Cubox
Cubox 是新一代 AI 稍后阅读助手,让您的收藏读得懂、记得住、用得上。Protocol Launcher 允许您生成深度链接以在 Cubox 中添加内容和导航。
使用方式
有两种使用此库的方式:
- 按需导入(On-Demand):从子路径导入支持 tree-shaking,保持较小的打包体积。
- 完整导入(Full Import):从根包导入更方便,但会包含所有应用模块。
生产构建建议选择按需导入;快速脚本或演示可以使用完整导入。
选择安装方式
按需加载
推荐使用。生产环境优化。
全量导入
使用便捷。适合快速脚本。
打开应用
ts
import { open } from 'protocol-launcher/cubox'
const url = open()添加链接
ts
import { addLink } from 'protocol-launcher/cubox'
const url = addLink({
url: 'https://example.com/article',
})添加备忘
ts
import { addMemo } from 'protocol-launcher/cubox'
const url = addMemo({
memo: 'Remember to buy groceries',
})打开文件夹
ts
import { openFolder } from 'protocol-launcher/cubox'
const url = openFolder({
name: 'Reading List',
})打开收件箱
ts
import { openInbox } from 'protocol-launcher/cubox'
const url = openInbox()打开智能文件夹
ts
import { openSmartFolder } from 'protocol-launcher/cubox'
const url = openSmartFolder({
name: 'Recent Articles',
})打开星标
ts
import { openStarred } from 'protocol-launcher/cubox'
const url = openStarred()打开标签
ts
import { openTag } from 'protocol-launcher/cubox'
const url = openTag({
name: 'important',
})搜索
ts
import { search } from 'protocol-launcher/cubox'
const url = search({
query: 'typescript',
type: 'card',
})