@pairdraw/vue 0.19.2 → 0.21.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 (477) hide show
  1. package/dist/canvas/CanvasRoot.vue.js +5 -0
  2. package/dist/canvas/CanvasRoot.vue.js.map +1 -1
  3. package/dist/canvas/auto-layout/value-edit.js +1 -1
  4. package/dist/canvas/auto-layout/value-edit.js.map +1 -1
  5. package/dist/canvas/eyedropper/index.d.ts +26 -0
  6. package/dist/canvas/eyedropper/index.d.ts.map +1 -0
  7. package/dist/canvas/eyedropper/index.js +62 -0
  8. package/dist/canvas/eyedropper/index.js.map +1 -0
  9. package/dist/canvas/eyedropper/sample.js +13 -0
  10. package/dist/canvas/eyedropper/sample.js.map +1 -0
  11. package/dist/canvas/eyedropper/use.d.ts +33 -0
  12. package/dist/canvas/eyedropper/use.d.ts.map +1 -0
  13. package/dist/canvas/eyedropper/use.js +52 -0
  14. package/dist/canvas/eyedropper/use.js.map +1 -0
  15. package/dist/canvas/pointer/drag-move.js +4 -0
  16. package/dist/canvas/pointer/drag-move.js.map +1 -1
  17. package/dist/canvas/surface/color-space.d.ts +1 -0
  18. package/dist/canvas/surface/color-space.d.ts.map +1 -1
  19. package/dist/canvas/surface/gl-surface.js +5 -1
  20. package/dist/canvas/surface/gl-surface.js.map +1 -1
  21. package/dist/canvas/surface/kit-loader.js +2 -3
  22. package/dist/canvas/surface/kit-loader.js.map +1 -1
  23. package/dist/canvas/surface/lifecycle.js +34 -3
  24. package/dist/canvas/surface/lifecycle.js.map +1 -1
  25. package/dist/canvas/surface/origin.js +14 -0
  26. package/dist/canvas/surface/origin.js.map +1 -0
  27. package/dist/canvas/surface/shader/plan.js +40 -0
  28. package/dist/canvas/surface/shader/plan.js.map +1 -0
  29. package/dist/canvas/surface/shader/playback.js +132 -36
  30. package/dist/canvas/surface/shader/playback.js.map +1 -1
  31. package/dist/canvas/surface/shader/stage.d.ts.map +1 -1
  32. package/dist/canvas/surface/shader/stage.js +42 -5
  33. package/dist/canvas/surface/shader/stage.js.map +1 -1
  34. package/dist/canvas/surface/types.d.ts +25 -0
  35. package/dist/canvas/surface/types.d.ts.map +1 -1
  36. package/dist/canvas/surface/use.js +3 -1
  37. package/dist/canvas/surface/use.js.map +1 -1
  38. package/dist/canvas/text-edit/textarea.d.ts +1 -0
  39. package/dist/canvas/text-edit/textarea.d.ts.map +1 -1
  40. package/dist/canvas/tools/registry.js +5 -1
  41. package/dist/canvas/tools/registry.js.map +1 -1
  42. package/dist/canvas/useCanvasInput.d.ts +144 -2
  43. package/dist/canvas/useCanvasInput.d.ts.map +1 -1
  44. package/dist/canvas/useCanvasInput.js +3 -2
  45. package/dist/canvas/useCanvasInput.js.map +1 -1
  46. package/dist/controls/appearance/use.d.ts +1 -1
  47. package/dist/controls/binding-provider/pairdraw.js +1 -1
  48. package/dist/controls/binding-provider/pairdraw.js.map +1 -1
  49. package/dist/controls/color-model/types.d.ts +6 -0
  50. package/dist/controls/color-model/types.d.ts.map +1 -1
  51. package/dist/controls/color-model/use.d.ts.map +1 -1
  52. package/dist/controls/color-model/use.js +5 -3
  53. package/dist/controls/color-model/use.js.map +1 -1
  54. package/dist/controls/document-colors/index.d.ts +2 -0
  55. package/dist/controls/document-colors/index.js +2 -0
  56. package/dist/controls/document-colors/use.d.ts +20 -0
  57. package/dist/controls/document-colors/use.d.ts.map +1 -0
  58. package/dist/controls/document-colors/use.js +35 -0
  59. package/dist/controls/document-colors/use.js.map +1 -0
  60. package/dist/controls/effects/helpers.d.ts +13 -2
  61. package/dist/controls/effects/helpers.d.ts.map +1 -1
  62. package/dist/controls/effects/helpers.js +89 -34
  63. package/dist/controls/effects/helpers.js.map +1 -1
  64. package/dist/controls/effects/index.d.ts +2 -1
  65. package/dist/controls/effects/index.js +2 -1
  66. package/dist/controls/effects/use.d.ts +9 -7
  67. package/dist/controls/effects/use.d.ts.map +1 -1
  68. package/dist/controls/effects/use.js +6 -3
  69. package/dist/controls/effects/use.js.map +1 -1
  70. package/dist/controls/okhcl/use.d.ts +2 -2
  71. package/dist/controls/shader/catalog.d.ts +11 -0
  72. package/dist/controls/shader/catalog.d.ts.map +1 -1
  73. package/dist/controls/shader/catalog.js +35 -6
  74. package/dist/controls/shader/catalog.js.map +1 -1
  75. package/dist/controls/shader/gallery.d.ts +1 -1
  76. package/dist/controls/shader/gallery.d.ts.map +1 -1
  77. package/dist/controls/shader/gallery.js +292 -0
  78. package/dist/controls/shader/gallery.js.map +1 -1
  79. package/dist/controls/shader/index.d.ts +3 -1
  80. package/dist/controls/shader/index.js +3 -1
  81. package/dist/controls/shader/shapes.d.ts +18 -0
  82. package/dist/controls/shader/shapes.d.ts.map +1 -0
  83. package/dist/controls/shader/shapes.js +227 -0
  84. package/dist/controls/shader/shapes.js.map +1 -0
  85. package/dist/controls/shader/stops.d.ts +22 -0
  86. package/dist/controls/shader/stops.d.ts.map +1 -0
  87. package/dist/controls/shader/stops.js +73 -0
  88. package/dist/controls/shader/stops.js.map +1 -0
  89. package/dist/controls/typography/features.d.ts +24 -0
  90. package/dist/controls/typography/features.d.ts.map +1 -0
  91. package/dist/controls/typography/features.js +130 -0
  92. package/dist/controls/typography/features.js.map +1 -0
  93. package/dist/controls/typography/index.d.ts +2 -1
  94. package/dist/controls/typography/index.js +2 -1
  95. package/dist/controls/typography/use.d.ts +6 -0
  96. package/dist/controls/typography/use.d.ts.map +1 -1
  97. package/dist/controls/typography/use.js +4 -1
  98. package/dist/controls/typography/use.js.map +1 -1
  99. package/dist/controls/variable-modes/helpers.d.ts.map +1 -1
  100. package/dist/controls/variable-modes/helpers.js +4 -2
  101. package/dist/controls/variable-modes/helpers.js.map +1 -1
  102. package/dist/editor/commands/registry.d.ts +4 -0
  103. package/dist/editor/commands/registry.d.ts.map +1 -1
  104. package/dist/editor/commands/registry.js +2 -0
  105. package/dist/editor/commands/registry.js.map +1 -1
  106. package/dist/editor/commands/selection.js +22 -0
  107. package/dist/editor/commands/selection.js.map +1 -1
  108. package/dist/editor/commands/types.d.ts +1 -1
  109. package/dist/editor/commands/types.d.ts.map +1 -1
  110. package/dist/editor/menu-model/canvas.d.ts.map +1 -1
  111. package/dist/editor/menu-model/canvas.js +7 -1
  112. package/dist/editor/menu-model/canvas.js.map +1 -1
  113. package/dist/editor/selection-capabilities/use.d.ts +2 -0
  114. package/dist/editor/selection-capabilities/use.js +5 -0
  115. package/dist/editor/selection-capabilities/use.js.map +1 -1
  116. package/dist/editor/selection-state/use.d.ts +1 -0
  117. package/dist/editor/selection-state/use.js +5 -0
  118. package/dist/editor/selection-state/use.js.map +1 -1
  119. package/dist/editor/tool-cursor/index.d.ts.map +1 -1
  120. package/dist/editor/tool-cursor/index.js +5 -1
  121. package/dist/editor/tool-cursor/index.js.map +1 -1
  122. package/dist/i18n/create.d.ts +1 -1
  123. package/dist/i18n/create.d.ts.map +1 -1
  124. package/dist/i18n/create.js +1 -0
  125. package/dist/i18n/create.js.map +1 -1
  126. package/dist/i18n/index.d.ts +5 -2
  127. package/dist/i18n/index.js +5 -2
  128. package/dist/i18n/locale.d.ts +5 -4
  129. package/dist/i18n/locale.d.ts.map +1 -1
  130. package/dist/i18n/locale.js +4 -0
  131. package/dist/i18n/locale.js.map +1 -1
  132. package/dist/i18n/locales/de/ai.json.js +68 -2
  133. package/dist/i18n/locales/de/commands.json.js +2 -0
  134. package/dist/i18n/locales/de/comments.json.js +1 -1
  135. package/dist/i18n/locales/de/design-check.json.js +13 -1
  136. package/dist/i18n/locales/de/design-memory.json.js +82 -0
  137. package/dist/i18n/locales/de/design-memory.json.js.map +1 -0
  138. package/dist/i18n/locales/de/fonts.json.js +10 -0
  139. package/dist/i18n/locales/de/index.js +5 -1
  140. package/dist/i18n/locales/de/index.js.map +1 -1
  141. package/dist/i18n/locales/de/menu.json.js +2 -0
  142. package/dist/i18n/locales/de/panels.json.js +109 -1
  143. package/dist/i18n/locales/de/settings.json.js +1 -0
  144. package/dist/i18n/locales/de/tools.json.js +3 -1
  145. package/dist/i18n/locales/de/variables/panel.json.js +20 -0
  146. package/dist/i18n/locales/de/variations.json.js +23 -0
  147. package/dist/i18n/locales/de/variations.json.js.map +1 -0
  148. package/dist/i18n/locales/es/ai.json.js +67 -1
  149. package/dist/i18n/locales/es/commands.json.js +2 -0
  150. package/dist/i18n/locales/es/comments.json.js +1 -1
  151. package/dist/i18n/locales/es/design-check.json.js +13 -1
  152. package/dist/i18n/locales/es/design-memory.json.js +82 -0
  153. package/dist/i18n/locales/es/design-memory.json.js.map +1 -0
  154. package/dist/i18n/locales/es/fonts.json.js +10 -0
  155. package/dist/i18n/locales/es/index.js +5 -1
  156. package/dist/i18n/locales/es/index.js.map +1 -1
  157. package/dist/i18n/locales/es/menu.json.js +2 -0
  158. package/dist/i18n/locales/es/panels.json.js +109 -1
  159. package/dist/i18n/locales/es/settings.json.js +1 -0
  160. package/dist/i18n/locales/es/tools.json.js +3 -1
  161. package/dist/i18n/locales/es/variables/panel.json.js +20 -0
  162. package/dist/i18n/locales/es/variations.json.js +23 -0
  163. package/dist/i18n/locales/es/variations.json.js.map +1 -0
  164. package/dist/i18n/locales/fr/ai.json.js +68 -2
  165. package/dist/i18n/locales/fr/commands.json.js +2 -0
  166. package/dist/i18n/locales/fr/comments.json.js +1 -1
  167. package/dist/i18n/locales/fr/design-check.json.js +13 -1
  168. package/dist/i18n/locales/fr/design-memory.json.js +82 -0
  169. package/dist/i18n/locales/fr/design-memory.json.js.map +1 -0
  170. package/dist/i18n/locales/fr/fonts.json.js +10 -0
  171. package/dist/i18n/locales/fr/index.js +5 -1
  172. package/dist/i18n/locales/fr/index.js.map +1 -1
  173. package/dist/i18n/locales/fr/menu.json.js +2 -0
  174. package/dist/i18n/locales/fr/panels.json.js +109 -1
  175. package/dist/i18n/locales/fr/settings.json.js +1 -0
  176. package/dist/i18n/locales/fr/tools.json.js +3 -1
  177. package/dist/i18n/locales/fr/variables/panel.json.js +20 -0
  178. package/dist/i18n/locales/fr/variations.json.js +23 -0
  179. package/dist/i18n/locales/fr/variations.json.js.map +1 -0
  180. package/dist/i18n/locales/id/agents.json.js +31 -0
  181. package/dist/i18n/locales/id/agents.json.js.map +1 -0
  182. package/dist/i18n/locales/id/ai.json.js +608 -0
  183. package/dist/i18n/locales/id/ai.json.js.map +1 -0
  184. package/dist/i18n/locales/id/automation.json.js +150 -0
  185. package/dist/i18n/locales/id/automation.json.js.map +1 -0
  186. package/dist/i18n/locales/id/browser.json.js +50 -0
  187. package/dist/i18n/locales/id/browser.json.js.map +1 -0
  188. package/dist/i18n/locales/id/chat-context.json.js +62 -0
  189. package/dist/i18n/locales/id/chat-context.json.js.map +1 -0
  190. package/dist/i18n/locales/id/cloud/editor.json.js +337 -0
  191. package/dist/i18n/locales/id/cloud/editor.json.js.map +1 -0
  192. package/dist/i18n/locales/id/cloud/portal.json.js +435 -0
  193. package/dist/i18n/locales/id/cloud/portal.json.js.map +1 -0
  194. package/dist/i18n/locales/id/code.json.js +43 -0
  195. package/dist/i18n/locales/id/code.json.js.map +1 -0
  196. package/dist/i18n/locales/id/collaboration.json.js +84 -0
  197. package/dist/i18n/locales/id/collaboration.json.js.map +1 -0
  198. package/dist/i18n/locales/id/commands.json.js +111 -0
  199. package/dist/i18n/locales/id/commands.json.js.map +1 -0
  200. package/dist/i18n/locales/id/comments.json.js +37 -0
  201. package/dist/i18n/locales/id/comments.json.js.map +1 -0
  202. package/dist/i18n/locales/id/common.json.js +51 -0
  203. package/dist/i18n/locales/id/common.json.js.map +1 -0
  204. package/dist/i18n/locales/id/credentials.json.js +21 -0
  205. package/dist/i18n/locales/id/credentials.json.js.map +1 -0
  206. package/dist/i18n/locales/id/design-check.json.js +101 -0
  207. package/dist/i18n/locales/id/design-check.json.js.map +1 -0
  208. package/dist/i18n/locales/id/design-memory.json.js +61 -0
  209. package/dist/i18n/locales/id/design-memory.json.js.map +1 -0
  210. package/dist/i18n/locales/id/diagnostics.json.js +78 -0
  211. package/dist/i18n/locales/id/diagnostics.json.js.map +1 -0
  212. package/dist/i18n/locales/id/editor.json.js +62 -0
  213. package/dist/i18n/locales/id/editor.json.js.map +1 -0
  214. package/dist/i18n/locales/id/explore.json.js +30 -0
  215. package/dist/i18n/locales/id/explore.json.js.map +1 -0
  216. package/dist/i18n/locales/id/figjam.json.js +39 -0
  217. package/dist/i18n/locales/id/figjam.json.js.map +1 -0
  218. package/dist/i18n/locales/id/files.json.js +86 -0
  219. package/dist/i18n/locales/id/files.json.js.map +1 -0
  220. package/dist/i18n/locales/id/fonts.json.js +54 -0
  221. package/dist/i18n/locales/id/fonts.json.js.map +1 -0
  222. package/dist/i18n/locales/id/index.js +85 -0
  223. package/dist/i18n/locales/id/index.js.map +1 -0
  224. package/dist/i18n/locales/id/media.json.js +52 -0
  225. package/dist/i18n/locales/id/media.json.js.map +1 -0
  226. package/dist/i18n/locales/id/menu.json.js +118 -0
  227. package/dist/i18n/locales/id/menu.json.js.map +1 -0
  228. package/dist/i18n/locales/id/pages.json.js +16 -0
  229. package/dist/i18n/locales/id/pages.json.js.map +1 -0
  230. package/dist/i18n/locales/id/panels.json.js +838 -0
  231. package/dist/i18n/locales/id/panels.json.js.map +1 -0
  232. package/dist/i18n/locales/id/recovery.json.js +36 -0
  233. package/dist/i18n/locales/id/recovery.json.js.map +1 -0
  234. package/dist/i18n/locales/id/rename.json.js +19 -0
  235. package/dist/i18n/locales/id/rename.json.js.map +1 -0
  236. package/dist/i18n/locales/id/rendering.json.js +18 -0
  237. package/dist/i18n/locales/id/rendering.json.js.map +1 -0
  238. package/dist/i18n/locales/id/settings.json.js +169 -0
  239. package/dist/i18n/locales/id/settings.json.js.map +1 -0
  240. package/dist/i18n/locales/id/shaders.json.js +24 -0
  241. package/dist/i18n/locales/id/shaders.json.js.map +1 -0
  242. package/dist/i18n/locales/id/shapes.json.js +48 -0
  243. package/dist/i18n/locales/id/shapes.json.js.map +1 -0
  244. package/dist/i18n/locales/id/slides.json.js +27 -0
  245. package/dist/i18n/locales/id/slides.json.js.map +1 -0
  246. package/dist/i18n/locales/id/statuses.json.js +38 -0
  247. package/dist/i18n/locales/id/statuses.json.js.map +1 -0
  248. package/dist/i18n/locales/id/storage.json.js +21 -0
  249. package/dist/i18n/locales/id/storage.json.js.map +1 -0
  250. package/dist/i18n/locales/id/tools.json.js +27 -0
  251. package/dist/i18n/locales/id/tools.json.js.map +1 -0
  252. package/dist/i18n/locales/id/updates.json.js +31 -0
  253. package/dist/i18n/locales/id/updates.json.js.map +1 -0
  254. package/dist/i18n/locales/id/variables/panel.json.js +175 -0
  255. package/dist/i18n/locales/id/variables/panel.json.js.map +1 -0
  256. package/dist/i18n/locales/id/variables/types.json.js +15 -0
  257. package/dist/i18n/locales/id/variables/types.json.js.map +1 -0
  258. package/dist/i18n/locales/id/variations.json.js +23 -0
  259. package/dist/i18n/locales/id/variations.json.js.map +1 -0
  260. package/dist/i18n/locales/it/ai.json.js +68 -2
  261. package/dist/i18n/locales/it/commands.json.js +2 -0
  262. package/dist/i18n/locales/it/comments.json.js +1 -1
  263. package/dist/i18n/locales/it/design-check.json.js +13 -1
  264. package/dist/i18n/locales/it/design-memory.json.js +82 -0
  265. package/dist/i18n/locales/it/design-memory.json.js.map +1 -0
  266. package/dist/i18n/locales/it/fonts.json.js +10 -0
  267. package/dist/i18n/locales/it/index.js +5 -1
  268. package/dist/i18n/locales/it/index.js.map +1 -1
  269. package/dist/i18n/locales/it/menu.json.js +2 -0
  270. package/dist/i18n/locales/it/panels.json.js +109 -1
  271. package/dist/i18n/locales/it/settings.json.js +1 -0
  272. package/dist/i18n/locales/it/tools.json.js +3 -1
  273. package/dist/i18n/locales/it/variables/panel.json.js +20 -0
  274. package/dist/i18n/locales/it/variations.json.js +23 -0
  275. package/dist/i18n/locales/it/variations.json.js.map +1 -0
  276. package/dist/i18n/locales/ja/ai.json.js +68 -2
  277. package/dist/i18n/locales/ja/commands.json.js +2 -0
  278. package/dist/i18n/locales/ja/comments.json.js +1 -1
  279. package/dist/i18n/locales/ja/design-check.json.js +13 -1
  280. package/dist/i18n/locales/ja/design-memory.json.js +61 -0
  281. package/dist/i18n/locales/ja/design-memory.json.js.map +1 -0
  282. package/dist/i18n/locales/ja/fonts.json.js +10 -0
  283. package/dist/i18n/locales/ja/index.js +5 -1
  284. package/dist/i18n/locales/ja/index.js.map +1 -1
  285. package/dist/i18n/locales/ja/menu.json.js +2 -0
  286. package/dist/i18n/locales/ja/panels.json.js +106 -1
  287. package/dist/i18n/locales/ja/settings.json.js +1 -0
  288. package/dist/i18n/locales/ja/tools.json.js +3 -1
  289. package/dist/i18n/locales/ja/variables/panel.json.js +20 -0
  290. package/dist/i18n/locales/ja/variations.json.js +23 -0
  291. package/dist/i18n/locales/ja/variations.json.js.map +1 -0
  292. package/dist/i18n/locales/pl/ai.json.js +68 -2
  293. package/dist/i18n/locales/pl/commands.json.js +2 -0
  294. package/dist/i18n/locales/pl/comments.json.js +1 -1
  295. package/dist/i18n/locales/pl/design-check.json.js +13 -1
  296. package/dist/i18n/locales/pl/design-memory.json.js +89 -0
  297. package/dist/i18n/locales/pl/design-memory.json.js.map +1 -0
  298. package/dist/i18n/locales/pl/fonts.json.js +10 -0
  299. package/dist/i18n/locales/pl/index.js +5 -1
  300. package/dist/i18n/locales/pl/index.js.map +1 -1
  301. package/dist/i18n/locales/pl/menu.json.js +2 -0
  302. package/dist/i18n/locales/pl/panels.json.js +110 -1
  303. package/dist/i18n/locales/pl/settings.json.js +1 -0
  304. package/dist/i18n/locales/pl/tools.json.js +3 -1
  305. package/dist/i18n/locales/pl/variables/panel.json.js +20 -0
  306. package/dist/i18n/locales/pl/variations.json.js +23 -0
  307. package/dist/i18n/locales/pl/variations.json.js.map +1 -0
  308. package/dist/i18n/locales/ru/ai.json.js +68 -2
  309. package/dist/i18n/locales/ru/commands.json.js +3 -1
  310. package/dist/i18n/locales/ru/comments.json.js +1 -1
  311. package/dist/i18n/locales/ru/design-check.json.js +13 -1
  312. package/dist/i18n/locales/ru/design-memory.json.js +89 -0
  313. package/dist/i18n/locales/ru/design-memory.json.js.map +1 -0
  314. package/dist/i18n/locales/ru/fonts.json.js +10 -0
  315. package/dist/i18n/locales/ru/index.js +5 -1
  316. package/dist/i18n/locales/ru/index.js.map +1 -1
  317. package/dist/i18n/locales/ru/menu.json.js +2 -0
  318. package/dist/i18n/locales/ru/panels.json.js +110 -1
  319. package/dist/i18n/locales/ru/settings.json.js +1 -0
  320. package/dist/i18n/locales/ru/tools.json.js +3 -1
  321. package/dist/i18n/locales/ru/variables/panel.json.js +20 -0
  322. package/dist/i18n/locales/ru/variations.json.js +23 -0
  323. package/dist/i18n/locales/ru/variations.json.js.map +1 -0
  324. package/dist/i18n/locales/zh-cn/ai.json.js +68 -2
  325. package/dist/i18n/locales/zh-cn/commands.json.js +2 -0
  326. package/dist/i18n/locales/zh-cn/comments.json.js +1 -1
  327. package/dist/i18n/locales/zh-cn/design-check.json.js +13 -1
  328. package/dist/i18n/locales/zh-cn/design-memory.json.js +61 -0
  329. package/dist/i18n/locales/zh-cn/design-memory.json.js.map +1 -0
  330. package/dist/i18n/locales/zh-cn/fonts.json.js +10 -0
  331. package/dist/i18n/locales/zh-cn/index.js +5 -1
  332. package/dist/i18n/locales/zh-cn/index.js.map +1 -1
  333. package/dist/i18n/locales/zh-cn/menu.json.js +2 -0
  334. package/dist/i18n/locales/zh-cn/panels.json.js +106 -1
  335. package/dist/i18n/locales/zh-cn/settings.json.js +1 -0
  336. package/dist/i18n/locales/zh-cn/tools.json.js +3 -1
  337. package/dist/i18n/locales/zh-cn/variables/panel.json.js +20 -0
  338. package/dist/i18n/locales/zh-cn/variations.json.js +23 -0
  339. package/dist/i18n/locales/zh-cn/variations.json.js.map +1 -0
  340. package/dist/i18n/messages/ai.d.ts +98 -2
  341. package/dist/i18n/messages/ai.d.ts.map +1 -1
  342. package/dist/i18n/messages/ai.js +70 -2
  343. package/dist/i18n/messages/ai.js.map +1 -1
  344. package/dist/i18n/messages/chat-usage.d.ts +34 -0
  345. package/dist/i18n/messages/chat-usage.d.ts.map +1 -0
  346. package/dist/i18n/messages/chat-usage.js +25 -0
  347. package/dist/i18n/messages/chat-usage.js.map +1 -0
  348. package/dist/i18n/messages/commands.d.ts +2 -0
  349. package/dist/i18n/messages/commands.d.ts.map +1 -1
  350. package/dist/i18n/messages/commands.js +2 -0
  351. package/dist/i18n/messages/commands.js.map +1 -1
  352. package/dist/i18n/messages/comments.d.ts +2 -2
  353. package/dist/i18n/messages/comments.js +2 -2
  354. package/dist/i18n/messages/comments.js.map +1 -1
  355. package/dist/i18n/messages/design-check.d.ts +12 -0
  356. package/dist/i18n/messages/design-check.d.ts.map +1 -1
  357. package/dist/i18n/messages/design-check.js +13 -1
  358. package/dist/i18n/messages/design-check.js.map +1 -1
  359. package/dist/i18n/messages/design-memory.d.ts +68 -0
  360. package/dist/i18n/messages/design-memory.d.ts.map +1 -0
  361. package/dist/i18n/messages/design-memory.js +85 -0
  362. package/dist/i18n/messages/design-memory.js.map +1 -0
  363. package/dist/i18n/messages/fonts.d.ts +12 -0
  364. package/dist/i18n/messages/fonts.d.ts.map +1 -1
  365. package/dist/i18n/messages/fonts.js +10 -0
  366. package/dist/i18n/messages/fonts.js.map +1 -1
  367. package/dist/i18n/messages/menu.d.ts +2 -0
  368. package/dist/i18n/messages/menu.d.ts.map +1 -1
  369. package/dist/i18n/messages/menu.js +2 -0
  370. package/dist/i18n/messages/menu.js.map +1 -1
  371. package/dist/i18n/messages/panels.d.ts +131 -0
  372. package/dist/i18n/messages/panels.d.ts.map +1 -1
  373. package/dist/i18n/messages/panels.js +109 -1
  374. package/dist/i18n/messages/panels.js.map +1 -1
  375. package/dist/i18n/messages/settings.d.ts +1 -0
  376. package/dist/i18n/messages/settings.d.ts.map +1 -1
  377. package/dist/i18n/messages/settings.js +1 -0
  378. package/dist/i18n/messages/settings.js.map +1 -1
  379. package/dist/i18n/messages/tools.d.ts +2 -0
  380. package/dist/i18n/messages/tools.d.ts.map +1 -1
  381. package/dist/i18n/messages/tools.js +3 -1
  382. package/dist/i18n/messages/tools.js.map +1 -1
  383. package/dist/i18n/messages/variables/panel.d.ts +24 -0
  384. package/dist/i18n/messages/variables/panel.d.ts.map +1 -1
  385. package/dist/i18n/messages/variables/panel.js +20 -0
  386. package/dist/i18n/messages/variables/panel.js.map +1 -1
  387. package/dist/i18n/messages/variations.d.ts +28 -0
  388. package/dist/i18n/messages/variations.d.ts.map +1 -0
  389. package/dist/i18n/messages/variations.js +26 -0
  390. package/dist/i18n/messages/variations.js.map +1 -0
  391. package/dist/i18n/messages.d.ts +405 -4
  392. package/dist/i18n/messages.d.ts.map +1 -1
  393. package/dist/i18n/messages.js +8 -2
  394. package/dist/i18n/messages.js.map +1 -1
  395. package/dist/i18n/useI18n.d.ts +1389 -13
  396. package/dist/i18n/useI18n.d.ts.map +1 -1
  397. package/dist/i18n/useI18n.js +8 -1
  398. package/dist/i18n/useI18n.js.map +1 -1
  399. package/dist/primitives/ColorPicker/ColorInputRoot.vue.d.ts +6 -0
  400. package/dist/primitives/ColorPicker/ColorInputRoot.vue.d.ts.map +1 -1
  401. package/dist/primitives/ColorPicker/ColorInputRoot.vue.js +3 -1
  402. package/dist/primitives/ColorPicker/ColorInputRoot.vue.js.map +1 -1
  403. package/dist/primitives/ColorPicker/ColorPickerRoot.vue.d.ts +11 -2
  404. package/dist/primitives/ColorPicker/ColorPickerRoot.vue.d.ts.map +1 -1
  405. package/dist/primitives/ColorPicker/ColorPickerRoot.vue.js +15 -5
  406. package/dist/primitives/ColorPicker/ColorPickerRoot.vue.js.map +1 -1
  407. package/dist/primitives/ColorPicker/index.d.ts +2 -1
  408. package/dist/primitives/ColorPicker/index.js +2 -1
  409. package/dist/primitives/ColorPicker/outside.d.ts +16 -0
  410. package/dist/primitives/ColorPicker/outside.d.ts.map +1 -0
  411. package/dist/primitives/ColorPicker/outside.js +20 -0
  412. package/dist/primitives/ColorPicker/outside.js.map +1 -0
  413. package/dist/primitives/Fill/FillRoot.vue.d.ts +2 -1
  414. package/dist/primitives/Fill/FillRoot.vue.d.ts.map +1 -1
  415. package/dist/primitives/Fill/FillRoot.vue.js +5 -2
  416. package/dist/primitives/Fill/FillRoot.vue.js.map +1 -1
  417. package/dist/primitives/Fill/FillSwatch.vue.d.ts.map +1 -1
  418. package/dist/primitives/Fill/FillSwatch.vue.js +2 -1
  419. package/dist/primitives/Fill/FillSwatch.vue.js.map +1 -1
  420. package/dist/primitives/Fill/types.d.ts +6 -1
  421. package/dist/primitives/Fill/types.d.ts.map +1 -1
  422. package/dist/primitives/Fill/useFill.d.ts +10 -4
  423. package/dist/primitives/Fill/useFill.d.ts.map +1 -1
  424. package/dist/primitives/Fill/useFill.js +14 -10
  425. package/dist/primitives/Fill/useFill.js.map +1 -1
  426. package/dist/primitives/FontPicker/FontPickerRoot.vue.d.ts +5 -0
  427. package/dist/primitives/FontPicker/FontPickerRoot.vue.d.ts.map +1 -1
  428. package/dist/primitives/FontPicker/FontPickerRoot.vue.js +63 -56
  429. package/dist/primitives/FontPicker/FontPickerRoot.vue.js.map +1 -1
  430. package/dist/primitives/GradientEditor/GradientEditorRoot.vue.d.ts +2 -1
  431. package/dist/primitives/GradientEditor/GradientEditorRoot.vue.d.ts.map +1 -1
  432. package/dist/primitives/GradientEditor/GradientEditorRoot.vue.js +5 -2
  433. package/dist/primitives/GradientEditor/GradientEditorRoot.vue.js.map +1 -1
  434. package/dist/primitives/GradientEditor/GradientEditorStop.vue.d.ts.map +1 -1
  435. package/dist/primitives/GradientEditor/GradientEditorStop.vue.js +4 -3
  436. package/dist/primitives/GradientEditor/GradientEditorStop.vue.js.map +1 -1
  437. package/dist/primitives/GradientEditor/types.d.ts +3 -1
  438. package/dist/primitives/GradientEditor/types.d.ts.map +1 -1
  439. package/dist/primitives/GradientEditor/useGradientStops.d.ts +5 -3
  440. package/dist/primitives/GradientEditor/useGradientStops.d.ts.map +1 -1
  441. package/dist/primitives/GradientEditor/useGradientStops.js +9 -4
  442. package/dist/primitives/GradientEditor/useGradientStops.js.map +1 -1
  443. package/dist/primitives/LayerTree/LayerTreeRoot.vue.d.ts +6 -1
  444. package/dist/primitives/LayerTree/LayerTreeRoot.vue.d.ts.map +1 -1
  445. package/dist/primitives/LayerTree/LayerTreeRoot.vue.js +16 -1
  446. package/dist/primitives/LayerTree/LayerTreeRoot.vue.js.map +1 -1
  447. package/dist/primitives/TypographyControls/TypographyControlsRoot.vue.d.ts +3 -0
  448. package/dist/primitives/TypographyControls/TypographyControlsRoot.vue.d.ts.map +1 -1
  449. package/dist/primitives/TypographyControls/TypographyControlsRoot.vue.js +3 -1
  450. package/dist/primitives/TypographyControls/TypographyControlsRoot.vue.js.map +1 -1
  451. package/dist/shared/assets/cursors/eyedropper.svg.js +6 -0
  452. package/dist/shared/assets/cursors/eyedropper.svg.js.map +1 -0
  453. package/dist/shared/frame.d.ts +28 -0
  454. package/dist/shared/frame.d.ts.map +1 -0
  455. package/dist/shared/frame.js +92 -0
  456. package/dist/shared/frame.js.map +1 -0
  457. package/dist/shared/input/auto-layout/drag.js +71 -0
  458. package/dist/shared/input/auto-layout/drag.js.map +1 -0
  459. package/dist/shared/input/{auto-layout-hover.d.ts → auto-layout/hover.d.ts} +3 -3
  460. package/dist/shared/input/auto-layout/hover.d.ts.map +1 -0
  461. package/dist/shared/input/{auto-layout-hover.js → auto-layout/hover.js} +42 -86
  462. package/dist/shared/input/auto-layout/hover.js.map +1 -0
  463. package/dist/shared/input/{auto-layout.js → auto-layout/index.js} +2 -2
  464. package/dist/shared/input/auto-layout/index.js.map +1 -0
  465. package/dist/shared/input/index.d.ts +1 -1
  466. package/dist/shared/input/index.js +1 -1
  467. package/dist/shared/input/move/drag.js +1 -1
  468. package/dist/shared/input/resize.js +1 -1
  469. package/dist/shared/input/select.js +5 -3
  470. package/dist/shared/input/select.js.map +1 -1
  471. package/dist/shared/input/types.d.ts +10 -2
  472. package/dist/shared/input/types.d.ts.map +1 -1
  473. package/dist/shared/input/types.js.map +1 -1
  474. package/package.json +19 -4
  475. package/dist/shared/input/auto-layout-hover.d.ts.map +0 -1
  476. package/dist/shared/input/auto-layout-hover.js.map +0 -1
  477. package/dist/shared/input/auto-layout.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.js","names":[],"sources":["../../../src/controls/shader/gallery.ts"],"sourcesContent":["import { isEqual, uniq } from 'es-toolkit'\n\nimport type { ShaderPreset } from '@pairdraw/scene-graph/shaders'\n\n/**\n * Complete shaders a shader paint can start from in one click: each stacks a texture with the\n * filters and overlays that finish it, flat at the top level so the picker lists and edits every\n * effect. Colors are written out rather than left to the library's defaults, so a gallery that\n * cannot draw shaders still shows each one's palette.\n */\n\n/** The shaders the gallery offers, by the name the app translates. */\nexport type ShaderGalleryId =\n | 'sunset'\n | 'northernLights'\n | 'retroScreen'\n | 'halftonePrint'\n | 'ditheredDusk'\n | 'glassOrb'\n | 'marble'\n | 'neonGrid'\n | 'velvet'\n\nexport interface ShaderGalleryEntry {\n id: ShaderGalleryId\n preset: ShaderPreset\n}\n\n/** The gallery in the order it is shown. */\nexport const SHADER_GALLERY: readonly ShaderGalleryEntry[] = [\n {\n id: 'sunset',\n preset: {\n components: [\n {\n type: 'MeshGradient',\n props: {\n stops: [\n { color: '#1b0b3a', position: 0 },\n { color: '#7b2cbf', position: 0.3 },\n { color: '#ff5b2e', position: 0.6 },\n { color: '#ff9e44', position: 0.8 },\n { color: '#ffd98e', position: 1 }\n ],\n seed: 12\n }\n },\n { type: 'FilmGrain', props: { strength: 0.2 } }\n ]\n }\n },\n {\n id: 'northernLights',\n preset: {\n components: [\n { type: 'SolidColor', props: { color: '#04101f' } },\n {\n type: 'Aurora',\n props: { colorA: '#7c3aed', colorB: '#22ee88', colorC: '#1694e8', intensity: 85 }\n },\n { type: 'FilmGrain', props: { strength: 0.15 } }\n ]\n }\n },\n {\n id: 'retroScreen',\n preset: {\n components: [\n { type: 'Plasma', props: { colorA: '#ff2e88', colorB: '#120024' } },\n { type: 'CRTScreen', props: { pixelSize: 96, scanlineIntensity: 0.45 } }\n ]\n }\n },\n {\n id: 'halftonePrint',\n preset: {\n components: [\n { type: 'Swirl', props: { colorA: '#1d4ed8', colorB: '#f97316' } },\n { type: 'Halftone', props: { style: 'cmyk', frequency: 80 } }\n ]\n }\n },\n {\n id: 'ditheredDusk',\n preset: {\n components: [\n {\n type: 'FlowingGradient',\n props: { colorA: '#0b1026', colorB: '#3b1d6e', colorC: '#ff5b2e', colorD: '#ffc46b' }\n },\n { type: 'Dither', props: { pattern: 'bayer8', pixelSize: 3, colorMode: 'source' } }\n ]\n }\n },\n {\n id: 'glassOrb',\n preset: {\n components: [\n {\n type: 'MeshGradient',\n props: {\n stops: [\n { color: '#0f172a', position: 0 },\n { color: '#2563eb', position: 0.4 },\n { color: '#22d3ee', position: 0.75 },\n { color: '#a7f3d0', position: 1 }\n ],\n seed: 4\n }\n },\n { type: 'Glass', props: { refraction: 1.2, aberration: 0.6 } }\n ]\n }\n },\n {\n id: 'marble',\n preset: {\n components: [\n { type: 'Marble', props: { colorA: '#f5f5f4', colorB: '#57534e', colorC: '#0c0a09' } },\n { type: 'Vignette', props: { intensity: 0.6 } }\n ]\n }\n },\n {\n id: 'neonGrid',\n preset: {\n components: [\n { type: 'SolidColor', props: { color: '#0a0614' } },\n { type: 'Grid', props: { color: '#ff2ea6', cells: 12, thickness: 2, softness: 0.2 } },\n { type: 'Glow', props: { intensity: 6, threshold: 0.3, size: 30 } }\n ]\n }\n },\n {\n id: 'velvet',\n preset: {\n components: [\n { type: 'Satin', props: { color: '#7f1d3a', highlightColor: '#e8798f' } },\n { type: 'LightLeak', props: { intensity: 0.25 } },\n { type: 'FilmGrain', props: { strength: 0.2 } }\n ]\n }\n }\n]\n\n/** The gallery shader `preset` is, unchanged; null once any of its effects was edited. */\nexport function shaderGalleryEntryOf(preset: ShaderPreset): ShaderGalleryEntry | null {\n return SHADER_GALLERY.find((entry) => isEqual(entry.preset, preset)) ?? null\n}\n\nconst HEX_COLOR = /^#(?:[\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/i\n\nfunction colorsIn(value: unknown): string[] {\n if (typeof value === 'string') return HEX_COLOR.test(value) ? [value.toLowerCase()] : []\n if (Array.isArray(value)) return value.flatMap(colorsIn)\n if (typeof value === 'object' && value !== null) return Object.values(value).flatMap(colorsIn)\n return []\n}\n\n/**\n * The colors `preset` sets, in the order its effects draw, without repeats and at most `limit` of\n * them: a palette that stands in for the shader where it cannot be drawn.\n */\nexport function shaderPresetColors(preset: ShaderPreset, limit = 4): string[] {\n const colors = preset.components.flatMap((component) => colorsIn(component.props))\n return uniq(colors).slice(0, limit)\n}\n"],"mappings":";;;AA6BA,MAAa,iBAAgD;CAC3D;EACE,IAAI;EACJ,QAAQ,EACN,YAAY,CACV;GACE,MAAM;GACN,OAAO;IACL,OAAO;KACL;MAAE,OAAO;MAAW,UAAU;KAAE;KAChC;MAAE,OAAO;MAAW,UAAU;KAAI;KAClC;MAAE,OAAO;MAAW,UAAU;KAAI;KAClC;MAAE,OAAO;MAAW,UAAU;KAAI;KAClC;MAAE,OAAO;MAAW,UAAU;KAAE;IAClC;IACA,MAAM;GACR;EACF,GACA;GAAE,MAAM;GAAa,OAAO,EAAE,UAAU,GAAI;EAAE,CAChD,EACF;CACF;CACA;EACE,IAAI;EACJ,QAAQ,EACN,YAAY;GACV;IAAE,MAAM;IAAc,OAAO,EAAE,OAAO,UAAU;GAAE;GAClD;IACE,MAAM;IACN,OAAO;KAAE,QAAQ;KAAW,QAAQ;KAAW,QAAQ;KAAW,WAAW;IAAG;GAClF;GACA;IAAE,MAAM;IAAa,OAAO,EAAE,UAAU,IAAK;GAAE;EACjD,EACF;CACF;CACA;EACE,IAAI;EACJ,QAAQ,EACN,YAAY,CACV;GAAE,MAAM;GAAU,OAAO;IAAE,QAAQ;IAAW,QAAQ;GAAU;EAAE,GAClE;GAAE,MAAM;GAAa,OAAO;IAAE,WAAW;IAAI,mBAAmB;GAAK;EAAE,CACzE,EACF;CACF;CACA;EACE,IAAI;EACJ,QAAQ,EACN,YAAY,CACV;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AAO;KAAE,OAAO;KAAW,gBAAgB;IAAU;GAAE;GACxE;IAAE,MAAM;IAAa,OAAO,EAAE,WAAW,IAAK;GAAE;GAChD;IAAE,MAAM;IAAa,OAAO,EAAE,UAAU,GAAI;GAAE;EAChD,EACF;CACF;AACF;;AAGA,SAAgB,qBAAqB,QAAiD;CACpF,OAAO,eAAe,MAAM,UAAU,QAAQ,MAAM,QAAQ,MAAM,CAAC,KAAK;AAC1E;AAEA,MAAM,YAAY;AAElB,SAAS,SAAS,OAA0B;CAC1C,IAAI,OAAO,UAAU,UAAU,OAAO,UAAU,KAAK,KAAK,IAAI,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC;CACvF,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,QAAQ,QAAQ;CACvD,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,QAAQ,QAAQ;CAC7F,OAAO,CAAC;AACV;;;;;AAMA,SAAgB,mBAAmB,QAAsB,QAAQ,GAAa;CAC5E,MAAM,SAAS,OAAO,WAAW,SAAS,cAAc,SAAS,UAAU,KAAK,CAAC;CACjF,OAAO,KAAK,MAAM,CAAC,CAAC,MAAM,GAAG,KAAK;AACpC"}
