Skip to content

Commit 852c046

Browse files
committed
feat(cubox): add cubox protocol launcher support
1 parent 8f93bdf commit 852c046

File tree

27 files changed

+778
-36
lines changed

27 files changed

+778
-36
lines changed

.changeset/little-eagles-dress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'protocol-launcher': minor
3+
---
4+
5+
feat(cubox): add cubox protocol launcher support

apps/docs/.vitepress/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default defineConfig({
3939
'en/apps/code-runner.md': 'apps/code-runner.md',
4040
'en/apps/codex.md': 'apps/codex.md',
4141
'en/apps/craft.md': 'apps/craft.md',
42+
'en/apps/cubox.md': 'apps/cubox.md',
4243
'en/apps/cursor.md': 'apps/cursor.md',
4344
'en/apps/2do.md': 'apps/2do.md',
4445
'en/apps/day-one.md': 'apps/day-one.md',
@@ -185,6 +186,7 @@ export default defineConfig({
185186
{ text: 'CodeRunner', link: '/apps/code-runner' },
186187
{ text: 'Codex', link: '/apps/codex' },
187188
{ text: 'Craft', link: '/apps/craft' },
189+
{ text: 'Cubox', link: '/apps/cubox' },
188190
{ text: 'Cursor', link: '/apps/cursor' },
189191
{ text: '2Do', link: '/apps/2do' },
190192
{ text: 'Day One', link: '/apps/day-one' },
@@ -337,6 +339,7 @@ export default defineConfig({
337339
{ text: 'CodeRunner', link: '/apps/code-runner' },
338340
{ text: 'Codex', link: '/apps/codex' },
339341
{ text: 'Craft', link: '/apps/craft' },
342+
{ text: 'Cubox', link: '/apps/cubox' },
340343
{ text: 'Cursor', link: '/apps/cursor' },
341344
{ text: '2Do', link: '/apps/2do' },
342345
{ text: 'Day One', link: '/apps/day-one' },
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export const addLinkParams = {
2+
url: 'https://example.com/article',
3+
}
4+
5+
export const addMemoParams = {
6+
memo: 'Remember to buy groceries',
7+
}
8+
9+
export const openFolderParams = {
10+
name: 'Reading List',
11+
}
12+
13+
export const openSmartFolderParams = {
14+
name: 'Recent Articles',
15+
}
16+
17+
export const openTagParams = {
18+
name: 'important',
19+
}
20+
21+
export const searchParams = {
22+
query: 'typescript',
23+
type: 'card' as const,
24+
}

apps/docs/en/apps/cubox.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
layout: doc
3+
---
4+
5+
<script setup lang="ts">
6+
import { ref, computed } from 'vue';
7+
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue';
8+
import { open, addLink, addMemo, openFolder, openInbox, openSmartFolder, openStarred, openTag, search } from 'protocol-launcher/cubox';
9+
import { SelectInstallationMethod } from '../../.vitepress/components';
10+
import {
11+
addLinkParams,
12+
addMemoParams,
13+
openFolderParams,
14+
openSmartFolderParams,
15+
openTagParams,
16+
searchParams,
17+
} from '../../.vitepress/constants/cubox';
18+
19+
const currentMethod = ref('On-Demand');
20+
const importPath = computed(() => currentMethod.value === 'On-Demand' ? 'protocol-launcher/cubox' : 'protocol-launcher');
21+
</script>
22+
23+
# Cubox
24+
25+
[Cubox](https://www.cubox.pro/) is a next-generation AI-powered read-it-later assistant that helps you save, organize, and truly understand what you read. **Protocol Launcher** allows you to generate deep links to add content and navigate within Cubox.
26+
27+
## Usage
28+
29+
There are two ways to use this library:
30+
31+
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
32+
- Full Import from the root package is convenient but includes all app modules.
33+
34+
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
35+
36+
<SelectInstallationMethod v-model="currentMethod" />
37+
38+
### Open App
39+
40+
```ts-vue [{{currentMethod}}]
41+
import { {{ currentMethod === 'On-Demand' ? 'open' : 'cubox' }} } from '{{ importPath }}'
42+
43+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}open()
44+
```
45+
46+
<div class="flex justify-center">
47+
<VPLink :href="open()" target="_self">
48+
Open Cubox
49+
</VPLink>
50+
</div>
51+
52+
### Add Link
53+
54+
```ts-vue [{{currentMethod}}]
55+
import { {{ currentMethod === 'On-Demand' ? 'addLink' : 'cubox' }} } from '{{ importPath }}'
56+
57+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}addLink({
58+
url: 'https://example.com/article',
59+
})
60+
```
61+
62+
<div class="flex justify-center">
63+
<VPLink :href="addLink(addLinkParams)" target="_self">
64+
Add Link to Cubox
65+
</VPLink>
66+
</div>
67+
68+
### Add Memo
69+
70+
```ts-vue [{{currentMethod}}]
71+
import { {{ currentMethod === 'On-Demand' ? 'addMemo' : 'cubox' }} } from '{{ importPath }}'
72+
73+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}addMemo({
74+
memo: 'Remember to buy groceries',
75+
})
76+
```
77+
78+
<div class="flex justify-center">
79+
<VPLink :href="addMemo(addMemoParams)" target="_self">
80+
Add Memo to Cubox
81+
</VPLink>
82+
</div>
83+
84+
### Open Folder
85+
86+
```ts-vue [{{currentMethod}}]
87+
import { {{ currentMethod === 'On-Demand' ? 'openFolder' : 'cubox' }} } from '{{ importPath }}'
88+
89+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}openFolder({
90+
name: 'Reading List',
91+
})
92+
```
93+
94+
<div class="flex justify-center">
95+
<VPLink :href="openFolder(openFolderParams)" target="_self">
96+
Open Folder in Cubox
97+
</VPLink>
98+
</div>
99+
100+
### Open Inbox
101+
102+
```ts-vue [{{currentMethod}}]
103+
import { {{ currentMethod === 'On-Demand' ? 'openInbox' : 'cubox' }} } from '{{ importPath }}'
104+
105+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}openInbox()
106+
```
107+
108+
<div class="flex justify-center">
109+
<VPLink :href="openInbox()" target="_self">
110+
Open Inbox in Cubox
111+
</VPLink>
112+
</div>
113+
114+
### Open Smart Folder
115+
116+
```ts-vue [{{currentMethod}}]
117+
import { {{ currentMethod === 'On-Demand' ? 'openSmartFolder' : 'cubox' }} } from '{{ importPath }}'
118+
119+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}openSmartFolder({
120+
name: 'Recent Articles',
121+
})
122+
```
123+
124+
<div class="flex justify-center">
125+
<VPLink :href="openSmartFolder(openSmartFolderParams)" target="_self">
126+
Open Smart Folder in Cubox
127+
</VPLink>
128+
</div>
129+
130+
### Open Starred
131+
132+
```ts-vue [{{currentMethod}}]
133+
import { {{ currentMethod === 'On-Demand' ? 'openStarred' : 'cubox' }} } from '{{ importPath }}'
134+
135+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}openStarred()
136+
```
137+
138+
<div class="flex justify-center">
139+
<VPLink :href="openStarred()" target="_self">
140+
Open Starred in Cubox
141+
</VPLink>
142+
</div>
143+
144+
### Open Tag
145+
146+
```ts-vue [{{currentMethod}}]
147+
import { {{ currentMethod === 'On-Demand' ? 'openTag' : 'cubox' }} } from '{{ importPath }}'
148+
149+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}openTag({
150+
name: 'important',
151+
})
152+
```
153+
154+
<div class="flex justify-center">
155+
<VPLink :href="openTag(openTagParams)" target="_self">
156+
Open Tag in Cubox
157+
</VPLink>
158+
</div>
159+
160+
### Search
161+
162+
```ts-vue [{{currentMethod}}]
163+
import { {{ currentMethod === 'On-Demand' ? 'search' : 'cubox' }} } from '{{ importPath }}'
164+
165+
const url = {{currentMethod === 'On-Demand' ? '' : 'cubox.'}}search({
166+
query: 'typescript',
167+
type: 'card',
168+
})
169+
```
170+
171+
<div class="flex justify-center">
172+
<VPLink :href="search(searchParams)" target="_self">
173+
Search in Cubox
174+
</VPLink>
175+
</div>

apps/docs/en/apps/tally.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ layout: doc
33
---
44

55
<script setup lang="ts">
6-
import { ref, computed } from 'vue'
7-
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue'
8-
import { open, increment, decrement, reset, get } from 'protocol-launcher/tally'
9-
import { SelectInstallationMethod } from '../../.vitepress/components'
10-
import { incrementParams, decrementParams, resetParams, getParams } from '../../.vitepress/constants/tally'
6+
import { ref, computed } from 'vue';
7+
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue';
8+
import { open, increment, decrement, reset, get } from 'protocol-launcher/tally';
9+
import { SelectInstallationMethod } from '../../.vitepress/components';
10+
import { incrementParams, decrementParams, resetParams, getParams } from '../../.vitepress/constants/tally';
1111

12-
const currentMethod = ref('On-Demand')
12+
const currentMethod = ref('On-Demand');
1313
const importPath = computed(() =>
1414
currentMethod.value === 'On-Demand' ? 'protocol-launcher/tally' : 'protocol-launcher',
15-
)
15+
);
1616
</script>
1717

1818
# Tally
@@ -40,7 +40,7 @@ const url = {{currentMethod === 'On-Demand' ? '' : 'tally.'}}open()
4040

4141
<div class="flex justify-center">
4242
<VPLink :href="open()" target="_self">
43-
<Button Text>
43+
Open Tally
4444
</VPLink>
4545
</div>
4646

apps/docs/en/apps/terminology.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ layout: doc
33
---
44

55
<script setup lang="ts">
6-
import { ref, computed } from 'vue'
7-
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue'
8-
import { open, lookup, search } from 'protocol-launcher/terminology'
9-
import { SelectInstallationMethod } from '../../.vitepress/components'
10-
import { lookupParams, searchParams } from '../../.vitepress/constants/terminology'
6+
import { ref, computed } from 'vue';
7+
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue';
8+
import { open, lookup, search } from 'protocol-launcher/terminology';
9+
import { SelectInstallationMethod } from '../../.vitepress/components';
10+
import { lookupParams, searchParams } from '../../.vitepress/constants/terminology';
1111

12-
const currentMethod = ref('On-Demand')
12+
const currentMethod = ref('On-Demand');
1313
const importPath = computed(() =>
1414
currentMethod.value === 'On-Demand' ? 'protocol-launcher/terminology' : 'protocol-launcher',
15-
)
15+
);
1616
</script>
1717

1818
# Terminology
@@ -30,7 +30,7 @@ Pick On-Demand for production builds; Full Import is fine for quick scripts or d
3030

3131
<SelectInstallationMethod v-model="currentMethod" />
3232

33-
### Open App
33+
### Open Terminology
3434

3535
```ts-vue [{{currentMethod}}]
3636
import { {{ currentMethod === 'On-Demand' ? 'open' : 'terminology' }} } from '{{ importPath }}'
@@ -40,7 +40,7 @@ const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}open()
4040

4141
<div class="flex justify-center">
4242
<VPLink :href="open()" target="_self">
43-
<Button Text>
43+
Open Terminology
4444
</VPLink>
4545
</div>
4646

@@ -58,7 +58,7 @@ const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}lookup({
5858

5959
<div class="flex justify-center">
6060
<VPLink :href="lookup(lookupParams)" target="_self">
61-
<Button Text>
61+
Open in Terminology
6262
</VPLink>
6363
</div>
6464

@@ -76,6 +76,6 @@ const url = {{currentMethod === 'On-Demand' ? '' : 'terminology.'}}search({
7676

7777
<div class="flex justify-center">
7878
<VPLink :href="search(searchParams)" target="_self">
79-
<Button Text>
79+
Open in Terminology
8080
</VPLink>
8181
</div>

apps/docs/en/guide/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ For detailed usage instructions for each application, please refer to their resp
144144
- [CodeRunner](../apps/code-runner.md)
145145
- [Codex](../apps/codex.md)
146146
- [Craft](../apps/craft.md)
147+
- [Cubox](../apps/cubox.md)
147148
- [Cursor](../apps/cursor.md)
148149
- [2Do](../apps/2do.md)
149150
- [Day One](../apps/day-one.md)

apps/docs/en/guide/what-is-it.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Currently, we support the following applications:
4242
- [CodeLite](../apps/codelite.md)
4343
- [Codex](../apps/codex.md)
4444
- [Craft](../apps/craft.md)
45+
- [Cubox](../apps/cubox.md)
4546
- [Cursor](../apps/cursor.md)
4647
- [2Do](../apps/2do.md)
4748
- [Day One](../apps/day-one.md)

0 commit comments

Comments
 (0)