@1agh/maude 0.28.0 → 0.29.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 (361) hide show
  1. package/README.md +2 -2
  2. package/{plugins/design/dev-server → apps/studio}/ai-banner.tsx +1 -1
  3. package/{plugins/design/dev-server → apps/studio}/annotations-context-toolbar.tsx +286 -6
  4. package/{plugins/design/dev-server → apps/studio}/annotations-layer.tsx +1209 -122
  5. package/{plugins/design/dev-server → apps/studio}/api.ts +486 -32
  6. package/{plugins/design/dev-server → apps/studio}/artboard-activity-overlay.tsx +1 -1
  7. package/{plugins/design/dev-server → apps/studio}/artboard-marquee.tsx +1 -1
  8. package/apps/studio/bin/_motion-sample-playwright.mjs +129 -0
  9. package/{plugins/design/dev-server → apps/studio}/bin/canvas-edit.sh +1 -1
  10. package/{plugins/design/dev-server → apps/studio}/bin/draw-proof.sh +37 -2
  11. package/{plugins/design/dev-server → apps/studio}/bin/preflight.sh +1 -1
  12. package/apps/studio/bin/read-annotations.mjs +438 -0
  13. package/apps/studio/bin/read-annotations.sh +11 -0
  14. package/{plugins/design/dev-server → apps/studio}/bin/runtime-health.sh +1 -1
  15. package/{plugins/design/dev-server → apps/studio}/bin/scenario-report.mjs +1 -1
  16. package/{plugins/design/dev-server → apps/studio}/bin/screenshot.sh +62 -2
  17. package/apps/studio/bin/server-up.sh +234 -0
  18. package/apps/studio/bin/to-lottie-verify.html +68 -0
  19. package/apps/studio/bin/to-lottie.sh +128 -0
  20. package/{plugins/design/dev-server → apps/studio}/bin/visual-sanity.sh +19 -3
  21. package/{plugins/design/dev-server → apps/studio}/build.ts +5 -3
  22. package/{plugins/design/dev-server → apps/studio}/canvas-arrowheads.ts +1 -1
  23. package/{plugins/design/dev-server → apps/studio}/canvas-comment-mount.tsx +2 -2
  24. package/apps/studio/canvas-create.ts +104 -0
  25. package/{plugins/design/dev-server → apps/studio}/canvas-cursors.ts +47 -13
  26. package/{plugins/design/dev-server → apps/studio}/canvas-icons.tsx +60 -1
  27. package/{plugins/design/dev-server → apps/studio}/canvas-lib-inline.ts +1 -1
  28. package/{plugins/design/dev-server → apps/studio}/canvas-lib-resolver.ts +1 -1
  29. package/{plugins/design/dev-server → apps/studio}/canvas-lib.tsx +41 -33
  30. package/{plugins/design/dev-server → apps/studio}/canvas-shell.tsx +57 -42
  31. package/{plugins/design/dev-server → apps/studio}/client/app.jsx +1713 -530
  32. package/apps/studio/client/canvas-url.js +81 -0
  33. package/{plugins/design/dev-server → apps/studio}/client/comments-overlay.css +41 -27
  34. package/{plugins/design/dev-server → apps/studio}/client/index.html +2 -1
  35. package/apps/studio/client/styles/1-tokens-maude.css +296 -0
  36. package/apps/studio/client/styles/3-shell-maude.css +459 -0
  37. package/{plugins/design/dev-server → apps/studio}/client/styles/3-shell.css +129 -0
  38. package/apps/studio/client/styles/4-components-maude.css +74 -0
  39. package/{plugins/design/dev-server → apps/studio}/client/styles/4-components.css +357 -34
  40. package/apps/studio/client/styles/5-maude-overrides.css +123 -0
  41. package/{plugins/design/dev-server → apps/studio}/client/styles/_index.css +9 -0
  42. package/{plugins/design/dev-server → apps/studio}/client/styles.css +1 -1
  43. package/apps/studio/client/tour/overlay.jsx +191 -0
  44. package/apps/studio/client/tour/usage-tour.js +35 -0
  45. package/apps/studio/client/whats-new-seen.js +52 -0
  46. package/apps/studio/client/whats-new.jsx +250 -0
  47. package/{plugins/design/dev-server → apps/studio}/collab/index.ts +4 -4
  48. package/{plugins/design/dev-server → apps/studio}/collab/persistence.ts +1 -1
  49. package/{plugins/design/dev-server → apps/studio}/commands/annotation-strokes-command.ts +1 -1
  50. package/{plugins/design/dev-server → apps/studio}/commands/equal-spacing-command.ts +1 -1
  51. package/{plugins/design/dev-server → apps/studio}/commands/move-artboards-command.ts +1 -1
  52. package/{plugins/design/dev-server → apps/studio}/comments-overlay.tsx +25 -6
  53. package/{plugins/design/dev-server → apps/studio}/context-menu.tsx +2 -2
  54. package/{plugins/design/dev-server → apps/studio}/contextual-toolbar.tsx +4 -7
  55. package/{plugins/design/dev-server → apps/studio}/cursors-overlay.tsx +1 -1
  56. package/apps/studio/dist/client.bundle.js +22825 -0
  57. package/apps/studio/dist/comment-mount.js +1960 -0
  58. package/apps/studio/dist/runtime/lib0_decoding.js +1 -0
  59. package/apps/studio/dist/runtime/lib0_encoding.js +1 -0
  60. package/apps/studio/dist/runtime/motion.js +4 -0
  61. package/apps/studio/dist/runtime/motion_react.js +12 -0
  62. package/apps/studio/dist/runtime/pixi-js.js +3397 -0
  63. package/apps/studio/dist/runtime/react-dom.js +1 -0
  64. package/apps/studio/dist/runtime/react-dom_client.js +9 -0
  65. package/apps/studio/dist/runtime/react.js +1 -0
  66. package/apps/studio/dist/runtime/react_jsx-dev-runtime.js +1 -0
  67. package/apps/studio/dist/runtime/react_jsx-runtime.js +1 -0
  68. package/apps/studio/dist/runtime/y-protocols_awareness.js +1 -0
  69. package/apps/studio/dist/runtime/y-protocols_sync.js +1 -0
  70. package/apps/studio/dist/runtime/yjs.js +5 -0
  71. package/apps/studio/dist/styles.css +5695 -0
  72. package/{plugins/design/dev-server → apps/studio}/dom-selection.ts +75 -4
  73. package/apps/studio/draw/animate.ts +333 -0
  74. package/{plugins/design/dev-server → apps/studio}/draw/brush.ts +4 -4
  75. package/{plugins/design/dev-server → apps/studio}/draw/composition.ts +1 -1
  76. package/{plugins/design/dev-server → apps/studio}/draw/geometry.ts +1 -1
  77. package/{plugins/design/dev-server → apps/studio}/draw/index.ts +9 -6
  78. package/{plugins/design/dev-server → apps/studio}/draw/layout.ts +2 -2
  79. package/apps/studio/draw/morph.ts +204 -0
  80. package/{plugins/design/dev-server → apps/studio}/draw/optimize.ts +1 -1
  81. package/{plugins/design/dev-server → apps/studio}/draw/palette.ts +1 -1
  82. package/{plugins/design/dev-server → apps/studio}/draw/primitives.ts +1 -1
  83. package/apps/studio/draw/serialize-animate.ts +324 -0
  84. package/{plugins/design/dev-server → apps/studio}/draw/serialize.ts +9 -3
  85. package/apps/studio/draw/test/animate.test.ts +172 -0
  86. package/{plugins/design/dev-server → apps/studio}/draw/test/layout.test.ts +1 -1
  87. package/apps/studio/draw/test/morph.test.ts +107 -0
  88. package/apps/studio/draw/test/serialize-animate.test.ts +142 -0
  89. package/{plugins/design/dev-server → apps/studio}/draw/test/serialize.test.ts +1 -1
  90. package/{plugins/design/dev-server → apps/studio}/equal-spacing-detector.ts +1 -1
  91. package/{plugins/design/dev-server → apps/studio}/equal-spacing-handles.tsx +7 -29
  92. package/{plugins/design/dev-server → apps/studio}/examples/perf-100-artboards.tsx +1 -2
  93. package/{plugins/design/dev-server → apps/studio}/export-dialog.tsx +14 -2
  94. package/{plugins/design/dev-server → apps/studio}/exporters/index.ts +2 -2
  95. package/{plugins/design/dev-server → apps/studio}/http.ts +103 -2
  96. package/{plugins/design/dev-server → apps/studio}/input-router.tsx +8 -1
  97. package/{plugins/design/dev-server → apps/studio}/inspect.ts +20 -3
  98. package/{plugins/design/dev-server → apps/studio}/marquee-overlay.tsx +6 -3
  99. package/{plugins/design/dev-server → apps/studio}/participants-chrome.tsx +1 -1
  100. package/{plugins/design/dev-server → apps/studio}/paths.ts +15 -11
  101. package/{plugins/design/dev-server → apps/studio}/server.ts +19 -1
  102. package/{plugins/design/dev-server → apps/studio}/sync/index.ts +6 -6
  103. package/{plugins/design/dev-server → apps/studio}/sync/materialize.ts +2 -2
  104. package/{plugins/design/dev-server → apps/studio}/test/ai-activity.test.ts +1 -1
  105. package/{plugins/design/dev-server → apps/studio}/test/annotations-api.test.ts +1 -2
  106. package/{plugins/design/dev-server → apps/studio}/test/annotations-layer.test.ts +69 -6
  107. package/{plugins/design/dev-server → apps/studio}/test/annotations-roundtrip.test.ts +98 -1
  108. package/apps/studio/test/annotations-text-format.test.ts +396 -0
  109. package/apps/studio/test/asset-api.test.ts +149 -0
  110. package/{plugins/design/dev-server → apps/studio}/test/boot-self-heal.test.ts +1 -1
  111. package/apps/studio/test/canvas-create-api.test.ts +361 -0
  112. package/{plugins/design/dev-server → apps/studio}/test/canvas-cursors.test.ts +3 -1
  113. package/{plugins/design/dev-server → apps/studio}/test/canvas-edit.test.ts +1 -1
  114. package/{plugins/design/dev-server → apps/studio}/test/canvas-hmr-runtime.test.tsx +1 -1
  115. package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-inline.test.ts +1 -1
  116. package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-resolver.test.ts +2 -3
  117. package/apps/studio/test/canvas-media-drop.test.ts +158 -0
  118. package/{plugins/design/dev-server → apps/studio}/test/canvas-meta-api.test.ts +1 -2
  119. package/{plugins/design/dev-server → apps/studio}/test/canvas-origin-gate.test.ts +18 -3
  120. package/apps/studio/test/canvas-url.test.ts +99 -0
  121. package/{plugins/design/dev-server → apps/studio}/test/collab-annotations-bridge.test.ts +1 -1
  122. package/{plugins/design/dev-server → apps/studio}/test/collab-bridge.test.ts +1 -1
  123. package/{plugins/design/dev-server → apps/studio}/test/collab-room.test.ts +1 -1
  124. package/{plugins/design/dev-server → apps/studio}/test/collab-stress.test.ts +1 -1
  125. package/{plugins/design/dev-server → apps/studio}/test/comments-api.test.ts +1 -2
  126. package/{plugins/design/dev-server → apps/studio}/test/compile-entry.test.ts +1 -2
  127. package/{plugins/design/dev-server → apps/studio}/test/exporters/canva.test.ts +1 -2
  128. package/{plugins/design/dev-server → apps/studio}/test/exporters/history.test.ts +1 -2
  129. package/{plugins/design/dev-server → apps/studio}/test/exporters/pw-launch.test.ts +1 -1
  130. package/{plugins/design/dev-server → apps/studio}/test/exporters/scope.test.ts +1 -2
  131. package/{plugins/design/dev-server → apps/studio}/test/exporters/zip.test.ts +1 -2
  132. package/{plugins/design/dev-server → apps/studio}/test/git-lifecycle.test.ts +1 -2
  133. package/{plugins/design/dev-server → apps/studio}/test/handoff-static-frames.test.ts +1 -1
  134. package/{plugins/design/dev-server → apps/studio}/test/hmr-broadcast.test.ts +1 -1
  135. package/apps/studio/test/index-data-canvas-ds.test.ts +97 -0
  136. package/apps/studio/test/motion-sample.test.ts +35 -0
  137. package/{plugins/design/dev-server → apps/studio}/test/perf-harness.ts +1 -1
  138. package/{plugins/design/dev-server → apps/studio}/test/phase-3.6-smoke.test.ts +3 -1
  139. package/apps/studio/test/read-annotations.test.ts +409 -0
  140. package/{plugins/design/dev-server → apps/studio}/test/runtime-bundle.test.ts +1 -1
  141. package/{plugins/design/dev-server → apps/studio}/test/sanitize-annotation-svg.test.ts +108 -2
  142. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-convergence.test.ts +2 -2
  143. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-migrate.test.ts +2 -3
  144. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-projection.test.ts +1 -1
  145. package/{plugins/design/dev-server → apps/studio}/test/snap-distance-pill.test.ts +1 -1
  146. package/{plugins/design/dev-server → apps/studio}/test/sync-agent.test.ts +2 -3
  147. package/{plugins/design/dev-server → apps/studio}/test/sync-atomic-write.test.ts +2 -3
  148. package/{plugins/design/dev-server → apps/studio}/test/sync-connection-state.test.ts +1 -1
  149. package/{plugins/design/dev-server → apps/studio}/test/sync-echo-guard.test.ts +1 -1
  150. package/{plugins/design/dev-server → apps/studio}/test/sync-fs-mirror.test.ts +1 -2
  151. package/{plugins/design/dev-server → apps/studio}/test/sync-hardening.test.ts +4 -5
  152. package/{plugins/design/dev-server → apps/studio}/test/sync-hubs-config.test.ts +1 -2
  153. package/{plugins/design/dev-server → apps/studio}/test/sync-runtime.test.ts +3 -8
  154. package/{plugins/design/dev-server → apps/studio}/test/sync-status.test.ts +1 -1
  155. package/{plugins/design/dev-server → apps/studio}/test/sync-untrusted.test.ts +1 -2
  156. package/apps/studio/test/tour-overlay.test.tsx +56 -0
  157. package/{plugins/design/dev-server → apps/studio}/test/use-agent-presence.test.tsx +4 -1
  158. package/{plugins/design/dev-server → apps/studio}/test/use-annotation-resize.test.ts +43 -0
  159. package/{plugins/design/dev-server → apps/studio}/test/use-snap-guides.test.ts +1 -1
  160. package/{plugins/design/dev-server → apps/studio}/test/use-tool-mode.test.tsx +4 -1
  161. package/apps/studio/test/whats-new.test.ts +101 -0
  162. package/apps/studio/text-imports.d.ts +9 -0
  163. package/{plugins/design/dev-server → apps/studio}/tool-palette.tsx +4 -69
  164. package/{plugins/design/dev-server → apps/studio}/undo-hud.tsx +1 -1
  165. package/{plugins/design/dev-server → apps/studio}/undo-stack.ts +1 -1
  166. package/{plugins/design/dev-server → apps/studio}/use-agent-presence.tsx +2 -2
  167. package/{plugins/design/dev-server → apps/studio}/use-annotation-resize.tsx +41 -12
  168. package/{plugins/design/dev-server → apps/studio}/use-annotation-selection.tsx +3 -7
  169. package/{plugins/design/dev-server → apps/studio}/use-annotations-visibility.tsx +2 -2
  170. package/{plugins/design/dev-server → apps/studio}/use-artboard-drag.tsx +2 -2
  171. package/{plugins/design/dev-server → apps/studio}/use-canvas-activity.tsx +2 -2
  172. package/apps/studio/use-canvas-media-drop.tsx +343 -0
  173. package/{plugins/design/dev-server → apps/studio}/use-collab.tsx +4 -5
  174. package/{plugins/design/dev-server → apps/studio}/use-cursor-modifiers.tsx +1 -1
  175. package/{plugins/design/dev-server → apps/studio}/use-keyboard-discipline.tsx +5 -2
  176. package/{plugins/design/dev-server → apps/studio}/use-selection-set.tsx +10 -2
  177. package/{plugins/design/dev-server → apps/studio}/use-snap-guides.tsx +1 -1
  178. package/{plugins/design/dev-server → apps/studio}/use-tool-mode.tsx +4 -2
  179. package/{plugins/design/dev-server → apps/studio}/use-undo-stack.tsx +5 -6
  180. package/apps/studio/whats-new.json +139 -0
  181. package/apps/studio/whats-new.schema.json +70 -0
  182. package/apps/studio/whats-new.ts +87 -0
  183. package/cli/bin/maude.mjs +10 -0
  184. package/cli/commands/design.mjs +84 -10
  185. package/cli/commands/design.test.mjs +133 -1
  186. package/cli/commands/help.mjs +8 -2
  187. package/cli/commands/hub.mjs +3 -3
  188. package/cli/commands/hub.test.mjs +1 -1
  189. package/cli/commands/scenario-report.mjs +2 -9
  190. package/cli/lib/cache.mjs +1 -1
  191. package/cli/lib/config-lint.mjs +1 -1
  192. package/cli/lib/copy-tree.mjs +1 -1
  193. package/cli/lib/design-link.mjs +1 -1
  194. package/cli/lib/flow-design-integration.test.mjs +2 -2
  195. package/cli/lib/gitignore-block.mjs +1 -0
  196. package/cli/lib/gitignore-block.test.mjs +2 -2
  197. package/cli/lib/plugin-cli-reachability.test.mjs +8 -7
  198. package/cli/lib/preflight.mjs +1 -1
  199. package/cli/lib/stack-detect.mjs +1 -1
  200. package/package.json +16 -16
  201. package/plugins/design/templates/_shell.html +3 -3
  202. package/plugins/design/templates/brief-board.tsx.template +61 -0
  203. package/plugins/design/templates/canvas.tsx.template +1 -1
  204. package/plugins/design/templates/design-system-inspiration/SUB-AGENT-PROMPTS.md +18 -3
  205. package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -1
  206. package/plugins/design/templates/design-system-inspiration/core/preview/_motion-readme.md.tpl +1 -1
  207. package/plugins/flow/.claude-plugin/config.schema.json +16 -0
  208. package/plugins/design/dev-server/bin/server-up.sh +0 -135
  209. package/plugins/design/dev-server/dist/client.bundle.js +0 -20692
  210. package/plugins/design/dev-server/dist/comment-mount.js +0 -1924
  211. package/plugins/design/dev-server/dist/runtime/lib0_decoding.js +0 -620
  212. package/plugins/design/dev-server/dist/runtime/lib0_encoding.js +0 -604
  213. package/plugins/design/dev-server/dist/runtime/motion.js +0 -4944
  214. package/plugins/design/dev-server/dist/runtime/motion_react.js +0 -10056
  215. package/plugins/design/dev-server/dist/runtime/pixi-js.js +0 -53104
  216. package/plugins/design/dev-server/dist/runtime/react-dom.js +0 -231
  217. package/plugins/design/dev-server/dist/runtime/react-dom_client.js +0 -10357
  218. package/plugins/design/dev-server/dist/runtime/react.js +0 -535
  219. package/plugins/design/dev-server/dist/runtime/react_jsx-dev-runtime.js +0 -60
  220. package/plugins/design/dev-server/dist/runtime/react_jsx-runtime.js +0 -85
  221. package/plugins/design/dev-server/dist/runtime/y-protocols_awareness.js +0 -376
  222. package/plugins/design/dev-server/dist/runtime/y-protocols_sync.js +0 -100
  223. package/plugins/design/dev-server/dist/runtime/yjs.js +0 -6687
  224. package/plugins/design/dev-server/dist/styles.css +0 -2710
  225. package/{plugins/design/dev-server → apps/studio}/activity.ts +0 -0
  226. package/{plugins/design/dev-server → apps/studio}/bin/_enumerate-artboards-playwright.mjs +0 -0
  227. package/{plugins/design/dev-server → apps/studio}/bin/_html-playwright.mjs +0 -0
  228. package/{plugins/design/dev-server → apps/studio}/bin/_pdf-playwright.mjs +0 -0
  229. package/{plugins/design/dev-server → apps/studio}/bin/_png-playwright.mjs +0 -0
  230. package/{plugins/design/dev-server → apps/studio}/bin/_pptx-playwright.mjs +0 -0
  231. package/{plugins/design/dev-server → apps/studio}/bin/_pw-launch.mjs +0 -0
  232. package/{plugins/design/dev-server → apps/studio}/bin/_screenshot-playwright.mjs +0 -0
  233. package/{plugins/design/dev-server → apps/studio}/bin/_svg-optimize.mjs +0 -0
  234. package/{plugins/design/dev-server → apps/studio}/bin/_svg-playwright.mjs +0 -0
  235. package/{plugins/design/dev-server → apps/studio}/bin/asset-sweep.sh +0 -0
  236. package/{plugins/design/dev-server → apps/studio}/bin/bootstrap-check.sh +0 -0
  237. package/{plugins/design/dev-server → apps/studio}/bin/check-runtime-bundles.sh +0 -0
  238. package/{plugins/design/dev-server → apps/studio}/bin/draw-build.sh +0 -0
  239. package/{plugins/design/dev-server → apps/studio}/bin/handoff.sh +0 -0
  240. package/{plugins/design/dev-server → apps/studio}/bin/prep.sh +0 -0
  241. package/{plugins/design/dev-server → apps/studio}/bin/slug.sh +0 -0
  242. package/{plugins/design/dev-server → apps/studio}/bin/smoke.sh +0 -0
  243. package/{plugins/design/dev-server → apps/studio}/bin/svg-optimize.sh +0 -0
  244. package/{plugins/design/dev-server → apps/studio}/boot-self-heal.ts +0 -0
  245. package/{plugins/design/dev-server → apps/studio}/canvas-build.ts +0 -0
  246. package/{plugins/design/dev-server → apps/studio}/canvas-edit.ts +0 -0
  247. package/{plugins/design/dev-server → apps/studio}/canvas-header.ts +0 -0
  248. package/{plugins/design/dev-server → apps/studio}/canvas-meta.schema.json +0 -0
  249. package/{plugins/design/dev-server → apps/studio}/canvas-pipeline.ts +0 -0
  250. package/{plugins/design/dev-server → apps/studio}/client/hmr.mjs +0 -0
  251. package/{plugins/design/dev-server → apps/studio}/client/iframe-lazy.mjs +0 -0
  252. package/{plugins/design/dev-server → apps/studio}/client/styles/0-reset.css +0 -0
  253. package/{plugins/design/dev-server → apps/studio}/client/styles/1-tokens.css +0 -0
  254. package/{plugins/design/dev-server → apps/studio}/client/styles/2-layout.css +0 -0
  255. package/{plugins/design/dev-server → apps/studio}/client/styles/5-utilities.css +0 -0
  256. package/{plugins/design/dev-server → apps/studio}/collab/ai-activity.ts +0 -0
  257. package/{plugins/design/dev-server → apps/studio}/collab/awareness-bridge.ts +1 -1
  258. package/{plugins/design/dev-server → apps/studio}/collab/git-lifecycle.ts +0 -0
  259. package/{plugins/design/dev-server → apps/studio}/collab/protocol.ts +0 -0
  260. package/{plugins/design/dev-server → apps/studio}/collab/registry.ts +0 -0
  261. package/{plugins/design/dev-server → apps/studio}/collab/room.ts +0 -0
  262. package/{plugins/design/dev-server → apps/studio}/config.schema.json +0 -0
  263. package/{plugins/design/dev-server → apps/studio}/context.ts +0 -0
  264. package/{plugins/design/dev-server → apps/studio}/dist/runtime/.min-sizes.json +0 -0
  265. package/{plugins/design/dev-server → apps/studio}/draw/test/brush.test.ts +0 -0
  266. package/{plugins/design/dev-server → apps/studio}/draw/test/composition.test.ts +0 -0
  267. package/{plugins/design/dev-server → apps/studio}/draw/test/geometry.test.ts +1 -1
  268. package/{plugins/design/dev-server → apps/studio}/draw/test/gradient.test.ts +0 -0
  269. package/{plugins/design/dev-server → apps/studio}/draw/test/optimize.test.ts +0 -0
  270. package/{plugins/design/dev-server → apps/studio}/draw/test/palette.test.ts +0 -0
  271. package/{plugins/design/dev-server → apps/studio}/draw/test/primitives.test.ts +1 -1
  272. package/{plugins/design/dev-server → apps/studio}/examples/README.md +0 -0
  273. package/{plugins/design/dev-server → apps/studio}/exporters/_browser-bundles.ts +0 -0
  274. package/{plugins/design/dev-server → apps/studio}/exporters/canva-handoff-prompt.ts +0 -0
  275. package/{plugins/design/dev-server → apps/studio}/exporters/canva.ts +0 -0
  276. package/{plugins/design/dev-server → apps/studio}/exporters/html.ts +1 -1
  277. package/{plugins/design/dev-server → apps/studio}/exporters/pdf.ts +1 -1
  278. package/{plugins/design/dev-server → apps/studio}/exporters/png.ts +1 -1
  279. package/{plugins/design/dev-server → apps/studio}/exporters/pptx.ts +1 -1
  280. package/{plugins/design/dev-server → apps/studio}/exporters/scope.ts +0 -0
  281. package/{plugins/design/dev-server → apps/studio}/exporters/svg.ts +1 -1
  282. package/{plugins/design/dev-server → apps/studio}/exporters/zip.ts +0 -0
  283. package/{plugins/design/dev-server → apps/studio}/fs-watch.ts +0 -0
  284. package/{plugins/design/dev-server → apps/studio}/handoff.ts +0 -0
  285. package/{plugins/design/dev-server → apps/studio}/history.ts +0 -0
  286. package/{plugins/design/dev-server → apps/studio}/hmr-broadcast.ts +0 -0
  287. package/{plugins/design/dev-server → apps/studio}/locator.ts +0 -0
  288. package/{plugins/design/dev-server → apps/studio}/mem.ts +0 -0
  289. package/{plugins/design/dev-server → apps/studio}/runtime-bundle.ts +0 -0
  290. package/{plugins/design/dev-server → apps/studio}/server.mjs +0 -0
  291. package/{plugins/design/dev-server → apps/studio}/sync/agent.ts +1 -1
  292. package/{plugins/design/dev-server → apps/studio}/sync/atomic-write.ts +0 -0
  293. package/{plugins/design/dev-server → apps/studio}/sync/codec.ts +0 -0
  294. package/{plugins/design/dev-server → apps/studio}/sync/connection-state.ts +0 -0
  295. package/{plugins/design/dev-server → apps/studio}/sync/echo-guard.ts +0 -0
  296. package/{plugins/design/dev-server → apps/studio}/sync/fs-mirror.ts +0 -0
  297. package/{plugins/design/dev-server → apps/studio}/sync/hubs-config.ts +0 -0
  298. package/{plugins/design/dev-server → apps/studio}/sync/migrate-seed.ts +1 -1
  299. package/{plugins/design/dev-server → apps/studio}/sync/origins.ts +0 -0
  300. package/{plugins/design/dev-server → apps/studio}/sync/projection.ts +3 -3
  301. package/{plugins/design/dev-server → apps/studio}/sync/status.ts +0 -0
  302. package/{plugins/design/dev-server → apps/studio}/sync/untrusted.ts +0 -0
  303. package/{plugins/design/dev-server → apps/studio}/test/_helpers.ts +0 -0
  304. package/{plugins/design/dev-server → apps/studio}/test/active-state.test.ts +0 -0
  305. package/{plugins/design/dev-server → apps/studio}/test/activity.test.ts +0 -0
  306. package/{plugins/design/dev-server → apps/studio}/test/annotation-strokes-command.test.ts +0 -0
  307. package/{plugins/design/dev-server → apps/studio}/test/annotations-draw-modifiers.test.ts +2 -2
  308. package/{plugins/design/dev-server → apps/studio}/test/artboard-activity-overlay.test.tsx +0 -0
  309. package/{plugins/design/dev-server → apps/studio}/test/binary-smoke.test.ts +0 -0
  310. package/{plugins/design/dev-server → apps/studio}/test/bundle-smoke.test.ts +0 -0
  311. package/{plugins/design/dev-server → apps/studio}/test/canvas-build.test.ts +0 -0
  312. package/{plugins/design/dev-server → apps/studio}/test/canvas-header.test.ts +1 -1
  313. package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-motion.test.ts +0 -0
  314. package/{plugins/design/dev-server → apps/studio}/test/canvas-pipeline.test.ts +0 -0
  315. package/{plugins/design/dev-server → apps/studio}/test/canvas-route.test.ts +0 -0
  316. package/{plugins/design/dev-server → apps/studio}/test/collab-awareness-bridge.test.ts +0 -0
  317. package/{plugins/design/dev-server → apps/studio}/test/collab-loopback.test.ts +0 -0
  318. package/{plugins/design/dev-server → apps/studio}/test/collab-protocol.test.ts +2 -2
  319. package/{plugins/design/dev-server → apps/studio}/test/collab-reseed-guard.test.ts +0 -0
  320. package/{plugins/design/dev-server → apps/studio}/test/comment-mount.test.ts +0 -0
  321. package/{plugins/design/dev-server → apps/studio}/test/context-resolve-tokens.test.ts +0 -0
  322. package/{plugins/design/dev-server → apps/studio}/test/csp-canvas-shell.test.ts +0 -0
  323. package/{plugins/design/dev-server → apps/studio}/test/equal-spacing-detector.test.ts +0 -0
  324. package/{plugins/design/dev-server → apps/studio}/test/exporters/endpoint.test.ts +0 -0
  325. package/{plugins/design/dev-server → apps/studio}/test/exporters/html.test.ts +0 -0
  326. package/{plugins/design/dev-server → apps/studio}/test/exporters/pdf.test.ts +0 -0
  327. package/{plugins/design/dev-server → apps/studio}/test/exporters/png.test.ts +0 -0
  328. package/{plugins/design/dev-server → apps/studio}/test/exporters/pptx-deck.test.ts +0 -0
  329. package/{plugins/design/dev-server → apps/studio}/test/exporters/pptx.test.ts +0 -0
  330. package/{plugins/design/dev-server → apps/studio}/test/exporters/svg.test.ts +0 -0
  331. package/{plugins/design/dev-server → apps/studio}/test/fixtures/phase-20-annotations.svg +0 -0
  332. package/{plugins/design/dev-server → apps/studio}/test/fixtures/phase-21-annotations.svg +0 -0
  333. package/{plugins/design/dev-server → apps/studio}/test/fs-watch.test.ts +0 -0
  334. package/{plugins/design/dev-server → apps/studio}/test/handoff.test.ts +1 -1
  335. package/{plugins/design/dev-server → apps/studio}/test/history-rollback.test.ts +0 -0
  336. package/{plugins/design/dev-server → apps/studio}/test/hmr-classify.test.ts +0 -0
  337. package/{plugins/design/dev-server → apps/studio}/test/input-router.test.ts +2 -2
  338. package/{plugins/design/dev-server → apps/studio}/test/locator.test.ts +1 -1
  339. package/{plugins/design/dev-server → apps/studio}/test/marquee-overlay.test.ts +0 -0
  340. package/{plugins/design/dev-server → apps/studio}/test/move-artboards-command.test.ts +0 -0
  341. package/{plugins/design/dev-server → apps/studio}/test/participants-chrome.test.ts +0 -0
  342. package/{plugins/design/dev-server → apps/studio}/test/paths.test.ts +0 -0
  343. package/{plugins/design/dev-server → apps/studio}/test/runtime-bundle-error-mapping.test.ts +0 -0
  344. package/{plugins/design/dev-server → apps/studio}/test/server-lifecycle.test.ts +0 -0
  345. package/{plugins/design/dev-server → apps/studio}/test/shared-doc-foundation.test.ts +0 -0
  346. package/{plugins/design/dev-server → apps/studio}/test/sync-codec.test.ts +1 -1
  347. package/{plugins/design/dev-server → apps/studio}/test/sync-meta-codec.test.ts +1 -1
  348. package/{plugins/design/dev-server → apps/studio}/test/system-endpoint.test.ts +0 -0
  349. package/{plugins/design/dev-server → apps/studio}/test/tool-palette.test.tsx +0 -0
  350. package/{plugins/design/dev-server → apps/studio}/test/undo-stack.test.ts +2 -2
  351. package/{plugins/design/dev-server → apps/studio}/test/use-annotation-selection.test.tsx +0 -0
  352. package/{plugins/design/dev-server → apps/studio}/test/use-artboard-drag.test.ts +3 -3
  353. package/{plugins/design/dev-server → apps/studio}/test/use-canvas-activity.test.tsx +2 -2
  354. package/{plugins/design/dev-server → apps/studio}/test/use-collab.test.ts +0 -0
  355. package/{plugins/design/dev-server → apps/studio}/test/use-cursor-modifiers.test.ts +0 -0
  356. package/{plugins/design/dev-server → apps/studio}/test/use-keyboard-discipline.test.ts +0 -0
  357. package/{plugins/design/dev-server → apps/studio}/test/use-selection-set.test.tsx +1 -1
  358. package/{plugins/design/dev-server → apps/studio}/test/use-undo-stack.test.tsx +2 -2
  359. /package/{plugins/design/dev-server → apps/studio}/test/ws-handshake.test.ts +0 -0
  360. /package/{plugins/design/dev-server → apps/studio}/tsconfig.json +0 -0
  361. /package/{plugins/design/dev-server → apps/studio}/ws.ts +0 -0
