forked from cyanzhong/jsbox-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ying Zhong
committed
Jun 23, 2019
0 parents
commit 2678ac3
Showing
269 changed files
with
20,789 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# JSBox APIs | ||
|
||
> 通过 JavaScript 来为 JSBox 提供强大的扩展,支持 ES6 标准语法,并提供了丰富的 API 来与 Native 代码进行交互。 | ||
# 如何在 JSBox 里运行代码 | ||
|
||
- 在 JSBox 里面直接编写 | ||
|
||
> JSBox 内置了一个简单的 js 编辑器,目前只提供了基本的代码高亮和自动补全,随着之后的版本更新将会提供更好的编辑器。 | ||
- 通过 URL Scheme 在线安装 | ||
|
||
> 例如通过在 iOS 设备上点击:jsbox://import?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcyanzhong%2FxTeko%2Fmaster%2Fextension-scripts%2Fapi.js&name=%E6%B5%8B%E8%AF%95%E5%9C%A8%E7%BA%BF%E5%AE%89%E8%A3%85&icon=icon_063.png | ||
> 将会打开 JSBox 自动安装脚本,支持 `url`, `name`(可选), `icon`(可选) 3 个参数,均需要 URL Encode | ||
> icon 名称具体请参考:https://github.com/cyanzhong/xTeko/tree/master/extension-icons | ||
> 在线文件 URL 中请使用纯英文名 | ||
- 通过 VSCode 插件同步编辑 | ||
|
||
> 1. 打开 JSBox 中任意一个脚本,进入设置页面打开调试模式 | ||
> 2. 回到桌面后重新打开应用,打开设置 Tab 查看本机 HOST | ||
> 3. 在 VSCode 的扩展商店搜索安装 `JSBox` 插件 | ||
> 4. 在 VSCode 打开 JavaScript 文件,点击菜单中的 `Set Host` 选项填入步骤 2 的 HOST | ||
> 5. 至此,编辑保存 JavaScript 文件之后,将同步运行到 JSBox 应用 | ||
- 通过 AirDrop 传输脚本 | ||
|
||
> 你可以通过文件分享或 AirDrop 把脚本传输到 JSBox,但你需要手动同步被导入进来的脚本 | ||
> 可以通过类似这个样例的脚本进行同步:https://github.com/cyanzhong/xTeko/blob/master/extension-demos/sync-inbox.js | ||
- 发挥你的创造力,利用 JSBox 提供的接口获取脚本 | ||
|
||
> 例如这个例子:https://github.com/cyanzhong/xTeko/blob/master/extension-demos/addin-gallery.js | ||
# 开源项目 | ||
|
||
为了提供更多的样例代码,我们准备了一个开源项目:https://github.com/cyanzhong/xTeko | ||
|
||
欢迎一起完善这个项目,通过 [提交 Issue](https://github.com/cyanzhong/xTeko/issues/new) 或 [提交 PR](https://github.com/cyanzhong/xTeko/compare) 等贡献方式。 | ||
|
||
# 联系我们 | ||
|
||
对文档有任何疑问都可以通过以下方式联系我们: | ||
|
||
- Email: [[email protected]](mailto:[email protected]) | ||
- Weibo: [@StackOverflowError](https://weibo.com/0x00eeee) | ||
- Twitter: [@cyanapps](https://twitter.com/cyanapps) | ||
- Telegram: [PinTG](https://t.me/PinTG) | ||
|
||
*准备好了,[快速开始 >](quickstart/intro.md)* | ||
|
||
> 此文档目前处于测试阶段,之后可能会有变化,如有错误欢迎指正。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Translations | ||
- [:cn: 中文](/) | ||
- [:us: English](/en/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
- 快速开始 | ||
- [README](README.md) | ||
- [开始之前](quickstart/intro.md) | ||
- [简单样例](quickstart/sample.md) | ||
|
||
- 基础接口 | ||
- [前言](foundation/intro.md) | ||
- [设备](foundation/device.md) | ||
- [应用](foundation/app.md) | ||
- [系统](foundation/system.md) | ||
- [网络](foundation/network.md) | ||
- [缓存](foundation/cache.md) | ||
- [线程](foundation/thread.md) | ||
- [剪贴板](foundation/clipboard.md) | ||
- [本地化](foundation/l10n.md) | ||
|
||
- 内建函数 | ||
- [前言](function/intro.md) | ||
- [索引](function/index.md) | ||
|
||
- 数据类型 | ||
- [前言](data/intro.md) | ||
- [方法](data/method.md) | ||
- [对象](data/object.md) | ||
- [常量](data/constant.md) | ||
|
||
- 构建界面 | ||
- [前言](uikit/intro.md) | ||
- [渲染](uikit/render.md) | ||
- [视图](uikit/view.md) | ||
- [布局](uikit/layout.md) | ||
- [手势](uikit/gesture.md) | ||
- [事件处理](uikit/event.md) | ||
- [动画](uikit/animation.md) | ||
- [接口](uikit/method.md) | ||
|
||
- 控件列表 | ||
- [标签](component/label.md) | ||
- [按钮](component/button.md) | ||
- [输入](component/input.md) | ||
- [滑块](component/slider.md) | ||
- [开关](component/switch.md) | ||
- [指示器](component/spinner.md) | ||
- [进度条](component/progress.md) | ||
- [画廊](component/gallery.md) | ||
- [步进器](component/stepper.md) | ||
- [文本](component/text.md) | ||
- [图片](component/image.md) | ||
- [视频](component/video.md) | ||
- [滚动视图](component/scroll.md) | ||
- [菜单](component/menu.md) | ||
- [地图](component/map.md) | ||
- [网页](component/web.md) | ||
- [列表](component/list.md) | ||
- [网格](component/matrix.md) | ||
- [模糊效果](component/blur.md) | ||
- [渐变效果](component/gradient.md) | ||
- [日期选择器](component/date-picker.md) | ||
- [通用选择器](component/picker.md) | ||
- [画布](component/canvas.md) | ||
- [Markdown](component/markdown.md) | ||
- [Lottie](component/lottie.md) | ||
- [图表控件](component/chart.md) | ||
- [Runtime](component/runtime.md) | ||
|
||
- Today 小组件 | ||
- [前言](widget/intro.md) | ||
- [方法](widget/method.md) | ||
|
||
- Action Extension 扩展 | ||
- [前言](context/intro.md) | ||
- [方法列表](context/method.md) | ||
|
||
- 键盘扩展 | ||
- [方法列表](keyboard/method.md) | ||
- [隐私策略](keyboard/privacy.md) | ||
|
||
- 文件系统 | ||
- [设计思路](file/design.md) | ||
- [接口](file/method.md) | ||
- [iCloud Drive](file/drive.md) | ||
|
||
- SQLite | ||
- [前言](sqlite/intro.md) | ||
- [基本使用](sqlite/usage.md) | ||
- [事务](sqlite/transaction.md) | ||
- [Queue](sqlite/queue.md) | ||
|
||
- 脚本相关 | ||
- [方法列表](addin/method.md) | ||
- [样例](addin/sample.md) | ||
|
||
- 媒体 | ||
- [预览](media/quicklook.md) | ||
- [图片](media/photo.md) | ||
- [音频](media/audio.md) | ||
- [PDF](media/pdf.md) | ||
|
||
- 原生 SDK | ||
- [前言](sdk/intro.md) | ||
- [消息](sdk/message.md) | ||
- [日历](sdk/calendar.md) | ||
- [提醒事项](sdk/reminder.md) | ||
- [联系人](sdk/contact.md) | ||
- [地理位置](sdk/location.md) | ||
- [传感数据](sdk/motion.md) | ||
- [Safari](sdk/safari.md) | ||
|
||
- 网络相关 | ||
- [Socket](network/socket.md) | ||
- [Server](network/server.md) | ||
|
||
- 扩展接口 | ||
- [前言](extend/intro.md) | ||
- [文本](extend/text.md) | ||
- [编辑器插件](extend/editor.md) | ||
- [XML](extend/xml.md) | ||
- [分享](extend/share.md) | ||
- [二维码](extend/qrcode.md) | ||
- [浏览器](extend/browser.md) | ||
- [消息推送](extend/push.md) | ||
- [文件压缩](extend/archiver.md) | ||
- [数据检测](extend/detector.md) | ||
|
||
- 捷径(Shortcuts) | ||
- [前言](shortcuts/intro.md) | ||
- [语音](shortcuts/voice.md) | ||
- [Intents](shortcuts/intents.md) | ||
- [UI Intents](shortcuts/ui-intents.md) | ||
- [运行脚本](shortcuts/scripting.md) | ||
|
||
- SSH | ||
- [前言](ssh/intro.md) | ||
- [Channel](ssh/channel.md) | ||
- [SFTP](ssh/sftp.md) | ||
|
||
- 对象属性 | ||
- [data](object/data.md) | ||
- [image](object/image.md) | ||
- [color](object/color.md) | ||
- [indexPath](object/index-path.md) | ||
- [error](object/error.md) | ||
- [response](object/response.md) | ||
- [navigationAction](object/navigation-action.md) | ||
- [calendarItem](object/calendar-item.md) | ||
- [reminderItem](object/reminder-item.md) | ||
- [contact](object/contact.md) | ||
- [resultSet](object/result-set.md) | ||
- [server](object/server.md) | ||
|
||
- Promise | ||
- [前言](promise/intro.md) | ||
- [样例代码](promise/sample.md) | ||
- [接口列表](promise/index.md) | ||
|
||
- 安装包格式 | ||
- [前言](package/intro.md) | ||
- [模块化](package/module.md) | ||
- [文件路径](package/path.md) | ||
- [VSCode](package/vscode.md) | ||
- [安装说明](package/install.md) | ||
|
||
- Runtime | ||
- [前言](runtime/intro.md) | ||
- [动态调用](runtime/invoke.md) | ||
- [语法糖](runtime/sugar.md) | ||
- [动态创建](runtime/define.md) | ||
- [类型转换](runtime/types.md) | ||
- [Blocks](runtime/blocks.md) | ||
- [内存管理](runtime/memory.md) | ||
- [C 函数](runtime/c.md) | ||
|
||
- 调试工具 | ||
- [控制台](debug/console.md) | ||
|
||
- 关于 | ||
- [如何使用](about/guide.md) | ||
- [更新说明](about/changelog.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# 2018.12.23 | ||
|
||
- 增加编辑器插件相关:[详情](extend/editor.md) | ||
|
||
# 2018.11.09 | ||
|
||
- 增加 Apple Pencil 相关:[详情](uikit/view.md) | ||
|
||
# 2018.10.21 | ||
|
||
- 增加 XML 相关:[详情](extend/xml.md) | ||
|
||
# 2018.10.05 | ||
|
||
- 增加 Lottie View 相关:[详情](component/lottie.md) | ||
|
||
# 2018.08.26 | ||
|
||
- 添加 Web Socket 相关:[详情](network/socket.md) | ||
- 添加 Web Server 相关:[详情](network/server.md) | ||
|
||
# 2018.08.11 | ||
|
||
- 增加 SQLite 相关:[详情](sqlite/intro.md) | ||
|
||
# 2018.07.29 | ||
|
||
- 增加 Shortcuts 相关:[详情](shortcuts/intro.md) | ||
|
||
# 2018.07.22 | ||
|
||
- 增加内建函数索引:[详情](function/intro.md) | ||
|
||
# 2018.07.18 | ||
|
||
- $contact 增加分组相关操作:[详情](sdk/contact.md) | ||
|
||
# 2018.07.08 | ||
|
||
- Runtime 语法糖:[详情](runtime/sugar.md) | ||
|
||
# 2018.06.27 | ||
|
||
- matrix 增加长按排序:[详情](component/matrix.md) | ||
- matrix 增加 itemSize 方法:[详情](component/matrix.md) | ||
- matrix 和 list 增加 forEachItem 方法:[详情](component/matrix.md) | ||
|
||
# 2018.06.17 | ||
|
||
- $audio.play 增加 events: [详情](media/audio.md) | ||
|
||
# 2018.06.14 | ||
|
||
- 增加 $widget 接口文档:[详情](widget/method.md) | ||
|
||
# 2018.06.08 | ||
|
||
- 增加对 Lua 虚拟机的文档:[详情](vm/lua.md) | ||
|
||
# 2018.05.15 | ||
|
||
- 完善 Runtime 相关文档:[详情](runtime/blocks.md) | ||
- 增加 C 函数相关文档:[详情](runtime/c.md) | ||
|
||
# 2018.04.18 | ||
|
||
- 添加 Promise 相关文档:[详情](promise/intro.md) | ||
|
||
# 2018.04.07 | ||
|
||
- 添加 SSH 相关接口:[详情](ssh/intro.md) | ||
|
||
# 2018.04.06 | ||
|
||
- 添加 markdown 相关接口:[详情](extend/text.md) | ||
|
||
# 2018.04.01 | ||
|
||
- 添加 view debugging 文档:[详情](uikit/render.md) | ||
|
||
# 2018.03.25 | ||
|
||
- 添加 ifa_data 相关文档:[详情](foundation/network.md) | ||
- 添加 ping 相关文档:[详情](foundation/network.md) | ||
|
||
# 2018.03.18 | ||
|
||
- 添加关于键盘的文档:[详情](keyboard/method.md) | ||
|
||
# 2018.03.11 | ||
|
||
- 添加 $location.select 接口 | ||
|
||
# 2018.03.09 | ||
|
||
- 为 $push 接口添加新内容:[详情](extend/push.md) | ||
- 添加 $http.startServer 相关内容:[详情](foundation/network.md) | ||
- $text.speech 新增语言 | ||
|
||
# 2018.02.28 | ||
|
||
- 新增安装包格式:[详情](package/intro.md) | ||
|
||
# 2017.07.15 | ||
|
||
- 初始版本 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Tab 1 | ||
|
||
- 点击右上角按钮新建脚本 | ||
- 滑动删除某个脚本 | ||
- 长按对脚本进行排序 | ||
- 点击脚本进行编辑 | ||
- 点击播放按钮执行脚本 | ||
|
||
# Tab 2 | ||
|
||
- 在这里列举了各种 JavaScript 资源 | ||
- 和 JSBox 有关的内容在第二行,这是最重要的文档 | ||
|
||
# Tab 3 | ||
|
||
- 你可以将最常用的脚本固定在这个 Tab | ||
- 你可以通过桌面 3D Touch 快速打开这个脚本 | ||
|
||
# Tab 4 | ||
|
||
- 在这里罗列了应用内的各种设置 | ||
- 你也可以在这里找到联系我们的方式 | ||
- 也非常诚恳希望能得到你在 App Store 的评分 | ||
|
||
# 其他启动方案 | ||
|
||
- JSBox 提供了 Today Widget | ||
- JSBox 也提供了 Action Extension | ||
|
||
# 脚本编辑器使用 | ||
|
||
- 滑动工具栏可移动关闭 | ||
- 长按符号可展示相关符号 | ||
- 点击操作按钮和符号按钮可以打开相应的键盘 | ||
- 点击回车按钮可以收起键盘 |
Oops, something went wrong.