@mkbabb/glass-ui 3.13.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/CardAction-XH4YBVEK.js +158 -0
  2. package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DdtWXxOK.js} +57 -52
  3. package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-B0Vs6atR.js} +1 -1
  4. package/dist/{DataTable-BCddn3T3.js → DataTable-C464Zbqd.js} +99 -97
  5. package/dist/DialogContent-DDE6pQBU.js +103 -0
  6. package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-8eZbdmPc.js} +1 -1
  7. package/dist/FadingScroll-DwNnvKMs.js +76 -0
  8. package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-Dpzwvc4t.js} +1 -1
  9. package/dist/IconChip-BDw1j5mu.js +54 -0
  10. package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-BpC0R_Ec.js} +1 -1
  11. package/dist/{Notification-DdwNxIrI.js → Notification-DKjKsQq8.js} +8 -8
  12. package/dist/{NumberFieldContent-CqaN-SvN.js → NumberFieldContent-1VtwDSgf.js} +1 -1
  13. package/dist/PopoverContent-BTorlp--.js +127 -0
  14. package/dist/{Progress-DwlUKGbr.js → Progress-hAT4gqGH.js} +97 -77
  15. package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-CUVFTWk2.js} +2 -2
  16. package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-C1jb3b3K.js} +22 -6
  17. package/dist/{Switch-CsIuYP_e.js → Switch-Dr--uLGH.js} +1 -1
  18. package/dist/{Toaster-D6q4HtXu.js → Toaster-Bm_HQSpc.js} +6 -6
  19. package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-Dzk9hWsF.js} +1 -1
  20. package/dist/animated-digit.js +2 -2
  21. package/dist/api/index.d.ts +8 -5
  22. package/dist/api.js +2 -2
  23. package/dist/aurora.js +132 -117
  24. package/dist/{button-ChXMfsud.js → button-BNDWhAZb.js} +2 -2
  25. package/dist/button.js +1 -1
  26. package/dist/card.js +1 -1
  27. package/dist/carousel.d.ts +1 -1
  28. package/dist/carousel.js +97 -141
  29. package/dist/collapsible.js +1 -1
  30. package/dist/color-swatch.d.ts +1 -0
  31. package/dist/color-swatch.js +47 -0
  32. package/dist/color.js +1 -1
  33. package/dist/command.js +1 -1
  34. package/dist/components/custom/aurora/constants/presets.d.ts +28 -0
  35. package/dist/components/custom/aurora/constants/renderMode.d.ts +2 -0
  36. package/dist/components/custom/aurora/index.d.ts +1 -1
  37. package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
  38. package/dist/components/custom/color-swatch/index.d.ts +1 -0
  39. package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
  40. package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
  41. package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
  42. package/dist/components/custom/constellation/constellationField.d.ts +2 -369
  43. package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
  44. package/dist/components/custom/constellation/index.d.ts +1 -1
  45. package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
  46. package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
  47. package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
  48. package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
  49. package/dist/components/custom/dock/constants.d.ts +35 -0
  50. package/dist/components/custom/dock/index.d.ts +2 -0
  51. package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
  52. package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
  53. package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
  54. package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
  55. package/dist/components/custom/fading-scroll/index.d.ts +2 -0
  56. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +7 -0
  57. package/dist/components/custom/fourier-field/index.d.ts +1 -1
  58. package/dist/components/custom/fourier-field/math.d.ts +17 -0
  59. package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +8 -0
  60. package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -1
  61. package/dist/components/custom/goo-blob/constants.d.ts +6 -1
  62. package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
  63. package/dist/components/custom/handmark/brush.d.ts +269 -0
  64. package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
  65. package/dist/components/custom/handmark/constants.d.ts +39 -0
  66. package/dist/components/custom/handmark/freehand.d.ts +69 -0
  67. package/dist/components/custom/handmark/geometry.d.ts +52 -0
  68. package/dist/components/custom/handmark/index.d.ts +27 -0
  69. package/dist/components/custom/handmark/ink.d.ts +11 -0
  70. package/dist/components/custom/handmark/texture.d.ts +39 -0
  71. package/dist/components/custom/handmark/types.d.ts +62 -0
  72. package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
  73. package/dist/components/custom/icon-chip/index.d.ts +2 -0
  74. package/dist/components/custom/icon-chip/types.d.ts +72 -0
  75. package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +15 -2
  76. package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
  77. package/dist/components/custom/pager-dots/index.d.ts +2 -0
  78. package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +20 -25
  79. package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
  80. package/dist/components/custom/tabs/constants.d.ts +9 -3
  81. package/dist/components/custom/tabs/index.d.ts +1 -1
  82. package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +14 -0
  83. package/dist/components/ui/_shared/index.d.ts +2 -0
  84. package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
  85. package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
  86. package/dist/components/ui/card/Card.vue.d.ts +1 -1
  87. package/dist/components/ui/carousel/index.d.ts +0 -1
  88. package/dist/components/ui/command/Command.vue.d.ts +3 -0
  89. package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
  90. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +5 -0
  91. package/dist/components/ui/index.d.ts +0 -1
  92. package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
  93. package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
  94. package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
  95. package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
  96. package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
  97. package/dist/composables/dark/index.d.ts +1 -1
  98. package/dist/composables/dark/useGlobalDark.d.ts +23 -1
  99. package/dist/composables/motion/useViewTransition.d.ts +36 -1
  100. package/dist/configurator.js +1 -1
  101. package/dist/confirm-dialog.js +2 -2
  102. package/dist/constellation.js +92 -94
  103. package/dist/context-menu.js +2 -2
  104. package/dist/controls.js +10 -4
  105. package/dist/dark.d.ts +1 -1
  106. package/dist/dark.js +1 -1
  107. package/dist/data-table.js +1 -1
  108. package/dist/dialog.js +2 -2
  109. package/dist/dock.js +510 -321
  110. package/dist/{dockContext-BegmJVmx.js → dockContext-Bu1Avy-a.js} +1 -1
  111. package/dist/dom.js +5 -5
  112. package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-BJ7E9js_.js} +2 -2
  113. package/dist/dropdown-menu.js +1 -1
  114. package/dist/expandable-container.js +42 -38
  115. package/dist/fading-scroll.d.ts +1 -0
  116. package/dist/fading-scroll.js +2 -0
  117. package/dist/forms.js +3 -3
  118. package/dist/fourier-field.js +38 -37
  119. package/dist/fourier-math.js +2 -2
  120. package/dist/glass-panel.js +39 -36
  121. package/dist/glass-ui.css +1 -1
  122. package/dist/glass-ui.js +129 -145
  123. package/dist/goo-blob.js +86 -81
  124. package/dist/handmark.d.ts +1 -0
  125. package/dist/handmark.js +707 -0
  126. package/dist/header-ribbon.js +1 -1
  127. package/dist/hover-card.js +1 -1
  128. package/dist/hover-popover.js +1 -1
  129. package/dist/icon-chip.d.ts +1 -0
  130. package/dist/icon-chip.js +2 -0
  131. package/dist/icon-tooltip.js +1 -1
  132. package/dist/index.d.ts +2 -2
  133. package/dist/keyboard.js +1 -1
  134. package/dist/label.js +1 -1
  135. package/dist/labeled-field.js +6 -6
  136. package/dist/{math-U6-RrLmV.js → math-DeuJwLFx.js} +11 -3
  137. package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-DWRQXBxJ.js} +10 -4
  138. package/dist/metric-badge.js +1 -1
  139. package/dist/metric-cell.js +25 -22
  140. package/dist/metric-stack.js +1 -1
  141. package/dist/motion-core.js +33 -32
  142. package/dist/motion-curves.js +1 -1
  143. package/dist/motion.js +4 -4
  144. package/dist/notification.js +1 -1
  145. package/dist/number-field.js +1 -1
  146. package/dist/pager-dots.d.ts +1 -0
  147. package/dist/pager-dots.js +91 -0
  148. package/dist/paper-backdrop.js +1 -1
  149. package/dist/popover.js +1 -1
  150. package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
  151. package/dist/progress.js +1 -1
  152. package/dist/pulse.js +1 -1
  153. package/dist/reactive.js +2 -2
  154. package/dist/scrolling-text.js +1 -1
  155. package/dist/search.js +5 -5
  156. package/dist/select.js +3 -3
  157. package/dist/separator.js +1 -1
  158. package/dist/{sheet-1fChZjtw.js → sheet-CquRYOAw.js} +59 -55
  159. package/dist/sheet.js +1 -1
  160. package/dist/{slider-B-JP2JlI.js → slider-DQ95MET2.js} +7 -7
  161. package/dist/slider.js +1 -1
  162. package/dist/sortable-list.js +3 -3
  163. package/dist/styles/animations.css +11 -26
  164. package/dist/styles/components.css +1 -1
  165. package/dist/styles/configurator.css +35 -0
  166. package/dist/styles/dock/density.css +19 -0
  167. package/dist/styles/dock/overflow.css +15 -0
  168. package/dist/styles/dock/rail-extend.css +168 -71
  169. package/dist/styles/dock/section.css +59 -0
  170. package/dist/styles/dock/shell.css +34 -5
  171. package/dist/styles/dock-controls/icon-button.css +11 -1
  172. package/dist/styles/dock-controls/tab-button.css +24 -83
  173. package/dist/styles/dock-controls/triggers.css +7 -0
  174. package/dist/styles/dock.css +6 -3
  175. package/dist/styles/drawer.css +46 -0
  176. package/dist/styles/feedback-tone.css +104 -0
  177. package/dist/styles/glass/ladder.css +68 -22
  178. package/dist/styles/glass/surface-axis.css +113 -0
  179. package/dist/styles/glass/surfaces.css +88 -12
  180. package/dist/styles/glass.css +5 -2
  181. package/dist/styles/icon-chip.css +149 -0
  182. package/dist/styles/index.css +67 -5
  183. package/dist/styles/instrument-chassis.css +42 -0
  184. package/dist/styles/menu.css +127 -0
  185. package/dist/styles/segmented-tabs.css +160 -89
  186. package/dist/styles/select.css +50 -0
  187. package/dist/styles/theme/bridges.css +11 -1
  188. package/dist/styles/tokens/color-radius.css +40 -13
  189. package/dist/styles/tokens/dark-arm.css +124 -16
  190. package/dist/styles/tokens/glass.css +83 -23
  191. package/dist/styles/tokens/light-dark.css +48 -19
  192. package/dist/styles/tokens/offsets-sizing.css +62 -0
  193. package/dist/styles/tokens/property-regs.css +3 -10
  194. package/dist/styles/tokens/scale-paper.css +45 -2
  195. package/dist/styles/tokens/scheme-motion.css +32 -14
  196. package/dist/styles/transitions.css +7 -7
  197. package/dist/styles/typography/scale.css +153 -0
  198. package/dist/styles/typography/semantic.css +220 -0
  199. package/dist/styles/typography/utilities.css +159 -0
  200. package/dist/styles/typography.css +23 -507
  201. package/dist/styles/utilities/a11y-overrides.css +33 -4
  202. package/dist/styles/utilities/base.css +177 -1
  203. package/dist/styles/utilities/btn.css +18 -201
  204. package/dist/styles/view-transition.css +4 -1
  205. package/dist/switch.js +1 -1
  206. package/dist/tabs.js +154 -183
  207. package/dist/timeline.js +2 -2
  208. package/dist/toast.js +1 -1
  209. package/dist/toggle-chip.js +3 -1
  210. package/dist/toggle-group.js +1 -1
  211. package/dist/typewriter.js +1 -1
  212. package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-C_3wZLx4.js} +1 -1
  213. package/dist/useConfiguratorState-kiIlun8I.js +303 -0
  214. package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
  215. package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-CdwJ7284.js} +1 -1
  216. package/dist/{useSpringMount-CI2jOstM.js → useSpringMount-CvopqiFr.js} +1 -1
  217. package/dist/useSurfaceAxis-CMnF2zHb.js +7 -0
  218. package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-28Tk2-t2.js} +1 -1
  219. package/dist/{vReveal-CqaCz_mC.js → useViewTransition-COsPjQVZ.js} +15 -12
  220. package/dist/vReveal-D9k0jADx.js +10 -0
  221. package/dist/watercolor-dot.js +12 -5
  222. package/package.json +71 -7
  223. package/src/styles/animations.css +11 -26
  224. package/src/styles/configurator.css +35 -0
  225. package/src/styles/dock/density.css +19 -0
  226. package/src/styles/dock/overflow.css +15 -0
  227. package/src/styles/dock/rail-extend.css +168 -71
  228. package/src/styles/dock/section.css +59 -0
  229. package/src/styles/dock/shell.css +34 -5
  230. package/src/styles/dock-controls/icon-button.css +11 -1
  231. package/src/styles/dock-controls/tab-button.css +24 -83
  232. package/src/styles/dock-controls/triggers.css +7 -0
  233. package/src/styles/dock.css +6 -3
  234. package/src/styles/drawer.css +42 -0
  235. package/src/styles/feedback-tone.css +104 -0
  236. package/src/styles/glass/ladder.css +68 -22
  237. package/src/styles/glass/surface-axis.css +113 -0
  238. package/src/styles/glass/surfaces.css +88 -12
  239. package/src/styles/glass.css +5 -2
  240. package/src/styles/icon-chip.css +149 -0
  241. package/src/styles/index.css +66 -4
  242. package/src/styles/instrument-chassis.css +42 -0
  243. package/src/styles/menu.css +127 -0
  244. package/src/styles/segmented-tabs.css +156 -87
  245. package/src/styles/select.css +50 -0
  246. package/src/styles/theme/bridges.css +11 -1
  247. package/src/styles/tokens/color-radius.css +40 -13
  248. package/src/styles/tokens/dark-arm.css +124 -16
  249. package/src/styles/tokens/glass.css +83 -23
  250. package/src/styles/tokens/light-dark.css +48 -19
  251. package/src/styles/tokens/offsets-sizing.css +62 -0
  252. package/src/styles/tokens/property-regs.css +3 -10
  253. package/src/styles/tokens/scale-paper.css +45 -2
  254. package/src/styles/tokens/scheme-motion.css +32 -14
  255. package/src/styles/transitions.css +7 -7
  256. package/src/styles/typography/scale.css +153 -0
  257. package/src/styles/typography/semantic.css +220 -0
  258. package/src/styles/typography/utilities.css +159 -0
  259. package/src/styles/typography.css +23 -507
  260. package/src/styles/utilities/a11y-overrides.css +33 -4
  261. package/src/styles/utilities/base.css +177 -1
  262. package/src/styles/utilities/btn.css +18 -201
  263. package/src/styles/view-transition.css +4 -1
  264. package/dist/CardAction-Cj2eycQ2.js +0 -157
  265. package/dist/DialogContent-Dl9WkAoS.js +0 -100
  266. package/dist/PopoverContent-BYwt2-4x.js +0 -121
  267. package/dist/TabsList-Dttss653.js +0 -105
  268. package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
  269. package/dist/components/custom/underline/index.d.ts +0 -2
  270. package/dist/components/custom/underline/types.d.ts +0 -56
  271. package/dist/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
  272. package/dist/underline.d.ts +0 -1
  273. package/dist/underline.js +0 -85
  274. package/dist/useConfiguratorState-DAoeHVue.js +0 -287
  275. /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-C_s6fG7r.js} +0 -0
  276. /package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-ON3x7cuk.js} +0 -0
  277. /package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-DkMaQzH5.js} +0 -0
  278. /package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-DSjasZIt.js} +0 -0
  279. /package/dist/{Input-DWQQIOC4.js → Input-DVG_J0ne.js} +0 -0
  280. /package/dist/{Label-r3WzWrsj.js → Label-Ck9SWEKM.js} +0 -0
  281. /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-CkPRRgl_.js} +0 -0
  282. /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-nBKe0vkB.js} +0 -0
  283. /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-Dcczq44n.js} +0 -0
  284. /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DK2y1Bun.js} +0 -0
  285. /package/dist/{Separator-0JE6LtNu.js → Separator-BArl4OaB.js} +0 -0
  286. /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-CBt_VvXa.js} +0 -0
  287. /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
  288. /package/dist/{compile-B7NGOBcP.js → compile-EXXzEr1q.js} +0 -0
  289. /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
  290. /package/dist/{createContext-BM46COQ-.js → createContext-B2RaZ-b8.js} +0 -0
  291. /package/dist/{prng-D27-B3tK.js → prng-Cg22zv8g.js} +0 -0
  292. /package/dist/{springPresets--YdWTHtm.js → springPresets-WXaLbu8u.js} +0 -0
  293. /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
  294. /package/dist/{useInterval-iHludrxk.js → useInterval-CNdua40W.js} +0 -0
  295. /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
  296. /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-C12hXwOZ.js} +0 -0
  297. /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-V6nq5gJb.js} +0 -0
  298. /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-NUG2zYAW.js} +0 -0
  299. /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
  300. /package/dist/{useSortable-muI29agz.js → useSortable-BVqlJRBR.js} +0 -0
  301. /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-NmBM5V_4.js} +0 -0
  302. /package/dist/{useTimer-Dzarvzuk.js → useTimer-B_PAasDL.js} +0 -0
  303. /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-CDfJuakL.js} +0 -0
  304. /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-CvBcCYDf.js} +0 -0
