@heyramzi/ui 2.8.0 → 2.10.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 (426) hide show
  1. package/COMPONENTS.md +1 -1
  2. package/README.md +1 -1
  3. package/dist/agents/helpers.js +52 -0
  4. package/dist/agents/index.js +3 -0
  5. package/dist/agents/page-state.js +65 -0
  6. package/dist/agents/types.js +1 -0
  7. package/dist/agents/vendor/color.js +149 -0
  8. package/dist/agents/vendor/draw.js +548 -0
  9. package/dist/agents/vendor/engine.js +632 -0
  10. package/dist/agents/vendor/mesh.js +727 -0
  11. package/dist/agents/vendor/plastic.js +3273 -0
  12. package/dist/agents/vendor/presets.js +171 -0
  13. package/dist/agents/vendor/shapes.js +24 -0
  14. package/dist/agents/vendor/ticker.js +56 -0
  15. package/dist/agents/vendor/types.js +0 -0
  16. package/dist/agents/vendor/wear.js +1525 -0
  17. package/dist/ai/ai-button/index.js +2 -0
  18. package/dist/ai/confirmation/confirmation-context.svelte.js +12 -0
  19. package/dist/ai/confirmation/index.js +9 -0
  20. package/dist/ai/generation-progress/index.js +2 -0
  21. package/dist/ai/index.js +11 -0
  22. package/dist/ai/loading-state/index.js +3 -0
  23. package/dist/ai/prompt-input/index.js +6 -0
  24. package/dist/ai/reasoning/index.js +4 -0
  25. package/dist/ai/reasoning/reasoning-context.svelte.js +12 -0
  26. package/dist/ai/response/index.js +3 -0
  27. package/dist/ai/suggestion/index.js +3 -0
  28. package/dist/ai/thinking-dots/index.js +3 -0
  29. package/dist/ai/typing-dots/index.js +2 -0
  30. package/dist/ai/voice-waveform/index.js +3 -0
  31. package/dist/animations/text-swap.js +30 -0
  32. package/dist/brand/index.js +65 -0
  33. package/dist/canvas/card/resize.js +10 -0
  34. package/dist/canvas/edges/edge-path.js +284 -0
  35. package/dist/canvas/editor/context-menu.js +42 -0
  36. package/dist/canvas/editor/dispatch.svelte.js +157 -0
  37. package/dist/canvas/editor/editor-context.js +8 -0
  38. package/dist/canvas/editor/editor-mode.js +0 -0
  39. package/dist/canvas/editor/frame.js +87 -0
  40. package/dist/canvas/editor/hand-context.js +8 -0
  41. package/dist/canvas/editor/history-core.js +221 -0
  42. package/dist/canvas/editor/keymap.js +193 -0
  43. package/dist/canvas/editor/layout-actions.js +170 -0
  44. package/dist/canvas/editor/lock.js +65 -0
  45. package/dist/canvas/editor/rebase.js +279 -0
  46. package/dist/canvas/editor/style.js +174 -0
  47. package/dist/canvas/editor/text-field-context.js +8 -0
  48. package/dist/canvas/editor/z-order.js +82 -0
  49. package/dist/canvas/headless/alignment.js +20 -0
  50. package/dist/canvas/headless/break-apart-find.js +324 -0
  51. package/dist/canvas/headless/break-apart-pieces.js +74 -0
  52. package/dist/canvas/headless/break-apart-plan.js +378 -0
  53. package/dist/canvas/headless/break-apart-style.js +93 -0
  54. package/dist/canvas/headless/break-apart.js +206 -0
  55. package/dist/canvas/headless/canvas-cleanup.js +70 -0
  56. package/dist/canvas/headless/edge-anchors.js +134 -0
  57. package/dist/canvas/headless/edge-memo.js +28 -0
  58. package/dist/canvas/headless/edge-serialization.js +31 -0
  59. package/dist/canvas/headless/figure-geometry.js +331 -0
  60. package/dist/canvas/headless/fit-viewport.js +82 -0
  61. package/dist/canvas/headless/grid.js +96 -0
  62. package/dist/canvas/headless/icon-node.js +45 -0
  63. package/dist/canvas/headless/index.js +1 -0
  64. package/dist/canvas/headless/linkify.js +25 -0
  65. package/dist/canvas/headless/pen-marks.js +115 -0
  66. package/dist/canvas/headless/sketch.js +250 -0
  67. package/dist/canvas/headless/snap-guides.js +100 -0
  68. package/dist/canvas/headless/svg-figure.js +137 -0
  69. package/dist/canvas/headless/table-layout.js +161 -0
  70. package/dist/canvas/index.js +25 -0
  71. package/dist/canvas/lod/lod-mode.svelte.js +22 -0
  72. package/dist/canvas/lod/render-all.svelte.js +45 -0
  73. package/dist/canvas/ops/arrange.js +83 -0
  74. package/dist/canvas/ops/ops.js +318 -0
  75. package/dist/canvas/pen/colors.js +41 -0
  76. package/dist/canvas/pen/eraser.js +35 -0
  77. package/dist/canvas/pen/geometry.js +143 -0
  78. package/dist/canvas/pen/index.js +9 -0
  79. package/dist/canvas/pen/ops.js +15 -0
  80. package/dist/canvas/pen/pen-session.js +171 -0
  81. package/dist/canvas/pen/plugin.js +129 -0
  82. package/dist/canvas/pen/shapes.js +80 -0
  83. package/dist/canvas/pen/stroke-path.js +37 -0
  84. package/dist/canvas/pen/types.js +30 -0
  85. package/dist/canvas/pen/ui.js +20 -0
  86. package/dist/canvas/plugin.js +51 -0
  87. package/dist/canvas/screen/glyphs.js +24 -0
  88. package/dist/canvas/screen/labels.js +24 -0
  89. package/dist/canvas/screen/parts.js +140 -0
  90. package/dist/canvas/screen/plugin.js +71 -0
  91. package/dist/canvas/screen/types.js +44 -0
  92. package/dist/canvas/screen/ui.js +13 -0
  93. package/dist/canvas/test-utils.js +18 -0
  94. package/dist/canvas/types.js +0 -0
  95. package/dist/canvas/ui/forward-wheel.js +27 -0
  96. package/dist/canvas/ui/icons.js +133 -0
  97. package/dist/canvas/ui/place-panel.js +57 -0
  98. package/dist/canvas/ui/shortcut-tip.js +18 -0
  99. package/dist/canvas/ui/tools.js +411 -0
  100. package/dist/charts/dashboard/chart.js +1 -0
  101. package/dist/charts/dashboard/data-table.js +7 -0
  102. package/dist/charts/dashboard/index.js +13 -0
  103. package/dist/charts/dashboard/windows.js +5 -0
  104. package/dist/charts/edge-fade.js +7 -0
  105. package/dist/charts/hover-band.js +13 -0
  106. package/dist/charts/index.js +19 -0
  107. package/dist/charts/motion.js +15 -0
  108. package/dist/charts/primitives/chart-utils.js +22 -0
  109. package/dist/charts/primitives/index.js +4 -0
  110. package/dist/components/copy/clipboard.js +38 -0
  111. package/dist/components/copy/copied.svelte.js +26 -0
  112. package/dist/components/copy/index.js +3 -0
  113. package/dist/components/data-table/data-table.js +55 -0
  114. package/dist/components/data-table/index.js +7 -0
  115. package/dist/components/docs/index.js +3 -0
  116. package/dist/components/docs/scroll-spy.svelte.js +71 -0
  117. package/dist/components/field-row/index.js +1 -0
  118. package/dist/components/hold-to-confirm/index.js +1 -0
  119. package/dist/components/icon/index.js +1 -0
  120. package/dist/components/language-flag/index.js +1 -0
  121. package/dist/components/list-page/filter-section.js +4 -0
  122. package/dist/components/list-page/index.js +25 -0
  123. package/dist/components/list-page/list-table.js +5 -0
  124. package/dist/components/list-page/queue-rail.js +3 -0
  125. package/dist/components/list-page/section-host.js +8 -0
  126. package/dist/components/list-page/step.js +5 -0
  127. package/dist/components/list-page/types.js +0 -0
  128. package/dist/components/locale-switch/index.js +1 -0
  129. package/dist/components/mark/index.js +1 -0
  130. package/dist/components/open-in/index.js +1 -0
  131. package/dist/components/picker/index.js +3 -0
  132. package/dist/components/picker/trigger.js +33 -0
  133. package/dist/components/picker/types.js +0 -0
  134. package/dist/components/section-card/index.js +1 -0
  135. package/dist/components/section-header/index.js +2 -0
  136. package/dist/components/segmented/collapse.js +32 -0
  137. package/dist/components/segmented/index.js +8 -0
  138. package/dist/components/segmented/segmented.js +50 -0
  139. package/dist/components/star-rating-input/index.js +2 -0
  140. package/dist/components/svg/index.js +1 -0
  141. package/dist/components/table-view/index.js +1 -0
  142. package/dist/components/table-view/types.js +0 -0
  143. package/dist/components/tags-input/index.js +2 -0
  144. package/dist/components/tags-input/tags.js +90 -0
  145. package/dist/components/theme/index.js +3 -0
  146. package/dist/components/toolbar/index.js +3 -0
  147. package/dist/components/toolbar/toolbar-trigger.js +4 -0
  148. package/dist/editor/anchors.js +17 -0
  149. package/dist/editor/block-id.js +62 -0
  150. package/dist/editor/block-ops.js +105 -0
  151. package/dist/editor/doc-blocks.js +181 -0
  152. package/dist/editor/extensions.js +200 -0
  153. package/dist/editor/index.js +4 -0
  154. package/dist/editor/markdown-test-helpers.js +6 -0
  155. package/dist/editor/markdown.js +486 -0
  156. package/dist/editor/serializer.js +268 -0
  157. package/dist/editor/slash-items.js +104 -0
  158. package/dist/editor/youtube-url.js +27 -0
  159. package/dist/effects/animated-beam/index.js +1 -0
  160. package/dist/effects/animated-beam/path-calculator.svelte.js +42 -0
  161. package/dist/effects/animated-beam/types.js +0 -0
  162. package/dist/effects/border-beam/css.js +420 -0
  163. package/dist/effects/border-beam/presets.js +1792 -0
  164. package/dist/effects/border-beam/register-properties.js +39 -0
  165. package/dist/effects/border-beam/types.js +0 -0
  166. package/dist/effects/image-comparison/compare.js +4 -0
  167. package/dist/effects/image-reveal/index.js +1 -0
  168. package/dist/effects/image-reveal/types.js +0 -0
  169. package/dist/effects/magnetic/magnetic.js +54 -0
  170. package/dist/effects/reveal/index.js +4 -0
  171. package/dist/effects/reveal/observe.js +43 -0
  172. package/dist/effects/reveal/types.js +0 -0
  173. package/dist/effects/shader-gradient/color.js +34 -0
  174. package/dist/effects/shader-gradient/index.js +1 -0
  175. package/dist/effects/shader-gradient/renderer.js +320 -0
  176. package/dist/effects/shader-gradient/shaders.js +280 -0
  177. package/dist/effects/shader-gradient/types.js +0 -0
  178. package/dist/icons/apple-symbol-exports.js +126 -0
  179. package/dist/icons/sf-symbols.js +465 -0
  180. package/dist/icons/trades.js +34 -0
  181. package/dist/inbox/index.js +4 -0
  182. package/dist/inbox/logic.js +156 -0
  183. package/dist/inbox/types.js +46 -0
  184. package/dist/index.js +18 -0
  185. package/dist/lib/arrive.js +13 -0
  186. package/dist/lib/icon-types.js +0 -0
  187. package/dist/lib/initials.js +17 -0
  188. package/dist/lib/layout.js +1 -0
  189. package/dist/lib/panel.js +3 -0
  190. package/dist/lib/result.js +26 -0
  191. package/dist/lib/sliding-pill.js +45 -0
  192. package/dist/lib/theme-transition.js +53 -0
  193. package/dist/lib/tone.js +32 -0
  194. package/dist/lib/utils.js +5 -0
  195. package/dist/onboarding/define-tours.js +28 -0
  196. package/dist/onboarding/index.js +4 -0
  197. package/dist/onboarding/onboarding.svelte.js +15 -0
  198. package/dist/onboarding/pick.js +16 -0
  199. package/dist/onboarding/stores.js +50 -0
  200. package/dist/onboarding/types.js +1 -0
  201. package/dist/onboarding/wait.js +25 -0
  202. package/dist/panel/index.js +1 -0
  203. package/dist/panel/side-panel-types.js +0 -0
  204. package/dist/record/demo-data.js +512 -0
  205. package/dist/record/fields.js +148 -0
  206. package/dist/record/format.js +97 -0
  207. package/dist/record/gutter.js +1 -0
  208. package/dist/record/index.js +15 -0
  209. package/dist/record/kinds.js +110 -0
  210. package/dist/record/logic.js +255 -0
  211. package/dist/record/types.js +52 -0
  212. package/dist/shadcn/accordion/index.js +5 -0
  213. package/dist/shadcn/alert/index.js +5 -0
  214. package/dist/shadcn/alert-dialog/index.js +12 -0
  215. package/dist/shadcn/attachment/index.js +10 -0
  216. package/dist/shadcn/avatar/index.js +7 -0
  217. package/dist/shadcn/badge/index.js +2 -0
  218. package/dist/shadcn/breadcrumb/index.js +8 -0
  219. package/dist/shadcn/bubble/index.js +5 -0
  220. package/dist/shadcn/button/index.js +2 -0
  221. package/dist/shadcn/calendar/index.js +19 -0
  222. package/dist/shadcn/card/index.js +8 -0
  223. package/dist/shadcn/checkbox/index.js +2 -0
  224. package/dist/shadcn/code-block/index.js +9 -0
  225. package/dist/shadcn/collapsible/index.js +4 -0
  226. package/dist/shadcn/command/index.js +13 -0
  227. package/dist/shadcn/context-menu/index.js +17 -0
  228. package/dist/shadcn/dialog/index.js +11 -0
  229. package/dist/shadcn/dropdown-menu/index.js +19 -0
  230. package/dist/shadcn/dropdown-menu/menu-item.js +23 -0
  231. package/dist/shadcn/empty/index.js +7 -0
  232. package/dist/shadcn/field/index.js +12 -0
  233. package/dist/shadcn/hooks/highlighter.js +92 -0
  234. package/dist/shadcn/hooks/is-mobile.svelte.js +7 -0
  235. package/dist/shadcn/hooks/use-highlighted-code.svelte.js +65 -0
  236. package/dist/shadcn/hover-card/index.js +5 -0
  237. package/dist/shadcn/input/index.js +3 -0
  238. package/dist/shadcn/input-otp/index.js +5 -0
  239. package/dist/shadcn/kbd/index.js +3 -0
  240. package/dist/shadcn/label/index.js +2 -0
  241. package/dist/shadcn/marker/index.js +4 -0
  242. package/dist/shadcn/message/index.js +7 -0
  243. package/dist/shadcn/message-scroller/index.js +8 -0
  244. package/dist/shadcn/popover/index.js +9 -0
  245. package/dist/shadcn/progress/index.js +2 -0
  246. package/dist/shadcn/progress/tone.js +11 -0
  247. package/dist/shadcn/radio-group/index.js +3 -0
  248. package/dist/shadcn/scroll-area/index.js +3 -0
  249. package/dist/shadcn/select/index.js +12 -0
  250. package/dist/shadcn/separator/index.js +2 -0
  251. package/dist/shadcn/sheet/index.js +11 -0
  252. package/dist/shadcn/sidebar/constants.js +6 -0
  253. package/dist/shadcn/sidebar/context.svelte.js +38 -0
  254. package/dist/shadcn/sidebar/index.js +25 -0
  255. package/dist/shadcn/skeleton/index.js +2 -0
  256. package/dist/shadcn/slider/index.js +2 -0
  257. package/dist/shadcn/sonner/index.js +1 -0
  258. package/dist/shadcn/spinner/index.js +1 -0
  259. package/dist/shadcn/switch/index.js +2 -0
  260. package/dist/shadcn/table/index.js +9 -0
  261. package/dist/shadcn/tabs/index.js +5 -0
  262. package/dist/shadcn/textarea/index.js +2 -0
  263. package/dist/shadcn/toggle/index.js +3 -0
  264. package/dist/shadcn/toggle-group/index.js +3 -0
  265. package/dist/shadcn/tooltip/context.js +8 -0
  266. package/dist/shadcn/tooltip/index.js +6 -0
  267. package/dist/shadcn/trace/index.js +9 -0
  268. package/dist/slides/bridges.js +66 -0
  269. package/dist/slides/deck-controller.svelte.js +221 -0
  270. package/dist/slides/export/capture.js +81 -0
  271. package/dist/slides/export/ffmpeg.js +85 -0
  272. package/dist/slides/export/index.js +4 -0
  273. package/dist/slides/export/launch.js +8 -0
  274. package/dist/slides/export/pdf.js +78 -0
  275. package/dist/slides/export/types.js +0 -0
  276. package/dist/slides/index.js +7 -0
  277. package/dist/slides/labels.js +26 -0
  278. package/dist/slides/layout.js +47 -0
  279. package/dist/slides/model.js +9 -0
  280. package/dist/slides/navigation.js +89 -0
  281. package/dist/slides/types.js +6 -0
  282. package/dist/status/define-statuses.js +16 -0
  283. package/dist/status/index.js +4 -0
  284. package/dist/status/status-types.js +0 -0
  285. package/dist/test-setup.js +26 -0
  286. package/dist/thread/index.js +3 -0
  287. package/dist/thread/logic.js +94 -0
  288. package/dist/thread/types.js +23 -0
  289. package/dist/work/board-order.js +109 -0
  290. package/dist/work/dates.js +19 -0
  291. package/dist/work/detail/detail-types.js +20 -0
  292. package/dist/work/docs/edited.js +39 -0
  293. package/dist/work/docs/index.js +7 -0
  294. package/dist/work/docs/labels.js +38 -0
  295. package/dist/work/docs/menu.js +121 -0
  296. package/dist/work/docs/outline.js +39 -0
  297. package/dist/work/gantt/logic.js +260 -0
  298. package/dist/work/inbox/inbox-logic.js +94 -0
  299. package/dist/work/inbox/inbox-statuses.js +86 -0
  300. package/dist/work/inbox/inbox-types.js +0 -0
  301. package/dist/work/inbox/index.js +1 -0
  302. package/dist/work/index.js +21 -0
  303. package/dist/work/kanban-drag.js +25 -0
  304. package/dist/work/kanban-types.js +0 -0
  305. package/dist/work/presets/sales.js +35 -0
  306. package/dist/work/reorder.js +10 -0
  307. package/dist/work/task-types.js +0 -0
  308. package/dist/work/time/duration.js +60 -0
  309. package/dist/work/time/time-types.js +25 -0
  310. package/dist/work/use-kanban-dnd.svelte.js +128 -0
  311. package/package.json +102 -76
  312. package/src/agents/vendor/draw.ts +4 -4
  313. package/src/canvas/headless/canvas-cleanup.test.ts +1 -1
  314. package/src/canvas/ops/ops.ts +1 -1
  315. package/src/charts/area-chart.svelte +11 -1
  316. package/src/charts/bar-chart.svelte +18 -3
  317. package/src/charts/line-chart.svelte +11 -1
  318. package/src/components/data-table/data-table.ts +4 -5
  319. package/src/components/data-table/pagination.svelte +5 -3
  320. package/src/components/docs/on-this-page.svelte +82 -5
  321. package/src/components/docs/scroll-spy.svelte.ts +6 -1
  322. package/src/components/list-page/detail-header.svelte +7 -3
  323. package/src/components/list-page/empty-state.svelte +3 -1
  324. package/src/components/list-page/filter-popover.svelte +2 -2
  325. package/src/components/list-page/rail-row.svelte +5 -2
  326. package/src/components/mark/mark.svelte +2 -1
  327. package/src/components/section-card/section-card.svelte +3 -1
  328. package/src/components/section-header/section-header.svelte +5 -5
  329. package/src/components/segmented/segment.svelte +1 -1
  330. package/src/components/table-view/table-view.svelte +6 -1
  331. package/src/components/tags-input/tags-input.svelte +1 -1
  332. package/src/components/toolbar/toolbar-trigger.ts +8 -2
  333. package/src/components/toolbar/toolbar.svelte +1 -1
  334. package/src/editor/anchors.ts +28 -0
  335. package/src/editor/doc-blocks.ts +168 -0
  336. package/src/editor/doc-page.css +389 -0
  337. package/src/editor/editor.svelte +47 -5
  338. package/src/editor/extensions.ts +26 -2
  339. package/src/editor/markdown.ts +27 -2
  340. package/src/editor/slash-items.ts +18 -0
  341. package/src/icons/trades.ts +1 -1
  342. package/src/inbox/README.md +6 -4
  343. package/src/inbox/inbox.test.ts +1 -1
  344. package/src/inbox/index.ts +2 -2
  345. package/src/inbox/logic.ts +29 -5
  346. package/src/inbox/thread-inbox.svelte +219 -92
  347. package/src/inbox/types.ts +27 -1
  348. package/src/lib/initials.test.ts +25 -0
  349. package/src/lib/initials.ts +29 -0
  350. package/src/modules.test.ts +4 -64
  351. package/src/panel/README.md +1 -1
  352. package/src/record/README.md +1 -1
  353. package/src/record/demo-data.ts +4 -4
  354. package/src/record/info-list.svelte +5 -4
  355. package/src/record/next-up.svelte +1 -1
  356. package/src/record/project-list.svelte +1 -1
  357. package/src/record/record-demo.svelte +2 -2
  358. package/src/record/steps-rail.svelte +3 -3
  359. package/src/shadcn/badge/badge.svelte +1 -1
  360. package/src/shadcn/card/card-title.svelte +1 -5
  361. package/src/shadcn/empty/empty-description.svelte +1 -1
  362. package/src/shadcn/progress/progress.svelte +8 -1
  363. package/src/shadcn/table/table-cell.svelte +10 -2
  364. package/src/status/README.md +1 -1
  365. package/src/thread/README.md +2 -0
  366. package/src/thread/index.ts +9 -1
  367. package/src/thread/logic.ts +33 -3
  368. package/src/thread/thread-body.svelte +37 -0
  369. package/src/thread/thread-events.svelte +30 -0
  370. package/src/thread/thread.svelte +74 -59
  371. package/src/thread/types.ts +21 -0
  372. package/src/{tasks → work}/README.md +11 -8
  373. package/src/{tasks → work}/detail/task-thread.svelte +8 -15
  374. package/src/work/docs/doc-editor-page.svelte +194 -0
  375. package/src/work/docs/doc-menu.svelte +333 -0
  376. package/src/work/docs/docs-demo.svelte +227 -0
  377. package/src/work/docs/edited-chip.svelte +125 -0
  378. package/src/work/docs/edited.ts +54 -0
  379. package/src/work/docs/index.ts +38 -0
  380. package/src/work/docs/labels.ts +70 -0
  381. package/src/work/docs/menu.ts +127 -0
  382. package/src/work/docs/outline.ts +60 -0
  383. package/src/{tasks → work}/gantt/gantt-group-row.svelte +1 -1
  384. package/src/{tasks → work}/inbox/inbox-card.svelte +113 -50
  385. package/src/work/inbox/inbox-logic.ts +98 -0
  386. package/src/work/inbox/inbox-trace.svelte +58 -0
  387. package/src/{tasks → work}/inbox/inbox-types.ts +2 -0
  388. package/src/{tasks → work}/index.ts +0 -10
  389. package/src/{tasks → work}/kanban-board.svelte +1 -1
  390. package/src/{tasks → work}/task-list.svelte +1 -1
  391. package/src/{tasks → work}/time/time-tracker.svelte +2 -5
  392. package/src/tasks/inbox/inbox-logic.ts +0 -21
  393. package/src/tasks/inbox/inbox-trace.svelte +0 -51
  394. /package/src/{tasks → work}/ambient.d.ts +0 -0
  395. /package/src/{tasks → work}/board-order.ts +0 -0
  396. /package/src/{tasks → work}/dates.ts +0 -0
  397. /package/src/{tasks → work}/demo.svelte +0 -0
  398. /package/src/{tasks → work}/detail/detail-demo.svelte +0 -0
  399. /package/src/{tasks → work}/detail/detail-types.ts +0 -0
  400. /package/src/{tasks → work}/detail/task-chip.svelte +0 -0
  401. /package/src/{tasks → work}/detail/task-detail.svelte +0 -0
  402. /package/src/{tasks → work}/detail/task-property.svelte +0 -0
  403. /package/src/{tasks → work}/gantt/gantt-bar.svelte +0 -0
  404. /package/src/{tasks → work}/gantt/gantt-grid.svelte +0 -0
  405. /package/src/{tasks → work}/gantt/gantt-header.svelte +0 -0
  406. /package/src/{tasks → work}/gantt/gantt-task-row.svelte +0 -0
  407. /package/src/{tasks → work}/gantt/gantt.css +0 -0
  408. /package/src/{tasks → work}/gantt/gantt.test.ts +0 -0
  409. /package/src/{tasks → work}/gantt/logic.test.ts +0 -0
  410. /package/src/{tasks → work}/gantt/logic.ts +0 -0
  411. /package/src/{tasks → work}/inbox/inbox-draft.svelte +0 -0
  412. /package/src/{tasks → work}/inbox/inbox-statuses.ts +0 -0
  413. /package/src/{tasks → work}/inbox/index.ts +0 -0
  414. /package/src/{tasks → work}/kanban-column.svelte +0 -0
  415. /package/src/{tasks → work}/kanban-drag.ts +0 -0
  416. /package/src/{tasks → work}/kanban-types.ts +0 -0
  417. /package/src/{tasks → work}/presets/sales.ts +0 -0
  418. /package/src/{tasks → work}/reorder.ts +0 -0
  419. /package/src/{tasks → work}/task-gantt.svelte +0 -0
  420. /package/src/{tasks → work}/task-types.ts +0 -0
  421. /package/src/{tasks → work}/time/duration.ts +0 -0
  422. /package/src/{tasks → work}/time/time-chip.svelte +0 -0
  423. /package/src/{tasks → work}/time/time-dot.svelte +0 -0
  424. /package/src/{tasks → work}/time/time-ring.svelte +0 -0
  425. /package/src/{tasks → work}/time/time-types.ts +0 -0
  426. /package/src/{tasks → work}/use-kanban-dnd.svelte.ts +0 -0
