@kitschpatrol/tldraw-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/bin/cli.js +105 -0
  2. package/dist/assets/index-38ua_y9K.js +315 -0
  3. package/dist/assets/index-Go1mR3Ch.css +1 -0
  4. package/dist/embed-icons/codepen.png +0 -0
  5. package/dist/embed-icons/codesandbox.png +0 -0
  6. package/dist/embed-icons/excalidraw.png +0 -0
  7. package/dist/embed-icons/felt.png +0 -0
  8. package/dist/embed-icons/figma.png +0 -0
  9. package/dist/embed-icons/github_gist.png +0 -0
  10. package/dist/embed-icons/google_calendar.png +0 -0
  11. package/dist/embed-icons/google_maps.png +0 -0
  12. package/dist/embed-icons/google_slides.png +0 -0
  13. package/dist/embed-icons/observable.png +0 -0
  14. package/dist/embed-icons/replit.png +0 -0
  15. package/dist/embed-icons/scratch.png +0 -0
  16. package/dist/embed-icons/spotify.png +0 -0
  17. package/dist/embed-icons/tldraw.png +0 -0
  18. package/dist/embed-icons/val_town.png +0 -0
  19. package/dist/embed-icons/vimeo.png +0 -0
  20. package/dist/embed-icons/youtube.png +0 -0
  21. package/dist/fonts/IBMPlexMono-Medium.woff2 +0 -0
  22. package/dist/fonts/IBMPlexSans-Medium.woff2 +0 -0
  23. package/dist/fonts/IBMPlexSerif-Medium.woff2 +0 -0
  24. package/dist/fonts/Shantell_Sans-Tldrawish.woff2 +0 -0
  25. package/dist/icons/icon/align-bottom-center.svg +1 -0
  26. package/dist/icons/icon/align-bottom-left.svg +1 -0
  27. package/dist/icons/icon/align-bottom-right.svg +1 -0
  28. package/dist/icons/icon/align-bottom.svg +1 -0
  29. package/dist/icons/icon/align-center-center.svg +1 -0
  30. package/dist/icons/icon/align-center-horizontal.svg +1 -0
  31. package/dist/icons/icon/align-center-left.svg +1 -0
  32. package/dist/icons/icon/align-center-right.svg +1 -0
  33. package/dist/icons/icon/align-center-vertical.svg +1 -0
  34. package/dist/icons/icon/align-left.svg +1 -0
  35. package/dist/icons/icon/align-right.svg +1 -0
  36. package/dist/icons/icon/align-top-center.svg +1 -0
  37. package/dist/icons/icon/align-top-left.svg +1 -0
  38. package/dist/icons/icon/align-top-right.svg +1 -0
  39. package/dist/icons/icon/align-top.svg +1 -0
  40. package/dist/icons/icon/arrow-left.svg +1 -0
  41. package/dist/icons/icon/arrowhead-arrow.svg +1 -0
  42. package/dist/icons/icon/arrowhead-bar.svg +1 -0
  43. package/dist/icons/icon/arrowhead-diamond.svg +1 -0
  44. package/dist/icons/icon/arrowhead-dot.svg +1 -0
  45. package/dist/icons/icon/arrowhead-none.svg +1 -0
  46. package/dist/icons/icon/arrowhead-square.svg +1 -0
  47. package/dist/icons/icon/arrowhead-triangle-inverted.svg +1 -0
  48. package/dist/icons/icon/arrowhead-triangle.svg +1 -0
  49. package/dist/icons/icon/aspect-ratio.svg +1 -0
  50. package/dist/icons/icon/avatar.svg +1 -0
  51. package/dist/icons/icon/blob.svg +1 -0
  52. package/dist/icons/icon/bring-forward.svg +1 -0
  53. package/dist/icons/icon/bring-to-front.svg +1 -0
  54. package/dist/icons/icon/check.svg +1 -0
  55. package/dist/icons/icon/checkbox-checked.svg +1 -0
  56. package/dist/icons/icon/checkbox-empty.svg +1 -0
  57. package/dist/icons/icon/chevron-down.svg +1 -0
  58. package/dist/icons/icon/chevron-left.svg +1 -0
  59. package/dist/icons/icon/chevron-right.svg +1 -0
  60. package/dist/icons/icon/chevron-up.svg +1 -0
  61. package/dist/icons/icon/chevrons-ne.svg +1 -0
  62. package/dist/icons/icon/chevrons-sw.svg +1 -0
  63. package/dist/icons/icon/clipboard-copied.svg +1 -0
  64. package/dist/icons/icon/clipboard-copy.svg +1 -0
  65. package/dist/icons/icon/code.svg +1 -0
  66. package/dist/icons/icon/collab.svg +1 -0
  67. package/dist/icons/icon/color.svg +1 -0
  68. package/dist/icons/icon/comment.svg +1 -0
  69. package/dist/icons/icon/cross-2.svg +1 -0
  70. package/dist/icons/icon/cross.svg +1 -0
  71. package/dist/icons/icon/dash-dashed.svg +1 -0
  72. package/dist/icons/icon/dash-dotted.svg +1 -0
  73. package/dist/icons/icon/dash-draw.svg +1 -0
  74. package/dist/icons/icon/dash-solid.svg +1 -0
  75. package/dist/icons/icon/discord.svg +1 -0
  76. package/dist/icons/icon/distribute-horizontal.svg +1 -0
  77. package/dist/icons/icon/distribute-vertical.svg +1 -0
  78. package/dist/icons/icon/dot.svg +1 -0
  79. package/dist/icons/icon/dots-horizontal.svg +1 -0
  80. package/dist/icons/icon/dots-vertical.svg +1 -0
  81. package/dist/icons/icon/drag-handle-dots.svg +1 -0
  82. package/dist/icons/icon/duplicate.svg +1 -0
  83. package/dist/icons/icon/edit.svg +1 -0
  84. package/dist/icons/icon/external-link.svg +1 -0
  85. package/dist/icons/icon/file.svg +1 -0
  86. package/dist/icons/icon/fill-none.svg +1 -0
  87. package/dist/icons/icon/fill-pattern.svg +1 -0
  88. package/dist/icons/icon/fill-semi.svg +1 -0
  89. package/dist/icons/icon/fill-solid.svg +1 -0
  90. package/dist/icons/icon/follow.svg +1 -0
  91. package/dist/icons/icon/following.svg +1 -0
  92. package/dist/icons/icon/font-draw.svg +1 -0
  93. package/dist/icons/icon/font-mono.svg +1 -0
  94. package/dist/icons/icon/font-sans.svg +1 -0
  95. package/dist/icons/icon/font-serif.svg +1 -0
  96. package/dist/icons/icon/geo-arrow-down.svg +1 -0
  97. package/dist/icons/icon/geo-arrow-left.svg +1 -0
  98. package/dist/icons/icon/geo-arrow-right.svg +1 -0
  99. package/dist/icons/icon/geo-arrow-up.svg +1 -0
  100. package/dist/icons/icon/geo-check-box.svg +1 -0
  101. package/dist/icons/icon/geo-cloud.svg +1 -0
  102. package/dist/icons/icon/geo-diamond.svg +1 -0
  103. package/dist/icons/icon/geo-ellipse.svg +1 -0
  104. package/dist/icons/icon/geo-hexagon.svg +1 -0
  105. package/dist/icons/icon/geo-octagon.svg +1 -0
  106. package/dist/icons/icon/geo-oval.svg +1 -0
  107. package/dist/icons/icon/geo-pentagon.svg +1 -0
  108. package/dist/icons/icon/geo-rectangle.svg +1 -0
  109. package/dist/icons/icon/geo-rhombus-2.svg +1 -0
  110. package/dist/icons/icon/geo-rhombus.svg +1 -0
  111. package/dist/icons/icon/geo-star.svg +1 -0
  112. package/dist/icons/icon/geo-trapezoid.svg +1 -0
  113. package/dist/icons/icon/geo-triangle.svg +1 -0
  114. package/dist/icons/icon/geo-x-box.svg +1 -0
  115. package/dist/icons/icon/github.svg +1 -0
  116. package/dist/icons/icon/group.svg +1 -0
  117. package/dist/icons/icon/hidden.svg +1 -0
  118. package/dist/icons/icon/icon-names.json +166 -0
  119. package/dist/icons/icon/image.svg +1 -0
  120. package/dist/icons/icon/info-circle.svg +1 -0
  121. package/dist/icons/icon/leading.svg +1 -0
  122. package/dist/icons/icon/link.svg +1 -0
  123. package/dist/icons/icon/lock-small.svg +1 -0
  124. package/dist/icons/icon/lock.svg +1 -0
  125. package/dist/icons/icon/menu.svg +1 -0
  126. package/dist/icons/icon/minus.svg +1 -0
  127. package/dist/icons/icon/mixed.svg +1 -0
  128. package/dist/icons/icon/pack.svg +1 -0
  129. package/dist/icons/icon/page.svg +1 -0
  130. package/dist/icons/icon/plus.svg +1 -0
  131. package/dist/icons/icon/question-mark-circle.svg +1 -0
  132. package/dist/icons/icon/question-mark.svg +1 -0
  133. package/dist/icons/icon/redo.svg +1 -0
  134. package/dist/icons/icon/reset-zoom.svg +1 -0
  135. package/dist/icons/icon/rotate-ccw.svg +1 -0
  136. package/dist/icons/icon/rotate-cw.svg +1 -0
  137. package/dist/icons/icon/ruler.svg +1 -0
  138. package/dist/icons/icon/search.svg +1 -0
  139. package/dist/icons/icon/send-backward.svg +1 -0
  140. package/dist/icons/icon/send-to-back.svg +1 -0
  141. package/dist/icons/icon/settings-horizontal.svg +1 -0
  142. package/dist/icons/icon/settings-vertical-1.svg +1 -0
  143. package/dist/icons/icon/settings-vertical.svg +1 -0
  144. package/dist/icons/icon/share-1.svg +1 -0
  145. package/dist/icons/icon/share-2.svg +1 -0
  146. package/dist/icons/icon/size-extra-large.svg +1 -0
  147. package/dist/icons/icon/size-large.svg +1 -0
  148. package/dist/icons/icon/size-medium.svg +1 -0
  149. package/dist/icons/icon/size-small.svg +1 -0
  150. package/dist/icons/icon/spline-cubic.svg +1 -0
  151. package/dist/icons/icon/spline-line.svg +1 -0
  152. package/dist/icons/icon/stack-horizontal.svg +1 -0
  153. package/dist/icons/icon/stack-vertical.svg +1 -0
  154. package/dist/icons/icon/status-offline.svg +1 -0
  155. package/dist/icons/icon/status-online.svg +1 -0
  156. package/dist/icons/icon/stretch-horizontal.svg +1 -0
  157. package/dist/icons/icon/stretch-vertical.svg +1 -0
  158. package/dist/icons/icon/text-align-center.svg +1 -0
  159. package/dist/icons/icon/text-align-justify.svg +1 -0
  160. package/dist/icons/icon/text-align-left.svg +1 -0
  161. package/dist/icons/icon/text-align-right.svg +1 -0
  162. package/dist/icons/icon/tool-arrow.svg +1 -0
  163. package/dist/icons/icon/tool-embed.svg +1 -0
  164. package/dist/icons/icon/tool-eraser.svg +1 -0
  165. package/dist/icons/icon/tool-frame.svg +1 -0
  166. package/dist/icons/icon/tool-hand.svg +1 -0
  167. package/dist/icons/icon/tool-highlight.svg +1 -0
  168. package/dist/icons/icon/tool-laser.svg +1 -0
  169. package/dist/icons/icon/tool-line.svg +1 -0
  170. package/dist/icons/icon/tool-media.svg +1 -0
  171. package/dist/icons/icon/tool-note.svg +1 -0
  172. package/dist/icons/icon/tool-pencil.svg +1 -0
  173. package/dist/icons/icon/tool-pointer.svg +1 -0
  174. package/dist/icons/icon/tool-text.svg +1 -0
  175. package/dist/icons/icon/trash.svg +1 -0
  176. package/dist/icons/icon/triangle-down.svg +1 -0
  177. package/dist/icons/icon/triangle-up.svg +1 -0
  178. package/dist/icons/icon/twitter.svg +1 -0
  179. package/dist/icons/icon/undo.svg +1 -0
  180. package/dist/icons/icon/ungroup.svg +1 -0
  181. package/dist/icons/icon/unlock-small.svg +1 -0
  182. package/dist/icons/icon/unlock.svg +1 -0
  183. package/dist/icons/icon/vertical-align-center.svg +1 -0
  184. package/dist/icons/icon/vertical-align-end.svg +1 -0
  185. package/dist/icons/icon/vertical-align-start.svg +1 -0
  186. package/dist/icons/icon/visible.svg +1 -0
  187. package/dist/icons/icon/warning-triangle.svg +1 -0
  188. package/dist/icons/icon/zoom-in.svg +1 -0
  189. package/dist/icons/icon/zoom-out.svg +1 -0
  190. package/dist/index.html +13 -0
  191. package/dist/translations/ar.json +295 -0
  192. package/dist/translations/ca.json +295 -0
  193. package/dist/translations/cs.json +352 -0
  194. package/dist/translations/da.json +160 -0
  195. package/dist/translations/de.json +310 -0
  196. package/dist/translations/en.json +1 -0
  197. package/dist/translations/es.json +299 -0
  198. package/dist/translations/fa.json +343 -0
  199. package/dist/translations/fi.json +312 -0
  200. package/dist/translations/fr.json +295 -0
  201. package/dist/translations/gl.json +349 -0
  202. package/dist/translations/he.json +86 -0
  203. package/dist/translations/hi-in.json +290 -0
  204. package/dist/translations/hu.json +5 -0
  205. package/dist/translations/it.json +330 -0
  206. package/dist/translations/ja.json +351 -0
  207. package/dist/translations/ko-kr.json +355 -0
  208. package/dist/translations/ku.json +93 -0
  209. package/dist/translations/languages.json +138 -0
  210. package/dist/translations/main.json +355 -0
  211. package/dist/translations/my.json +112 -0
  212. package/dist/translations/ne.json +295 -0
  213. package/dist/translations/no.json +62 -0
  214. package/dist/translations/pl.json +113 -0
  215. package/dist/translations/pt-br.json +333 -0
  216. package/dist/translations/pt-pt.json +86 -0
  217. package/dist/translations/ro.json +351 -0
  218. package/dist/translations/ru.json +347 -0
  219. package/dist/translations/sv.json +96 -0
  220. package/dist/translations/te.json +112 -0
  221. package/dist/translations/th.json +295 -0
  222. package/dist/translations/tr.json +294 -0
  223. package/dist/translations/uk.json +347 -0
  224. package/dist/translations/vi.json +295 -0
  225. package/dist/translations/zh-cn.json +353 -0
  226. package/dist/translations/zh-tw.json +316 -0
  227. package/license.txt +21 -0
  228. package/package.json +83 -0
  229. package/readme.md +105 -0