@@ -0,0 +1,707 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-CBt_VvXa.js";
2
+ import { n as t } from "./prng-Cg22zv8g.js";
3
+ import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, unref as h, useId as g, watch as _ } from "vue";
4
+ import { catmullRomToBezier as v, ellipsePoints as y, perturbPoints as b, perturbPointsClosed as x, pointsToLinear as S, useLineBoil as C, wobbleLinePoints as w } from "@mkbabb/pencil-boil";
5
+ //#region src/components/custom/handmark/brush.ts
6
+ var T = {
7
+ pen: {
8
+ weight: 6,
9
+ weightJitter: .1,
10
+ thinning: .15,
11
+ taper: {
12
+ start: 14,
13
+ end: 14,
14
+ ease: "out-cubic"
15
+ },
16
+ ribbon: "stroke",
17
+ opacity: 1,
18
+ blend: "source-over",
19
+ passes: 1,
20
+ passOpacity: 0,
21
+ grain: 0,
22
+ grainFreq: .1,
23
+ grainScale: 0,
24
+ octaves: 2,
25
+ roughness: .7,
26
+ wobble: 1.2,
27
+ segments: 9,
28
+ cap: "round"
29
+ },
30
+ boil: {
31
+ weight: 5,
32
+ weightJitter: .12,
33
+ thinning: .2,
34
+ taper: {
35
+ start: 12,
36
+ end: 12,
37
+ ease: "out-cubic"
38
+ },
39
+ ribbon: "stroke",
40
+ opacity: 1,
41
+ blend: "source-over",
42
+ passes: 1,
43
+ passOpacity: 0,
44
+ grain: 0,
45
+ grainFreq: .1,
46
+ grainScale: 0,
47
+ octaves: 2,
48
+ roughness: .9,
49
+ wobble: 1.4,
50
+ segments: 14,
51
+ cap: "round"
52
+ },
53
+ pencil: {
54
+ weight: 3,
55
+ weightJitter: .3,
56
+ thinning: .4,
57
+ taper: {
58
+ start: 8,
59
+ end: 18,
60
+ ease: "out-cubic"
61
+ },
62
+ ribbon: "stroke",
63
+ opacity: .6,
64
+ blend: "source-over",
65
+ passes: 1,
66
+ passOpacity: 0,
67
+ grain: .5,
68
+ grainFreq: .42,
69
+ grainScale: 1.5,
70
+ octaves: 3,
71
+ roughness: 1,
72
+ wobble: 1.6,
73
+ segments: 11,
74
+ cap: "round"
75
+ },
76
+ crayon: {
77
+ weight: 16,
78
+ weightJitter: 1,
79
+ thinning: .25,
80
+ taper: {
81
+ start: 6,
82
+ end: 6,
83
+ ease: "linear"
84
+ },
85
+ ribbon: "stroke",
86
+ opacity: .8,
87
+ blend: "source-over",
88
+ passes: 2,
89
+ passOpacity: .18,
90
+ grain: .85,
91
+ grainFreq: .16,
92
+ grainScale: 2.6,
93
+ octaves: 4,
94
+ roughness: 1.5,
95
+ wobble: 3,
96
+ segments: 13,
97
+ cap: "round"
98
+ },
99
+ ring: {
100
+ weight: 5,
101
+ weightJitter: .6,
102
+ thinning: .3,
103
+ taper: {
104
+ start: 8,
105
+ end: 12,
106
+ ease: "out-cubic"
107
+ },
108
+ ribbon: "stroke",
109
+ opacity: .55,
110
+ blend: "source-over",
111
+ passes: 1,
112
+ passOpacity: 0,
113
+ grain: .7,
114
+ grainFreq: .18,
115
+ grainScale: 1.8,
116
+ octaves: 4,
117
+ roughness: 1.4,
118
+ wobble: 2.6,
119
+ segments: 13,
120
+ cap: "round"
121
+ },
122
+ marker: {
123
+ weight: 12,
124
+ weightJitter: .2,
125
+ thinning: .1,
126
+ taper: {
127
+ start: 4,
128
+ end: 10,
129
+ ease: "out-cubic"
130
+ },
131
+ ribbon: "stroke",
132
+ opacity: .92,
133
+ blend: "source-over",
134
+ passes: 1,
135
+ passOpacity: 0,
136
+ grain: .22,
137
+ grainFreq: .09,
138
+ grainScale: 1,
139
+ octaves: 3,
140
+ roughness: 1,
141
+ wobble: 2.2,
142
+ segments: 9,
143
+ cap: "square"
144
+ },
145
+ highlighter: {
146
+ weight: 26,
147
+ weightJitter: .05,
148
+ thinning: 0,
149
+ taper: {
150
+ start: 6,
151
+ end: 10,
152
+ ease: "out-cubic"
153
+ },
154
+ ribbon: "hull",
155
+ opacity: .38,
156
+ blend: "multiply",
157
+ passes: 1,
158
+ passOpacity: 0,
159
+ grain: .12,
160
+ grainFreq: .2,
161
+ grainScale: 1.5,
162
+ octaves: 2,
163
+ roughness: .5,
164
+ wobble: 1.4,
165
+ segments: 9,
166
+ cap: "square"
167
+ }
168
+ }, E = (e, t) => ({
169
+ ...T[typeof e == "string" ? e : "pen"],
170
+ ...typeof e == "object" ? e : {},
171
+ ...t
172
+ }), D = (e, t, n) => {
173
+ let r = (e, t) => e + (t - e) * n, i = (e, t) => n < .5 ? e : t;
174
+ return {
175
+ weight: r(e.weight, t.weight),
176
+ weightJitter: r(e.weightJitter, t.weightJitter),
177
+ thinning: r(e.thinning, t.thinning),
178
+ taper: {
179
+ start: r(e.taper.start, t.taper.start),
180
+ end: r(e.taper.end, t.taper.end),
181
+ ease: i(e.taper.ease, t.taper.ease)
182
+ },
183
+ ribbon: i(e.ribbon, t.ribbon),
184
+ opacity: r(e.opacity, t.opacity),
185
+ blend: i(e.blend, t.blend),
186
+ passes: Math.max(1, Math.round(r(e.passes, t.passes))),
187
+ passOpacity: r(e.passOpacity, t.passOpacity),
188
+ grain: r(e.grain, t.grain),
189
+ grainFreq: r(e.grainFreq, t.grainFreq),
190
+ grainScale: r(e.grainScale, t.grainScale),
191
+ octaves: Math.max(1, Math.round(r(e.octaves, t.octaves))),
192
+ roughness: r(e.roughness, t.roughness),
193
+ wobble: r(e.wobble, t.wobble),
194
+ segments: Math.max(2, Math.round(r(e.segments, t.segments))),
195
+ cap: i(e.cap, t.cap)
196
+ };
197
+ }, O = 100, k = 40, A = .06, j = .22, M = .66, N = .022;
198
+ function P(e, n, r, i, a) {
199
+ let o = r - e;
200
+ if (o <= 0) return [[e, n], [r, n]];
201
+ let s = t(i >>> 0), c = 2 + Math.floor(s() * 3), l = o * N, u = s() * Math.PI * 2, d = .65 + s() * .35, f = .2 + s() * .3, p = Math.max(6, a), m = [];
202
+ for (let t = 0; t <= p; t++) {
203
+ let r = t / p, i = e + o * r, a = d * Math.sin(u + r * Math.PI * 2 * c) + f * Math.sin(u * 1.7 + r * Math.PI * 2 * (c + 1)), h = Math.sin(Math.PI * r), g = (s() - .5) * .4;
204
+ m.push([i, n + l * (a + g) * h]);
205
+ }
206
+ return m;
207
+ }
208
+ function F(e, t, n = null, r = null, i = !1) {
209
+ let a = n ? n.x : 4, o = n ? n.x + n.w : 96, s = n ? n.y + n.h / 2 : 40 / 2, c = n ? n.y + n.h * .92 : r == null ? 32 : 40 * (r + A), l = t.seed ?? 1, u = t.segments ?? 9, d = (e, n, r, i, a = 0) => w(e, n, r, i, {
210
+ ...t,
211
+ seed: l + a
212
+ });
213
+ switch (e) {
214
+ case "underline": return {
215
+ lines: [i ? P(a, c, o, l, u) : d(a, c, o, c)],
216
+ closed: !1
217
+ };
218
+ case "strikethrough": return {
219
+ lines: [d(a, s, o, s)],
220
+ closed: !1
221
+ };
222
+ case "highlight": {
223
+ let e = n ? s : 40 * ((r ?? M) - j);
224
+ return {
225
+ lines: [d(a, e, o, e)],
226
+ closed: !1
227
+ };
228
+ }
229
+ case "box": {
230
+ let e = n ? n.y : 4, t = n ? n.y + n.h : 36;
231
+ return {
232
+ lines: [
233
+ d(a, e, o, e, 0),
234
+ d(o, e, o, t, 1),
235
+ d(o, t, a, t, 2),
236
+ d(a, t, a, e, 3)
237
+ ],
238
+ closed: !1
239
+ };
240
+ }
241
+ case "bracket": {
242
+ let e = n ? n.y : 4, t = n ? n.y + n.h : 36, r = (o - a) * .22;
243
+ return {
244
+ lines: [
245
+ d(a + r, e, a, e, 0),
246
+ d(a, e, a, t, 1),
247
+ d(a, t, a + r, t, 2)
248
+ ],
249
+ closed: !1
250
+ };
251
+ }
252
+ case "circle": return {
253
+ lines: [y(n ? n.x + n.w / 2 : 100 / 2, n ? n.y + n.h / 2 : 40 / 2, (n ? n.w / 2 : 100 / 2) - 3, (n ? n.h / 2 : 40 / 2) - 3, t)],
254
+ closed: !0
255
+ };
256
+ case "path": return {
257
+ lines: [],
258
+ closed: !1
259
+ };
260
+ default: return {
261
+ lines: [d(a, c, o, c)],
262
+ closed: !1
263
+ };
264
+ }
265
+ }
266
+ function I({ lines: e, closed: t }, n, r) {
267
+ return e.map((e, i) => {
268
+ if (t) return x(e, n, r + i);
269
+ let a = e[0], o = e[e.length - 1];
270
+ return b(e, a[0], a[1], o[0], o[1], n, r + i);
271
+ });
272
+ }
273
+ function L(e, t = !1) {
274
+ return e.map((e) => t ? S(e) : v(e)).join(" ");
275
+ }
276
+ //#endregion
277
+ //#region src/components/custom/handmark/freehand.ts
278
+ var R = (e, t) => [e[0] + t[0], e[1] + t[1]], z = (e, t) => [e[0] - t[0], e[1] - t[1]], B = (e, t) => [e[0] * t, e[1] * t], V = (e) => [-e[0], -e[1]], H = (e) => [e[1], -e[0]], U = (e, t) => e[0] * t[0] + e[1] * t[1], ee = (e) => e[0] * e[0] + e[1] * e[1], W = (e, t) => ee(z(e, t)), te = (e, t) => Math.hypot(e[1] - t[1], e[0] - t[0]), G = (e) => B(e, 1 / (Math.hypot(e[0], e[1]) || 1)), K = (e, t, n) => R(e, B(z(t, e), n)), q = (e, t) => B(R(e, t), .5), J = (e, t, n) => {
279
+ let r = Math.sin(n), i = Math.cos(n), a = e[0] - t[0], o = e[1] - t[1];
280
+ return [a * i - o * r + t[0], a * r + o * i + t[1]];
281
+ }, { min: Y, PI: ne } = Math, X = ne + 1e-4, Z = (e) => e;
282
+ function Q(e, t = {}) {
283
+ let { streamline: n = .5, size: r = 16, last: i = !1 } = t;
284
+ if (e.length === 0) return [];
285
+ let a = .15 + (1 - n) * .85, o = e.map((e) => [
286
+ e[0],
287
+ e[1],
288
+ e[2] ?? .5
289
+ ]);
290
+ if (o.length === 2) {
291
+ let e = o[1];
292
+ o[1] = K(o[0], e, .5), o.push(e);
293
+ }
294
+ o.length === 1 && o.push([...R(o[0], [1, 1]), ...o[0].slice(2)]);
295
+ let s = [{
296
+ point: [o[0][0], o[0][1]],
297
+ pressure: o[0][2] >= 0 ? o[0][2] : .25,
298
+ vector: [1, 1],
299
+ distance: 0,
300
+ runningLength: 0
301
+ }], c = !1, l = 0, u = s[0], d = o.length - 1;
302
+ for (let e = 1; e < o.length; e++) {
303
+ let t = i && e === d ? [o[e][0], o[e][1]] : K(u.point, [o[e][0], o[e][1]], a);
304
+ if (W(u.point, t) < 1e-4) continue;
305
+ let n = te(t, u.point);
306
+ if (l += n, e < d && !c) {
307
+ if (l < r) continue;
308
+ c = !0;
309
+ }
310
+ u = {
311
+ point: t,
312
+ pressure: o[e][2] >= 0 ? o[e][2] : .5,
313
+ vector: G(z(u.point, t)),
314
+ distance: n,
315
+ runningLength: l
316
+ }, s.push(u);
317
+ }
318
+ return s.length > 0 && (s[0].vector = s[1]?.vector ?? [0, 0]), s;
319
+ }
320
+ function re(e, t = {}) {
321
+ let { size: n = 16, smoothing: r = .5, thinning: i = .5, simulatePressure: a = !0, easing: o = Z, start: s = {}, end: c = {}, last: l = !1 } = t, { cap: u = !0, easing: d = (e) => e * (2 - e) } = s, { cap: f = !0, easing: p = (e) => --e * e * e + 1 } = c;
322
+ if (e.length === 0 || n <= 0) return [];
323
+ let m = e[e.length - 1].runningLength, h = s.taper === !1 ? 0 : s.taper === !0 ? Math.max(n, m) : s.taper ?? 0, g = c.taper === !1 ? 0 : c.taper === !0 ? Math.max(n, m) : c.taper ?? 0, _ = (n * r) ** 2, v = [], y = [], b = [], x = e.slice(0, 10).reduce((e, t) => {
324
+ let r = t.pressure;
325
+ if (a) {
326
+ let i = Y(1, t.distance / n);
327
+ r = Y(1, e + (Y(1, 1 - i) - e) * (i * .275));
328
+ }
329
+ return (e + r) / 2;
330
+ }, e[0].pressure), S = ie(n, i, e[e.length - 1].pressure, o), C, w = e[0].vector, T = e[0].point, E = T, D = T, O = E, k = !1;
331
+ for (let t = 0; t < e.length; t++) {
332
+ let { pressure: r } = e[t], { point: s, vector: c, distance: l, runningLength: u } = e[t];
333
+ if (t < e.length - 1 && m - u < 3) continue;
334
+ if (i) {
335
+ if (a) {
336
+ let e = Y(1, l / n), t = Y(1, 1 - e);
337
+ r = Y(1, x + (t - x) * (e * .275));
338
+ }
339
+ S = ie(n, i, r, o);
340
+ } else S = n / 2;
341
+ C === void 0 && (C = S);
342
+ let f = u < h ? d(u / h) : 1, A = m - u < g ? p((m - u) / g) : 1;
343
+ S = Math.max(.01, S * Math.min(f, A));
344
+ let j = (t < e.length - 1 ? e[t + 1] : e[t]).vector, M = t < e.length - 1 ? U(c, j) : 1, N = U(c, w) < 0 && !k, P = M !== null && M < .2;
345
+ if (N || P) {
346
+ let e = B(H(w), S);
347
+ for (let t = 0; t <= 1; t += .07692307692307693) D = J(z(s, e), s, X * t), v.push(D), O = J(R(s, e), s, X * -t), y.push(O);
348
+ T = D, E = O, P && (k = !0);
349
+ continue;
350
+ }
351
+ if (k = !1, t === e.length - 1) {
352
+ let e = B(H(c), S);
353
+ v.push(z(s, e)), y.push(R(s, e));
354
+ continue;
355
+ }
356
+ let F = B(H(K(j, c, M)), S);
357
+ D = z(s, F), (t <= 1 || W(T, D) > _) && (v.push(D), T = D), O = R(s, F), (t <= 1 || W(E, O) > _) && (y.push(O), E = O), x = r, w = c, b.push(S);
358
+ }
359
+ let A = e[0].point.slice(0, 2), j = e.length > 1 ? e[e.length - 1].point.slice(0, 2) : R(e[0].point, [1, 1]), M = [], N = [];
360
+ if (e.length === 1) {
361
+ if (!(h || g) || l) {
362
+ let e = R(A, B(G(H(z(A, j))), -(C ?? S))), t = [];
363
+ for (let n = 1 / 13, r = n; r <= 1; r += n) t.push(J(e, A, X * 2 * r));
364
+ return t;
365
+ }
366
+ } else {
367
+ if (!(h || g && e.length === 1)) if (u) for (let e = 1 / 13, t = e; t <= 1; t += e) {
368
+ let e = J(y[0], A, X * t);
369
+ M.push(e);
370
+ }
371
+ else {
372
+ let e = z(v[0], y[0]), t = B(e, .5), n = B(e, .51);
373
+ M.push(z(A, t), z(A, n), R(A, n), R(A, t));
374
+ }
375
+ let t = H(V(e[e.length - 1].vector));
376
+ if (g || h && e.length === 1) N.push(j);
377
+ else if (f) {
378
+ let e = R(j, B(t, S));
379
+ for (let t = 1 / 29, n = t; n < 1; n += t) N.push(J(e, j, X * 3 * n));
380
+ } else N.push(R(j, B(t, S)), R(j, B(t, S * .99)), z(j, B(t, S * .99)), z(j, B(t, S)));
381
+ }
382
+ return v.concat(N, y.reverse(), M);
383
+ }
384
+ function ie(e, t, n, r = Z) {
385
+ if (!t) return e / 2;
386
+ let i = n;
387
+ return i < 0 && (i = 0), i > 1 && (i = 1), e * r(.5 - t * (.5 - i)) * .5 + e / 2 * (1 - Math.abs(t));
388
+ }
389
+ function ae(e, t = {}) {
390
+ return re(Q(e, t), t);
391
+ }
392
+ function oe(e, t = !0) {
393
+ if (e.length < 4) return "";
394
+ let n = e[0], r = e[1], i = e[2], a = `M${n[0].toFixed(2)},${n[1].toFixed(2)} Q${r[0].toFixed(2)},${r[1].toFixed(2)} ${q(r, i)[0].toFixed(2)},${q(r, i)[1].toFixed(2)} T`;
395
+ for (let t = 2, i = e.length - 1; t < i; t++) n = e[t], r = e[t + 1], a += `${q(n, r)[0].toFixed(2)},${q(n, r)[1].toFixed(2)} `;
396
+ return t && (a += "Z"), a;
397
+ }
398
+ //#endregion
399
+ //#region src/components/custom/handmark/texture.ts
400
+ function se(e, t, n) {
401
+ if (t.grain <= 0 && t.grainScale <= 0) return "";
402
+ let r = (n ^ 34283) & 65535, i = (.55 - t.grain * .42).toFixed(3), a = t.grain > 0 ? "in" : "over";
403
+ return `
404
+ <filter id="${e}" x="-40%" y="-60%" width="180%" height="220%" color-interpolation-filters="sRGB">
405
+ <feTurbulence type="fractalNoise" baseFrequency="${(.012 * t.roughness).toFixed(4)}" numOctaves="2" seed="${r}" result="warp"/>
406
+ <feDisplacementMap in="SourceGraphic" in2="warp" scale="${(t.grainScale * 1.4).toFixed(2)}" xChannelSelector="R" yChannelSelector="G" result="wob"/>
407
+ <feTurbulence type="fractalNoise" baseFrequency="${t.grainFreq}" numOctaves="${t.octaves}" seed="${r + 17}" result="grain"/>
408
+ <feColorMatrix in="grain" type="matrix" result="grainA"
409
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${(6 + t.grain * 10).toFixed(2)} ${i}"/>
410
+ <feComposite in="wob" in2="grainA" operator="${a}" result="grained"/>
411
+ <feDisplacementMap in="grained" in2="grain" scale="${(t.grainScale * 2).toFixed(2)}" xChannelSelector="R" yChannelSelector="G"/>
412
+ </filter>`;
413
+ }
414
+ function $(e) {
415
+ return e.grain > 0 || e.grainScale > 0;
416
+ }
417
+ //#endregion
418
+ //#region src/components/custom/handmark/ink.ts
419
+ function ce(e) {
420
+ let t = 0;
421
+ for (let n = 1; n < e.length; n++) t += Math.hypot(e[n][0] - e[n - 1][0], e[n][1] - e[n - 1][1]);
422
+ return t;
423
+ }
424
+ function le(e, n, r) {
425
+ let i = t(r >>> 0);
426
+ return e.map((t, r) => {
427
+ let a = r / Math.max(1, e.length - 1), o = .5 + .35 * Math.sin(Math.PI * a) + (i() - .5) * n.weightJitter * .4;
428
+ return [
429
+ t[0],
430
+ t[1],
431
+ Math.max(.05, Math.min(1, o))
432
+ ];
433
+ });
434
+ }
435
+ function ue(e) {
436
+ return e === "out-cubic" ? (e) => 1 - (1 - e) ** 3 : (e) => e;
437
+ }
438
+ function de(e, n, r, i, a, o = !1) {
439
+ if (n.stamp) {
440
+ let a = t(r >>> 0), o = n.stamp({
441
+ centerline: e,
442
+ brush: n,
443
+ rng: a,
444
+ seed: r,
445
+ length: ce(e),
446
+ color: i
447
+ });
448
+ return {
449
+ paths: o.paths,
450
+ filterId: o.filterId ?? null,
451
+ defs: o.defs ?? []
452
+ };
453
+ }
454
+ let s = [], c = (e) => o ? S(e) : v(e);
455
+ for (let t = 0; t < n.passes; t++) {
456
+ let a = e[0], o = e[e.length - 1], l = b(e, a[0], a[1], o[0], o[1], n.weight * .06, r + 991 * t), u = n.opacity * (1 - n.passOpacity * t);
457
+ if (n.ribbon === "hull") {
458
+ let e = ae(le(l, n, r + 7 * t), {
459
+ size: n.weight,
460
+ thinning: n.thinning,
461
+ streamline: Math.max(.1, .55 - n.roughness * .1),
462
+ last: !0,
463
+ start: {
464
+ taper: n.taper.start,
465
+ easing: ue(n.taper.ease)
466
+ },
467
+ end: {
468
+ taper: n.taper.end,
469
+ easing: ue(n.taper.ease)
470
+ }
471
+ });
472
+ s.push({
473
+ d: oe(e),
474
+ fill: i,
475
+ opacity: u,
476
+ blend: n.blend,
477
+ cap: n.cap
478
+ });
479
+ } else s.push({
480
+ d: c(l),
481
+ stroke: i,
482
+ opacity: u,
483
+ blend: n.blend,
484
+ cap: n.cap
485
+ });
486
+ }
487
+ let l = $(n) ? se(a, n, r) : "";
488
+ return {
489
+ paths: s,
490
+ filterId: l ? a : null,
491
+ defs: l ? [l] : []
492
+ };
493
+ }
494
+ //#endregion
495
+ //#region src/components/custom/handmark/composables/useHandMark.ts
496
+ var fe = {
497
+ currentFrame: f(0),
498
+ start: () => {},
499
+ stop: () => {}
500
+ };
501
+ function pe(e, t, n = null) {
502
+ return {
503
+ brush: e.brush ?? "pen",
504
+ shape: e.shape ?? "underline",
505
+ color: e.color ?? "currentColor",
506
+ seed: e.seed ?? 1,
507
+ overrides: e.overrides,
508
+ animation: e.animation ?? "none",
509
+ boilFps: e.boilFps ?? 8,
510
+ boilFrames: e.boilFrames ?? 3,
511
+ roughness: e.roughness ?? null,
512
+ segments: e.segments ?? null,
513
+ jagged: e.jagged ?? !1,
514
+ natural: e.natural ?? e.brush === "boil",
515
+ box: e.box ?? null,
516
+ path: e.path ?? null,
517
+ filterId: t,
518
+ baselineFrac: n
519
+ };
520
+ }
521
+ function me(e) {
522
+ let t = r(() => {
523
+ let t = { ...e.value.overrides ?? {} };
524
+ return e.value.roughness != null && (t.roughness = e.value.roughness), e.value.segments != null && (t.segments = e.value.segments), E(e.value.brush, t);
525
+ }), n = r(() => $(t.value)), i = r(() => F(e.value.shape, {
526
+ roughness: t.value.roughness,
527
+ segments: t.value.segments,
528
+ seed: e.value.seed,
529
+ jagged: e.value.jagged
530
+ }, e.value.box, e.value.baselineFrac, e.value.natural)), a = r(() => e.value.animation === "boil" || e.value.animation === "draw-then-boil"), o = r(() => e.value.animation === "draw-on" || e.value.animation === "draw-then-boil"), s = r(() => n.value ? "clip" : "dashoffset"), c = f(!1), l = e.value.animation === "boil" || e.value.animation === "draw-then-boil" ? C(() => a.value && c.value ? e.value.boilFrames : 1, () => Math.max(16, 1e3 / e.value.boilFps)) : fe, u = r(() => {
531
+ if (e.value.path) return e.value.path;
532
+ let n = i.value.lines;
533
+ if (a.value && c.value) {
534
+ let r = t.value.wobble * .4 + .4, a = l.currentFrame.value;
535
+ n = I(i.value, r, e.value.seed + a * 31);
536
+ }
537
+ return L(n, e.value.jagged);
538
+ }), d = r(() => e.value.path ? [] : a.value && c.value ? I(i.value, t.value.wobble * .4 + .4, e.value.seed + l.currentFrame.value * 31) : i.value.lines);
539
+ return {
540
+ brush: t,
541
+ baseGeom: i,
542
+ fragment: r(() => {
543
+ let n = {
544
+ paths: [],
545
+ filterId: null,
546
+ defs: []
547
+ }, r = d.value.length ? d.value : [[]];
548
+ for (let i of r) {
549
+ let r = de(i, t.value, e.value.seed, e.value.color, e.value.filterId, e.value.jagged);
550
+ n.paths.push(...r.paths), r.filterId && !n.filterId && (n.filterId = r.filterId, n.defs = r.defs);
551
+ }
552
+ return n;
553
+ }),
554
+ pathD: u,
555
+ grained: n,
556
+ drawKind: s,
557
+ draws: o,
558
+ boils: a,
559
+ boil: l,
560
+ boilArmed: c
561
+ };
562
+ }
563
+ //#endregion
564
+ //#region src/components/custom/handmark/HandMark.vue?vue&type=script&setup=true&lang.ts
565
+ var he = [
566
+ "data-shape",
567
+ "data-behind",
568
+ "data-grained"
569
+ ], ge = ["viewBox"], _e = ["innerHTML"], ve = [
570
+ "d",
571
+ "stroke",
572
+ "fill",
573
+ "stroke-width",
574
+ "stroke-opacity",
575
+ "fill-opacity",
576
+ "stroke-linecap",
577
+ "filter"
578
+ ], ye = /* @__PURE__ */ e(/* @__PURE__ */ o({
579
+ __name: "HandMark",
580
+ props: {
581
+ brush: { default: "pen" },
582
+ shape: { default: "underline" },
583
+ color: { default: "currentColor" },
584
+ seed: { default: 1 },
585
+ overrides: {},
586
+ animation: { default: "none" },
587
+ drawMs: { default: 800 },
588
+ drawDelayMs: { default: 0 },
589
+ appear: { default: "visible" },
590
+ boilFps: { default: 8 },
591
+ boilFrames: { default: 3 },
592
+ roughness: {},
593
+ segments: {},
594
+ jagged: {
595
+ type: Boolean,
596
+ default: !1
597
+ },
598
+ natural: { type: Boolean },
599
+ box: {},
600
+ path: {},
601
+ points: {}
602
+ },
603
+ setup(e, { expose: t }) {
604
+ let o = e, v = `hm-${g().replace(/[^a-zA-Z0-9_-]/g, "")}`, y = f(null), { brush: b, fragment: x, grained: S, drawKind: C, draws: w, boils: T, boil: E, boilArmed: D } = me(r(() => pe(o, v, y.value))), O = r(() => o.shape === "highlight"), k = r(() => o.path ?? null), A = f(!1), j = f(null), M = r(() => w.value ? `${C.value === "clip" ? "clip-path" : "stroke-dashoffset"} ${o.drawMs}ms cubic-bezier(.16,1,.3,1) ${o.drawDelayMs}ms` : "none");
605
+ function N() {
606
+ T.value && (D.value = !0, E.start());
607
+ }
608
+ function P() {
609
+ if (!w.value) {
610
+ N();
611
+ return;
612
+ }
613
+ A.value = !1, j.value && j.value.offsetWidth, requestAnimationFrame(() => {
614
+ A.value = !0;
615
+ });
616
+ }
617
+ function F() {
618
+ o.animation === "draw-then-boil" && N();
619
+ }
620
+ t({ play: P });
621
+ let I = r(() => o.box == null && (o.shape === "underline" || o.shape === "strikethrough" || o.shape === "highlight"));
622
+ function L(e) {
623
+ if (typeof document > "u" || typeof Range > "u") return null;
624
+ let t = Array.from(e.childNodes).filter((e) => e.nodeType === Node.ELEMENT_NODE ? e.tagName !== "svg" : e.nodeType === Node.TEXT_NODE && (e.textContent ?? "").trim().length > 0);
625
+ if (t.length === 0) return null;
626
+ let n = document.createRange();
627
+ n.selectNode(t[0]), t.length > 1 && n.setEndAfter(t[t.length - 1]);
628
+ let r = n.getBoundingClientRect();
629
+ return n.detach?.(), r.height > 0 ? r : null;
630
+ }
631
+ function R() {
632
+ if (!I.value) return;
633
+ let e = j.value;
634
+ if (!e) return;
635
+ let t = L(e);
636
+ if (!t) return;
637
+ let n = e.getBoundingClientRect();
638
+ if (n.height <= 0) return;
639
+ let r = (t.bottom - n.top) / n.height;
640
+ y.value = Math.min(1, Math.max(0, r));
641
+ }
642
+ let z = null;
643
+ function B() {
644
+ !I.value || !j.value || (R(), typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(() => R()), typeof ResizeObserver < "u" && (z = new ResizeObserver(() => R()), z.observe(j.value)));
645
+ }
646
+ let V = null;
647
+ u(() => {
648
+ B(), o.animation === "boil" && N(), o.appear === "mount" ? P() : o.appear === "visible" && typeof IntersectionObserver < "u" ? (V = new IntersectionObserver((e) => {
649
+ e.some((e) => e.isIntersecting) && (P(), V?.disconnect());
650
+ }, { threshold: .35 }), j.value && V.observe(j.value)) : o.appear === "visible" && P();
651
+ }), l(() => {
652
+ V?.disconnect(), z?.disconnect(), E.stop();
653
+ }), _(() => o.animation, () => {
654
+ A.value = !1, D.value = !1;
655
+ });
656
+ let H = {
657
+ "source-over": "normal",
658
+ multiply: "multiply",
659
+ darken: "darken",
660
+ screen: "screen"
661
+ };
662
+ function U(e) {
663
+ return {
664
+ mixBlendMode: H[e],
665
+ transition: M.value
666
+ };
667
+ }
668
+ return (t, r) => (d(), a("span", {
669
+ class: "hm",
670
+ ref_key: "root",
671
+ ref: j,
672
+ "data-shape": e.shape,
673
+ "data-behind": O.value,
674
+ "data-grained": h(S)
675
+ }, [m(t.$slots, "default", {}, void 0, !0), (d(), a("svg", {
676
+ class: "hm__svg",
677
+ viewBox: `0 0 ${h(100)} ${h(40)}`,
678
+ preserveAspectRatio: "none",
679
+ "aria-hidden": "true",
680
+ focusable: "false"
681
+ }, [h(x).filterId ? (d(), a("defs", {
682
+ key: 0,
683
+ innerHTML: h(x).defs[0]
684
+ }, null, 8, _e)) : i("", !0), (d(!0), a(n, null, p(h(x).paths, (e, t) => (d(), a("path", {
685
+ key: t,
686
+ class: s(["hm__path", {
687
+ drawn: A.value,
688
+ [`hm__path--${h(C)}`]: h(w)
689
+ }]),
690
+ d: k.value ?? e.d,
691
+ pathLength: "1",
692
+ "vector-effect": "non-scaling-stroke",
693
+ stroke: e.stroke ?? "none",
694
+ fill: e.fill ?? "none",
695
+ "stroke-width": e.stroke ? h(b).weight : 0,
696
+ "stroke-opacity": e.stroke ? e.opacity : void 0,
697
+ "fill-opacity": e.fill ? e.opacity : void 0,
698
+ "stroke-linecap": e.cap ?? "round",
699
+ "stroke-linejoin": "round",
700
+ filter: h(x).filterId ? `url(#${h(x).filterId})` : void 0,
701
+ style: c(U(e.blend)),
702
+ onTransitionend: F
703
+ }, null, 46, ve))), 128))], 8, ge))], 8, he));
704
+ }
705
+ }), [["__scopeId", "data-v-d3137a58"]]);
706
+ //#endregion
707
+ export { T as BRUSHES, ye as HandMark, ye as InkMark, A as UNDERLINE_GAP, k as VB_H, O as VB_W, I as boilLines, ae as getStroke, Q as getStrokePoints, oe as getSvgPathFromStroke, se as grainFilter, $ as hasGrain, de as ink, D as lerpBrush, pe as normalizeProps, E as resolveBrush, L as serialize, F as shapeGeom, me as useHandMark };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./_plugin-vue_export-helper-ok8pgSl5.js";
1
+ import { t as e } from "./_plugin-vue_export-helper-CBt_VvXa.js";
2
2
  import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, onBeforeUnmount as s, openBlock as c, ref as l, renderSlot as u } from "vue";
3
3
  //#region src/components/custom/header-ribbon/HeaderRibbon.vue?vue&type=script&setup=true&lang.ts
4
4
  var d = {