@@ -1,604 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, {
5
- get: all[name],
6
- enumerable: true,
7
- configurable: true,
8
- set: (newValue) => all[name] = () => newValue
9
- });
10
- };
11
-
12
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js
13
- var exports_encoding = {};
14
- __export(exports_encoding, {
15
- writeVarUint8Array: () => writeVarUint8Array,
16
- writeVarUint: () => writeVarUint,
17
- writeVarString: () => writeVarString,
18
- writeVarInt: () => writeVarInt,
19
- writeUint8Array: () => writeUint8Array,
20
- writeUint8: () => writeUint8,
21
- writeUint32BigEndian: () => writeUint32BigEndian,
22
- writeUint32: () => writeUint32,
23
- writeUint16: () => writeUint16,
24
- writeTerminatedUint8Array: () => writeTerminatedUint8Array,
25
- writeTerminatedString: () => writeTerminatedString,
26
- writeOnDataView: () => writeOnDataView,
27
- writeFloat64: () => writeFloat64,
28
- writeFloat32: () => writeFloat32,
29
- writeBinaryEncoder: () => writeBinaryEncoder,
30
- writeBigUint64: () => writeBigUint64,
31
- writeBigInt64: () => writeBigInt64,
32
- writeAny: () => writeAny,
33
- write: () => write,
34
- verifyLen: () => verifyLen,
35
- toUint8Array: () => toUint8Array,
36
- setUint8: () => setUint8,
37
- setUint32: () => setUint32,
38
- setUint16: () => setUint16,
39
- set: () => set,
40
- length: () => length,
41
- hasContent: () => hasContent,
42
- encode: () => encode,
43
- createEncoder: () => createEncoder,
44
- _writeVarStringPolyfill: () => _writeVarStringPolyfill,
45
- _writeVarStringNative: () => _writeVarStringNative,
46
- UintOptRleEncoder: () => UintOptRleEncoder,
47
- StringEncoder: () => StringEncoder,
48
- RleIntDiffEncoder: () => RleIntDiffEncoder,
49
- RleEncoder: () => RleEncoder,
50
- IntDiffOptRleEncoder: () => IntDiffOptRleEncoder,
51
- IntDiffEncoder: () => IntDiffEncoder,
52
- IncUintOptRleEncoder: () => IncUintOptRleEncoder,
53
- Encoder: () => Encoder
54
- });
55
-
56
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js
57
- var floor = Math.floor;
58
- var abs = Math.abs;
59
- var min = (a, b) => a < b ? a : b;
60
- var max = (a, b) => a > b ? a : b;
61
- var isNegativeZero = (n) => n !== 0 ? n < 0 : 1 / n < 0;
62
-
63
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js
64
- var BIT7 = 64;
65
- var BIT8 = 128;
66
- var BIT18 = 1 << 17;
67
- var BIT19 = 1 << 18;
68
- var BIT20 = 1 << 19;
69
- var BIT21 = 1 << 20;
70
- var BIT22 = 1 << 21;
71
- var BIT23 = 1 << 22;
72
- var BIT24 = 1 << 23;
73
- var BIT25 = 1 << 24;
74
- var BIT26 = 1 << 25;
75
- var BIT27 = 1 << 26;
76
- var BIT28 = 1 << 27;
77
- var BIT29 = 1 << 28;
78
- var BIT30 = 1 << 29;
79
- var BIT31 = 1 << 30;
80
- var BIT32 = 1 << 31;
81
- var BITS6 = 63;
82
- var BITS7 = 127;
83
- var BITS8 = 255;
84
- var BITS17 = BIT18 - 1;
85
- var BITS18 = BIT19 - 1;
86
- var BITS19 = BIT20 - 1;
87
- var BITS20 = BIT21 - 1;
88
- var BITS21 = BIT22 - 1;
89
- var BITS22 = BIT23 - 1;
90
- var BITS23 = BIT24 - 1;
91
- var BITS24 = BIT25 - 1;
92
- var BITS25 = BIT26 - 1;
93
- var BITS26 = BIT27 - 1;
94
- var BITS27 = BIT28 - 1;
95
- var BITS28 = BIT29 - 1;
96
- var BITS29 = BIT30 - 1;
97
- var BITS30 = BIT31 - 1;
98
- var BITS31 = 2147483647;
99
-
100
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js
101
- var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
102
- var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER;
103
- var LOWEST_INT32 = 1 << 31;
104
- var isInteger = Number.isInteger || ((num) => typeof num === "number" && isFinite(num) && floor(num) === num);
105
-
106
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js
107
- var isArray = Array.isArray;
108
-
109
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js
110
- var fromCharCode = String.fromCharCode;
111
- var fromCodePoint = String.fromCodePoint;
112
- var MAX_UTF16_CHARACTER = fromCharCode(65535);
113
- var _encodeUtf8Polyfill = (str) => {
114
- const encodedString = unescape(encodeURIComponent(str));
115
- const len = encodedString.length;
116
- const buf = new Uint8Array(len);
117
- for (let i = 0;i < len; i++) {
118
- buf[i] = encodedString.codePointAt(i);
119
- }
120
- return buf;
121
- };
122
- var utf8TextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder : null;
123
- var _encodeUtf8Native = (str) => utf8TextEncoder.encode(str);
124
- var encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill;
125
- var utf8TextDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
126
- if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array).length === 1) {
127
- utf8TextDecoder = null;
128
- }
129
-
130
- // ../../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js
131
- class Encoder {
132
- constructor() {
133
- this.cpos = 0;
134
- this.cbuf = new Uint8Array(100);
135
- this.bufs = [];
136
- }
137
- }
138
- var createEncoder = () => new Encoder;
139
- var encode = (f) => {
140
- const encoder = createEncoder();
141
- f(encoder);
142
- return toUint8Array(encoder);
143
- };
144
- var length = (encoder) => {
145
- let len = encoder.cpos;
146
- for (let i = 0;i < encoder.bufs.length; i++) {
147
- len += encoder.bufs[i].length;
148
- }
149
- return len;
150
- };
151
- var hasContent = (encoder) => encoder.cpos > 0 || encoder.bufs.length > 0;
152
- var toUint8Array = (encoder) => {
153
- const uint8arr = new Uint8Array(length(encoder));
154
- let curPos = 0;
155
- for (let i = 0;i < encoder.bufs.length; i++) {
156
- const d = encoder.bufs[i];
157
- uint8arr.set(d, curPos);
158
- curPos += d.length;
159
- }
160
- uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos);
161
- return uint8arr;
162
- };
163
- var verifyLen = (encoder, len) => {
164
- const bufferLen = encoder.cbuf.length;
165
- if (bufferLen - encoder.cpos < len) {
166
- encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos));
167
- encoder.cbuf = new Uint8Array(max(bufferLen, len) * 2);
168
- encoder.cpos = 0;
169
- }
170
- };
171
- var write = (encoder, num) => {
172
- const bufferLen = encoder.cbuf.length;
173
- if (encoder.cpos === bufferLen) {
174
- encoder.bufs.push(encoder.cbuf);
175
- encoder.cbuf = new Uint8Array(bufferLen * 2);
176
- encoder.cpos = 0;
177
- }
178
- encoder.cbuf[encoder.cpos++] = num;
179
- };
180
- var set = (encoder, pos, num) => {
181
- let buffer = null;
182
- for (let i = 0;i < encoder.bufs.length && buffer === null; i++) {
183
- const b = encoder.bufs[i];
184
- if (pos < b.length) {
185
- buffer = b;
186
- } else {
187
- pos -= b.length;
188
- }
189
- }
190
- if (buffer === null) {
191
- buffer = encoder.cbuf;
192
- }
193
- buffer[pos] = num;
194
- };
195
- var writeUint8 = write;
196
- var setUint8 = set;
197
- var writeUint16 = (encoder, num) => {
198
- write(encoder, num & BITS8);
199
- write(encoder, num >>> 8 & BITS8);
200
- };
201
- var setUint16 = (encoder, pos, num) => {
202
- set(encoder, pos, num & BITS8);
203
- set(encoder, pos + 1, num >>> 8 & BITS8);
204
- };
205
- var writeUint32 = (encoder, num) => {
206
- for (let i = 0;i < 4; i++) {
207
- write(encoder, num & BITS8);
208
- num >>>= 8;
209
- }
210
- };
211
- var writeUint32BigEndian = (encoder, num) => {
212
- for (let i = 3;i >= 0; i--) {
213
- write(encoder, num >>> 8 * i & BITS8);
214
- }
215
- };
216
- var setUint32 = (encoder, pos, num) => {
217
- for (let i = 0;i < 4; i++) {
218
- set(encoder, pos + i, num & BITS8);
219
- num >>>= 8;
220
- }
221
- };
222
- var writeVarUint = (encoder, num) => {
223
- while (num > BITS7) {
224
- write(encoder, BIT8 | BITS7 & num);
225
- num = floor(num / 128);
226
- }
227
- write(encoder, BITS7 & num);
228
- };
229
- var writeVarInt = (encoder, num) => {
230
- const isNegative = isNegativeZero(num);
231
- if (isNegative) {
232
- num = -num;
233
- }
234
- write(encoder, (num > BITS6 ? BIT8 : 0) | (isNegative ? BIT7 : 0) | BITS6 & num);
235
- num = floor(num / 64);
236
- while (num > 0) {
237
- write(encoder, (num > BITS7 ? BIT8 : 0) | BITS7 & num);
238
- num = floor(num / 128);
239
- }
240
- };
241
- var _strBuffer = new Uint8Array(30000);
242
- var _maxStrBSize = _strBuffer.length / 3;
243
- var _writeVarStringNative = (encoder, str) => {
244
- if (str.length < _maxStrBSize) {
245
- const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0;
246
- writeVarUint(encoder, written);
247
- for (let i = 0;i < written; i++) {
248
- write(encoder, _strBuffer[i]);
249
- }
250
- } else {
251
- writeVarUint8Array(encoder, encodeUtf8(str));
252
- }
253
- };
254
- var _writeVarStringPolyfill = (encoder, str) => {
255
- const encodedString = unescape(encodeURIComponent(str));
256
- const len = encodedString.length;
257
- writeVarUint(encoder, len);
258
- for (let i = 0;i < len; i++) {
259
- write(encoder, encodedString.codePointAt(i));
260
- }
261
- };
262
- var writeVarString = utf8TextEncoder && utf8TextEncoder.encodeInto ? _writeVarStringNative : _writeVarStringPolyfill;
263
- var writeTerminatedString = (encoder, str) => writeTerminatedUint8Array(encoder, encodeUtf8(str));
264
- var writeTerminatedUint8Array = (encoder, buf) => {
265
- for (let i = 0;i < buf.length; i++) {
266
- const b = buf[i];
267
- if (b === 0 || b === 1) {
268
- write(encoder, 1);
269
- }
270
- write(encoder, buf[i]);
271
- }
272
- write(encoder, 0);
273
- };
274
- var writeBinaryEncoder = (encoder, append) => writeUint8Array(encoder, toUint8Array(append));
275
- var writeUint8Array = (encoder, uint8Array) => {
276
- const bufferLen = encoder.cbuf.length;
277
- const cpos = encoder.cpos;
278
- const leftCopyLen = min(bufferLen - cpos, uint8Array.length);
279
- const rightCopyLen = uint8Array.length - leftCopyLen;
280
- encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos);
281
- encoder.cpos += leftCopyLen;
282
- if (rightCopyLen > 0) {
283
- encoder.bufs.push(encoder.cbuf);
284
- encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen));
285
- encoder.cbuf.set(uint8Array.subarray(leftCopyLen));
286
- encoder.cpos = rightCopyLen;
287
- }
288
- };
289
- var writeVarUint8Array = (encoder, uint8Array) => {
290
- writeVarUint(encoder, uint8Array.byteLength);
291
- writeUint8Array(encoder, uint8Array);
292
- };
293
- var writeOnDataView = (encoder, len) => {
294
- verifyLen(encoder, len);
295
- const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len);
296
- encoder.cpos += len;
297
- return dview;
298
- };
299
- var writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false);
300
- var writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false);
301
- var writeBigInt64 = (encoder, num) => writeOnDataView(encoder, 8).setBigInt64(0, num, false);
302
- var writeBigUint64 = (encoder, num) => writeOnDataView(encoder, 8).setBigUint64(0, num, false);
303
- var floatTestBed = new DataView(new ArrayBuffer(4));
304
- var isFloat32 = (num) => {
305
- floatTestBed.setFloat32(0, num);
306
- return floatTestBed.getFloat32(0) === num;
307
- };
308
- var writeAny = (encoder, data) => {
309
- switch (typeof data) {
310
- case "string":
311
- write(encoder, 119);
312
- writeVarString(encoder, data);
313
- break;
314
- case "number":
315
- if (isInteger(data) && abs(data) <= BITS31) {
316
- write(encoder, 125);
317
- writeVarInt(encoder, data);
318
- } else if (isFloat32(data)) {
319
- write(encoder, 124);
320
- writeFloat32(encoder, data);
321
- } else {
322
- write(encoder, 123);
323
- writeFloat64(encoder, data);
324
- }
325
- break;
326
- case "bigint":
327
- write(encoder, 122);
328
- writeBigInt64(encoder, data);
329
- break;
330
- case "object":
331
- if (data === null) {
332
- write(encoder, 126);
333
- } else if (isArray(data)) {
334
- write(encoder, 117);
335
- writeVarUint(encoder, data.length);
336
- for (let i = 0;i < data.length; i++) {
337
- writeAny(encoder, data[i]);
338
- }
339
- } else if (data instanceof Uint8Array) {
340
- write(encoder, 116);
341
- writeVarUint8Array(encoder, data);
342
- } else {
343
- write(encoder, 118);
344
- const keys = Object.keys(data);
345
- writeVarUint(encoder, keys.length);
346
- for (let i = 0;i < keys.length; i++) {
347
- const key = keys[i];
348
- writeVarString(encoder, key);
349
- writeAny(encoder, data[key]);
350
- }
351
- }
352
- break;
353
- case "boolean":
354
- write(encoder, data ? 120 : 121);
355
- break;
356
- default:
357
- write(encoder, 127);
358
- }
359
- };
360
-
361
- class RleEncoder extends Encoder {
362
- constructor(writer) {
363
- super();
364
- this.w = writer;
365
- this.s = null;
366
- this.count = 0;
367
- }
368
- write(v) {
369
- if (this.s === v) {
370
- this.count++;
371
- } else {
372
- if (this.count > 0) {
373
- writeVarUint(this, this.count - 1);
374
- }
375
- this.count = 1;
376
- this.w(this, v);
377
- this.s = v;
378
- }
379
- }
380
- }
381
-
382
- class IntDiffEncoder extends Encoder {
383
- constructor(start) {
384
- super();
385
- this.s = start;
386
- }
387
- write(v) {
388
- writeVarInt(this, v - this.s);
389
- this.s = v;
390
- }
391
- }
392
-
393
- class RleIntDiffEncoder extends Encoder {
394
- constructor(start) {
395
- super();
396
- this.s = start;
397
- this.count = 0;
398
- }
399
- write(v) {
400
- if (this.s === v && this.count > 0) {
401
- this.count++;
402
- } else {
403
- if (this.count > 0) {
404
- writeVarUint(this, this.count - 1);
405
- }
406
- this.count = 1;
407
- writeVarInt(this, v - this.s);
408
- this.s = v;
409
- }
410
- }
411
- }
412
- var flushUintOptRleEncoder = (encoder) => {
413
- if (encoder.count > 0) {
414
- writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s);
415
- if (encoder.count > 1) {
416
- writeVarUint(encoder.encoder, encoder.count - 2);
417
- }
418
- }
419
- };
420
-
421
- class UintOptRleEncoder {
422
- constructor() {
423
- this.encoder = new Encoder;
424
- this.s = 0;
425
- this.count = 0;
426
- }
427
- write(v) {
428
- if (this.s === v) {
429
- this.count++;
430
- } else {
431
- flushUintOptRleEncoder(this);
432
- this.count = 1;
433
- this.s = v;
434
- }
435
- }
436
- toUint8Array() {
437
- flushUintOptRleEncoder(this);
438
- return toUint8Array(this.encoder);
439
- }
440
- }
441
-
442
- class IncUintOptRleEncoder {
443
- constructor() {
444
- this.encoder = new Encoder;
445
- this.s = 0;
446
- this.count = 0;
447
- }
448
- write(v) {
449
- if (this.s + this.count === v) {
450
- this.count++;
451
- } else {
452
- flushUintOptRleEncoder(this);
453
- this.count = 1;
454
- this.s = v;
455
- }
456
- }
457
- toUint8Array() {
458
- flushUintOptRleEncoder(this);
459
- return toUint8Array(this.encoder);
460
- }
461
- }
462
- var flushIntDiffOptRleEncoder = (encoder) => {
463
- if (encoder.count > 0) {
464
- const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1);
465
- writeVarInt(encoder.encoder, encodedDiff);
466
- if (encoder.count > 1) {
467
- writeVarUint(encoder.encoder, encoder.count - 2);
468
- }
469
- }
470
- };
471
-
472
- class IntDiffOptRleEncoder {
473
- constructor() {
474
- this.encoder = new Encoder;
475
- this.s = 0;
476
- this.count = 0;
477
- this.diff = 0;
478
- }
479
- write(v) {
480
- if (this.diff === v - this.s) {
481
- this.s = v;
482
- this.count++;
483
- } else {
484
- flushIntDiffOptRleEncoder(this);
485
- this.count = 1;
486
- this.diff = v - this.s;
487
- this.s = v;
488
- }
489
- }
490
- toUint8Array() {
491
- flushIntDiffOptRleEncoder(this);
492
- return toUint8Array(this.encoder);
493
- }
494
- }
495
-
496
- class StringEncoder {
497
- constructor() {
498
- this.sarr = [];
499
- this.s = "";
500
- this.lensE = new UintOptRleEncoder;
501
- }
502
- write(string) {
503
- this.s += string;
504
- if (this.s.length > 19) {
505
- this.sarr.push(this.s);
506
- this.s = "";
507
- }
508
- this.lensE.write(string.length);
509
- }
510
- toUint8Array() {
511
- const encoder = new Encoder;
512
- this.sarr.push(this.s);
513
- this.s = "";
514
- writeVarString(encoder, this.sarr.join(""));
515
- writeUint8Array(encoder, this.lensE.toUint8Array());
516
- return toUint8Array(encoder);
517
- }
518
- }
519
-
520
- // synth:/Users/iagh/git/claude-design/plugins/design/dev-server/.runtime-bundle-lib0_encoding-entry.tsx
521
- var {
522
- Encoder: Encoder2,
523
- IncUintOptRleEncoder: IncUintOptRleEncoder2,
524
- IntDiffEncoder: IntDiffEncoder2,
525
- IntDiffOptRleEncoder: IntDiffOptRleEncoder2,
526
- RleEncoder: RleEncoder2,
527
- RleIntDiffEncoder: RleIntDiffEncoder2,
528
- StringEncoder: StringEncoder2,
529
- UintOptRleEncoder: UintOptRleEncoder2,
530
- _writeVarStringNative: _writeVarStringNative2,
531
- _writeVarStringPolyfill: _writeVarStringPolyfill2,
532
- createEncoder: createEncoder2,
533
- encode: encode2,
534
- hasContent: hasContent2,
535
- length: length2,
536
- set: set2,
537
- setUint16: setUint162,
538
- setUint32: setUint322,
539
- setUint8: setUint82,
540
- toUint8Array: toUint8Array2,
541
- verifyLen: verifyLen2,
542
- write: write2,
543
- writeAny: writeAny2,
544
- writeBigInt64: writeBigInt642,
545
- writeBigUint64: writeBigUint642,
546
- writeBinaryEncoder: writeBinaryEncoder2,
547
- writeFloat32: writeFloat322,
548
- writeFloat64: writeFloat642,
549
- writeOnDataView: writeOnDataView2,
550
- writeTerminatedString: writeTerminatedString2,
551
- writeTerminatedUint8Array: writeTerminatedUint8Array2,
552
- writeUint16: writeUint162,
553
- writeUint32: writeUint322,
554
- writeUint32BigEndian: writeUint32BigEndian2,
555
- writeUint8: writeUint82,
556
- writeUint8Array: writeUint8Array2,
557
- writeVarInt: writeVarInt2,
558
- writeVarString: writeVarString2,
559
- writeVarUint: writeVarUint2,
560
- writeVarUint8Array: writeVarUint8Array2
561
- } = exports_encoding;
562
- var __runtime_bundle_lib0_encoding_entry_default = exports_encoding;
563
- export {
564
- writeVarUint8Array2 as writeVarUint8Array,
565
- writeVarUint2 as writeVarUint,
566
- writeVarString2 as writeVarString,
567
- writeVarInt2 as writeVarInt,
568
- writeUint8Array2 as writeUint8Array,
569
- writeUint82 as writeUint8,
570
- writeUint32BigEndian2 as writeUint32BigEndian,
571
- writeUint322 as writeUint32,
572
- writeUint162 as writeUint16,
573
- writeTerminatedUint8Array2 as writeTerminatedUint8Array,
574
- writeTerminatedString2 as writeTerminatedString,
575
- writeOnDataView2 as writeOnDataView,
576
- writeFloat642 as writeFloat64,
577
- writeFloat322 as writeFloat32,
578
- writeBinaryEncoder2 as writeBinaryEncoder,
579
- writeBigUint642 as writeBigUint64,
580
- writeBigInt642 as writeBigInt64,
581
- writeAny2 as writeAny,
582
- write2 as write,
583
- verifyLen2 as verifyLen,
584
- toUint8Array2 as toUint8Array,
585
- setUint82 as setUint8,
586
- setUint322 as setUint32,
587
- setUint162 as setUint16,
588
- set2 as set,
589
- length2 as length,
590
- hasContent2 as hasContent,
591
- encode2 as encode,
592
- __runtime_bundle_lib0_encoding_entry_default as default,
593
- createEncoder2 as createEncoder,
594
- _writeVarStringPolyfill2 as _writeVarStringPolyfill,
595
- _writeVarStringNative2 as _writeVarStringNative,
596
- UintOptRleEncoder2 as UintOptRleEncoder,
597
- StringEncoder2 as StringEncoder,
598
- RleIntDiffEncoder2 as RleIntDiffEncoder,
599
- RleEncoder2 as RleEncoder,
600
- IntDiffOptRleEncoder2 as IntDiffOptRleEncoder,
601
- IntDiffEncoder2 as IntDiffEncoder,
602
- IncUintOptRleEncoder2 as IncUintOptRleEncoder,
603
- Encoder2 as Encoder
604
- };