@@ -0,0 +1,316 @@
1
+ {
2
+ "action.convert-to-bookmark": "轉換為書籤",
3
+ "action.convert-to-embed": "轉換為嵌入",
4
+ "action.open-embed-link": "開啟連結",
5
+ "action.align-bottom": "置底",
6
+ "action.align-center-horizontal": "水平置中",
7
+ "action.align-center-vertical": "垂直置中",
8
+ "action.align-center-horizontal.short": "水平置中",
9
+ "action.align-center-vertical.short": "垂直置中",
10
+ "action.align-left": "置左",
11
+ "action.align-right": "置右",
12
+ "action.align-top": "置頂",
13
+ "action.back-to-content": "回到內容",
14
+ "action.bring-forward": "前移一層",
15
+ "action.bring-to-front": "移至頂層",
16
+ "action.copy-as-json.short": "JSON",
17
+ "action.copy-as-json": "複製為 JSON",
18
+ "action.copy-as-png.short": "PNG",
19
+ "action.copy-as-png": "複製為 PNG",
20
+ "action.copy-as-svg.short": "SVG",
21
+ "action.copy-as-svg": "複製為 SVG",
22
+ "action.copy": "複製",
23
+ "action.cut": "剪下",
24
+ "action.delete": "刪除",
25
+ "action.distribute-horizontal": "水平分布",
26
+ "action.distribute-vertical": "垂直分布",
27
+ "action.distribute-horizontal.short": "水平分布",
28
+ "action.distribute-vertical.short": "垂直分布",
29
+ "action.duplicate": "複製",
30
+ "action.edit-link": "編輯連結",
31
+ "action.exit-pen-mode": "退出畫筆模式",
32
+ "action.export-as-json.short": "JSON",
33
+ "action.export-as-json": "匯出成 JSON",
34
+ "action.export-as-png.short": "PNG",
35
+ "action.export-as-png": "匯出成 PNG",
36
+ "action.export-as-svg.short": "SVG",
37
+ "action.export-as-svg": "匯出成 SVG",
38
+ "action.flip-horizontal": "水平翻轉",
39
+ "action.flip-vertical": "垂直翻轉",
40
+ "action.flip-horizontal.short": "水平翻轉",
41
+ "action.flip-vertical.short": "垂直翻轉",
42
+ "action.group": "群組",
43
+ "action.insert-media": "上傳媒體檔",
44
+ "action.new-shared-project": "新建共享專案",
45
+ "action.open-file": "開啟檔案",
46
+ "action.pack": "打包",
47
+ "action.paste": "貼上",
48
+ "action.print": "列印",
49
+ "action.redo": "取消復原",
50
+ "action.rotate-ccw": "逆時針旋轉",
51
+ "action.rotate-cw": "順時針旋轉",
52
+ "action.save-copy": "存為副本",
53
+ "action.select-all": "全選",
54
+ "action.select-none": "取消選取",
55
+ "action.send-backward": "後移一層",
56
+ "action.send-to-back": "移至底層",
57
+ "action.share-project": "共享此專案",
58
+ "action.stack-horizontal": "水平堆疊",
59
+ "action.stack-vertical": "垂直堆疊",
60
+ "action.stack-horizontal.short": "水平堆疊",
61
+ "action.stack-vertical.short": "垂直堆疊",
62
+ "action.stretch-horizontal": "水平延展",
63
+ "action.stretch-vertical": "垂直延展",
64
+ "action.stretch-horizontal.short": "水平延展",
65
+ "action.stretch-vertical.short": "垂直延展",
66
+ "action.toggle-auto-size": "切換自動大小",
67
+ "action.toggle-dark-mode.menu": "深色模式",
68
+ "action.toggle-dark-mode": "切換深色模式",
69
+ "action.toggle-debug-mode.menu": "除錯模式",
70
+ "action.toggle-debug-mode": "切換除錯模式",
71
+ "action.toggle-focus-mode.menu": "專注模式",
72
+ "action.toggle-focus-mode": "切換專注模式",
73
+ "action.toggle-grid.menu": "顯示網格",
74
+ "action.toggle-grid": "切換網格",
75
+ "action.toggle-snap-mode.menu": "始終貼齊",
76
+ "action.toggle-snap-mode": "切換始終貼齊",
77
+ "action.toggle-tool-lock.menu": "工具鎖定",
78
+ "action.toggle-tool-lock": "切換工具鎖定",
79
+ "action.toggle-transparent.context-menu": "透明",
80
+ "action.toggle-transparent.menu": "透明",
81
+ "action.toggle-transparent": "切換透明背景",
82
+ "action.undo": "復原",
83
+ "action.ungroup": "取消群組",
84
+ "action.zoom-in": "放大",
85
+ "action.zoom-out": "縮小",
86
+ "action.zoom-to-100": "縮放至 100%",
87
+ "action.zoom-to-fit": "縮放至適當大小",
88
+ "action.zoom-to-selection": "縮放至選取範圍",
89
+ "color-style.black": "黑色",
90
+ "color-style.blue": "藍色",
91
+ "color-style.green": "綠色",
92
+ "color-style.grey": "灰色",
93
+ "color-style.light-blue": "淺藍色",
94
+ "color-style.light-green": "淺綠色",
95
+ "color-style.light-red": "淺紅色",
96
+ "color-style.light-violet": "淺紫色",
97
+ "color-style.orange": "橘色",
98
+ "color-style.red": "紅色",
99
+ "color-style.violet": "紫色",
100
+ "color-style.yellow": "黃色",
101
+ "fill-style.none": "無",
102
+ "fill-style.semi": "半填滿",
103
+ "fill-style.solid": "填滿",
104
+ "fill-style.pattern": "圖案",
105
+ "dash-style.dashed": "虛線",
106
+ "dash-style.dotted": "虛點",
107
+ "dash-style.draw": "手繪",
108
+ "dash-style.solid": "實線",
109
+ "size-style.s": "小",
110
+ "size-style.m": "中",
111
+ "size-style.l": "大",
112
+ "size-style.xl": "特大",
113
+ "opacity-style.0.1": "10%",
114
+ "opacity-style.0.25": "25%",
115
+ "opacity-style.0.5": "50%",
116
+ "opacity-style.0.75": "75%",
117
+ "opacity-style.1": "100%",
118
+ "font-style.draw": "手繪",
119
+ "font-style.sans": "無襯線",
120
+ "font-style.serif": "襯線",
121
+ "font-style.mono": "等寬",
122
+ "align-style.start": "前端",
123
+ "align-style.middle": "置中",
124
+ "align-style.end": "末端",
125
+ "align-style.justify": "兩端",
126
+ "geo-style.arrow-down": "向下箭頭",
127
+ "geo-style.arrow-left": "向左箭頭",
128
+ "geo-style.arrow-right": "向右箭頭",
129
+ "geo-style.arrow-up": "向上箭頭",
130
+ "geo-style.diamond": "菱形 2",
131
+ "geo-style.ellipse": "橢圓形",
132
+ "geo-style.hexagon": "六邊形",
133
+ "geo-style.octagon": "八邊形",
134
+ "geo-style.oval": "卵形",
135
+ "geo-style.pentagon": "五邊形",
136
+ "geo-style.rectangle": "矩形",
137
+ "geo-style.rhombus-2": "菱形 2",
138
+ "geo-style.rhombus": "菱形",
139
+ "geo-style.star": "星形",
140
+ "geo-style.trapezoid": "梯形",
141
+ "geo-style.triangle": "三角形",
142
+ "geo-style.x-box": "X 框",
143
+ "arrowheadStart-style.none": "無",
144
+ "arrowheadStart-style.arrow": "箭頭",
145
+ "arrowheadStart-style.bar": "條狀",
146
+ "arrowheadStart-style.diamond": "菱形",
147
+ "arrowheadStart-style.dot": "點",
148
+ "arrowheadStart-style.inverted": "反轉",
149
+ "arrowheadStart-style.pipe": "管狀",
150
+ "arrowheadStart-style.square": "正方形",
151
+ "arrowheadStart-style.triangle": "三角形",
152
+ "arrowheadEnd-style.none": "無",
153
+ "arrowheadEnd-style.arrow": "箭頭",
154
+ "arrowheadEnd-style.bar": "條狀",
155
+ "arrowheadEnd-style.diamond": "菱形",
156
+ "arrowheadEnd-style.dot": "點",
157
+ "arrowheadEnd-style.inverted": "反轉",
158
+ "arrowheadEnd-style.pipe": "管狀",
159
+ "arrowheadEnd-style.square": "正方形",
160
+ "arrowheadEnd-style.triangle": "三角形",
161
+ "spline-style.line": "直線",
162
+ "spline-style.cubic": "立方體",
163
+ "tool.select": "選取",
164
+ "tool.hand": "抓取",
165
+ "tool.draw": "手繪",
166
+ "tool.eraser": "橡皮擦",
167
+ "tool.arrow-down": "向下箭頭",
168
+ "tool.arrow-left": "向左箭頭",
169
+ "tool.arrow-right": "向右箭頭",
170
+ "tool.arrow-up": "向上箭頭",
171
+ "tool.arrow": "箭頭",
172
+ "tool.diamond": "菱形 2",
173
+ "tool.ellipse": "橢圓形",
174
+ "tool.hexagon": "六邊形",
175
+ "tool.line": "直線",
176
+ "tool.octagon": "八邊形",
177
+ "tool.oval": "卵形",
178
+ "tool.pentagon": "五邊形",
179
+ "tool.rectangle": "矩形",
180
+ "tool.rhombus": "菱形",
181
+ "tool.star": "星形",
182
+ "tool.trapezoid": "梯形",
183
+ "tool.triangle": "三角形",
184
+ "tool.x-box": "X 框",
185
+ "tool.asset": "資源",
186
+ "tool.frame": "框架",
187
+ "tool.note": "便利貼",
188
+ "tool.embed": "嵌入",
189
+ "tool.text": "文字",
190
+ "menu.title": "選單",
191
+ "menu.copy-as": "複製成",
192
+ "menu.edit": "編輯",
193
+ "menu.export-as": "匯出成",
194
+ "menu.file": "檔案",
195
+ "menu.language": "語言",
196
+ "menu.preferences": "選項",
197
+ "menu.view": "檢視",
198
+ "context-menu.arrange": "佈局",
199
+ "context-menu.copy-as": "複製成",
200
+ "context-menu.export-as": "匯出成",
201
+ "context-menu.move-to-page": "移至頁面",
202
+ "context-menu.reorder": "重新排序",
203
+ "page-menu.title": "頁面",
204
+ "page-menu.create-new-page": "建立新頁面",
205
+ "page-menu.max-page-count-reached": "達到上限頁數",
206
+ "page-menu.new-page-initial-name": "頁面 1",
207
+ "page-menu.edit-start": "編輯",
208
+ "page-menu.edit-done": "完成",
209
+ "page-menu.submenu.rename": "重新命名",
210
+ "page-menu.submenu.duplicate-page": "複製",
211
+ "page-menu.submenu.title": "選單",
212
+ "page-menu.submenu.move-down": "下移",
213
+ "page-menu.submenu.move-up": "上移",
214
+ "page-menu.submenu.delete": "刪除",
215
+ "share-menu.title": "共享",
216
+ "share-menu.share-project": "共享此專案",
217
+ "share-menu.copy-link": "複製連結",
218
+ "share-menu.readonly-link": "唯讀",
219
+ "share-menu.copy-readonly-link": "複製唯讀連結",
220
+ "share-menu.offline-note": "共享此專案將建立即時副本,並產生新網址。您可以分享網址,與其他至多三十人一起檢視和編輯副本。",
221
+ "share-menu.copy-link-note": "任何人透過連結都能檢視和編輯此專案。",
222
+ "share-menu.copy-readonly-link-note": "任何人透過連結都能檢視(但不能編輯)此專案。",
223
+ "share-menu.project-too-large": "抱歉,無法共享此專案,因為檔案過大。我們已在調整這件事!",
224
+ "people-menu.title": "人員",
225
+ "people-menu.change-name": "更改名稱",
226
+ "people-menu.change-color": "更改顏色",
227
+ "people-menu.user": "(您)",
228
+ "people-menu.invite": "邀請其他人",
229
+ "help-menu.title": "幫助和資源",
230
+ "help-menu.about": "關於",
231
+ "help-menu.discord": "Discord",
232
+ "help-menu.github": "GitHub",
233
+ "help-menu.keyboard-shortcuts": "鍵盤快捷鍵",
234
+ "help-menu.twitter": "Twitter",
235
+ "actions-menu.title": "操作",
236
+ "edit-link-dialog.title": "編輯連結",
237
+ "edit-link-dialog.invalid-url": "連結必須是有效網址。",
238
+ "edit-link-dialog.detail": "連結將在新分頁開啟。",
239
+ "edit-link-dialog.url": "網址",
240
+ "edit-link-dialog.clear": "清除",
241
+ "edit-link-dialog.save": "繼續",
242
+ "edit-link-dialog.cancel": "取消",
243
+ "embed-dialog.title": "建立嵌入",
244
+ "embed-dialog.back": "返回",
245
+ "embed-dialog.create": "建立",
246
+ "embed-dialog.cancel": "取消",
247
+ "embed-dialog.url": "網址",
248
+ "embed-dialog.instruction": "貼上網站連結以建立嵌入。",
249
+ "embed-dialog.invalid-url": "我們沒辦法從該網址建立嵌入。",
250
+ "edit-pages-dialog.move-down": "下移",
251
+ "edit-pages-dialog.move-up": "上移",
252
+ "shortcuts-dialog.title": "鍵盤快捷鍵",
253
+ "shortcuts-dialog.edit": "編輯",
254
+ "shortcuts-dialog.file": "檔案",
255
+ "shortcuts-dialog.preferences": "選項",
256
+ "shortcuts-dialog.tools": "工具",
257
+ "shortcuts-dialog.transform": "轉換",
258
+ "shortcuts-dialog.view": "檢視",
259
+ "style-panel.title": "樣式",
260
+ "style-panel.align": "對齊",
261
+ "style-panel.arrowheads": "箭頭",
262
+ "style-panel.color": "顏色",
263
+ "style-panel.dash": "虛線",
264
+ "style-panel.fill": "填充",
265
+ "style-panel.font": "字型",
266
+ "style-panel.geo": "形狀",
267
+ "style-panel.mixed": "混合",
268
+ "style-panel.opacity": "不透明度",
269
+ "style-panel.size": "大小",
270
+ "style-panel.spline": "曲線",
271
+ "tool-panel.drawing": "繪圖",
272
+ "tool-panel.shapes": "形狀",
273
+ "navigation-zone.toggle-minimap": "切換小地圖",
274
+ "navigation-zone.zoom": "縮放",
275
+ "focus-mode.toggle-focus-mode": "切換專注模式",
276
+ "toast.close": "關閉",
277
+ "file-system.file-open-error.title": "無法開啟檔案",
278
+ "file-system.file-open-error.not-a-tldraw-file": "您嘗試開啟的檔案不像 tldraw 檔。",
279
+ "file-system.file-open-error.file-format-version-too-new": "你嘗試開啟的檔案來自新版 tldraw。請重新載入頁面,然後再試一次。",
280
+ "file-system.file-open-error.generic-corrupted-file": "您嘗試開啟的檔案已損毀。",
281
+ "file-system.confirm-open.title": "覆蓋當前檔案?",
282
+ "file-system.confirm-open.description": "開啟檔案將置換您的當前專案,任何未儲存的更動都會消失。您確定要繼續嗎?",
283
+ "file-system.confirm-open.cancel": "取消",
284
+ "file-system.confirm-open.open": "開啟檔案",
285
+ "file-system.confirm-open.dont-show-again": "不再詢問",
286
+ "toast.error.export-fail.title": "匯出失敗",
287
+ "toast.error.export-fail.desc": "圖片匯出失敗",
288
+ "toast.error.copy-fail.title": "複製失敗",
289
+ "toast.error.copy-fail.desc": "圖片複製失敗",
290
+ "file-system.shared-document-file-open-error.title": "無法開啟檔案",
291
+ "file-system.shared-document-file-open-error.description": "不支援從共享專案開啟檔案。",
292
+ "vscode.file-open.dont-show-again": "不再詢問",
293
+ "vscode.file-open.desc": "此檔案由較早版本的 tldraw 所建立。您想要更新它以用於新版本上嗎?",
294
+ "context.pages.new-page": "新頁面",
295
+ "style-panel.arrowhead-start": "前端",
296
+ "style-panel.arrowhead-end": "末端",
297
+ "vscode.file-open.open": "繼續",
298
+ "vscode.file-open.backup": "備份",
299
+ "vscode.file-open.backup-saved": "已備份",
300
+ "vscode.file-open.backup-failed": "備份失敗:這不是 .tldr 檔。",
301
+ "tool-panel.more": "更多",
302
+ "debug-panel.more": "更多",
303
+ "action.new-project": "新建專案",
304
+ "file-system.confirm-clear.title": "清除當前專案?",
305
+ "file-system.confirm-clear.description": "建立新專案將清除當前專案,任何未儲存的更動都會消失。您確定要繼續嗎?",
306
+ "file-system.confirm-clear.cancel": "取消",
307
+ "file-system.confirm-clear.continue": "繼續",
308
+ "file-system.confirm-clear.dont-show-again": "不再詢問",
309
+ "action.stop-following": "取消追蹤",
310
+ "people-menu.follow": "追蹤",
311
+ "style-panel.position": "位置",
312
+ "page-menu.go-to-page": "轉到頁面",
313
+ "share-menu.create-snapshot-link": "建立快照連結",
314
+ "share-menu.save-note": "將此專案作為 .tldr 檔下載到您的電腦。",
315
+ "share-menu.fork-note": "基於此快照建立新的共享專案。"
316
+ }
package/license.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Eric Mika
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@kitschpatrol/tldraw-cli",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "A tiny little CLI tool for converting tldraw .tldr files into svg or png images.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/kitschpatrol/tldraw-cli.git"
9
+ },
10
+ "homepage": "https://github.com/kitschpatrol/tldraw-cli",
11
+ "bugs": {
12
+ "url": "https://github.com/kitschpatrol/tldraw-cli/issues",
13
+ "email": "eric@ericmika.com"
14
+ },
15
+ "author": {
16
+ "name": "Eric Mika",
17
+ "email": "eric@ericmika.com",
18
+ "url": "https://ericmika.com"
19
+ },
20
+ "license": "MIT",
21
+ "engines": {
22
+ "node": ">=18.0.0",
23
+ "pnpm": ">=8.0.0"
24
+ },
25
+ "bin": {
26
+ "tldraw-cli": "bin/cli.js"
27
+ },
28
+ "files": [
29
+ "bin/*",
30
+ "dist/*"
31
+ ],
32
+ "keywords": [
33
+ "tldraw",
34
+ "tldr",
35
+ "cli",
36
+ "diagram",
37
+ "drawing",
38
+ "sketch",
39
+ "export"
40
+ ],
41
+ "dependencies": {
42
+ "express": "^4.18.2",
43
+ "puppeteer": "^21.7.0"
44
+ },
45
+ "devDependencies": {
46
+ "@kitschpatrol/shared-config": "^4.3.3",
47
+ "@tldraw/assets": "2.0.0-beta.2",
48
+ "@tldraw/editor": "2.0.0-beta.2",
49
+ "@tldraw/tldraw": "2.0.0-beta.2",
50
+ "@types/express": "^4.17.21",
51
+ "@types/react": "^18.2.47",
52
+ "@types/react-dom": "^18.2.18",
53
+ "@types/yargs": "^17.0.32",
54
+ "@vitejs/plugin-react-swc": "^3.5.0",
55
+ "bumpp": "^9.2.1",
56
+ "esbuild": "^0.19.11",
57
+ "eslint-plugin-react-hooks": "^4.6.0",
58
+ "eslint-plugin-react-refresh": "^0.4.5",
59
+ "get-port": "^7.0.0",
60
+ "react": "^18.2.0",
61
+ "react-dom": "^18.2.0",
62
+ "tsx": "^4.7.0",
63
+ "typescript": "^5.3.3",
64
+ "untildify": "^5.0.0",
65
+ "vite": "^5.0.11",
66
+ "yargs": "^17.7.2"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "scripts": {
72
+ "build": "pnpm run build:tldraw && pnpm run build:cli",
73
+ "build:cli": "tsx ./scripts/build-cli.ts",
74
+ "build:tldraw": "pnpm run tldraw-copy-assets && vite build",
75
+ "dev": "pnpm run tldraw-copy-assets && vite",
76
+ "dev-cli": "pnpm run build:tldraw && tsx ./src/cli/tldraw-cli.ts ./test-assets/box.tldr --verbose",
77
+ "fix": "shared-config --fix",
78
+ "lint": "shared-config --lint",
79
+ "preview": "vite preview",
80
+ "release": "pnpm build && pnpm bumpp --commit 'Release: %s' && pnpm publish --otp $(op read 'op://Personal/Npmjs/one-time password?attribute=otp')",
81
+ "tldraw-copy-assets": "sync -av --include='/*/' --exclude='/*' ./node_modules/@tldraw/assets/ ./src/tldraw/public/"
82
+ }
83
+ }
package/readme.md ADDED
@@ -0,0 +1,105 @@
1
+ # @kitschpatrol/tldraw-cli
2
+
3
+ [![NPM Package](https://img.shields.io/npm/v/@kitschpatrol/tldraw-cli.svg)](https://npmjs.com/package/@kitschpatrol/tldraw-cli)
4
+
5
+ ## Overview
6
+
7
+ **A minimal CLI app to automate conversion and export of [tldraw](https://tldraw.dev) `.tldr` files into svg or png image formats.**
8
+
9
+ This could be useful in the context of a content publishing pipeline where you want to use a `.tldr` file (perhaps under version control) as the "source of truth" for assets to be embedded elsewhere, and you don't want to manage the export of that diagram manually.
10
+
11
+ _Note: This tool is not a part of the official tldraw project, and it is currently only tested and compatible with tldraw 2.0.0-beta.2._
12
+
13
+ ## Installation
14
+
15
+ Invoke directly:
16
+
17
+ ```sh
18
+ npx @kitschpatrol/tldraw-cli some-file.tldr
19
+ ```
20
+
21
+ ...or install locally:
22
+
23
+ ```sh
24
+ npm --install --save-dev @kitschpatrol/tldraw-cli
25
+ ```
26
+
27
+ ...or install globally:
28
+
29
+ ```sh
30
+ npm --install --global @kitschpatrol/tldraw-cli
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ### Invocation
36
+
37
+ ```sh
38
+ tldraw-cli file {options}
39
+ ```
40
+
41
+ ### Option flags
42
+
43
+ | Option | Description | Default |
44
+ | ----------------- | ------------------------------------------- | ------- |
45
+ | `-f`, `--format` | Output image format , one of "png" or "svg" | `svg` |
46
+ | `-o`, `--output` | Output image directory | `./` |
47
+ | `-h`, `--help` | Show help | |
48
+ | `-v`, `--version` | Show version number | |
49
+ | `--verbose` | Enable verbose output | `false` |
50
+
51
+ ## Examples
52
+
53
+ ### Basic conversion
54
+
55
+ To convert the file `your-drawing.tldr` to an svg named `your-drawing.svg` saved in the current working directory, run the following command. Note that the default output format is svg, and the default export location is the current working directory.
56
+
57
+ ```sh
58
+ npx @kitschpatrol/tldraw-cli your-drawing.tldr
59
+ ```
60
+
61
+ ### Export to a specific format
62
+
63
+ ```sh
64
+ npx @kitschpatrol/tldraw-cli your-drawing.tldr --format png
65
+ ```
66
+
67
+ ### Export to a specific destination
68
+
69
+ ```sh
70
+ npx @kitschpatrol/tldraw-cli your-drawing.tldr --output ~/Desktop
71
+ ```
72
+
73
+ ## Background
74
+
75
+ The potential utility of a tldraw CLI app has received mention a few times.
76
+
77
+ On GitHub:
78
+
79
+ - [\[Feature\]: CLI export application #1491](https://github.com/tldraw/tldraw/issues/1491)
80
+ - [AWS Lambda-based approach](https://gist.github.com/steveruizok/c30fc99b9b3d95a14c82c59bdcc69201)
81
+
82
+ On Discord:
83
+
84
+ - [@jorisjh in #ideas_old](https://discord.com/channels/859816885297741824/859816885801713730/1156880056501665802)
85
+ - [@Nitsuj in #ideas_old](https://discord.com/channels/859816885297741824/859816885801713730/1020352607920869406)
86
+
87
+ ## Implementation notes
88
+
89
+ Due to the current implementation of tldraw, export depends on functionality provided by a web browser. So, behind the scenes, this app serves a local instance of tldraw, then loads a `.tldr` and invokes the export download via [Puppeteer](https://pptr.dev).
90
+
91
+ The local instance of tldraw includes its assets dependencies, so the tool should work correctly without internet access.
92
+
93
+ ## The future
94
+
95
+ This is a very minimal implementation. Current plans for future improvements include the following:
96
+
97
+ - Add automated tests
98
+ - Implement the ability to export frames or pages as separate image files
99
+ - Add an option flag to set dpi when exporting to a bitmap format
100
+
101
+ Any other suggestions are welcome.
102
+
103
+ Eventually, I think it would make sense for some kind of CLI tool like this one to be part of the core tldraw project. (Similar to how [tldraw-vscode](https://github.com/tldraw/tldraw/tree/main/apps/vscode) is currently integrated.)
104
+
105
+ I'm consciously releasing this tool under the `@kitschpatrol` namespace on NPM to leave the `tldraw-cli` package name available to the core tldraw project.