sparkdesign 0.4.6 → 0.4.8

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 (276) hide show
  1. package/AI_README.md +60 -0
  2. package/README.md +1 -1
  3. package/cli/dist/commands/add.js +1 -1
  4. package/cli/dist/commands/init.js +1 -1
  5. package/cli/registry/AGENTS.md +9 -2
  6. package/cli/registry/agent-manifest.json +794 -0
  7. package/cli/registry/basic/alert-dialog.tsx +3 -6
  8. package/cli/registry/basic/alert.tsx +76 -0
  9. package/cli/registry/basic/aspect-ratio.tsx +8 -0
  10. package/cli/registry/basic/breadcrumb.tsx +117 -0
  11. package/cli/registry/basic/button-group.tsx +79 -0
  12. package/cli/registry/basic/button.tsx +19 -6
  13. package/cli/registry/basic/calendar.tsx +221 -0
  14. package/cli/registry/basic/card.tsx +115 -0
  15. package/cli/registry/basic/carousel.tsx +241 -0
  16. package/cli/registry/basic/chart.tsx +372 -0
  17. package/cli/registry/basic/checkbox.tsx +42 -0
  18. package/cli/registry/basic/collapsible-card.tsx +4 -6
  19. package/cli/registry/basic/combobox.tsx +133 -0
  20. package/cli/registry/basic/command.tsx +184 -0
  21. package/cli/registry/basic/context-menu.tsx +238 -0
  22. package/cli/registry/basic/data-table.tsx +73 -0
  23. package/cli/registry/basic/date-picker.tsx +84 -0
  24. package/cli/registry/basic/dialog.tsx +164 -0
  25. package/cli/registry/basic/direction.tsx +25 -0
  26. package/cli/registry/basic/drawer.tsx +162 -0
  27. package/cli/registry/basic/dropdown-menu.tsx +2 -7
  28. package/cli/registry/basic/empty.tsx +104 -0
  29. package/cli/registry/basic/field.tsx +248 -0
  30. package/cli/registry/basic/hover-card.tsx +57 -0
  31. package/cli/registry/basic/icon-button.tsx +18 -11
  32. package/cli/registry/basic/input-group.tsx +168 -0
  33. package/cli/registry/basic/input-otp.tsx +75 -0
  34. package/cli/registry/basic/input.tsx +43 -0
  35. package/cli/registry/basic/item.tsx +204 -0
  36. package/cli/registry/basic/label.tsx +24 -0
  37. package/cli/registry/basic/menubar.tsx +274 -0
  38. package/cli/registry/basic/native-select.tsx +62 -0
  39. package/cli/registry/basic/navigation-menu.tsx +168 -0
  40. package/cli/registry/basic/popover.tsx +58 -0
  41. package/cli/registry/basic/scroll-area.tsx +58 -0
  42. package/cli/registry/basic/select.tsx +24 -3
  43. package/cli/registry/basic/separator.tsx +26 -0
  44. package/cli/registry/basic/sheet.tsx +18 -0
  45. package/cli/registry/basic/spinner.tsx +20 -5
  46. package/cli/registry/basic/textarea.tsx +43 -0
  47. package/cli/registry/basic/toggle.tsx +1 -1
  48. package/cli/registry/basic/tooltip.tsx +2 -1
  49. package/cli/registry/basic/typography.tsx +1 -1
  50. package/cli/registry/chat/chat-input/chat-input-textarea.tsx +1 -1
  51. package/cli/registry/chat/chat-input/compound.tsx +4 -3
  52. package/cli/registry/chat/chat-input/context.tsx +4 -1
  53. package/cli/registry/chat/code-block-part.tsx +1 -1
  54. package/cli/registry/chat/conversation-anchor-nav.tsx +349 -0
  55. package/cli/registry/chat/file-attachment.tsx +2 -1
  56. package/cli/registry/chat/file-review-part.tsx +21 -21
  57. package/cli/registry/chat/markdown.tsx +2 -2
  58. package/cli/registry/chat/queue-indicator.tsx +1 -0
  59. package/cli/registry/chat/streaming-markdown-block.tsx +12 -8
  60. package/cli/registry/chat/tool-invocation-card.tsx +4 -1
  61. package/cli/registry/lib/file-icon-maps.ts +22 -22
  62. package/cli/registry/meta.json +600 -15
  63. package/cli/registry/tokens/ontology.json +404 -0
  64. package/cli/registry/tokens/scale/presets/compact.css +16 -5
  65. package/cli/registry/tokens/scale/presets/dense.css +13 -2
  66. package/cli/registry/tokens/scale/presets/sharp.css +18 -6
  67. package/cli/registry/tokens/scale/presets/soft.css +23 -1
  68. package/dist/registry/basic/alert-dialog.d.ts +1 -1
  69. package/dist/registry/basic/alert.d.ts +24 -0
  70. package/dist/registry/basic/aspect-ratio.d.ts +16 -0
  71. package/dist/registry/basic/avatar.d.ts +1 -1
  72. package/dist/registry/basic/breadcrumb.d.ts +24 -0
  73. package/dist/registry/basic/button-group.d.ts +26 -0
  74. package/dist/registry/basic/button.d.ts +3 -1
  75. package/dist/registry/basic/calendar.d.ts +22 -0
  76. package/dist/registry/basic/card.d.ts +32 -0
  77. package/dist/registry/basic/carousel.d.ts +19 -0
  78. package/dist/registry/basic/chart.d.ts +55 -0
  79. package/dist/registry/basic/checkbox.d.ts +21 -0
  80. package/dist/registry/basic/combobox.d.ts +37 -0
  81. package/dist/registry/basic/command.d.ts +18 -0
  82. package/dist/registry/basic/context-menu.d.ts +44 -0
  83. package/dist/registry/basic/data-table.d.ts +26 -0
  84. package/dist/registry/basic/date-picker.d.ts +27 -0
  85. package/dist/registry/basic/dialog.d.ts +39 -0
  86. package/dist/registry/basic/direction.d.ts +19 -0
  87. package/dist/registry/basic/drawer.d.ts +37 -0
  88. package/dist/registry/basic/empty.d.ts +22 -0
  89. package/dist/registry/basic/field.d.ts +24 -0
  90. package/dist/registry/basic/hover-card.d.ts +22 -0
  91. package/dist/registry/basic/icon-button.d.ts +2 -1
  92. package/dist/registry/basic/input-group.d.ts +29 -0
  93. package/dist/registry/basic/input-otp.d.ts +22 -0
  94. package/dist/registry/basic/input.d.ts +20 -0
  95. package/dist/registry/basic/item.d.ts +34 -0
  96. package/dist/registry/basic/label.d.ts +16 -0
  97. package/dist/registry/basic/menubar.d.ts +37 -0
  98. package/dist/registry/basic/native-select.d.ts +18 -0
  99. package/dist/registry/basic/navigation-menu.d.ts +25 -0
  100. package/dist/registry/basic/popover.d.ts +23 -0
  101. package/dist/registry/basic/resizable.d.ts +48 -48
  102. package/dist/registry/basic/scroll-area.d.ts +5 -0
  103. package/dist/registry/basic/select.d.ts +7 -2
  104. package/dist/registry/basic/separator.d.ts +16 -0
  105. package/dist/registry/basic/sheet.d.ts +13 -0
  106. package/dist/registry/basic/spinner.d.ts +6 -2
  107. package/dist/registry/basic/tag.d.ts +1 -1
  108. package/dist/registry/basic/textarea.d.ts +21 -0
  109. package/dist/registry/chat/chat-input/context.d.ts +3 -1
  110. package/dist/registry/chat/conversation-anchor-nav.d.ts +72 -0
  111. package/dist/registry/chat/tool-invocation-card.d.ts +2 -0
  112. package/dist/scale/computed.css +11 -0
  113. package/dist/scale/config.css +11 -0
  114. package/dist/scale/presets/compact.css +23 -5
  115. package/dist/scale/presets/dense.css +20 -2
  116. package/dist/scale/presets/sharp.css +25 -6
  117. package/dist/scale/presets/soft.css +30 -1
  118. package/dist/spark-design.cjs.js +37 -33
  119. package/dist/spark-design.es.js +10324 -8950
  120. package/dist/sparkdesign.css +1 -1
  121. package/dist/src/components/basic/Alert/index.d.ts +13 -0
  122. package/dist/src/components/basic/AspectRatio/index.d.ts +13 -0
  123. package/dist/src/components/basic/Breadcrumb/index.d.ts +12 -0
  124. package/dist/src/components/basic/ButtonGroup/index.d.ts +13 -0
  125. package/dist/src/components/basic/Calendar/index.d.ts +13 -0
  126. package/dist/src/components/basic/Card/index.d.ts +13 -0
  127. package/dist/src/components/basic/Carousel/index.d.ts +12 -0
  128. package/dist/src/components/basic/Chart/index.d.ts +13 -0
  129. package/dist/src/components/basic/Checkbox/index.d.ts +13 -0
  130. package/dist/src/components/basic/Combobox/index.d.ts +13 -0
  131. package/dist/src/components/basic/Command/index.d.ts +12 -0
  132. package/dist/src/components/basic/ContextMenu/index.d.ts +19 -0
  133. package/dist/src/components/basic/DataTable/index.d.ts +13 -0
  134. package/dist/src/components/basic/DatePicker/index.d.ts +13 -0
  135. package/dist/src/components/basic/Dialog/index.d.ts +16 -0
  136. package/dist/src/components/basic/Direction/index.d.ts +13 -0
  137. package/dist/src/components/basic/Drawer/index.d.ts +16 -0
  138. package/dist/src/components/basic/Empty/index.d.ts +12 -0
  139. package/dist/src/components/basic/Field/index.d.ts +12 -0
  140. package/dist/src/components/basic/HoverCard/index.d.ts +16 -0
  141. package/dist/src/components/basic/Input/index.d.ts +13 -0
  142. package/dist/src/components/basic/InputGroup/index.d.ts +12 -0
  143. package/dist/src/components/basic/InputOTP/index.d.ts +12 -0
  144. package/dist/src/components/basic/Item/index.d.ts +12 -0
  145. package/dist/src/components/basic/Label/index.d.ts +13 -0
  146. package/dist/src/components/basic/Menubar/index.d.ts +12 -0
  147. package/dist/src/components/basic/NativeSelect/index.d.ts +12 -0
  148. package/dist/src/components/basic/NavigationMenu/index.d.ts +12 -0
  149. package/dist/src/components/basic/Popover/index.d.ts +16 -0
  150. package/dist/src/components/basic/ScrollArea/index.d.ts +12 -0
  151. package/dist/src/components/basic/Separator/index.d.ts +13 -0
  152. package/dist/src/components/basic/Sheet/index.d.ts +13 -0
  153. package/dist/src/components/basic/Textarea/index.d.ts +13 -0
  154. package/dist/src/components/chat/ConversationAnchorNav/index.d.ts +13 -0
  155. package/dist/src/components/chat/StreamingMarkdownBlock/index.d.ts +13 -0
  156. package/dist/src/components/index.d.ts +58 -1
  157. package/dist/src/lib/index.d.ts +1 -1
  158. package/dist/src/lib/motion.d.ts +79 -0
  159. package/dist/theme-base.css +22 -0
  160. package/dist/themes/dark-mint.css +6 -0
  161. package/dist/themes/dark-parchment.css +6 -0
  162. package/dist/themes/light-parchment.css +6 -0
  163. package/dist/tokens/AGENTS.md +1 -0
  164. package/dist/tokens/scale/computed.css +11 -0
  165. package/dist/tokens/scale/config.css +11 -0
  166. package/dist/tokens/scale/presets/compact.css +23 -5
  167. package/dist/tokens/scale/presets/dense.css +20 -2
  168. package/dist/tokens/scale/presets/sharp.css +25 -6
  169. package/dist/tokens/scale/presets/soft.css +30 -1
  170. package/dist/tokens/theme-base.css +22 -0
  171. package/dist/tokens/themes/dark-mint.css +6 -0
  172. package/dist/tokens/themes/dark-parchment.css +6 -0
  173. package/dist/tokens/themes/light-parchment.css +6 -0
  174. package/docs/agent/component-selection.md +60 -0
  175. package/docs/agent/token-ontology.md +37 -0
  176. package/package.json +31 -5
  177. package/registry/agent-manifest.json +794 -0
  178. package/registry/tokens/ontology.json +404 -0
  179. package/dist/_basePickBy-DnQN8w3y.js +0 -151
  180. package/dist/_basePickBy-a-kPMlkg.cjs +0 -1
  181. package/dist/_baseUniq-B-N2NQ50.js +0 -614
  182. package/dist/_baseUniq-Cc_zbSif.cjs +0 -1
  183. package/dist/arc-BQBhijZ6.js +0 -83
  184. package/dist/arc-mWQt0Yph.cjs +0 -1
  185. package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +0 -36
  186. package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +0 -4661
  187. package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +0 -2256
  188. package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +0 -122
  189. package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +0 -10
  190. package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +0 -1580
  191. package/dist/channel-BQn0o8bs.js +0 -5
  192. package/dist/channel-DaN7XniJ.cjs +0 -1
  193. package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +0 -1
  194. package/dist/chunk-4BX2VUAB-Czitj3Kc.js +0 -8
  195. package/dist/chunk-55IACEB6-DXacNZbO.js +0 -8
  196. package/dist/chunk-55IACEB6-DnDxpye9.cjs +0 -1
  197. package/dist/chunk-B4BG7PRW-CBdN0q_V.js +0 -1375
  198. package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +0 -165
  199. package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +0 -220
  200. package/dist/chunk-DI55MBZ5-NCQTvayw.js +0 -1370
  201. package/dist/chunk-FMBD7UC4-CsGMbrtr.js +0 -19
  202. package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +0 -15
  203. package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +0 -1
  204. package/dist/chunk-QN33PNHL-3GERZBRm.js +0 -19
  205. package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +0 -15
  206. package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +0 -1
  207. package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +0 -1
  208. package/dist/chunk-TZMSLE5B-sbiflal0.js +0 -64
  209. package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +0 -1
  210. package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +0 -16
  211. package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +0 -1
  212. package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +0 -16
  213. package/dist/clone-Cde_NQ8V.js +0 -8
  214. package/dist/clone-DCNjWuM2.cjs +0 -1
  215. package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +0 -1
  216. package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +0 -2608
  217. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  218. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  219. package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +0 -444
  220. package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +0 -4
  221. package/dist/defaultLocale-BgPVtth8.js +0 -171
  222. package/dist/defaultLocale-C4wbwF1n.cjs +0 -1
  223. package/dist/diagram-PSM6KHXK-D2bdb7MT.js +0 -531
  224. package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +0 -24
  225. package/dist/diagram-QEK2KX5R-BpUSoh0-.js +0 -217
  226. package/dist/diagram-QEK2KX5R-DZPGteon.cjs +0 -43
  227. package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +0 -24
  228. package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +0 -142
  229. package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +0 -841
  230. package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +0 -60
  231. package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +0 -162
  232. package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +0 -1620
  233. package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +0 -267
  234. package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +0 -2670
  235. package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +0 -699
  236. package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +0 -65
  237. package/dist/graph-DIbblrZP.cjs +0 -1
  238. package/dist/graph-DPcK91G3.js +0 -247
  239. package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +0 -2
  240. package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +0 -24
  241. package/dist/init-CHZsXQcr.cjs +0 -1
  242. package/dist/init-DjUOC4st.js +0 -16
  243. package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +0 -834
  244. package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +0 -139
  245. package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +0 -89
  246. package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +0 -719
  247. package/dist/layout-Byuh8f-J.cjs +0 -1
  248. package/dist/layout-CdLdvj1j.js +0 -1335
  249. package/dist/linear-C2Q_PI9B.js +0 -259
  250. package/dist/linear-C69aPBW1.cjs +0 -1
  251. package/dist/mermaid.core-DBwAx_jp.cjs +0 -249
  252. package/dist/mermaid.core-gFR0XUlD.js +0 -15300
  253. package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +0 -68
  254. package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +0 -784
  255. package/dist/ordinal-B6-f3MAq.js +0 -61
  256. package/dist/ordinal-CagbB1m8.cjs +0 -1
  257. package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +0 -161
  258. package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +0 -30
  259. package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +0 -7
  260. package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +0 -1022
  261. package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +0 -850
  262. package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +0 -64
  263. package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +0 -810
  264. package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +0 -10
  265. package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +0 -145
  266. package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +0 -2511
  267. package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +0 -1
  268. package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +0 -263
  269. package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +0 -16
  270. package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +0 -1
  271. package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +0 -61
  272. package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +0 -795
  273. package/dist/treemap-GDKQZRPO-B9sfERx8.js +0 -17922
  274. package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +0 -160
  275. package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +0 -1340
  276. package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +0 -7