1
+ {"version":3,"file":"gallery.js","names":[],"sources":["../../../src/controls/shader/gallery.ts"],"sourcesContent":["import { isEqual, uniq } from 'es-toolkit'\n\nimport type { ShaderPreset } from '@pairdraw/scene-graph/shaders'\n\n/**\n * Complete shaders a shader paint can start from in one click: each stacks a texture with the\n * filters and overlays that finish it, flat at the top level so the picker lists and edits every\n * effect. Colors are written out rather than left to the library's defaults, so a gallery that\n * cannot draw shaders still shows each one's palette.\n */\n\n/** The shaders the gallery offers, by the name the app translates. */\nexport type ShaderGalleryId =\n | 'sunset'\n | 'northernLights'\n | 'retroScreen'\n | 'halftonePrint'\n | 'ditheredDusk'\n | 'glassOrb'\n | 'marble'\n | 'neonGrid'\n | 'velvet'\n | 'liquidChrome'\n | 'flutedGlass'\n | 'paperStock'\n | 'godRays'\n | 'thermal'\n | 'voronoiCells'\n | 'deepWater'\n | 'smokePlume'\n | 'neonPulse'\n | 'grainWash'\n | 'obsidian'\n | 'marbleInk'\n\nexport interface ShaderGalleryEntry {\n id: ShaderGalleryId\n preset: ShaderPreset\n}\n\n/** The gallery in the order it is shown. */\nexport const SHADER_GALLERY: readonly ShaderGalleryEntry[] = [\n {\n id: 'sunset',\n preset: {\n components: [\n {\n type: 'MeshGradient',\n props: {\n stops: [\n { color: '#1b0b3a', position: 0 },\n { color: '#7b2cbf', position: 0.3 },\n { color: '#ff5b2e', position: 0.6 },\n { color: '#ff9e44', position: 0.8 },\n { color: '#ffd98e', position: 1 }\n ],\n seed: 12\n }\n },\n { type: 'FilmGrain', props: { strength: 0.2 } }\n ]\n }\n },\n {\n id: 'northernLights',\n preset: {\n components: [\n { type: 'SolidColor', props: { color: '#04101f' } },\n {\n type: 'Aurora',\n props: { colorA: '#7c3aed', colorB: '#22ee88', colorC: '#1694e8', intensity: 85 }\n },\n { type: 'FilmGrain', props: { strength: 0.15 } }\n ]\n }\n },\n {\n id: 'retroScreen',\n preset: {\n components: [\n { type: 'Plasma', props: { colorA: '#ff2e88', colorB: '#120024' } },\n { type: 'CRTScreen', props: { pixelSize: 96, scanlineIntensity: 0.45 } }\n ]\n }\n },\n {\n id: 'halftonePrint',\n preset: {\n components: [\n { type: 'Swirl', props: { colorA: '#1d4ed8', colorB: '#f97316' } },\n { type: 'Halftone', props: { style: 'cmyk', frequency: 80 } }\n ]\n }\n },\n {\n id: 'ditheredDusk',\n preset: {\n components: [\n {\n type: 'FlowingGradient',\n props: { colorA: '#0b1026', colorB: '#3b1d6e', colorC: '#ff5b2e', colorD: '#ffc46b' }\n },\n { type: 'Dither', props: { pattern: 'bayer8', pixelSize: 3, colorMode: 'source' } }\n ]\n }\n },\n {\n id: 'glassOrb',\n preset: {\n components: [\n {\n type: 'MeshGradient',\n props: {\n stops: [\n { color: '#0f172a', position: 0 },\n { color: '#2563eb', position: 0.4 },\n { color: '#22d3ee', position: 0.75 },\n { color: '#a7f3d0', position: 1 }\n ],\n seed: 4\n }\n },\n { type: 'Glass', props: { refraction: 1.2, aberration: 0.6 } }\n ]\n }\n },\n {\n id: 'marble',\n preset: {\n components: [\n { type: 'Marble', props: { colorA: '#f5f5f4', colorB: '#57534e', colorC: '#0c0a09' } },\n { type: 'Vignette', props: { intensity: 0.6 } }\n ]\n }\n },\n {\n id: 'neonGrid',\n preset: {\n components: [\n { type: 'SolidColor', props: { color: '#0a0614' } },\n { type: 'Grid', props: { color: '#ff2ea6', cells: 12, thickness: 2, softness: 0.2 } },\n { type: 'Glow', props: { intensity: 6, threshold: 0.3, size: 30 } }\n ]\n }\n },\n {\n id: 'velvet',\n preset: {\n components: [\n { type: 'Satin', props: { color: '#7f1d3a', highlightColor: '#e8798f' } },\n { type: 'LightLeak', props: { intensity: 0.25 } },\n { type: 'FilmGrain', props: { strength: 0.2 } }\n ]\n }\n },\n {\n id: 'liquidChrome',\n preset: {\n components: [\n {\n type: 'LiquidMetal',\n props: {\n lightColor: '#f5f7fa',\n darkColor: '#1c1f26',\n turbulence: 0.55,\n ripple: 1.2,\n sharpness: 0.8,\n dispersion: 0.25,\n speed: 0.35\n }\n },\n { type: 'FilmGrain', props: { strength: 0.08, bias: 0.04 } }\n ]\n }\n },\n {\n id: 'flutedGlass',\n preset: {\n components: [\n {\n type: 'FlowingGradient',\n props: {\n colorA: '#0f1b2d',\n colorB: '#1f4b6e',\n colorC: '#8fd3ff',\n colorD: '#f5f9ff',\n distortion: 0.7,\n speed: 0.2\n }\n },\n {\n type: 'FlutedGlass',\n props: {\n frequency: 18,\n refraction: 0.6,\n aberration: 0.3,\n highlight: 0.5,\n edges: 'mirror',\n speed: 0.2\n }\n }\n ]\n }\n },\n {\n id: 'paperStock',\n preset: {\n components: [\n {\n type: 'FlowingGradient',\n props: { colorA: '#efe7d8', colorB: '#e2d6c2', distortion: 0.2, speed: 0 }\n },\n {\n type: 'Paper',\n props: { roughness: 0.65, grainScale: 0.8, displacement: 0.25, seed: 7 }\n }\n ]\n }\n },\n {\n id: 'godRays',\n preset: {\n components: [\n {\n type: 'Godrays',\n props: {\n rayColor: '#ffe9b0',\n backgroundColor: '#0b0a12',\n density: 0.7,\n intensity: 0.9,\n spotty: 0.3,\n speed: 0.15\n }\n },\n { type: 'FilmGrain', props: { strength: 0.12 } }\n ]\n }\n },\n {\n id: 'thermal',\n preset: {\n components: [\n {\n type: 'Heatmap',\n props: {\n colorA: '#08131f',\n colorB: '#f7f3cf',\n stops: [\n { color: '#08131f', position: 0 },\n { color: '#1d6fb8', position: 0.3 },\n { color: '#f2d21a', position: 0.55 },\n { color: '#f08a24', position: 0.78 },\n { color: '#e0212f', position: 1 }\n ],\n innerGlow: 0.6,\n outerGlow: 0.4,\n contour: 0.2,\n speed: 0.3\n }\n },\n { type: 'FilmGrain', props: { strength: 0.06 } }\n ]\n }\n },\n {\n id: 'voronoiCells',\n preset: {\n components: [\n {\n type: 'Voronoi',\n props: {\n colorA: '#101820',\n colorB: '#3fb6a8',\n colorBorder: '#e8fff9',\n scale: 9,\n edgeIntensity: 0.7,\n edgeSoftness: 0.15,\n seed: 21,\n speed: 0.1\n }\n },\n { type: 'FilmGrain', props: { strength: 0.08 } }\n ]\n }\n },\n {\n id: 'deepWater',\n preset: {\n components: [\n {\n type: 'Water',\n props: {\n waterColor: '#0a2a43',\n clarity: 0.55,\n depth: 0.8,\n shallows: 0.35,\n caustics: 0.6,\n causticScale: 2.4,\n choppiness: 0.35,\n waveScale: 1.2,\n reflection: 0.4,\n foam: 0.15,\n speed: 0.25\n }\n },\n {\n type: 'LightLeak',\n props: {\n colorHot: '#9fe2ff',\n colorMid: '#1f4b6e',\n intensity: 0.25,\n spread: 0.6,\n speed: 0.15\n }\n },\n { type: 'FilmGrain', props: { strength: 0.06 } }\n ]\n }\n },\n {\n id: 'smokePlume',\n preset: {\n components: [\n {\n type: 'SmokeFill',\n props: {\n colorA: '#ffffff',\n colorB: '#6d6a75',\n direction: 90,\n speed: 0.25,\n spread: 0.5,\n emitRadius: 0.2,\n intensity: 0.8,\n dissipation: 0.55,\n detail: 0.6,\n gravity: 0.05,\n colorDecay: 0.4\n }\n },\n { type: 'FilmGrain', props: { strength: 0.05 } }\n ]\n }\n },\n {\n id: 'neonPulse',\n preset: {\n components: [\n {\n type: 'LightEdge',\n props: {\n colorA: '#ff2fb3',\n colorB: '#22d3ee',\n stops: [\n { color: '#ff2fb3', position: 0 },\n { color: '#22d3ee', position: 1 }\n ],\n thickness: 0.35,\n softness: 0.5,\n intensity: 0.9,\n bloom: 0.7,\n spots: 3,\n pulse: 0.6,\n smoke: 0.2,\n speed: 0.5\n }\n },\n { type: 'FilmGrain', props: { strength: 0.06 } }\n ]\n }\n },\n {\n id: 'grainWash',\n preset: {\n components: [\n {\n type: 'FlowingGradient',\n props: {\n colorA: '#0b1026',\n colorB: '#243b80',\n colorC: '#7c5cff',\n colorD: '#ffb86b',\n distortion: 0.7,\n speed: 0.25\n }\n },\n { type: 'FilmGrain', props: { strength: 0.18, bias: 0.05 } }\n ]\n }\n },\n {\n id: 'obsidian',\n preset: {\n components: [\n {\n type: 'Obsidian',\n props: {\n bodyColor: '#0a0b0f',\n colorA: '#3b0f52',\n colorB: '#0f6b6b',\n iridescence: 0.5,\n rimWidth: 0.25,\n rimSoftness: 0.3,\n flowScale: 1.6,\n gloss: 0.7,\n bevelWidth: 0.2,\n speed: 0.2\n }\n },\n { type: 'FilmGrain', props: { strength: 0.06 } }\n ]\n }\n },\n {\n id: 'marbleInk',\n preset: {\n components: [\n {\n type: 'Marble',\n props: {\n colorA: '#f7f4ee',\n colorB: '#20232b',\n colorC: '#8a8f9a',\n turbulence: 8,\n scale: 1.4,\n speed: 0.05\n }\n },\n {\n type: 'Halftone',\n props: {\n style: 'cmyk',\n frequency: 70,\n paperColor: '#f7f4ee',\n cyanColor: '#00a6c9',\n magentaColor: '#e0218a',\n yellowColor: '#f2d21a',\n blackColor: '#111111',\n misprint: 0.005\n }\n }\n ]\n }\n }\n]\n\n/** The gallery shader `preset` is, unchanged; null once any of its effects was edited. */\nexport function shaderGalleryEntryOf(preset: ShaderPreset): ShaderGalleryEntry | null {\n return SHADER_GALLERY.find((entry) => isEqual(entry.preset, preset)) ?? null\n}\n\nconst HEX_COLOR = /^#(?:[\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/i\n\nfunction colorsIn(value: unknown): string[] {\n if (typeof value === 'string') return HEX_COLOR.test(value) ? [value.toLowerCase()] : []\n if (Array.isArray(value)) return value.flatMap(colorsIn)\n if (typeof value === 'object' && value !== null) return Object.values(value).flatMap(colorsIn)\n return []\n}\n\n/**\n * The colors `preset` sets, in the order its effects draw, without repeats and at most `limit` of\n * them: a palette that stands in for the shader where it cannot be drawn.\n */\nexport function shaderPresetColors(preset: ShaderPreset, limit = 4): string[] {\n const colors = preset.components.flatMap((component) => colorsIn(component.props))\n return uniq(colors).slice(0, limit)\n}\n"],"mappings":";;;AAyCA,MAAa,iBAAgD;CAC3D;EACE,IAAI;EACJ,QAAQ,EACN,YAAY,CACV;GACE,MAAM;GACN,OAAO;IACL,OAAO;KACL;MAAE,OAAO;MAAW,UAAU;KAAE;KAChC;MAAE,OAAO;MAAW,UAAU;KAAI;KAClC;MAAE,OAAO;MAAW,UAAU;KAAI;KAClC;MAAE,OAAO;MAAW,UAAU;KAAI;KAClC;MAAE,OAAO;MAAW,UAAU;KAAE;IAClC;IACA,MAAM;GACR;EACF,GACA;GAAE,MAAM;GAAa,OAAO,EAAE,UAAU,GAAI;EAAE,CAChD,EACF;CACF;CACA;EACE,IAAI;EACJ,QAAQ,EACN,YAAY;GACV;IAAE,MAAM;IAAc,OAAO,EAAE,OAAO,UAAU;GAAE;GAClD;IACE,MAAM;IACN,OAAO;KAAE,QAAQ;KAAW,QAAQ;KAAW,QAAQ;KAAW,WAAW;IAAG;GAClF;GACA;IAAE,MAAM;IAAa,OAAO,EAA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AAW;IACX,cAAc;IACd,aAAa;IACb,YAAY;IACZ,UAAU;GACZ;EACF,CACF,EACF;CACF;AACF;;AAGA,SAAgB,qBAAqB,QAAiD;CACpF,OAAO,eAAe,MAAM,UAAU,QAAQ,MAAM,QAAQ,MAAM,CAAC,KAAK;AAC1E;AAEA,MAAM,YAAY;AAElB,SAAS,SAAS,OAA0B;CAC1C,IAAI,OAAO,UAAU,UAAU,OAAO,UAAU,KAAK,KAAK,IAAI,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC;CACvF,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,QAAQ,QAAQ;CACvD,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,QAAQ,QAAQ;CAC7F,OAAO,CAAC;AACV;;;;;AAMA,SAAgB,mBAAmB,QAAsB,QAAQ,GAAa;CAC5E,MAAM,SAAS,OAAO,WAAW,SAAS,cAAc,SAAS,UAAU,KAAK,CAAC;CACjF,OAAO,KAAK,MAAM,CAAC,CAAC,MAAM,GAAG,KAAK;AACpC"}
@@ -1,5 +1,7 @@
1
1
  import { ShaderEffect, ShaderPropControl, loadShaderCatalog, shaderEffectLabel } from "./catalog.js";