@@ -0,0 +1,39 @@
1
+ export function registerBorderBeamProperties(id, size) {
2
+ const registry = globalThis.CSS;
3
+ if (typeof registry?.registerProperty !== "function") return;
4
+ for (const registration of getBorderBeamPropertyRegistrations(id, size)){
5
+ try {
6
+ registry.registerProperty?.(registration);
7
+ } catch {}
8
+ }
9
+ }
10
+ function getBorderBeamPropertyRegistrations(id, size) {
11
+ if (size === "line") {
12
+ return [
13
+ numberProperty(`--beam-x-${id}`, "0"),
14
+ numberProperty(`--beam-w-${id}`, "1"),
15
+ numberProperty(`--beam-h-${id}`, "1"),
16
+ numberProperty(`--beam-spike-${id}`, "1"),
17
+ numberProperty(`--beam-spike2-${id}`, "1"),
18
+ numberProperty(`--beam-edge-${id}`, "1"),
19
+ numberProperty(`--beam-opacity-${id}`, "0")
20
+ ];
21
+ }
22
+ return [
23
+ {
24
+ name: `--beam-angle-${id}`,
25
+ syntax: "<angle>",
26
+ initialValue: "0deg",
27
+ inherits: true
28
+ },
29
+ numberProperty(`--beam-opacity-${id}`, "0")
30
+ ];
31
+ }
32
+ function numberProperty(name, initialValue) {
33
+ return {
34
+ name,
35
+ syntax: "<number>",
36
+ initialValue,
37
+ inherits: true
38
+ };
39
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ export function positionAt(clientX, left, width) {
2
+ if (width <= 0) return 50;
3
+ return Math.min(Math.max((clientX - left) / width * 100, 0), 100);
4
+ }
@@ -0,0 +1 @@
1
+ export { default as ImageReveal } from "../../../src/effects/image-reveal/ImageReveal.svelte";
File without changes
@@ -0,0 +1,54 @@
1
+ const EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
2
+ export const magnetic = (node, options)=>{
3
+ let intensity = options?.intensity ?? 0.6;
4
+ let range = options?.range ?? 100;
5
+ let from = options?.from ?? "self";
6
+ let duration = options?.duration ?? 350;
7
+ let armed = false;
8
+ const reduced = window.matchMedia("(prefers-reduced-motion: reduce)");
9
+ const zone = ()=>from === "parent" ? node.parentElement ?? node : node;
10
+ const reset = ()=>{
11
+ node.style.transition = `translate ${duration}ms ${EASE}`;
12
+ node.style.translate = "0px 0px";
13
+ };
14
+ const onMove = (event)=>{
15
+ if (!armed || reduced.matches) return;
16
+ const rect = node.getBoundingClientRect();
17
+ const dx = event.clientX - (rect.left + rect.width / 2);
18
+ const dy = event.clientY - (rect.top + rect.height / 2);
19
+ const distance = Math.hypot(dx, dy);
20
+ if (distance > range) return reset();
21
+ const falloff = intensity * (1 - distance / range);
22
+ node.style.transition = "translate 0ms";
23
+ node.style.translate = `${dx * falloff}px ${dy * falloff}px`;
24
+ };
25
+ const arm = ()=>armed = true;
26
+ const disarm = ()=>{
27
+ armed = false;
28
+ reset();
29
+ };
30
+ let target = zone();
31
+ target.addEventListener("pointerenter", arm);
32
+ target.addEventListener("pointerleave", disarm);
33
+ document.addEventListener("pointermove", onMove);
34
+ return {
35
+ update (next) {
36
+ intensity = next?.intensity ?? 0.6;
37
+ range = next?.range ?? 100;
38
+ duration = next?.duration ?? 350;
39
+ const nextFrom = next?.from ?? "self";
40
+ if (nextFrom === from) return;
41
+ target.removeEventListener("pointerenter", arm);
42
+ target.removeEventListener("pointerleave", disarm);
43
+ from = nextFrom;
44
+ target = zone();
45
+ target.addEventListener("pointerenter", arm);
46
+ target.addEventListener("pointerleave", disarm);
47
+ },
48
+ destroy () {
49
+ target.removeEventListener("pointerenter", arm);
50
+ target.removeEventListener("pointerleave", disarm);
51
+ document.removeEventListener("pointermove", onMove);
52
+ }
53
+ };
54
+ };
@@ -0,0 +1,4 @@
1
+ export { default as InView } from "../../../src/effects/reveal/InView.svelte";
2
+ export { default as AnimatedGroup } from "../../../src/effects/reveal/AnimatedGroup.svelte";
3
+ export { default as TextEffect } from "../../../src/effects/reveal/TextEffect.svelte";
4
+ export { observeInView, onInView } from "./observe.js";
@@ -0,0 +1,43 @@
1
+ export function observeInView(el, options, onChange) {
2
+ if (typeof IntersectionObserver === "undefined") {
3
+ onChange(true);
4
+ return ()=>{};
5
+ }
6
+ const observer = new IntersectionObserver(([entry])=>{
7
+ if (entry.isIntersecting) {
8
+ onChange(true);
9
+ if (options.once !== false) observer.disconnect();
10
+ return;
11
+ }
12
+ if (options.once === false) onChange(false);
13
+ }, {
14
+ threshold: options.amount ?? 0,
15
+ rootMargin: options.margin ?? "0px"
16
+ });
17
+ observer.observe(el);
18
+ return ()=>observer.disconnect();
19
+ }
20
+ export const onInView = (node, initial)=>{
21
+ let options = initial ?? {};
22
+ let entered = false;
23
+ const { amount = 0.1, margin, once } = options;
24
+ const stop = observeInView(node, {
25
+ amount,
26
+ margin,
27
+ once
28
+ }, (inView)=>{
29
+ if (inView && !entered) {
30
+ entered = true;
31
+ options.onEnter?.();
32
+ } else if (!inView && entered) {
33
+ entered = false;
34
+ options.onLeave?.();
35
+ }
36
+ });
37
+ return {
38
+ update (next) {
39
+ options = next ?? {};
40
+ },
41
+ destroy: stop
42
+ };
43
+ };
File without changes
@@ -0,0 +1,34 @@
1
+ let probe;
2
+ function getProbe() {
3
+ if (probe !== undefined) return probe;
4
+ probe = document.createElement("canvas").getContext("2d", {
5
+ willReadFrequently: true
6
+ });
7
+ return probe;
8
+ }
9
+ export function resolveColor(input, scope) {
10
+ const fallback = [
11
+ 0,
12
+ 0,
13
+ 0
14
+ ];
15
+ if (typeof document === "undefined") return fallback;
16
+ let value = input.trim();
17
+ const token = /^var\(\s*(--[\w-]+)\s*(?:,\s*([\s\S]+))?\)$/.exec(value);
18
+ if (token) {
19
+ const resolved = getComputedStyle(scope ?? document.documentElement).getPropertyValue(token[1]).trim();
20
+ value = resolved || token[2]?.trim() || "";
21
+ }
22
+ if (!value) return fallback;
23
+ const context = getProbe();
24
+ if (!context) return fallback;
25
+ context.fillStyle = value;
26
+ context.clearRect(0, 0, 1, 1);
27
+ context.fillRect(0, 0, 1, 1);
28
+ const [r, g, b] = context.getImageData(0, 0, 1, 1).data;
29
+ return [
30
+ r / 255,
31
+ g / 255,
32
+ b / 255
33
+ ];
34
+ }
@@ -0,0 +1 @@
1
+ export { default as ShaderGradient } from "../../../src/effects/shader-gradient/ShaderGradient.svelte";
@@ -0,0 +1,320 @@
1
+ import { HALFTONE_FRAGMENT_SHADER, MESH_FRAGMENT_SHADER, MESH_VERTEX_SHADER, QUAD_VERTEX_SHADER } from "./shaders.js";
2
+ const PLANE_SIZE = 10;
3
+ const PLANE_SEGMENTS = 192;
4
+ const DEG_TO_RAD = Math.PI / 180;
5
+ const HALFTONE_ROTATION = {
6
+ r: Math.PI / 12,
7
+ g: Math.PI / 12 * 3,
8
+ b: Math.PI / 12 * 2
9
+ };
10
+ const HALFTONE_SCATTER = 1;
11
+ const MAX_VISIBLE_HALF_WIDTH = 2.4;
12
+ const MAX_CORNER_RAY_DEGREES = 10;
13
+ function createPlane() {
14
+ const positions = new Float32Array((PLANE_SEGMENTS + 1) * 2 * 3);
15
+ const indices = new Uint16Array(PLANE_SEGMENTS * 6);
16
+ const half = PLANE_SIZE / 2;
17
+ const segment = PLANE_SIZE / PLANE_SEGMENTS;
18
+ for(let iy = 0; iy <= PLANE_SEGMENTS; iy++){
19
+ const y = -(iy * segment - half);
20
+ const offset = iy * 6;
21
+ positions[offset] = -half;
22
+ positions[offset + 1] = y;
23
+ positions[offset + 2] = 0;
24
+ positions[offset + 3] = half;
25
+ positions[offset + 4] = y;
26
+ positions[offset + 5] = 0;
27
+ }
28
+ for(let iy = 0; iy < PLANE_SEGMENTS; iy++){
29
+ const a = iy * 2;
30
+ const b = (iy + 1) * 2;
31
+ const c = (iy + 1) * 2 + 1;
32
+ const d = iy * 2 + 1;
33
+ const offset = iy * 6;
34
+ indices[offset] = a;
35
+ indices[offset + 1] = b;
36
+ indices[offset + 2] = d;
37
+ indices[offset + 3] = b;
38
+ indices[offset + 4] = c;
39
+ indices[offset + 5] = d;
40
+ }
41
+ return {
42
+ positions,
43
+ indices
44
+ };
45
+ }
46
+ function perspective(fovDegrees, aspect, near, far) {
47
+ const f = 1 / Math.tan(fovDegrees * DEG_TO_RAD / 2);
48
+ const range = 1 / (near - far);
49
+ return new Float32Array([
50
+ f / aspect,
51
+ 0,
52
+ 0,
53
+ 0,
54
+ 0,
55
+ f,
56
+ 0,
57
+ 0,
58
+ 0,
59
+ 0,
60
+ (far + near) * range,
61
+ -1,
62
+ 0,
63
+ 0,
64
+ 2 * far * near * range,
65
+ 0
66
+ ]);
67
+ }
68
+ function orbitView(distance, polarDegrees, azimuthDegrees) {
69
+ const polar = polarDegrees * DEG_TO_RAD;
70
+ const azimuth = azimuthDegrees * DEG_TO_RAD;
71
+ const eye = [
72
+ distance * Math.sin(polar) * Math.sin(azimuth),
73
+ distance * Math.cos(polar),
74
+ distance * Math.sin(polar) * Math.cos(azimuth)
75
+ ];
76
+ let zx = eye[0];
77
+ let zy = eye[1];
78
+ let zz = eye[2];
79
+ const zLength = Math.hypot(zx, zy, zz) || 1;
80
+ zx /= zLength;
81
+ zy /= zLength;
82
+ zz /= zLength;
83
+ let xx = zz;
84
+ let xy = 0;
85
+ let xz = -zx;
86
+ const xLength = Math.hypot(xx, xy, xz) || 1;
87
+ xx /= xLength;
88
+ xy /= xLength;
89
+ xz /= xLength;
90
+ const yx = zy * xz - zz * xy;
91
+ const yy = zz * xx - zx * xz;
92
+ const yz = zx * xy - zy * xx;
93
+ return new Float32Array([
94
+ xx,
95
+ yx,
96
+ zx,
97
+ 0,
98
+ xy,
99
+ yy,
100
+ zy,
101
+ 0,
102
+ xz,
103
+ yz,
104
+ zz,
105
+ 0,
106
+ -(xx * eye[0] + xy * eye[1] + xz * eye[2]),
107
+ -(yx * eye[0] + yy * eye[1] + yz * eye[2]),
108
+ -(zx * eye[0] + zy * eye[1] + zz * eye[2]),
109
+ 1
110
+ ]);
111
+ }
112
+ function modelMatrix(position, rotationDegrees) {
113
+ const a = Math.cos(rotationDegrees[0] * DEG_TO_RAD);
114
+ const b = Math.sin(rotationDegrees[0] * DEG_TO_RAD);
115
+ const c = Math.cos(rotationDegrees[1] * DEG_TO_RAD);
116
+ const d = Math.sin(rotationDegrees[1] * DEG_TO_RAD);
117
+ const e = Math.cos(rotationDegrees[2] * DEG_TO_RAD);
118
+ const f = Math.sin(rotationDegrees[2] * DEG_TO_RAD);
119
+ const ae = a * e;
120
+ const af = a * f;
121
+ const be = b * e;
122
+ const bf = b * f;
123
+ return new Float32Array([
124
+ c * e,
125
+ af + be * d,
126
+ bf - ae * d,
127
+ 0,
128
+ -c * f,
129
+ ae - bf * d,
130
+ be + af * d,
131
+ 0,
132
+ d,
133
+ -b * c,
134
+ a * c,
135
+ 0,
136
+ position[0],
137
+ position[1],
138
+ position[2],
139
+ 1
140
+ ]);
141
+ }
142
+ function compile(gl, type, source) {
143
+ const shader = gl.createShader(type);
144
+ if (!shader) throw new Error("shader-gradient: could not create shader");
145
+ gl.shaderSource(shader, source);
146
+ gl.compileShader(shader);
147
+ if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
148
+ const log = gl.getShaderInfoLog(shader);
149
+ gl.deleteShader(shader);
150
+ throw new Error(`shader-gradient: shader failed to compile. ${log}`);
151
+ }
152
+ return shader;
153
+ }
154
+ function link(gl, vertexSource, fragmentSource) {
155
+ const vertex = compile(gl, gl.VERTEX_SHADER, vertexSource);
156
+ const fragment = compile(gl, gl.FRAGMENT_SHADER, fragmentSource);
157
+ const program = gl.createProgram();
158
+ if (!program) throw new Error("shader-gradient: could not create program");
159
+ gl.attachShader(program, vertex);
160
+ gl.attachShader(program, fragment);
161
+ gl.linkProgram(program);
162
+ gl.deleteShader(vertex);
163
+ gl.deleteShader(fragment);
164
+ if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
165
+ const log = gl.getProgramInfoLog(program);
166
+ gl.deleteProgram(program);
167
+ throw new Error(`shader-gradient: program failed to link. ${log}`);
168
+ }
169
+ return program;
170
+ }
171
+ function uniformLocations(gl, program, names) {
172
+ const locations = {};
173
+ for (const name of names)locations[name] = gl.getUniformLocation(program, name);
174
+ return locations;
175
+ }
176
+ export function createShaderGradientRenderer(canvas) {
177
+ const gl = canvas.getContext("webgl2", {
178
+ antialias: true,
179
+ alpha: false
180
+ }) ?? canvas.getContext("webgl", {
181
+ antialias: true,
182
+ alpha: false
183
+ });
184
+ if (!gl) return null;
185
+ const plane = createPlane();
186
+ const meshProgram = link(gl, MESH_VERTEX_SHADER, MESH_FRAGMENT_SHADER);
187
+ const meshUniforms = uniformLocations(gl, meshProgram, [
188
+ "uProjectionMatrix",
189
+ "uViewMatrix",
190
+ "uModelMatrix",
191
+ "uTime",
192
+ "uSpeed",
193
+ "uNoiseDensity",
194
+ "uNoiseStrength",
195
+ "uC1",
196
+ "uC2",
197
+ "uC3",
198
+ "uBrightness",
199
+ "uFoldRange"
200
+ ]);
201
+ const meshPositionAttribute = gl.getAttribLocation(meshProgram, "position");
202
+ const halftoneProgram = link(gl, QUAD_VERTEX_SHADER, HALFTONE_FRAGMENT_SHADER);
203
+ const halftoneUniforms = uniformLocations(gl, halftoneProgram, [
204
+ "tDiffuse",
205
+ "uRadius",
206
+ "uRotateR",
207
+ "uRotateG",
208
+ "uRotateB",
209
+ "uScatter",
210
+ "uWidth",
211
+ "uHeight"
212
+ ]);
213
+ const halftonePositionAttribute = gl.getAttribLocation(halftoneProgram, "position");
214
+ const positionBuffer = gl.createBuffer();
215
+ gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
216
+ gl.bufferData(gl.ARRAY_BUFFER, plane.positions, gl.STATIC_DRAW);
217
+ const indexBuffer = gl.createBuffer();
218
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
219
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, plane.indices, gl.STATIC_DRAW);
220
+ const quadBuffer = gl.createBuffer();
221
+ gl.bindBuffer(gl.ARRAY_BUFFER, quadBuffer);
222
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
223
+ -1,
224
+ -1,
225
+ 3,
226
+ -1,
227
+ -1,
228
+ 3
229
+ ]), gl.STATIC_DRAW);
230
+ const targetTexture = gl.createTexture();
231
+ gl.bindTexture(gl.TEXTURE_2D, targetTexture);
232
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
233
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
234
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
235
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
236
+ const framebuffer = gl.createFramebuffer();
237
+ let width = 1;
238
+ let height = 1;
239
+ const setSize = (nextWidth, nextHeight)=>{
240
+ width = Math.max(1, Math.floor(nextWidth));
241
+ height = Math.max(1, Math.floor(nextHeight));
242
+ canvas.width = width;
243
+ canvas.height = height;
244
+ gl.bindTexture(gl.TEXTURE_2D, targetTexture);
245
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
246
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
247
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, targetTexture, 0);
248
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
249
+ };
250
+ const render = (uniforms, time)=>{
251
+ const aspect = width / height;
252
+ const halfHeight = Math.min(Math.tan(uniforms.fov * DEG_TO_RAD / 2) * uniforms.cDistance, MAX_VISIBLE_HALF_WIDTH / aspect);
253
+ const cornerRadius = Math.hypot(halfHeight * aspect, halfHeight);
254
+ const distance = Math.max(uniforms.cDistance, cornerRadius / Math.tan(MAX_CORNER_RAY_DEGREES * DEG_TO_RAD));
255
+ const fov = 2 * Math.atan(halfHeight / distance) / DEG_TO_RAD;
256
+ gl.bindFramebuffer(gl.FRAMEBUFFER, uniforms.grain ? framebuffer : null);
257
+ gl.viewport(0, 0, width, height);
258
+ gl.clearColor(uniforms.bgColor[0], uniforms.bgColor[1], uniforms.bgColor[2], 1);
259
+ gl.clear(gl.COLOR_BUFFER_BIT);
260
+ gl.useProgram(meshProgram);
261
+ gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
262
+ gl.enableVertexAttribArray(meshPositionAttribute);
263
+ gl.vertexAttribPointer(meshPositionAttribute, 3, gl.FLOAT, false, 0, 0);
264
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
265
+ gl.uniformMatrix4fv(meshUniforms.uProjectionMatrix, false, perspective(fov, aspect, 0.1, 1000));
266
+ gl.uniformMatrix4fv(meshUniforms.uViewMatrix, false, orbitView(distance, uniforms.cPolarAngle, uniforms.cAzimuthAngle));
267
+ gl.uniformMatrix4fv(meshUniforms.uModelMatrix, false, modelMatrix([
268
+ uniforms.positionX,
269
+ uniforms.positionY,
270
+ uniforms.positionZ
271
+ ], [
272
+ uniforms.rotationX,
273
+ uniforms.rotationY,
274
+ uniforms.rotationZ
275
+ ]));
276
+ gl.uniform1f(meshUniforms.uTime, time);
277
+ gl.uniform1f(meshUniforms.uSpeed, uniforms.uSpeed);
278
+ gl.uniform1f(meshUniforms.uNoiseDensity, uniforms.uDensity);
279
+ gl.uniform1f(meshUniforms.uNoiseStrength, uniforms.uStrength);
280
+ gl.uniform3fv(meshUniforms.uC1, uniforms.color1);
281
+ gl.uniform3fv(meshUniforms.uC2, uniforms.color2);
282
+ gl.uniform3fv(meshUniforms.uC3, uniforms.color3);
283
+ gl.uniform1f(meshUniforms.uBrightness, uniforms.brightness);
284
+ gl.uniform1f(meshUniforms.uFoldRange, 0.75 * uniforms.uStrength);
285
+ gl.drawElements(gl.TRIANGLES, plane.indices.length, gl.UNSIGNED_SHORT, 0);
286
+ if (!uniforms.grain) return;
287
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
288
+ gl.viewport(0, 0, width, height);
289
+ gl.useProgram(halftoneProgram);
290
+ gl.bindBuffer(gl.ARRAY_BUFFER, quadBuffer);
291
+ gl.enableVertexAttribArray(halftonePositionAttribute);
292
+ gl.vertexAttribPointer(halftonePositionAttribute, 2, gl.FLOAT, false, 0, 0);
293
+ gl.activeTexture(gl.TEXTURE0);
294
+ gl.bindTexture(gl.TEXTURE_2D, targetTexture);
295
+ gl.uniform1i(halftoneUniforms.tDiffuse, 0);
296
+ gl.uniform1f(halftoneUniforms.uRadius, uniforms.grainRadius);
297
+ gl.uniform1f(halftoneUniforms.uRotateR, HALFTONE_ROTATION.r);
298
+ gl.uniform1f(halftoneUniforms.uRotateG, HALFTONE_ROTATION.g);
299
+ gl.uniform1f(halftoneUniforms.uRotateB, HALFTONE_ROTATION.b);
300
+ gl.uniform1f(halftoneUniforms.uScatter, HALFTONE_SCATTER);
301
+ gl.uniform1f(halftoneUniforms.uWidth, width);
302
+ gl.uniform1f(halftoneUniforms.uHeight, height);
303
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
304
+ };
305
+ const destroy = ()=>{
306
+ gl.deleteBuffer(positionBuffer);
307
+ gl.deleteBuffer(indexBuffer);
308
+ gl.deleteBuffer(quadBuffer);
309
+ gl.deleteTexture(targetTexture);
310
+ gl.deleteFramebuffer(framebuffer);
311
+ gl.deleteProgram(meshProgram);
312
+ gl.deleteProgram(halftoneProgram);
313
+ gl.getExtension("WEBGL_lose_context")?.loseContext();
314
+ };
315
+ return {
316
+ setSize,
317
+ render,
318
+ destroy
319
+ };
320
+ }