@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,156 @@
1
+ import { isOpen, isTyping } from "../work/inbox/inbox-logic.js";
2
+ import { ALL, DEFAULT_INBOX_LABELS } from "./types.js";
3
+ function ms(at) {
4
+ return Date.parse(at);
5
+ }
6
+ function latestOf(thread) {
7
+ const time = ms(thread.latestAt);
8
+ return Number.isNaN(time) ? Number.NEGATIVE_INFINITY : time;
9
+ }
10
+ export function isPending(entry) {
11
+ return entry.kind === "proposal" && !!entry.proposal && isOpen(entry.proposal);
12
+ }
13
+ export function threadsOf(entries, options = {}) {
14
+ const groups = new Map();
15
+ entries.forEach((entry, index)=>{
16
+ const subject = entry.subject;
17
+ if (!subject?.id) return;
18
+ const key = `${subject.type}:${subject.id}`;
19
+ groups.set(key, [
20
+ ...groups.get(key) ?? [],
21
+ {
22
+ entry,
23
+ subject,
24
+ index,
25
+ time: ms(entry.at)
26
+ }
27
+ ]);
28
+ });
29
+ const threads = [];
30
+ for (const [key, rows] of groups){
31
+ const ordered = rows.toSorted((a, b)=>{
32
+ const aBad = Number.isNaN(a.time);
33
+ const bBad = Number.isNaN(b.time);
34
+ if (aBad !== bBad) return aBad ? 1 : -1;
35
+ return (aBad ? 0 : a.time - b.time) || a.index - b.index;
36
+ });
37
+ const newest = ordered.findLast((row)=>!Number.isNaN(row.time)) ?? ordered[0];
38
+ const list = ordered.map((row)=>row.entry);
39
+ threads.push({
40
+ key,
41
+ subject: newest.subject,
42
+ entries: list,
43
+ unread: list.filter((entry)=>!entry.read).length,
44
+ latestAt: newest.entry.at,
45
+ pending: list.filter(isPending).toReversed()
46
+ });
47
+ }
48
+ return threads.map((thread, index)=>({
49
+ thread,
50
+ index
51
+ })).toSorted((a, b)=>{
52
+ if (options.unreadFirst) {
53
+ const unread = Number(b.thread.unread > 0) - Number(a.thread.unread > 0);
54
+ if (unread) return unread;
55
+ }
56
+ const aTime = latestOf(a.thread);
57
+ const bTime = latestOf(b.thread);
58
+ if (aTime === bTime) return a.index - b.index;
59
+ return bTime - aTime;
60
+ }).map((row)=>row.thread);
61
+ }
62
+ export const NO_FILTER = {
63
+ type: ALL,
64
+ who: ALL,
65
+ needsYou: false
66
+ };
67
+ export function filterThreads(threads, filter) {
68
+ return threads.filter((thread)=>(filter.type === ALL || thread.subject.type === filter.type) && (filter.who === ALL || thread.entries.some((entry)=>entry.actor.name === filter.who)) && (!filter.needsYou || thread.pending.length > 0));
69
+ }
70
+ export function subjectTypes(threads) {
71
+ return [
72
+ ...new Set(threads.map((thread)=>thread.subject.type))
73
+ ];
74
+ }
75
+ export function actorNames(threads) {
76
+ return [
77
+ ...new Set(threads.flatMap((thread)=>thread.entries.map((entry)=>entry.actor.name)))
78
+ ].filter(Boolean);
79
+ }
80
+ const KEYS = {
81
+ j: "next",
82
+ k: "previous",
83
+ u: "toggleRead",
84
+ h: "snooze",
85
+ a: "approve",
86
+ d: "decline",
87
+ s: "steer",
88
+ S: "unfollow",
89
+ e: "edit"
90
+ };
91
+ export function inboxKeyOf(event) {
92
+ if (event.defaultPrevented || event.metaKey || event.ctrlKey) return null;
93
+ if (isTyping(event.target)) return null;
94
+ if (event.altKey) return event.code === "KeyU" && !event.shiftKey ? "readAll" : null;
95
+ if (event.key === "Backspace") return event.shiftKey ? "clearRead" : "clear";
96
+ return KEYS[event.key] ?? null;
97
+ }
98
+ export function snoozeChoices(now) {
99
+ const later = new Date(now.getTime() + 3 * 60 * 60 * 1000);
100
+ const tomorrow = new Date(now);
101
+ tomorrow.setDate(tomorrow.getDate() + 1);
102
+ tomorrow.setHours(9, 0, 0, 0);
103
+ const nextWeek = new Date(now);
104
+ nextWeek.setDate(nextWeek.getDate() + ((8 - nextWeek.getDay()) % 7 || 7));
105
+ nextWeek.setHours(9, 0, 0, 0);
106
+ return [
107
+ {
108
+ id: "later",
109
+ until: later
110
+ },
111
+ {
112
+ id: "tomorrow",
113
+ until: tomorrow
114
+ },
115
+ {
116
+ id: "nextWeek",
117
+ until: nextWeek
118
+ }
119
+ ];
120
+ }
121
+ export function resolveInboxLabels(overrides) {
122
+ return {
123
+ ...DEFAULT_INBOX_LABELS,
124
+ ...overrides
125
+ };
126
+ }
127
+ export function entryLine(entry, labels) {
128
+ const fill = (text)=>text.replaceAll("{from}", entry.status?.from ?? "").replaceAll("{to}", entry.status?.to ?? "").replaceAll("{assignee}", entry.assignee ?? "");
129
+ switch(entry.kind){
130
+ case "status":
131
+ return fill(entry.status?.from ? labels.statusMoved : labels.statusSet);
132
+ case "assigned":
133
+ return fill(labels.assigned);
134
+ case "mention":
135
+ return labels.mentioned;
136
+ case "agent_response":
137
+ return labels.responded;
138
+ case "proposal":
139
+ return labels.proposed;
140
+ default:
141
+ return labels.commented;
142
+ }
143
+ }
144
+ export function sentenceOf(entry, labels) {
145
+ const line = entryLine(entry, labels);
146
+ if (entry.actor.name) return `${entry.actor.name} ${line}`;
147
+ return line.charAt(0).toUpperCase() + line.slice(1);
148
+ }
149
+ const EVENT_KINDS = new Set([
150
+ "status",
151
+ "assigned",
152
+ "proposal"
153
+ ]);
154
+ export function isEvent(entry) {
155
+ return EVENT_KINDS.has(entry.kind);
156
+ }
@@ -0,0 +1,46 @@
1
+ export const ALL = "all";
2
+ export const DEFAULT_INBOX_LABELS = {
3
+ title: "Inbox",
4
+ all: "All",
5
+ anyone: "Anyone",
6
+ needsYou: "Needs you",
7
+ empty: "Nothing here",
8
+ emptyNeedsYou: "Nothing is waiting on you",
9
+ emptyFiltered: "No thread matches these filters",
10
+ clearFilters: "Clear filters",
11
+ unread: "unread",
12
+ markRead: "Mark read",
13
+ markUnread: "Mark unread",
14
+ snooze: "Snooze",
15
+ snoozeLater: "Later today",
16
+ snoozeTomorrow: "Tomorrow",
17
+ snoozeNextWeek: "Next week",
18
+ snoozed: "Snoozed",
19
+ showSnoozed: "Show snoozed",
20
+ unsnooze: "Unsnooze",
21
+ unfollow: "Unfollow",
22
+ markAllRead: "Mark all read",
23
+ clear: "Clear",
24
+ clearRead: "Clear read",
25
+ selectThread: "Select a thread",
26
+ filterType: "Filter by type",
27
+ filterWho: "Filter by person or agent",
28
+ filter: "Filter",
29
+ kind: "Type",
30
+ from: "From",
31
+ open: "Open",
32
+ agent: "AI",
33
+ statusMoved: "moved this from {from} to {to}",
34
+ statusSet: "set this to {to}",
35
+ assigned: "assigned this to {assignee}",
36
+ mentioned: "mentioned you",
37
+ commented: "commented",
38
+ responded: "replied",
39
+ proposed: "asks for your call",
40
+ hintMove: "move",
41
+ hintRead: "read",
42
+ hintReadAll: "all read",
43
+ hintSnooze: "snooze",
44
+ hintClear: "clear, with shift every read thread",
45
+ hintAct: "approve, decline, steer, edit"
46
+ };
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ export { default as BorderBeam } from "../src/effects/border-beam/BorderBeam.svelte";
2
+ export { sizePresets, sizeThemePresets, themeColors } from "./effects/border-beam/presets.js";
3
+ export { default as ThemeToggle } from "../src/effects/theme-toggle/ThemeToggle.svelte";
4
+ export { default as AnimatedBeam } from "../src/effects/animated-beam/AnimatedBeam.svelte";
5
+ export { default as Spotlight } from "../src/effects/spotlight/Spotlight.svelte";
6
+ export { default as MagicCard } from "../src/effects/magic-card/MagicCard.svelte";
7
+ export { default as Marquee } from "../src/effects/marquee/Marquee.svelte";
8
+ export { default as ImageReveal } from "../src/effects/image-reveal/ImageReveal.svelte";
9
+ export { default as ShaderGradient } from "../src/effects/shader-gradient/ShaderGradient.svelte";
10
+ export { default as InView } from "../src/effects/reveal/InView.svelte";
11
+ export { default as AnimatedGroup } from "../src/effects/reveal/AnimatedGroup.svelte";
12
+ export { default as TextEffect } from "../src/effects/reveal/TextEffect.svelte";
13
+ export { observeInView } from "./effects/reveal/observe.js";
14
+ export { default as ProgressiveBlur } from "../src/effects/progressive-blur/ProgressiveBlur.svelte";
15
+ export { default as InteractiveHoverButton } from "../src/effects/interactive-hover-button/InteractiveHoverButton.svelte";
16
+ export { default as ImageComparison } from "../src/effects/image-comparison/ImageComparison.svelte";
17
+ export { magnetic } from "./effects/magnetic/magnetic.js";
18
+ export { revealTheme } from "./lib/theme-transition.js";
@@ -0,0 +1,13 @@
1
+ export const arrive = (node, value)=>{
2
+ let previous = value;
3
+ node.classList.add("t-enter");
4
+ return {
5
+ update (next) {
6
+ if (next === previous) return;
7
+ previous = next;
8
+ node.classList.remove("t-enter");
9
+ void node.offsetWidth;
10
+ node.classList.add("t-enter");
11
+ }
12
+ };
13
+ };
File without changes
@@ -0,0 +1,17 @@
1
+ const segmenter = typeof Intl !== "undefined" && "Segmenter" in Intl ? new Intl.Segmenter() : null;
2
+ function firstGrapheme(text) {
3
+ if (!text) return "";
4
+ if (segmenter) return segmenter.segment(text)[Symbol.iterator]().next().value?.segment ?? "";
5
+ return Array.from(text)[0] ?? "";
6
+ }
7
+ export function initial(name, fallback = "?") {
8
+ const first = firstGrapheme((name ?? "").trim());
9
+ return first ? first.toLocaleUpperCase() : fallback;
10
+ }
11
+ export function initials(name, fallback = "?") {
12
+ const words = (name ?? "").trim().split(/\s+/).filter((word)=>word && !/^(?:[IVX]{1,4}|jr\.?|sr\.?)$/i.test(word));
13
+ if (words.length === 0) return initial(name, fallback);
14
+ const head = firstGrapheme(words[0]);
15
+ const tail = words.length > 1 ? firstGrapheme(words[words.length - 1]) : "";
16
+ return (head + tail).toLocaleUpperCase();
17
+ }
@@ -0,0 +1 @@
1
+ export const pageGutterClass = "px-4";
@@ -0,0 +1,3 @@
1
+ export const panelShellClass = "overflow-hidden rounded-xl border border-border bg-card";
2
+ export const panelHeaderClass = "flex min-h-11 flex-wrap items-center justify-between gap-x-3 gap-y-1 border-b border-border px-4 py-2";
3
+ export const insetWellClass = "rounded-lg border border-border bg-muted/40 p-2";
@@ -0,0 +1,26 @@
1
+ export function tryCatch(fn) {
2
+ try {
3
+ return {
4
+ ok: true,
5
+ value: fn()
6
+ };
7
+ } catch (e) {
8
+ return {
9
+ ok: false,
10
+ error: e instanceof Error ? e : new Error(String(e))
11
+ };
12
+ }
13
+ }
14
+ export async function tryCatchAsync(fn) {
15
+ try {
16
+ return {
17
+ ok: true,
18
+ value: await fn()
19
+ };
20
+ } catch (e) {
21
+ return {
22
+ ok: false,
23
+ error: e instanceof Error ? e : new Error(String(e))
24
+ };
25
+ }
26
+ }
@@ -0,0 +1,45 @@
1
+ const ACTIVE = '[data-state="active"],[aria-current="page"],[aria-pressed="true"]';
2
+ export const slidingPill = (pill)=>{
3
+ const list = pill.parentElement;
4
+ if (!list) return;
5
+ let settled = false;
6
+ const move = (animate)=>{
7
+ const active = list.querySelector(ACTIVE);
8
+ if (!active) {
9
+ pill.style.opacity = "0";
10
+ return;
11
+ }
12
+ pill.style.opacity = "1";
13
+ if (animate) {
14
+ pill.style.transform = `translateX(${active.offsetLeft}px)`;
15
+ pill.style.width = `${active.offsetWidth}px`;
16
+ return;
17
+ }
18
+ pill.style.transition = "none";
19
+ pill.style.transform = `translateX(${active.offsetLeft}px)`;
20
+ pill.style.width = `${active.offsetWidth}px`;
21
+ void pill.offsetWidth;
22
+ pill.style.transition = "";
23
+ };
24
+ move(false);
25
+ list.dataset.pill = "on";
26
+ settled = true;
27
+ const attributes = new MutationObserver(()=>move(settled));
28
+ attributes.observe(list, {
29
+ subtree: true,
30
+ childList: true,
31
+ attributes: true,
32
+ attributeFilter: [
33
+ "data-state",
34
+ "aria-current",
35
+ "aria-pressed"
36
+ ]
37
+ });
38
+ const resize = new ResizeObserver(()=>move(false));
39
+ resize.observe(list);
40
+ return ()=>{
41
+ attributes.disconnect();
42
+ resize.disconnect();
43
+ delete list.dataset.pill;
44
+ };
45
+ };
@@ -0,0 +1,53 @@
1
+ const DEFAULT_DURATION = 300;
2
+ const STYLE_ID = "heyramzi-reveal-theme";
3
+ export function revealTheme(origin, apply, options = {}) {
4
+ const { skip = false, duration = DEFAULT_DURATION, easing = "cubic-bezier(0.77, 0, 0.175, 1)" } = options;
5
+ const point = resolveOrigin(origin);
6
+ const prefersReduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
7
+ if (skip || prefersReduced || !document.startViewTransition || !point) {
8
+ apply();
9
+ return;
10
+ }
11
+ const { x, y } = point;
12
+ const endRadius = Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y));
13
+ ensureStyles();
14
+ const transition = document.startViewTransition(()=>{
15
+ apply();
16
+ });
17
+ transition.ready.then(()=>{
18
+ document.documentElement.animate({
19
+ clipPath: [
20
+ `circle(0px at ${x}px ${y}px)`,
21
+ `circle(${endRadius}px at ${x}px ${y}px)`
22
+ ]
23
+ }, {
24
+ duration,
25
+ easing,
26
+ pseudoElement: "::view-transition-new(root)"
27
+ });
28
+ });
29
+ }
30
+ function centreOf(element) {
31
+ const rect = element.getBoundingClientRect();
32
+ return {
33
+ x: rect.left + rect.width / 2,
34
+ y: rect.top + rect.height / 2
35
+ };
36
+ }
37
+ function resolveOrigin(origin) {
38
+ if (origin instanceof Element) return centreOf(origin);
39
+ if (origin instanceof MouseEvent) {
40
+ return origin.currentTarget instanceof Element ? centreOf(origin.currentTarget) : {
41
+ x: origin.clientX,
42
+ y: origin.clientY
43
+ };
44
+ }
45
+ return origin;
46
+ }
47
+ function ensureStyles() {
48
+ if (document.getElementById(STYLE_ID)) return;
49
+ const style = document.createElement("style");
50
+ style.id = STYLE_ID;
51
+ style.textContent = `::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal;}`;
52
+ document.head.appendChild(style);
53
+ }
@@ -0,0 +1,32 @@
1
+ export const TONE_CLASS = {
2
+ neutral: "border-border bg-muted/40 text-muted-foreground",
3
+ accent: "border-[color-mix(in_oklab,var(--tone-accent,var(--color-primary))_30%,transparent)] bg-[color-mix(in_oklab,var(--tone-accent,var(--color-primary))_10%,transparent)] text-[color:var(--tone-accent,var(--color-primary))]",
4
+ info: "border-info/30 bg-info/10 text-info-800 dark:text-info-400",
5
+ success: "border-success/30 bg-success/10 text-success-800 dark:text-success-400",
6
+ warning: "border-warning/30 bg-warning/10 text-warning-800 dark:text-warning-400",
7
+ destructive: "border-destructive/30 bg-destructive/10 text-destructive-ink"
8
+ };
9
+ export const TONE_TEXT = {
10
+ neutral: "text-muted-foreground",
11
+ accent: "text-[color:var(--tone-accent,var(--color-primary))]",
12
+ info: "text-info-800 dark:text-info-400",
13
+ success: "text-success-800 dark:text-success-400",
14
+ warning: "text-warning-800 dark:text-warning-400",
15
+ destructive: "text-destructive"
16
+ };
17
+ export const TONE_ICON = {
18
+ neutral: "text-muted-foreground",
19
+ accent: "text-[color:var(--tone-accent,var(--color-primary))]",
20
+ info: "text-info",
21
+ success: "text-success",
22
+ warning: "text-warning",
23
+ destructive: "text-destructive"
24
+ };
25
+ export const TONE_COLOR = {
26
+ neutral: "var(--color-muted-foreground)",
27
+ accent: "var(--tone-accent,var(--color-primary))",
28
+ info: "var(--color-info)",
29
+ success: "var(--color-success)",
30
+ warning: "var(--color-warning)",
31
+ destructive: "var(--color-destructive)"
32
+ };
@@ -0,0 +1,5 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
@@ -0,0 +1,28 @@
1
+ import { MAX_STEPS } from "./types.js";
2
+ function fail(id, problem) {
3
+ throw new Error(`tour "${id}": ${problem}`);
4
+ }
5
+ export function defineTours(tours) {
6
+ const ids = new Set();
7
+ for (const tour of tours){
8
+ const { id } = tour;
9
+ if (!id || !id.trim()) throw new Error("a tour needs an id");
10
+ if (ids.has(id)) fail(id, "its id is used twice");
11
+ ids.add(id);
12
+ if (!tour.route.startsWith("/")) fail(id, `route "${tour.route}" is not a route id`);
13
+ const version = tour.version ?? 1;
14
+ if (!Number.isInteger(version) || version < 1) fail(id, "version is a whole number from 1");
15
+ if (tour.kind === "intro") {
16
+ if (!tour.title || !tour.body) fail(id, "an intro needs a title and a body");
17
+ continue;
18
+ }
19
+ if (tour.steps.length < 1 || tour.steps.length > MAX_STEPS) {
20
+ fail(id, `has ${tour.steps.length} steps, and a tour takes 1 to ${MAX_STEPS}`);
21
+ }
22
+ tour.steps.forEach((step, i)=>{
23
+ if (!step.target.trim()) fail(id, `step ${i + 1} has no target`);
24
+ if (!step.title || !step.body) fail(id, `step ${i + 1} needs a title and a body`);
25
+ });
26
+ }
27
+ return tours;
28
+ }
@@ -0,0 +1,4 @@
1
+ export { default as OnboardingProvider } from "../../src/onboarding/onboarding-provider.svelte";
2
+ export { onboarding } from "./onboarding.svelte.js";
3
+ export { defineTours } from "./define-tours.js";
4
+ export { localStorageStore, memoryStore } from "./stores.js";
@@ -0,0 +1,15 @@
1
+ class Onboarding {
2
+ hasTour = $state(false);
3
+ running = $state(false);
4
+ #replay = null;
5
+ bind(replay) {
6
+ this.#replay = replay;
7
+ return ()=>{
8
+ if (this.#replay === replay) this.#replay = null;
9
+ };
10
+ }
11
+ replay(tourId) {
12
+ return this.#replay ? this.#replay(tourId) : Promise.resolve(false);
13
+ }
14
+ }
15
+ export const onboarding = new Onboarding();
@@ -0,0 +1,16 @@
1
+ export function isSeen(tour, seen) {
2
+ return (seen[tour.id] ?? 0) >= (tour.version ?? 1);
3
+ }
4
+ export function toursForRoute(tours, routeId) {
5
+ return routeId ? tours.filter((tour)=>tour.route === routeId) : [];
6
+ }
7
+ export function pickTour(tours, routeId, seen) {
8
+ return toursForRoute(tours, routeId).find((tour)=>!isSeen(tour, seen));
9
+ }
10
+ export function pickForReplay(tours, routeId, tourId) {
11
+ if (tourId) return tours.find((tour)=>tour.id === tourId);
12
+ return toursForRoute(tours, routeId)[0];
13
+ }
14
+ export function keepFoundSteps(steps, exists) {
15
+ return steps.filter((step)=>exists(step.target));
16
+ }
@@ -0,0 +1,50 @@
1
+ import { tryCatch } from "../lib/result.js";
2
+ export function memoryStore(initial = {}) {
3
+ let seen = {
4
+ ...initial
5
+ };
6
+ return {
7
+ async load () {
8
+ return {
9
+ ...seen
10
+ };
11
+ },
12
+ async markSeen (tourId, version, _outcome) {
13
+ seen[tourId] = Math.max(seen[tourId] ?? 0, version);
14
+ },
15
+ async reset (tourId) {
16
+ if (tourId === undefined) seen = {};
17
+ else delete seen[tourId];
18
+ }
19
+ };
20
+ }
21
+ function readSeen(key) {
22
+ const read = tryCatch(()=>JSON.parse(localStorage.getItem(key) ?? "{}"));
23
+ const parsed = read.ok ? read.value : null;
24
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
25
+ return Object.fromEntries(Object.entries(parsed).filter((entry)=>typeof entry[1] === "number"));
26
+ }
27
+ function writeSeen(key, seen) {
28
+ tryCatch(()=>localStorage.setItem(key, JSON.stringify(seen)));
29
+ }
30
+ export function localStorageStore(key = "heyramzi:onboarding") {
31
+ return {
32
+ async load () {
33
+ return readSeen(key);
34
+ },
35
+ async markSeen (tourId, version, _outcome) {
36
+ const seen = readSeen(key);
37
+ seen[tourId] = Math.max(seen[tourId] ?? 0, version);
38
+ writeSeen(key, seen);
39
+ },
40
+ async reset (tourId) {
41
+ if (tourId === undefined) {
42
+ tryCatch(()=>localStorage.removeItem(key));
43
+ return;
44
+ }
45
+ const seen = readSeen(key);
46
+ delete seen[tourId];
47
+ writeSeen(key, seen);
48
+ }
49
+ };
50
+ }
@@ -0,0 +1 @@
1
+ export const MAX_STEPS = 6;
@@ -0,0 +1,25 @@
1
+ const find = (selector)=>document.querySelector(selector);
2
+ export function waitForElement(selector, timeoutMs, signal) {
3
+ return new Promise((resolve)=>{
4
+ const now = find(selector);
5
+ if (now) return resolve(now);
6
+ if (signal?.aborted) return resolve(null);
7
+ const finish = (el)=>{
8
+ observer.disconnect();
9
+ clearTimeout(timer);
10
+ signal?.removeEventListener("abort", onAbort);
11
+ resolve(el);
12
+ };
13
+ const onAbort = ()=>finish(null);
14
+ const observer = new MutationObserver(()=>{
15
+ const el = find(selector);
16
+ if (el) finish(el);
17
+ });
18
+ const timer = setTimeout(()=>finish(find(selector)), timeoutMs);
19
+ observer.observe(document.documentElement, {
20
+ childList: true,
21
+ subtree: true
22
+ });
23
+ signal?.addEventListener("abort", onAbort);
24
+ });
25
+ }
@@ -0,0 +1 @@
1
+ export { default as SidePanel } from "../../src/panel/side-panel.svelte";
File without changes