2
2
  import { SHADER_GALLERY, ShaderGalleryEntry, ShaderGalleryId, shaderGalleryEntryOf, shaderPresetColors } from "./gallery.js";
3
3
  import { shaderEffectPreview, shaderGalleryPreview } from "./preview.js";
4
+ import { SHADER_SHAPES, ShaderShape, shaderShapeType, withShapeType } from "./shapes.js";
5
+ import { ShaderStop, addStop, removeStop, setStopColor, setStopPosition, shaderStops } from "./stops.js";
4
6
  import { DEFAULT_SHADER_EFFECT, DEFAULT_SHADER_PRESET, DEFAULT_SHADER_SOURCE, addShaderEffect, moveShaderEffect, parseShaderPreset, removeShaderEffect, setShaderEffectProp, shaderPresetJSON } from "./preset.js";
5
- export { DEFAULT_SHADER_EFFECT, DEFAULT_SHADER_PRESET, DEFAULT_SHADER_SOURCE, SHADER_GALLERY, type ShaderEffect, type ShaderGalleryEntry, type ShaderGalleryId, type ShaderPropControl, addShaderEffect, loadShaderCatalog, moveShaderEffect, parseShaderPreset, removeShaderEffect, setShaderEffectProp, shaderEffectLabel, shaderEffectPreview, shaderGalleryEntryOf, shaderGalleryPreview, shaderPresetColors, shaderPresetJSON };
7
+ export { DEFAULT_SHADER_EFFECT, DEFAULT_SHADER_PRESET, DEFAULT_SHADER_SOURCE, SHADER_GALLERY, SHADER_SHAPES, type ShaderEffect, type ShaderGalleryEntry, type ShaderGalleryId, type ShaderPropControl, type ShaderShape, type ShaderStop, addShaderEffect, addStop, loadShaderCatalog, moveShaderEffect, parseShaderPreset, removeShaderEffect, removeStop, setShaderEffectProp, setStopColor, setStopPosition, shaderEffectLabel, shaderEffectPreview, shaderGalleryEntryOf, shaderGalleryPreview, shaderPresetColors, shaderPresetJSON, shaderShapeType, shaderStops, withShapeType };
@@ -1,5 +1,7 @@
1
+ import { SHADER_SHAPES, shaderShapeType, withShapeType } from "./shapes.js";
1
2
  import { loadShaderCatalog, shaderEffectLabel } from "./catalog.js";