@@ -1,259 +0,0 @@
1
- import { aM as j, aN as p, aO as w, aP as k, aQ as q } from "./mermaid.core-gFR0XUlD.js";
2
- import { i as D } from "./init-DjUOC4st.js";
3
- import { e as M, f as F, a as P, b as z } from "./defaultLocale-BgPVtth8.js";
4
- function g(n, r) {
5
- return n == null || r == null ? NaN : n < r ? -1 : n > r ? 1 : n >= r ? 0 : NaN;
6
- }
7
- function B(n, r) {
8
- return n == null || r == null ? NaN : r < n ? -1 : r > n ? 1 : r >= n ? 0 : NaN;
9
- }
10
- function R(n) {
11
- let r, t, e;
12
- n.length !== 2 ? (r = g, t = (o, c) => g(n(o), c), e = (o, c) => n(o) - c) : (r = n === g || n === B ? n : I, t = n, e = n);
13
- function u(o, c, i = 0, h = o.length) {
14
- if (i < h) {
15
- if (r(c, c) !== 0) return h;
16
- do {
17
- const l = i + h >>> 1;
18
- t(o[l], c) < 0 ? i = l + 1 : h = l;
19
- } while (i < h);
20
- }
21
- return i;
22
- }
23
- function f(o, c, i = 0, h = o.length) {
24
- if (i < h) {
25
- if (r(c, c) !== 0) return h;
26
- do {
27
- const l = i + h >>> 1;
28
- t(o[l], c) <= 0 ? i = l + 1 : h = l;
29
- } while (i < h);
30
- }
31
- return i;
32
- }
33
- function a(o, c, i = 0, h = o.length) {
34
- const l = u(o, c, i, h - 1);
35
- return l > i && e(o[l - 1], c) > -e(o[l], c) ? l - 1 : l;
36
- }
37
- return { left: u, center: a, right: f };
38
- }
39
- function I() {
40
- return 0;
41
- }
42
- function O(n) {
43
- return n === null ? NaN : +n;
44
- }
45
- const V = R(g), $ = V.right;
46
- R(O).center;
47
- const x = Math.sqrt(50), Q = Math.sqrt(10), T = Math.sqrt(2);
48
- function v(n, r, t) {
49
- const e = (r - n) / Math.max(0, t), u = Math.floor(Math.log10(e)), f = e / Math.pow(10, u), a = f >= x ? 10 : f >= Q ? 5 : f >= T ? 2 : 1;
50
- let o, c, i;
51
- return u < 0 ? (i = Math.pow(10, -u) / a, o = Math.round(n * i), c = Math.round(r * i), o / i < n && ++o, c / i > r && --c, i = -i) : (i = Math.pow(10, u) * a, o = Math.round(n / i), c = Math.round(r / i), o * i < n && ++o, c * i > r && --c), c < o && 0.5 <= t && t < 2 ? v(n, r, t * 2) : [o, c, i];
52
- }
53
- function C(n, r, t) {
54
- if (r = +r, n = +n, t = +t, !(t > 0)) return [];
55
- if (n === r) return [n];
56
- const e = r < n, [u, f, a] = e ? v(r, n, t) : v(n, r, t);
57
- if (!(f >= u)) return [];
58
- const o = f - u + 1, c = new Array(o);
59
- if (e)
60
- if (a < 0) for (let i = 0; i < o; ++i) c[i] = (f - i) / -a;
61
- else for (let i = 0; i < o; ++i) c[i] = (f - i) * a;
62
- else if (a < 0) for (let i = 0; i < o; ++i) c[i] = (u + i) / -a;
63
- else for (let i = 0; i < o; ++i) c[i] = (u + i) * a;
64
- return c;
65
- }
66
- function y(n, r, t) {
67
- return r = +r, n = +n, t = +t, v(n, r, t)[2];
68
- }
69
- function E(n, r, t) {
70
- r = +r, n = +n, t = +t;
71
- const e = r < n, u = e ? y(r, n, t) : y(n, r, t);
72
- return (e ? -1 : 1) * (u < 0 ? 1 / -u : u);
73
- }
74
- function G(n, r) {
75
- r || (r = []);
76
- var t = n ? Math.min(r.length, n.length) : 0, e = r.slice(), u;
77
- return function(f) {
78
- for (u = 0; u < t; ++u) e[u] = n[u] * (1 - f) + r[u] * f;
79
- return e;
80
- };
81
- }
82
- function H(n) {
83
- return ArrayBuffer.isView(n) && !(n instanceof DataView);
84
- }
85
- function J(n, r) {
86
- var t = r ? r.length : 0, e = n ? Math.min(t, n.length) : 0, u = new Array(e), f = new Array(t), a;
87
- for (a = 0; a < e; ++a) u[a] = d(n[a], r[a]);
88
- for (; a < t; ++a) f[a] = r[a];
89
- return function(o) {
90
- for (a = 0; a < e; ++a) f[a] = u[a](o);
91
- return f;
92
- };
93
- }
94
- function K(n, r) {
95
- var t = /* @__PURE__ */ new Date();
96
- return n = +n, r = +r, function(e) {
97
- return t.setTime(n * (1 - e) + r * e), t;
98
- };
99
- }
100
- function L(n, r) {
101
- var t = {}, e = {}, u;
102
- (n === null || typeof n != "object") && (n = {}), (r === null || typeof r != "object") && (r = {});
103
- for (u in r)
104
- u in n ? t[u] = d(n[u], r[u]) : e[u] = r[u];
105
- return function(f) {
106
- for (u in t) e[u] = t[u](f);
107
- return e;
108
- };
109
- }
110
- function d(n, r) {
111
- var t = typeof r, e;
112
- return r == null || t === "boolean" ? j(r) : (t === "number" ? p : t === "string" ? (e = w(r)) ? (r = e, k) : q : r instanceof w ? k : r instanceof Date ? K : H(r) ? G : Array.isArray(r) ? J : typeof r.valueOf != "function" && typeof r.toString != "function" || isNaN(r) ? L : p)(n, r);
113
- }
114
- function U(n, r) {
115
- return n = +n, r = +r, function(t) {
116
- return Math.round(n * (1 - t) + r * t);
117
- };
118
- }
119
- function W(n) {
120
- return Math.max(0, -M(Math.abs(n)));
121
- }
122
- function X(n, r) {
123
- return Math.max(0, Math.max(-8, Math.min(8, Math.floor(M(r) / 3))) * 3 - M(Math.abs(n)));
124
- }
125
- function Y(n, r) {
126
- return n = Math.abs(n), r = Math.abs(r) - n, Math.max(0, M(r) - M(n)) + 1;
127
- }
128
- function Z(n) {
129
- return function() {
130
- return n;
131
- };
132
- }
133
- function _(n) {
134
- return +n;
135
- }
136
- var A = [0, 1];
137
- function m(n) {
138
- return n;
139
- }
140
- function N(n, r) {
141
- return (r -= n = +n) ? function(t) {
142
- return (t - n) / r;
143
- } : Z(isNaN(r) ? NaN : 0.5);
144
- }
145
- function b(n, r) {
146
- var t;
147
- return n > r && (t = n, n = r, r = t), function(e) {
148
- return Math.max(n, Math.min(r, e));
149
- };
150
- }
151
- function nn(n, r, t) {
152
- var e = n[0], u = n[1], f = r[0], a = r[1];
153
- return u < e ? (e = N(u, e), f = t(a, f)) : (e = N(e, u), f = t(f, a)), function(o) {
154
- return f(e(o));
155
- };
156
- }
157
- function rn(n, r, t) {
158
- var e = Math.min(n.length, r.length) - 1, u = new Array(e), f = new Array(e), a = -1;
159
- for (n[e] < n[0] && (n = n.slice().reverse(), r = r.slice().reverse()); ++a < e; )
160
- u[a] = N(n[a], n[a + 1]), f[a] = t(r[a], r[a + 1]);
161
- return function(o) {
162
- var c = $(n, o, 1, e) - 1;
163
- return f[c](u[c](o));
164
- };
165
- }
166
- function en(n, r) {
167
- return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
168
- }
169
- function tn() {
170
- var n = A, r = A, t = d, e, u, f, a = m, o, c, i;
171
- function h() {
172
- var s = Math.min(n.length, r.length);
173
- return a !== m && (a = b(n[0], n[s - 1])), o = s > 2 ? rn : nn, c = i = null, l;
174
- }
175
- function l(s) {
176
- return s == null || isNaN(s = +s) ? f : (c || (c = o(n.map(e), r, t)))(e(a(s)));
177
- }
178
- return l.invert = function(s) {
179
- return a(u((i || (i = o(r, n.map(e), p)))(s)));
180
- }, l.domain = function(s) {
181
- return arguments.length ? (n = Array.from(s, _), h()) : n.slice();
182
- }, l.range = function(s) {
183
- return arguments.length ? (r = Array.from(s), h()) : r.slice();
184
- }, l.rangeRound = function(s) {
185
- return r = Array.from(s), t = U, h();
186
- }, l.clamp = function(s) {
187
- return arguments.length ? (a = s ? !0 : m, h()) : a !== m;
188
- }, l.interpolate = function(s) {
189
- return arguments.length ? (t = s, h()) : t;
190
- }, l.unknown = function(s) {
191
- return arguments.length ? (f = s, l) : f;
192
- }, function(s, S) {
193
- return e = s, u = S, h();
194
- };
195
- }
196
- function un() {
197
- return tn()(m, m);
198
- }
199
- function an(n, r, t, e) {
200
- var u = E(n, r, t), f;
201
- switch (e = F(e ?? ",f"), e.type) {
202
- case "s": {
203
- var a = Math.max(Math.abs(n), Math.abs(r));
204
- return e.precision == null && !isNaN(f = X(u, a)) && (e.precision = f), P(e, a);
205
- }
206
- case "":
207
- case "e":
208
- case "g":
209
- case "p":
210
- case "r": {
211
- e.precision == null && !isNaN(f = Y(u, Math.max(Math.abs(n), Math.abs(r)))) && (e.precision = f - (e.type === "e"));
212
- break;
213
- }
214
- case "f":
215
- case "%": {
216
- e.precision == null && !isNaN(f = W(u)) && (e.precision = f - (e.type === "%") * 2);
217
- break;
218
- }
219
- }
220
- return z(e);
221
- }
222
- function on(n) {
223
- var r = n.domain;
224
- return n.ticks = function(t) {
225
- var e = r();
226
- return C(e[0], e[e.length - 1], t ?? 10);
227
- }, n.tickFormat = function(t, e) {
228
- var u = r();
229
- return an(u[0], u[u.length - 1], t ?? 10, e);
230
- }, n.nice = function(t) {
231
- t == null && (t = 10);
232
- var e = r(), u = 0, f = e.length - 1, a = e[u], o = e[f], c, i, h = 10;
233
- for (o < a && (i = a, a = o, o = i, i = u, u = f, f = i); h-- > 0; ) {
234
- if (i = y(a, o, t), i === c)
235
- return e[u] = a, e[f] = o, r(e);
236
- if (i > 0)
237
- a = Math.floor(a / i) * i, o = Math.ceil(o / i) * i;
238
- else if (i < 0)
239
- a = Math.ceil(a * i) / i, o = Math.floor(o * i) / i;
240
- else
241
- break;
242
- c = i;
243
- }
244
- return n;
245
- }, n;
246
- }
247
- function fn() {
248
- var n = un();
249
- return n.copy = function() {
250
- return en(n, fn());
251
- }, D.apply(n, arguments), on(n);
252
- }
253
- export {
254
- en as a,
255
- R as b,
256
- un as c,
257
- fn as l,
258
- E as t
259
- };
@@ -1 +0,0 @@
1
- "use strict";const s=require("./mermaid.core-DBwAx_jp.cjs"),x=require("./init-CHZsXQcr.cjs"),g=require("./defaultLocale-C4wbwF1n.cjs");function p(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function D(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function d(n){let r,t,e;n.length!==2?(r=p,t=(a,f)=>p(n(a),f),e=(a,f)=>n(a)-f):(r=n===p||n===D?n:F,t=n,e=n);function u(a,f,i=0,m=a.length){if(i<m){if(r(f,f)!==0)return m;do{const l=i+m>>>1;t(a[l],f)<0?i=l+1:m=l}while(i<m)}return i}function c(a,f,i=0,m=a.length){if(i<m){if(r(f,f)!==0)return m;do{const l=i+m>>>1;t(a[l],f)<=0?i=l+1:m=l}while(i<m)}return i}function o(a,f,i=0,m=a.length){const l=u(a,f,i,m-1);return l>i&&e(a[l-1],f)>-e(a[l],f)?l-1:l}return{left:u,center:o,right:c}}function F(){return 0}function $(n){return n===null?NaN:+n}const z=d(p),B=z.right;d($).center;const I=Math.sqrt(50),P=Math.sqrt(10),V=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),c=e/Math.pow(10,u),o=c>=I?10:c>=P?5:c>=V?2:1;let a,f,i;return u<0?(i=Math.pow(10,-u)/o,a=Math.round(n*i),f=Math.round(r*i),a/i<n&&++a,f/i>r&&--f,i=-i):(i=Math.pow(10,u)*o,a=Math.round(n/i),f=Math.round(r/i),a*i<n&&++a,f*i>r&&--f),f<a&&.5<=t&&t<2?v(n,r,t*2):[a,f,i]}function L(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,c,o]=e?v(r,n,t):v(n,r,t);if(!(c>=u))return[];const a=c-u+1,f=new Array(a);if(e)if(o<0)for(let i=0;i<a;++i)f[i]=(c-i)/-o;else for(let i=0;i<a;++i)f[i]=(c-i)*o;else if(o<0)for(let i=0;i<a;++i)f[i]=(u+i)/-o;else for(let i=0;i<a;++i)f[i]=(u+i)*o;return f}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function A(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function O(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(c){for(u=0;u<t;++u)e[u]=n[u]*(1-c)+r[u]*c;return e}}function T(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function _(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),c=new Array(t),o;for(o=0;o<e;++o)u[o]=w(n[o],r[o]);for(;o<t;++o)c[o]=r[o];return function(a){for(o=0;o<e;++o)c[o]=u[o](a);return c}}function C(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function E(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=w(n[u],r[u]):e[u]=r[u];return function(c){for(u in t)e[u]=t[u](c);return e}}function w(n,r){var t=typeof r,e;return r==null||t==="boolean"?s.constant$2(r):(t==="number"?s.interpolateNumber:t==="string"?(e=s.color(r))?(r=e,s.interpolateRgb):s.interpolateString:r instanceof s.color?s.interpolateRgb:r instanceof Date?C:T(r)?O:Array.isArray(r)?_:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?E:s.interpolateNumber)(n,r)}function G(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function H(n){return Math.max(0,-g.exponent(Math.abs(n)))}function J(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g.exponent(r)/3)))*3-g.exponent(Math.abs(n)))}function K(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g.exponent(r)-g.exponent(n))+1}function Q(n){return function(){return n}}function U(n){return+n}var k=[0,1];function M(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Q(isNaN(r)?NaN:.5)}function W(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function X(n,r,t){var e=n[0],u=n[1],c=r[0],o=r[1];return u<e?(e=N(u,e),c=t(o,c)):(e=N(e,u),c=t(c,o)),function(a){return c(e(a))}}function Y(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),c=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++o<e;)u[o]=N(n[o],n[o+1]),c[o]=t(r[o],r[o+1]);return function(a){var f=B(n,a,1,e)-1;return c[f](u[f](a))}}function R(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Z(){var n=k,r=k,t=w,e,u,c,o=M,a,f,i;function m(){var h=Math.min(n.length,r.length);return o!==M&&(o=W(n[0],n[h-1])),a=h>2?Y:X,f=i=null,l}function l(h){return h==null||isNaN(h=+h)?c:(f||(f=a(n.map(e),r,t)))(e(o(h)))}return l.invert=function(h){return o(u((i||(i=a(r,n.map(e),s.interpolateNumber)))(h)))},l.domain=function(h){return arguments.length?(n=Array.from(h,U),m()):n.slice()},l.range=function(h){return arguments.length?(r=Array.from(h),m()):r.slice()},l.rangeRound=function(h){return r=Array.from(h),t=G,m()},l.clamp=function(h){return arguments.length?(o=h?!0:M,m()):o!==M},l.interpolate=function(h){return arguments.length?(t=h,m()):t},l.unknown=function(h){return arguments.length?(c=h,l):c},function(h,j){return e=h,u=j,m()}}function q(){return Z()(M,M)}function b(n,r,t,e){var u=A(n,r,t),c;switch(e=g.formatSpecifier(e??",f"),e.type){case"s":{var o=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(c=J(u,o))&&(e.precision=c),g.formatPrefix(e,o)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(c=K(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=c-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(c=H(u))&&(e.precision=c-(e.type==="%")*2);break}}return g.format(e)}function nn(n){var r=n.domain;return n.ticks=function(t){var e=r();return L(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return b(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,c=e.length-1,o=e[u],a=e[c],f,i,m=10;for(a<o&&(i=o,o=a,a=i,i=u,u=c,c=i);m-- >0;){if(i=y(o,a,t),i===f)return e[u]=o,e[c]=a,r(e);if(i>0)o=Math.floor(o/i)*i,a=Math.ceil(a/i)*i;else if(i<0)o=Math.ceil(o*i)/i,a=Math.floor(a*i)/i;else break;f=i}return n},n}function S(){var n=q();return n.copy=function(){return R(n,S())},x.initRange.apply(n,arguments),nn(n)}exports.bisector=d;exports.continuous=q;exports.copy=R;exports.linear=S;exports.tickStep=A;