2
3
  import { SHADER_GALLERY, shaderGalleryEntryOf, shaderPresetColors } from "./gallery.js";
3
4
  import { shaderEffectPreview, shaderGalleryPreview } from "./preview.js";
5
+ import { addStop, removeStop, setStopColor, setStopPosition, shaderStops } from "./stops.js";
4
6
  import { DEFAULT_SHADER_EFFECT, DEFAULT_SHADER_PRESET, DEFAULT_SHADER_SOURCE, addShaderEffect, moveShaderEffect, parseShaderPreset, removeShaderEffect, setShaderEffectProp, shaderPresetJSON } from "./preset.js";
5
- export { DEFAULT_SHADER_EFFECT, DEFAULT_SHADER_PRESET, DEFAULT_SHADER_SOURCE, SHADER_GALLERY, addShaderEffect, loadShaderCatalog, moveShaderEffect, parseShaderPreset, removeShaderEffect, setShaderEffectProp, shaderEffectLabel, shaderEffectPreview, shaderGalleryEntryOf, shaderGalleryPreview, shaderPresetColors, shaderPresetJSON };
7
+ export { DEFAULT_SHADER_EFFECT, DEFAULT_SHADER_PRESET, DEFAULT_SHADER_SOURCE, SHADER_GALLERY, SHADER_SHAPES, addShaderEffect, addStop, loadShaderCatalog, moveShaderEffect, parseShaderPreset, removeShaderEffect, removeStop, setShaderEffectProp, setStopColor, setStopPosition, shaderEffectLabel, shaderEffectPreview, shaderGalleryEntryOf, shaderGalleryPreview, shaderPresetColors, shaderPresetJSON, shaderShapeType, shaderStops, withShapeType };
@@ -0,0 +1,18 @@
1
+ //#region src/controls/shader/shapes.d.ts
2
+ /**
3
+ * The shapes the `shaders` library draws for an effect that takes one, as `SHAPE3D_TYPES` in
4
+ * `shaders/core` names them. The list is local so the panel does not load the WebGPU library;
5
+ * `shapes.test.ts` keeps it equal to the library's.
6
+ */
7
+ declare const SHADER_SHAPES: readonly ["sphere3D", "cube3D", "torus3D", "octahedron3D", "cylinder3D", "capsule3D", "cone3D", "pyramid3D", "prism3D", "ellipsoid3D", "diamond3D", "link3D", "gem3D", "helix3D", "metaballs3D", "dodecahedron3D", "hemisphere3D", "ribbon3D", "blob3D", "gyroscope3D"];
8
+ type ShaderShape = (typeof SHADER_SHAPES)[number];
9
+ /** The type of the shape `value` holds, or '' when it holds none. */
10
+ declare function shaderShapeType(value: unknown): string;
11
+ /**
12
+ * `value` with its shape type set to `type`: the new shape's own geometry fills in where the
13
+ * old shape had none, and whatever the old shape set for the same fields is kept.
14
+ */
15
+ declare function withShapeType(value: unknown, type: string): string;
16
+ //#endregion
17
+ export { SHADER_SHAPES, ShaderShape, shaderShapeType, withShapeType };
18
+ //# sourceMappingURL=shapes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapes.d.ts","names":[],"sources":["../../../src/controls/shader/shapes.ts"],"mappings":";;;;;;cAKa;KAuBD,sBAAsB;;iBA2ElB,gBAAgB;;;;;iBAShB,cAAc,gBAAgB"}
@@ -0,0 +1,227 @@
1
+ //#region src/controls/shader/shapes.ts
2
+ /**
3
+ * The shapes the `shaders` library draws for an effect that takes one, as `SHAPE3D_TYPES` in
4
+ * `shaders/core` names them. The list is local so the panel does not load the WebGPU library;
5
+ * `shapes.test.ts` keeps it equal to the library's.
6
+ */
7
+ const SHADER_SHAPES = [
8
+ "sphere3D",
9
+ "cube3D",
10
+ "torus3D",
11
+ "octahedron3D",
12
+ "cylinder3D",
13
+ "capsule3D",
14
+ "cone3D",
15
+ "pyramid3D",
16
+ "prism3D",
17
+ "ellipsoid3D",
18
+ "diamond3D",
19
+ "link3D",
20
+ "gem3D",
21
+ "helix3D",
22
+ "metaballs3D",
23
+ "dodecahedron3D",
24
+ "hemisphere3D",
25
+ "ribbon3D",
26
+ "blob3D",
27
+ "gyroscope3D"
28
+ ];
29
+ /** The geometry each shape starts from, as `SHAPE3D_DEFAULTS` in `shaders/core` gives it. */
30
+ const SHAPE_DEFAULTS = {
31
+ sphere3D: {
32
+ radius: .35,
33
+ rotX: 0,
34
+ rotY: 0,
35
+ rotZ: 0
36
+ },
37
+ cube3D: {
38
+ sizeX: .27,
39
+ sizeY: .27,
40
+ sizeZ: .27,
41
+ rounding: .02,
42
+ rotX: 25,
43
+ rotY: 35,
44
+ rotZ: 0
45
+ },
46
+ torus3D: {
47
+ radius: .3,
48
+ tube: .12,
49
+ rotX: 55,
50
+ rotY: 0,
51
+ rotZ: 0
52
+ },
53
+ octahedron3D: {
54
+ radius: .42,
55
+ rotX: 10,
56
+ rotY: 25,
57
+ rotZ: 0
58
+ },
59
+ cylinder3D: {
60
+ radius: .22,
61
+ height: .26,
62
+ rounding: .02,
63
+ rotX: 60,
64
+ rotY: 0,
65
+ rotZ: 30
66
+ },
67
+ capsule3D: {
68
+ radius: .16,
69
+ height: .2,
70
+ rotX: 0,
71
+ rotY: 0,
72
+ rotZ: 35
73
+ },
74
+ cone3D: {
75
+ radius: .3,
76
+ topRadius: .02,
77
+ height: .3,
78
+ rotX: 25,
79
+ rotY: 0,
80
+ rotZ: 15
81
+ },
82
+ pyramid3D: {
83
+ size: .3,
84
+ height: .45,
85
+ rotX: -10,
86
+ rotY: 30,
87
+ rotZ: 0
88
+ },
89
+ prism3D: {
90
+ radius: .28,
91
+ height: .14,
92
+ rotX: 25,
93
+ rotY: 30,
94
+ rotZ: 0
95
+ },
96
+ ellipsoid3D: {
97
+ radiusX: .38,
98
+ radiusY: .22,
99
+ radiusZ: .3,
100
+ rotX: 0,
101
+ rotY: 0,
102
+ rotZ: 20
103
+ },
104
+ diamond3D: {
105
+ radius: .3,
106
+ height: .42,
107
+ rotX: 15,
108
+ rotY: 0,
109
+ rotZ: 0
110
+ },
111
+ link3D: {
112
+ radius: .18,
113
+ length: .15,
114
+ tube: .08,
115
+ rotX: 20,
116
+ rotY: 30,
117
+ rotZ: 0
118
+ },
119
+ gem3D: {
120
+ radius: .3,
121
+ height: .32,
122
+ facets: 8,
123
+ rotX: 15,
124
+ rotY: 0,
125
+ rotZ: 0
126
+ },
127
+ helix3D: {
128
+ radius: .22,
129
+ tube: .06,
130
+ pitch: .16,
131
+ rotX: 20,
132
+ rotY: 0,
133
+ rotZ: 0
134
+ },
135
+ metaballs3D: {
136
+ balls: 4,
137
+ ballRadius: .16,
138
+ spread: .2,
139
+ blend: .12,
140
+ speed: 1,
141
+ rotX: 0,
142
+ rotY: 0,
143
+ rotZ: 0
144
+ },
145
+ dodecahedron3D: {
146
+ radius: .34,
147
+ rotX: 20,
148
+ rotY: 10,
149
+ rotZ: 0
150
+ },
151
+ hemisphere3D: {
152
+ radius: .4,
153
+ cut: 0,
154
+ rotX: 30,
155
+ rotY: 0,
156
+ rotZ: 0
157
+ },
158
+ ribbon3D: {
159
+ width: .15,
160
+ thickness: .03,
161
+ length: .38,
162
+ wave: .1,
163
+ waveFrequency: 7,
164
+ twist: 140,
165
+ speed: 1,
166
+ rotX: 12,
167
+ rotY: 18,
168
+ rotZ: 0
169
+ },
170
+ blob3D: {
171
+ radius: .3,
172
+ wobble: .07,
173
+ wobbliness: 5,
174
+ speed: 1,
175
+ rotX: 0,
176
+ rotY: 0,
177
+ rotZ: 0
178
+ },
179
+ gyroscope3D: {
180
+ radius: .34,
181
+ width: .1,
182
+ thickness: .028,
183
+ rounding: .006,
184
+ core: .14,
185
+ speed: 1,
186
+ rotX: 15,
187
+ rotY: 0,
188
+ rotZ: 0
189
+ }
190
+ };
191
+ /** The shape an effect's `shape` prop holds, as the library writes it: JSON with a `type`. */
192
+ function readShape(value) {
193
+ if (typeof value !== "string") return null;
194
+ try {
195
+ const parsed = JSON.parse(value);
196
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
197
+ return parsed;
198
+ } catch {
199
+ return null;
200
+ }
201
+ }
202
+ /** The type of the shape `value` holds, or '' when it holds none. */
203
+ function shaderShapeType(value) {
204
+ const shape = readShape(value);
205
+ return typeof shape?.type === "string" ? shape.type : "";
206
+ }
207
+ /**
208
+ * `value` with its shape type set to `type`: the new shape's own geometry fills in where the
209
+ * old shape had none, and whatever the old shape set for the same fields is kept.
210
+ */
211
+ function withShapeType(value, type) {
212
+ const shape = readShape(value);
213
+ if (shape?.type === type) return value;
214
+ const defaults = SHADER_SHAPES.includes(type) ? SHAPE_DEFAULTS[type] : {};
215
+ return JSON.stringify(shape ? {
216
+ ...defaults,
217
+ ...shape,
218
+ type
219
+ } : {
220
+ ...defaults,
221
+ type
222
+ });
223
+ }
224
+ //#endregion
225
+ export { SHADER_SHAPES, shaderShapeType, withShapeType };
226
+
227
+ //# sourceMappingURL=shapes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapes.js","names":[],"sources":["../../../src/controls/shader/shapes.ts"],"sourcesContent":["/**\n * The shapes the `shaders` library draws for an effect that takes one, as `SHAPE3D_TYPES` in\n * `shaders/core` names them. The list is local so the panel does not load the WebGPU library;\n * `shapes.test.ts` keeps it equal to the library's.\n */\nexport const SHADER_SHAPES = [\n 'sphere3D',\n 'cube3D',\n 'torus3D',\n 'octahedron3D',\n 'cylinder3D',\n 'capsule3D',\n 'cone3D',\n 'pyramid3D',\n 'prism3D',\n 'ellipsoid3D',\n 'diamond3D',\n 'link3D',\n 'gem3D',\n 'helix3D',\n 'metaballs3D',\n 'dodecahedron3D',\n 'hemisphere3D',\n 'ribbon3D',\n 'blob3D',\n 'gyroscope3D'\n] as const\n\nexport type ShaderShape = (typeof SHADER_SHAPES)[number]\n\n/** The geometry each shape starts from, as `SHAPE3D_DEFAULTS` in `shaders/core` gives it. */\nconst SHAPE_DEFAULTS: Readonly<Record<ShaderShape, Readonly<Record<string, number>>>> = {\n sphere3D: { radius: 0.35, rotX: 0, rotY: 0, rotZ: 0 },\n cube3D: { sizeX: 0.27, sizeY: 0.27, sizeZ: 0.27, rounding: 0.02, rotX: 25, rotY: 35, rotZ: 0 },\n torus3D: { radius: 0.3, tube: 0.12, rotX: 55, rotY: 0, rotZ: 0 },\n octahedron3D: { radius: 0.42, rotX: 10, rotY: 25, rotZ: 0 },\n cylinder3D: { radius: 0.22, height: 0.26, rounding: 0.02, rotX: 60, rotY: 0, rotZ: 30 },\n capsule3D: { radius: 0.16, height: 0.2, rotX: 0, rotY: 0, rotZ: 35 },\n cone3D: { radius: 0.3, topRadius: 0.02, height: 0.3, rotX: 25, rotY: 0, rotZ: 15 },\n pyramid3D: { size: 0.3, height: 0.45, rotX: -10, rotY: 30, rotZ: 0 },\n prism3D: { radius: 0.28, height: 0.14, rotX: 25, rotY: 30, rotZ: 0 },\n ellipsoid3D: { radiusX: 0.38, radiusY: 0.22, radiusZ: 0.3, rotX: 0, rotY: 0, rotZ: 20 },\n diamond3D: { radius: 0.3, height: 0.42, rotX: 15, rotY: 0, rotZ: 0 },\n link3D: { radius: 0.18, length: 0.15, tube: 0.08, rotX: 20, rotY: 30, rotZ: 0 },\n gem3D: { radius: 0.3, height: 0.32, facets: 8, rotX: 15, rotY: 0, rotZ: 0 },\n helix3D: { radius: 0.22, tube: 0.06, pitch: 0.16, rotX: 20, rotY: 0, rotZ: 0 },\n metaballs3D: {\n balls: 4,\n ballRadius: 0.16,\n spread: 0.2,\n blend: 0.12,\n speed: 1,\n rotX: 0,\n rotY: 0,\n rotZ: 0\n },\n dodecahedron3D: { radius: 0.34, rotX: 20, rotY: 10, rotZ: 0 },\n hemisphere3D: { radius: 0.4, cut: 0, rotX: 30, rotY: 0, rotZ: 0 },\n ribbon3D: {\n width: 0.15,\n thickness: 0.03,\n length: 0.38,\n wave: 0.1,\n waveFrequency: 7,\n twist: 140,\n speed: 1,\n rotX: 12,\n rotY: 18,\n rotZ: 0\n },\n blob3D: { radius: 0.3, wobble: 0.07, wobbliness: 5, speed: 1, rotX: 0, rotY: 0, rotZ: 0 },\n gyroscope3D: {\n radius: 0.34,\n width: 0.1,\n thickness: 0.028,\n rounding: 0.006,\n core: 0.14,\n speed: 1,\n rotX: 15,\n rotY: 0,\n rotZ: 0\n }\n}\n\n/** The fields a shape's JSON holds: a type, and whatever that shape's geometry needs. */\ninterface ShaderShapeFields {\n type?: unknown\n [field: string]: unknown\n}\n\n/** The shape an effect's `shape` prop holds, as the library writes it: JSON with a `type`. */\nfunction readShape(value: unknown): ShaderShapeFields | null {\n if (typeof value !== 'string') return null\n try {\n const parsed: unknown = JSON.parse(value)\n if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) return null\n return parsed as ShaderShapeFields\n } catch {\n return null\n }\n}\n\n/** The type of the shape `value` holds, or '' when it holds none. */\nexport function shaderShapeType(value: unknown): string {\n const shape = readShape(value)\n return typeof shape?.type === 'string' ? shape.type : ''\n}\n\n/**\n * `value` with its shape type set to `type`: the new shape's own geometry fills in where the\n * old shape had none, and whatever the old shape set for the same fields is kept.\n */\nexport function withShapeType(value: unknown, type: string): string {\n const shape = readShape(value)\n if (shape?.type === type) return value as string\n const defaults = SHADER_SHAPES.includes(type as ShaderShape)\n ? SHAPE_DEFAULTS[type as ShaderShape]\n : {}\n return JSON.stringify(shape ? { ...defaults, ...shape, type } : { ...defaults, type })\n}\n"],"mappings":";;;;;;AAKA,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;C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EAAO;CAAK,IAAI;EAAE,GAAG;EAAU;CAAK,CAAC;AACvF"}
@@ -0,0 +1,22 @@
1
+ //#region src/controls/shader/stops.d.ts
2
+ /** One colour stop of a shader effect's gradient, as the `shaders` library takes it. */
3
+ interface ShaderStop {
4
+ color: string;
5
+ position: number;
6
+ }
7
+ /** The stops a preset's gradient value holds, sorted along the ramp, positions within it. */
8
+ declare function shaderStops(value: unknown): ShaderStop[];
9
+ /** `stops` with stop `index` at `position`, kept within the ramp. */
10
+ declare function setStopPosition(stops: readonly ShaderStop[], index: number, position: number): ShaderStop[];
11
+ /** `stops` with stop `index` painted `color`. */
12
+ declare function setStopColor(stops: readonly ShaderStop[], index: number, color: string): ShaderStop[];
13
+ /**
14
+ * `stops` with a stop in the widest gap between two, painted the colour on its left, so adding
15
+ * one never flashes a colour the shader did not already show.
16
+ */
17
+ declare function addStop(stops: readonly ShaderStop[]): ShaderStop[];
18
+ /** `stops` without stop `index`; the last two stay, since a ramp needs two. */
19
+ declare function removeStop(stops: readonly ShaderStop[], index: number): ShaderStop[];
20
+ //#endregion
21
+ export { ShaderStop, addStop, removeStop, setStopColor, setStopPosition, shaderStops };
22
+ //# sourceMappingURL=stops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stops.d.ts","names":[],"sources":["../../../src/controls/shader/stops.ts"],"mappings":";;UACiB;EACf;EACA;;;iBAmBc,YAAY,iBAAiB;;iBAS7B,gBACd,gBAAgB,cAChB,eACA,mBACC;;iBAMa,aACd,gBAAgB,cAChB,eACA,gBACC;;;;;iBAQa,QAAQ,gBAAgB,eAAe;;iBAyBvC,WAAW,gBAAgB,cAAc,gBAAgB"}
@@ -0,0 +1,73 @@
1
+ //#region src/controls/shader/stops.ts
2
+ /** The least stops a gradient keeps: fewer stops are a colour, not a ramp. */
3
+ const MIN_STOPS = 2;
4
+ function isStop(value) {
5
+ return typeof value === "object" && value !== null && "color" in value && typeof value.color === "string" && "position" in value && typeof value.position === "number" && Number.isFinite(value.position);
6
+ }
7
+ /** The stops a preset's gradient value holds, sorted along the ramp, positions within it. */
8
+ function shaderStops(value) {
9
+ if (!Array.isArray(value)) return [];
10
+ return value.filter(isStop).map((stop) => ({
11
+ color: stop.color,
12
+ position: Math.min(1, Math.max(0, stop.position))
13
+ })).sort((a, b) => a.position - b.position);
14
+ }
15
+ /** `stops` with stop `index` at `position`, kept within the ramp. */
16
+ function setStopPosition(stops, index, position) {
17
+ const clamped = Math.min(1, Math.max(0, position));
18
+ return stops.map((stop, at) => at === index ? {
19
+ ...stop,
20
+ position: clamped
21
+ } : stop);
22
+ }
23
+ /** `stops` with stop `index` painted `color`. */
24
+ function setStopColor(stops, index, color) {
25
+ return stops.map((stop, at) => at === index ? {
26
+ ...stop,
27
+ color
28
+ } : stop);
29
+ }
30
+ /**
31
+ * `stops` with a stop in the widest gap between two, painted the colour on its left, so adding
32
+ * one never flashes a colour the shader did not already show.
33
+ */
34
+ function addStop(stops) {
35
+ if (stops.length === 0) return [{
36
+ color: "#000000",
37
+ position: 0
38
+ }, {
39
+ color: "#ffffff",
40
+ position: 1
41
+ }];
42
+ const sorted = shaderStops(stops);
43
+ let widest = 0;
44
+ let at = 0;
45
+ for (let index = 1; index < sorted.length; index++) {
46
+ const gap = (sorted[index]?.position ?? 1) - (sorted[index - 1]?.position ?? 0);
47
+ if (gap > widest) {
48
+ widest = gap;
49
+ at = index;
50
+ }
51
+ }
52
+ const left = sorted.at(Math.max(0, at - 1));
53
+ const right = sorted.at(Math.min(sorted.length - 1, at));
54
+ const position = ((left?.position ?? 0) + (right?.position ?? 1)) / 2;
55
+ const added = {
56
+ color: left?.color ?? "#000000",
57
+ position
58
+ };
59
+ return [
60
+ ...sorted.slice(0, at),
61
+ added,
62
+ ...sorted.slice(at)
63
+ ];
64
+ }
65
+ /** `stops` without stop `index`; the last two stay, since a ramp needs two. */
66
+ function removeStop(stops, index) {
67
+ if (stops.length <= MIN_STOPS) return [...stops];
68
+ return stops.filter((_, at) => at !== index);
69
+ }
70
+ //#endregion
71
+ export { addStop, removeStop, setStopColor, setStopPosition, shaderStops };
72
+
73
+ //# sourceMappingURL=stops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stops.js","names":[],"sources":["../../../src/controls/shader/stops.ts"],"sourcesContent":["/** One colour stop of a shader effect's gradient, as the `shaders` library takes it. */\nexport interface ShaderStop {\n color: string\n position: number\n}\n\n/** The least stops a gradient keeps: fewer stops are a colour, not a ramp. */\nconst MIN_STOPS = 2\n\nfunction isStop(value: unknown): value is ShaderStop {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'color' in value &&\n typeof value.color === 'string' &&\n 'position' in value &&\n typeof value.position === 'number' &&\n Number.isFinite(value.position)\n )\n}\n\n/** The stops a preset's gradient value holds, sorted along the ramp, positions within it. */\nexport function shaderStops(value: unknown): ShaderStop[] {\n if (!Array.isArray(value)) return []\n return value\n .filter(isStop)\n .map((stop) => ({ color: stop.color, position: Math.min(1, Math.max(0, stop.position)) }))\n .sort((a, b) => a.position - b.position)\n}\n\n/** `stops` with stop `index` at `position`, kept within the ramp. */\nexport function setStopPosition(\n stops: readonly ShaderStop[],\n index: number,\n position: number\n): ShaderStop[] {\n const clamped = Math.min(1, Math.max(0, position))\n return stops.map((stop, at) => (at === index ? { ...stop, position: clamped } : stop))\n}\n\n/** `stops` with stop `index` painted `color`. */\nexport function setStopColor(\n stops: readonly ShaderStop[],\n index: number,\n color: string\n): ShaderStop[] {\n return stops.map((stop, at) => (at === index ? { ...stop, color } : stop))\n}\n\n/**\n * `stops` with a stop in the widest gap between two, painted the colour on its left, so adding\n * one never flashes a colour the shader did not already show.\n */\nexport function addStop(stops: readonly ShaderStop[]): ShaderStop[] {\n if (stops.length === 0) {\n return [\n { color: '#000000', position: 0 },\n { color: '#ffffff', position: 1 }\n ]\n }\n const sorted = shaderStops(stops)\n let widest = 0\n let at = 0\n for (let index = 1; index < sorted.length; index++) {\n const gap = (sorted[index]?.position ?? 1) - (sorted[index - 1]?.position ?? 0)\n if (gap > widest) {\n widest = gap\n at = index\n }\n }\n const left = sorted.at(Math.max(0, at - 1))\n const right = sorted.at(Math.min(sorted.length - 1, at))\n const position = ((left?.position ?? 0) + (right?.position ?? 1)) / 2\n const added = { color: left?.color ?? '#000000', position }\n return [...sorted.slice(0, at), added, ...sorted.slice(at)]\n}\n\n/** `stops` without stop `index`; the last two stay, since a ramp needs two. */\nexport function removeStop(stops: readonly ShaderStop[], index: number): ShaderStop[] {\n if (stops.length <= MIN_STOPS) return [...stops]\n return stops.filter((_, at) => at !== index)\n}\n"],"mappings":";;AAOA,MAAM,YAAY;AAElB,SAAS,OAAO,OAAqC;CACnD,OACE,OAAO,UAAU,YACjB,UAAU,QACV,WAAW,SACX,OAAO,MAAM,UAAU,YACvB,cAAc,SACd,OAAO,MAAM,aAAa,YAC1B,OAAO,SAAS,MAAM,QAAQ;AAElC;;AAGA,SAAgB,YAAY,OAA8B;CACxD,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC;CACnC,OAAO,MACJ,OAAO,MAAM,CAAC,CACd,KAAK,UAAU;EAAE,OAAO,KAAK;EAAO,UAAU,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,QAAQ,CAAC;CAAE,EAAE,CAAC,CACzF,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,QAAQ;AAC3C;;AAGA,SAAgB,gBACd,OACA,OACA,UACc;CACd,MAAM,UAAU,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,QAAQ,CAAC;CACjD,OAAO,MAAM,KAAK,MAAM,OAAQ,OAAO,QAAQ;EAAE,GAAG;EAAM,UAAU;CAAQ,IAAI,IAAK;AACvF;;AAGA,SAAgB,aACd,OACA,OACA,OACc;CACd,OAAO,MAAM,KAAK,MAAM,OAAQ,OAAO,QAAQ;EAAE,GAAG;EAAM;CAAM,IAAI,IAAK;AAC3E;;;;;AAMA,SAAgB,QAAQ,OAA4C;CAClE,IAAI,MAAM,WAAW,GACnB,OAAO,CACL;EAAE,OAAO;EAAW,UAAU;CAAE,GAChC;EAAE,OAAO;EAAW,UAAU;CAAE,CAClC;CAEF,MAAM,SAAS,YAAY,KAAK;CAChC,IAAI,SAAS;CACb,IAAI,KAAK;CACT,KAAK,IAAI,QAAQ,GAAG,QAAQ,OAAO,QAAQ,SAAS;EAClD,MAAM,OAAO,OAAO,MAAM,EAAE,YAAY,MAAM,OAAO,QAAQ,EAAE,EAAE,YAAY;EAC7E,IAAI,MAAM,QAAQ;GAChB,SAAS;GACT,KAAK;EACP;CACF;CACA,MAAM,OAAO,OAAO,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,CAAC;CAC1C,MAAM,QAAQ,OAAO,GAAG,KAAK,IAAI,OAAO,SAAS,GAAG,EAAE,CAAC;CACvD,MAAM,aAAa,MAAM,YAAY,MAAM,OAAO,YAAY,MAAM;CACpE,MAAM,QAAQ;EAAE,OAAO,MAAM,SAAS;EAAW;CAAS;CAC1D,OAAO;EAAC,GAAG,OAAO,MAAM,GAAG,EAAE;EAAG;EAAO,GAAG,OAAO,MAAM,EAAE;CAAC;AAC5D;;AAGA,SAAgB,WAAW,OAA8B,OAA6B;CACpF,IAAI,MAAM,UAAU,WAAW,OAAO,CAAC,GAAG,KAAK;CAC/C,OAAO,MAAM,QAAQ,GAAG,OAAO,OAAO,KAAK;AAC7C"}
@@ -0,0 +1,24 @@
1
+ import { MixedValue } from "../node-props/helpers.js";
2
+ import { ComputedRef } from "vue";
3
+ import { Editor } from "@pairdraw/core";
4
+ import { SceneNode } from "@pairdraw/scene-graph";
5
+ //#region src/controls/typography/features.d.ts
6
+ /** One OpenType feature the selected text's font has, as the panel's switch list offers it. */
7
+ interface TypographyFeature {
8
+ tag: string;
9
+ /** One of the switches Figma always offers, whether or not the font lists the tag. */
10
+ standard: boolean;
11
+ }
12
+ /**
13
+ * The OpenType features of the selected text layers' font, as Figma's type settings offer them:
14
+ * only the features the font actually has, and actions that toggle them. Layers in different
15
+ * families share the features every one of their fonts has.
16
+ */
17
+ declare function createTypographyFeatures(editor: Editor, nodes: ComputedRef<SceneNode[]>): {
18
+ available: ComputedRef<TypographyFeature[]>;
19
+ state: (tag: string) => MixedValue<boolean>;
20
+ set: (tag: string, enabled: boolean) => void;
21
+ };
22
+ //#endregion
23
+ export { TypographyFeature, createTypographyFeatures };
24
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","names":[],"sources":["../../../src/controls/typography/features.ts"],"mappings":";;;;;;UAUiB;EACf;;EAEA;;;;;;;iBAiDc,yBAAyB,QAAQ,QAAQ,OAAO,YAAY;;EAsDtD,QAAA,gBAAS;EASX,MAAA,aAAM"}
@@ -0,0 +1,130 @@
1
+ import { MIXED } from "../node-props/helpers.js";
2
+ import { computed, onScopeDispose, ref } from "vue";
3
+ import { fontManager } from "@pairdraw/core/text";
4
+ import { uniq } from "es-toolkit/array";
5
+ //#region src/controls/typography/features.ts
6
+ /** The common switches Figma always shows for text; the font's own features follow them. */
7
+ const STANDARD_FEATURES = [
8
+ "LIGA",
9
+ "CALT",
10
+ "KERN"
11
+ ];
12
+ /** The features a font has, in a stable order: the common controls first, then the font's own. */
13
+ const COMMON_ORDER = [
14
+ "LIGA",
15
+ "CALT",
16
+ "DLIG",
17
+ "HLIG",
18
+ "KERN",
19
+ "LNUM",
20
+ "ONUM",
21
+ "PNUM",
22
+ "TNUM",
23
+ "FRAC",
24
+ "AFRC",
25
+ "ORDN",
26
+ "ZERO",
27
+ "SMCP",
28
+ "PCAP",
29
+ "C2SC",
30
+ "C2PC",
31
+ "UNIC",
32
+ "TITL",
33
+ "CASE",
34
+ "SINF",
35
+ "SUBS",
36
+ "SUPS"
37
+ ];
38
+ function featureOrder(tag) {
39
+ const common = COMMON_ORDER.indexOf(tag);
40
+ if (common !== -1) return common;
41
+ const set = /^SS(\d{2})$/.exec(tag);
42
+ if (set) return COMMON_ORDER.length + Number(set[1]);
43
+ const variant = /^CV(\d{2})$/.exec(tag);
44
+ if (variant) return COMMON_ORDER.length + 100 + Number(variant[1]);
45
+ return COMMON_ORDER.length + 200;
46
+ }
47
+ /**
48
+ * The OpenType features of the selected text layers' font, as Figma's type settings offer them:
49
+ * only the features the font actually has, and actions that toggle them. Layers in different
50
+ * families share the features every one of their fonts has.
51
+ */
52
+ function createTypographyFeatures(editor, nodes) {
53
+ const arrived = ref(0);
54
+ const families = computed(() => uniq(nodes.value.map((node) => node.fontFamily)));
55
+ function request(current) {
56
+ for (const family of current) {
57
+ if (fontManager.loadedFamilyFaces(family) !== void 0) continue;
58
+ fontManager.familyFaces(family).then(() => arrived.value++);
59
+ }
60
+ }
61
+ request(families.value);
62
+ onScopeDispose(fontManager.onFamilyFacesReset(() => {
63
+ arrived.value++;
64
+ request(families.value);
65
+ }));
66
+ onScopeDispose(fontManager.onFaceLoaded((family) => {
67
+ if (families.value.includes(family)) arrived.value++;
68
+ }));
69
+ const available = computed(() => {
70
+ arrived.value;
71
+ if (families.value.at(0) === void 0 || nodes.value.length === 0) return [];
72
+ let shared = null;
73
+ for (const family of families.value) {
74
+ const tags = fontManager.familyFeatures(family);
75
+ if (tags === void 0 || tags === null) return STANDARD_FEATURES.map((tag) => ({
76
+ tag,
77
+ standard: true
78
+ }));
79
+ shared = shared === null ? tags : shared.filter((tag) => tags.includes(tag));
80
+ }
81
+ return uniq([...STANDARD_FEATURES, ...shared ?? []]).map((tag) => ({
82
+ tag,
83
+ standard: STANDARD_FEATURES.includes(tag)
84
+ })).sort((a, b) => Number(b.standard) - Number(a.standard) || featureOrder(a.tag) - featureOrder(b.tag) || a.tag.localeCompare(b.tag));
85
+ });
86
+ /** Whether a feature is on for every selected text, MIXED when they differ; unset reads on. */
87
+ function state(tag) {
88
+ const values = nodes.value.map((node) => node.fontFeatures.find((feature) => feature.tag === tag)?.enabled ?? true);
89
+ const first = values.at(0);
90
+ return values.every((value) => value === first) ? first ?? true : MIXED;
91
+ }
92
+ /** Toggles one feature on every selected text, keeping its other features and its ranges'. */
93
+ function set(tag, enabled) {
94
+ const targets = nodes.value;
95
+ if (targets.length === 0) return;
96
+ editor.undo.runBatch(`Change ${tag} feature`, () => {
97
+ for (const target of targets) {
98
+ const node = editor.graph.getNode(target.id) ?? target;
99
+ const merge = (features) => features.some((feature) => feature.tag === tag) ? features.map((feature) => feature.tag === tag ? {
100
+ tag,
101
+ enabled
102
+ } : feature) : [...features, {
103
+ tag,
104
+ enabled
105
+ }];
106
+ const styleRuns = node.styleRuns.map((run) => run.style.fontFeatures ? {
107
+ ...run,
108
+ style: {
109
+ ...run.style,
110
+ fontFeatures: merge(run.style.fontFeatures)
111
+ }
112
+ } : run);
113
+ const changes = editor.layerChanges(target.id, { fontFeatures: merge(node.fontFeatures) });
114
+ editor.updateNodeWithUndo(target.id, {
115
+ ...changes,
116
+ styleRuns
117
+ }, `Change ${tag} feature`);
118
+ }
119
+ });
120
+ }
121
+ return {
122
+ available,
123
+ state,
124
+ set
125
+ };
126
+ }
127
+ //#endregion
128
+ export { STANDARD_FEATURES, createTypographyFeatures };
129
+
130
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.js","names":[],"sources":["../../../src/controls/typography/features.ts"],"sourcesContent":["import { uniq } from 'es-toolkit/array'\nimport { computed, onScopeDispose, ref, type ComputedRef } from 'vue'\n\nimport type { Editor } from '@pairdraw/core'\nimport { fontManager } from '@pairdraw/core/text'\nimport type { FontFeature, SceneNode } from '@pairdraw/scene-graph'\n\nimport { MIXED, type MixedValue } from '#vue/controls/node-props/use'\n\n/** One OpenType feature the selected text's font has, as the panel's switch list offers it. */\nexport interface TypographyFeature {\n tag: string\n /** One of the switches Figma always offers, whether or not the font lists the tag. */\n standard: boolean\n}\n\n/** The common switches Figma always shows for text; the font's own features follow them. */\nexport const STANDARD_FEATURES = ['LIGA', 'CALT', 'KERN'] as const\n\n/** The features a font has, in a stable order: the common controls first, then the font's own. */\nconst COMMON_ORDER = [\n 'LIGA',\n 'CALT',\n 'DLIG',\n 'HLIG',\n 'KERN',\n 'LNUM',\n 'ONUM',\n 'PNUM',\n 'TNUM',\n 'FRAC',\n 'AFRC',\n 'ORDN',\n 'ZERO',\n 'SMCP',\n 'PCAP',\n 'C2SC',\n 'C2PC',\n 'UNIC',\n 'TITL',\n 'CASE',\n 'SINF',\n 'SUBS',\n 'SUPS'\n]\n\nfunction featureOrder(tag: string): number {\n const common = COMMON_ORDER.indexOf(tag)\n if (common !== -1) return common\n // Stylistic sets and character variants follow, numbered; anything else sorts after them.\n const set = /^SS(\\d{2})$/.exec(tag)\n if (set) return COMMON_ORDER.length + Number(set[1])\n const variant = /^CV(\\d{2})$/.exec(tag)\n if (variant) return COMMON_ORDER.length + 100 + Number(variant[1])\n return COMMON_ORDER.length + 200\n}\n\n/**\n * The OpenType features of the selected text layers' font, as Figma's type settings offer them:\n * only the features the font actually has, and actions that toggle them. Layers in different\n * families share the features every one of their fonts has.\n */\nexport function createTypographyFeatures(editor: Editor, nodes: ComputedRef<SceneNode[]>) {\n // Bumped when a family's faces arrive, so the list follows a font that loads after selection.\n const arrived = ref(0)\n const families = computed(() => uniq(nodes.value.map((node) => node.fontFamily)))\n function request(current: readonly string[]) {\n for (const family of current) {\n if (fontManager.loadedFamilyFaces(family) !== undefined) continue\n void fontManager.familyFaces(family).then(() => arrived.value++)\n }\n }\n request(families.value)\n onScopeDispose(\n fontManager.onFamilyFacesReset(() => {\n arrived.value++\n request(families.value)\n })\n )\n // Faces may also arrive by the renderer, a paste or a script: the list follows any of them.\n onScopeDispose(\n fontManager.onFaceLoaded((family) => {\n if (families.value.includes(family)) arrived.value++\n })\n )\n\n const available = computed<TypographyFeature[]>(() => {\n void arrived.value\n const first = families.value.at(0)\n if (first === undefined || nodes.value.length === 0) return []\n let shared: string[] | null = null\n for (const family of families.value) {\n const tags = fontManager.familyFeatures(family)\n // Until a family's font is loaded its features are unknown: the common switches stay, and\n // the font's own join them once it arrives.\n if (tags === undefined || tags === null) {\n return STANDARD_FEATURES.map((tag) => ({ tag, standard: true }))\n }\n shared = shared === null ? tags : shared.filter((tag) => tags.includes(tag))\n }\n // The common switches stay offered beside the font's own, as Figma keeps them for any font.\n const tags = uniq([...STANDARD_FEATURES, ...(shared ?? [])])\n return tags\n .map((tag) => ({\n tag,\n standard: (STANDARD_FEATURES as readonly string[]).includes(tag)\n }))\n .sort(\n (a, b) =>\n Number(b.standard) - Number(a.standard) ||\n featureOrder(a.tag) - featureOrder(b.tag) ||\n a.tag.localeCompare(b.tag)\n )\n })\n\n /** Whether a feature is on for every selected text, MIXED when they differ; unset reads on. */\n function state(tag: string): MixedValue<boolean> {\n const values = nodes.value.map(\n (node) => node.fontFeatures.find((feature) => feature.tag === tag)?.enabled ?? true\n )\n const first = values.at(0)\n return values.every((value) => value === first) ? (first ?? true) : MIXED\n }\n\n /** Toggles one feature on every selected text, keeping its other features and its ranges'. */\n function set(tag: string, enabled: boolean) {\n const targets = nodes.value\n if (targets.length === 0) return\n editor.undo.runBatch(`Change ${tag} feature`, () => {\n for (const target of targets) {\n const node = editor.graph.getNode(target.id) ?? target\n // The toggled tag keeps its place in the list, so a range whose features now equal the\n // text's own keeps its run instead of being stripped as redundant.\n const merge = (features: FontFeature[]): FontFeature[] =>\n features.some((feature) => feature.tag === tag)\n ? features.map((feature) => (feature.tag === tag ? { tag, enabled } : feature))\n : [...features, { tag, enabled }]\n // A range with its own features keeps them, with the toggled tag replaced, as an axis\n // edit keeps the other axes a range sets. layerChanges strips the changed style from\n // the runs it recomputes, so the merged runs go on after it, not through it.\n const styleRuns = node.styleRuns.map((run) =>\n run.style.fontFeatures\n ? { ...run, style: { ...run.style, fontFeatures: merge(run.style.fontFeatures) } }\n : run\n )\n const changes = editor.layerChanges(target.id, { fontFeatures: merge(node.fontFeatures) })\n editor.updateNodeWithUndo(target.id, { ...changes, styleRuns }, `Change ${tag} feature`)\n }\n })\n }\n\n return { available, state, set }\n}\n"],"mappings":";;;;;;AAiBA,MAAa,oBAAoB;CAAC;CAAQ;CA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O,cAAc,MAAM,IAAI,MAAM,YAAY;KAAE;IAAE,IAC/E,GACN;IACA,MAAM,UAAU,OAAO,aAAa,OAAO,IAAI,EAAE,cAAc,MAAM,KAAK,YAAY,EAAE,CAAC;IACzF,OAAO,mBAAmB,OAAO,IAAI;KAAE,GAAG;KAAS;IAAU,GAAG,UAAU,IAAI,SAAS;GACzF;EACF,CAAC;CACH;CAEA,OAAO;EAAE;EAAW;EAAO;CAAI;AACjC"}
@@ -1,3 +1,4 @@
1
+ import { TypographyFeature, createTypographyFeatures } from "./features.js";
1
2
  import { TypographyAxis } from "./axes.js";
2
3
  import { UseTypographyOptions, useTypography } from "./use.js";
3
- export { type TypographyAxis, type UseTypographyOptions, useTypography };
4
+ export { type TypographyAxis, type TypographyFeature, type UseTypographyOptions, createTypographyFeatures, useTypography };
@@ -1,2 +1,3 @@
1
+ import { createTypographyFeatures } from "./features.js";
1
2
  import { useTypography } from "./use.js";
2
- export { useTypography };
3
+ export { createTypographyFeatures, useTypography };