@cloudflare/kumo 2.2.1 → 2.3.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 (200) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/ai/component-registry.json +28 -5
  3. package/ai/component-registry.md +64 -7
  4. package/ai/schemas.ts +1 -0
  5. package/dist/.build-complete +1 -1
  6. package/dist/ai/schemas.d.ts +12 -4
  7. package/dist/ai/schemas.d.ts.map +1 -1
  8. package/dist/ai/schemas.js +2 -0
  9. package/dist/ai/schemas.js.map +1 -1
  10. package/dist/chunks/SankeyChart-krkvltewpn3bbupw.js +651 -0
  11. package/dist/chunks/{SankeyChart-dkq90770ad7hgzx3.js.map → SankeyChart-krkvltewpn3bbupw.js.map} +1 -1
  12. package/dist/chunks/{autocomplete-mhrvtq4y5n21vr0t.js → autocomplete-h39m8kzoq0csjh9l.js} +82 -68
  13. package/dist/chunks/autocomplete-h39m8kzoq0csjh9l.js.map +1 -0
  14. package/dist/chunks/{badge-kqox9toi0sygfbno.js → badge-e9w8qrjmeu9nocf6.js} +80 -19
  15. package/dist/chunks/badge-e9w8qrjmeu9nocf6.js.map +1 -0
  16. package/dist/chunks/{breadcrumbs-ohstavaqvycoremm.js → breadcrumbs-g4pyoikibpoxsgw4.js} +2 -2
  17. package/dist/chunks/{breadcrumbs-ohstavaqvycoremm.js.map → breadcrumbs-g4pyoikibpoxsgw4.js.map} +1 -1
  18. package/dist/chunks/{button-oevxukl0zmwoq4tb.js → button-fxdpoacmq5rv1adk.js} +2 -2
  19. package/dist/chunks/{button-oevxukl0zmwoq4tb.js.map → button-fxdpoacmq5rv1adk.js.map} +1 -1
  20. package/dist/chunks/{checkbox-h6vkv17lnq854z2c.js → checkbox-dtoq56ieijj9m6vr.js} +3 -3
  21. package/dist/chunks/{checkbox-h6vkv17lnq854z2c.js.map → checkbox-dtoq56ieijj9m6vr.js.map} +1 -1
  22. package/dist/chunks/{clipboard-text-kyy71jmx7umdh8k8.js → clipboard-text-nvdsloomefwgcxat.js} +4 -4
  23. package/dist/chunks/{clipboard-text-kyy71jmx7umdh8k8.js.map → clipboard-text-nvdsloomefwgcxat.js.map} +1 -1
  24. package/dist/chunks/{collapsible-ej6p2bq758sw30nk.js → collapsible-cnsxmp7dko87pgx0.js} +2 -2
  25. package/dist/chunks/{collapsible-ej6p2bq758sw30nk.js.map → collapsible-cnsxmp7dko87pgx0.js.map} +1 -1
  26. package/dist/chunks/{combobox-g3cudlfajecou4va.js → combobox-jcqn64ixr4557a0s.js} +126 -126
  27. package/dist/chunks/combobox-jcqn64ixr4557a0s.js.map +1 -0
  28. package/dist/chunks/{command-palette-eep807rf6iapoz8r.js → command-palette-jrq7p16tff6n46nj.js} +11 -11
  29. package/dist/chunks/{command-palette-eep807rf6iapoz8r.js.map → command-palette-jrq7p16tff6n46nj.js.map} +1 -1
  30. package/dist/chunks/dialog-gndju3sqg1lmpb3f.js +118 -0
  31. package/dist/chunks/{dialog-fo3qhv9fgiadq5gp.js.map → dialog-gndju3sqg1lmpb3f.js.map} +1 -1
  32. package/dist/chunks/{dropdown-cobpydatw4vlb3ov.js → dropdown-k6orz4j043xybf54.js} +2 -2
  33. package/dist/chunks/{dropdown-cobpydatw4vlb3ov.js.map → dropdown-k6orz4j043xybf54.js.map} +1 -1
  34. package/dist/chunks/{empty-n3r7xutkb9sxjaso.js → empty-ni12ufom1kkakbuc.js} +2 -2
  35. package/dist/chunks/{empty-n3r7xutkb9sxjaso.js.map → empty-ni12ufom1kkakbuc.js.map} +1 -1
  36. package/dist/chunks/{field-l1oapopp6kjnephi.js → field-n16udu32tpyq5udz.js} +3 -3
  37. package/dist/chunks/{field-l1oapopp6kjnephi.js.map → field-n16udu32tpyq5udz.js.map} +1 -1
  38. package/dist/chunks/{input-area-gudamx1ruz8rxiw2.js → input-area-hhhpgg0ev8bowtrk.js} +4 -4
  39. package/dist/chunks/{input-area-gudamx1ruz8rxiw2.js.map → input-area-hhhpgg0ev8bowtrk.js.map} +1 -1
  40. package/dist/chunks/{input-group-gy08vju7eoogil8k.js → input-group-kkw5j7rwzhj66h10.js} +70 -70
  41. package/dist/chunks/input-group-kkw5j7rwzhj66h10.js.map +1 -0
  42. package/dist/chunks/{input-i3os21puacqw4r75.js → input-mv7giprcc6hfkpq3.js} +3 -3
  43. package/dist/chunks/{input-i3os21puacqw4r75.js.map → input-mv7giprcc6hfkpq3.js.map} +1 -1
  44. package/dist/chunks/{label-i0bj94d43irz0k1x.js → label-f6yvqca8qhbpvkq8.js} +3 -3
  45. package/dist/chunks/{label-i0bj94d43irz0k1x.js.map → label-f6yvqca8qhbpvkq8.js.map} +1 -1
  46. package/dist/chunks/{layer-card-hyz8lfxceudt05pv.js → layer-card-gegkqhkjy65l1ueo.js} +2 -2
  47. package/dist/chunks/{layer-card-hyz8lfxceudt05pv.js.map → layer-card-gegkqhkjy65l1ueo.js.map} +1 -1
  48. package/dist/chunks/{link-lkzjiitte3l29q87.js → link-jjk7qolyol7s1jkk.js} +2 -2
  49. package/dist/chunks/{link-lkzjiitte3l29q87.js.map → link-jjk7qolyol7s1jkk.js.map} +1 -1
  50. package/dist/chunks/{menubar-jalggrag4utvdpey.js → menubar-d5s6h96nw8ggy04a.js} +2 -2
  51. package/dist/chunks/{menubar-jalggrag4utvdpey.js.map → menubar-d5s6h96nw8ggy04a.js.map} +1 -1
  52. package/dist/chunks/{meter-jbxkh6gfggx1kjna.js → meter-kxn34sy6l2mz5dwq.js} +2 -2
  53. package/dist/chunks/{meter-jbxkh6gfggx1kjna.js.map → meter-kxn34sy6l2mz5dwq.js.map} +1 -1
  54. package/dist/chunks/{pagination-ceetno8sc1rd0wr2.js → pagination-ixbq8ssuuo0jxaa4.js} +3 -3
  55. package/dist/chunks/{pagination-ceetno8sc1rd0wr2.js.map → pagination-ixbq8ssuuo0jxaa4.js.map} +1 -1
  56. package/dist/chunks/{popover-i4opvl9g0as52fyx.js → popover-js5ds3szd43kspja.js} +2 -2
  57. package/dist/chunks/{popover-i4opvl9g0as52fyx.js.map → popover-js5ds3szd43kspja.js.map} +1 -1
  58. package/dist/chunks/{radio-g56o5rftpu1qpxuv.js → radio-nyw89v4eafptepmz.js} +2 -2
  59. package/dist/chunks/{radio-g56o5rftpu1qpxuv.js.map → radio-nyw89v4eafptepmz.js.map} +1 -1
  60. package/dist/chunks/{select-g1xvti1k1hj7xe5t.js → select-o2i7aovnu8v1zv8t.js} +39 -38
  61. package/dist/chunks/{select-g1xvti1k1hj7xe5t.js.map → select-o2i7aovnu8v1zv8t.js.map} +1 -1
  62. package/dist/chunks/{sensitive-input-hokm527ollnz9dqc.js → sensitive-input-bjg6m791yz7g6bn3.js} +93 -90
  63. package/dist/chunks/sensitive-input-bjg6m791yz7g6bn3.js.map +1 -0
  64. package/dist/chunks/{sidebar-oan40ylmqkyui21w.js → sidebar-izcfqkrzt4vqn8ez.js} +37 -37
  65. package/dist/chunks/{sidebar-oan40ylmqkyui21w.js.map → sidebar-izcfqkrzt4vqn8ez.js.map} +1 -1
  66. package/dist/chunks/{surface-ck1nt2uqfzmod4sz.js → surface-lzwbh3f5t0gxc83t.js} +2 -2
  67. package/dist/chunks/{surface-ck1nt2uqfzmod4sz.js.map → surface-lzwbh3f5t0gxc83t.js.map} +1 -1
  68. package/dist/chunks/{switch-fv0ttj24uhocvuh8.js → switch-d9cs31oj4rjtg717.js} +3 -3
  69. package/dist/chunks/{switch-fv0ttj24uhocvuh8.js.map → switch-d9cs31oj4rjtg717.js.map} +1 -1
  70. package/dist/chunks/{table-nsfcgpo93gfetrhh.js → table-c6qemc2jmv22cv3p.js} +2 -2
  71. package/dist/chunks/{table-nsfcgpo93gfetrhh.js.map → table-c6qemc2jmv22cv3p.js.map} +1 -1
  72. package/dist/chunks/{tabs-g8ier5pehjpfxauf.js → tabs-f0ztlooi91ko9g04.js} +2 -2
  73. package/dist/chunks/{tabs-g8ier5pehjpfxauf.js.map → tabs-f0ztlooi91ko9g04.js.map} +1 -1
  74. package/dist/chunks/{toast-ofqlfmddcyka091n.js → toast-ejfm5cbt9yulqhol.js} +3 -3
  75. package/dist/chunks/{toast-ofqlfmddcyka091n.js.map → toast-ejfm5cbt9yulqhol.js.map} +1 -1
  76. package/dist/chunks/{tooltip-icvb67awe1zolz61.js → tooltip-o6xfw9jjclv9pxaj.js} +16 -16
  77. package/dist/chunks/{tooltip-icvb67awe1zolz61.js.map → tooltip-o6xfw9jjclv9pxaj.js.map} +1 -1
  78. package/dist/chunks/vendor-base-ui-mzjqwv5teijixz8h.js +24703 -0
  79. package/dist/chunks/vendor-base-ui-mzjqwv5teijixz8h.js.map +1 -0
  80. package/dist/chunks/{vendor-floating-ui-dwag5e88viikh2zs.js → vendor-floating-ui-c4mwmh0xmfzevy9l.js} +5 -5
  81. package/dist/chunks/{vendor-floating-ui-dwag5e88viikh2zs.js.map → vendor-floating-ui-c4mwmh0xmfzevy9l.js.map} +1 -1
  82. package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js +217 -0
  83. package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js.map +1 -0
  84. package/dist/code.js +114 -89
  85. package/dist/code.js.map +1 -1
  86. package/dist/components/autocomplete.js +1 -1
  87. package/dist/components/badge.js +1 -1
  88. package/dist/components/breadcrumbs.js +1 -1
  89. package/dist/components/button.js +1 -1
  90. package/dist/components/chart.js +1 -1
  91. package/dist/components/checkbox.js +1 -1
  92. package/dist/components/clipboard-text.js +1 -1
  93. package/dist/components/collapsible.js +1 -1
  94. package/dist/components/combobox.js +1 -1
  95. package/dist/components/command-palette.js +1 -1
  96. package/dist/components/dialog.js +1 -1
  97. package/dist/components/dropdown.js +1 -1
  98. package/dist/components/empty.js +1 -1
  99. package/dist/components/field.js +1 -1
  100. package/dist/components/input-group.js +1 -1
  101. package/dist/components/input.js +3 -3
  102. package/dist/components/label.js +1 -1
  103. package/dist/components/layer-card.js +1 -1
  104. package/dist/components/link.js +1 -1
  105. package/dist/components/menubar.js +1 -1
  106. package/dist/components/meter.js +1 -1
  107. package/dist/components/pagination.js +1 -1
  108. package/dist/components/popover.js +1 -1
  109. package/dist/components/radio.js +1 -1
  110. package/dist/components/select.js +1 -1
  111. package/dist/components/sensitive-input.js +1 -1
  112. package/dist/components/sidebar.js +1 -1
  113. package/dist/components/surface.js +1 -1
  114. package/dist/components/switch.js +1 -1
  115. package/dist/components/table.js +1 -1
  116. package/dist/components/tabs.js +1 -1
  117. package/dist/components/toast.js +2 -2
  118. package/dist/components/tooltip.js +1 -1
  119. package/dist/index.js +38 -38
  120. package/dist/primitives/accordion.js +1 -1
  121. package/dist/primitives/alert-dialog.js +1 -1
  122. package/dist/primitives/autocomplete.js +1 -1
  123. package/dist/primitives/avatar.js +1 -1
  124. package/dist/primitives/button.js +1 -1
  125. package/dist/primitives/checkbox-group.js +1 -1
  126. package/dist/primitives/checkbox.js +1 -1
  127. package/dist/primitives/collapsible.js +1 -1
  128. package/dist/primitives/combobox.js +1 -1
  129. package/dist/primitives/context-menu.js +1 -1
  130. package/dist/primitives/csp-provider.js +1 -1
  131. package/dist/primitives/dialog.js +1 -1
  132. package/dist/primitives/direction-provider.js +1 -1
  133. package/dist/primitives/drawer.js +1 -1
  134. package/dist/primitives/field.js +1 -1
  135. package/dist/primitives/fieldset.js +1 -1
  136. package/dist/primitives/form.js +1 -1
  137. package/dist/primitives/input.js +1 -1
  138. package/dist/primitives/menu.js +1 -1
  139. package/dist/primitives/menubar.js +1 -1
  140. package/dist/primitives/meter.js +1 -1
  141. package/dist/primitives/navigation-menu.js +1 -1
  142. package/dist/primitives/number-field.js +1 -1
  143. package/dist/primitives/otp-field.js +1 -1
  144. package/dist/primitives/popover.js +1 -1
  145. package/dist/primitives/preview-card.js +1 -1
  146. package/dist/primitives/progress.js +1 -1
  147. package/dist/primitives/radio-group.js +1 -1
  148. package/dist/primitives/radio.js +1 -1
  149. package/dist/primitives/scroll-area.js +1 -1
  150. package/dist/primitives/select.js +1 -1
  151. package/dist/primitives/separator.js +1 -1
  152. package/dist/primitives/slider.js +1 -1
  153. package/dist/primitives/switch.js +1 -1
  154. package/dist/primitives/tabs.js +1 -1
  155. package/dist/primitives/toast.js +1 -1
  156. package/dist/primitives/toggle-group.js +1 -1
  157. package/dist/primitives/toggle.js +1 -1
  158. package/dist/primitives/toolbar.js +1 -1
  159. package/dist/primitives/tooltip.js +1 -1
  160. package/dist/primitives.js +1 -1
  161. package/dist/scripts/theme-generator/config.js +3 -3
  162. package/dist/scripts/theme-generator/config.js.map +1 -1
  163. package/dist/src/code/index.d.ts +3 -2
  164. package/dist/src/code/index.d.ts.map +1 -1
  165. package/dist/src/code/provider.d.ts +7 -1
  166. package/dist/src/code/provider.d.ts.map +1 -1
  167. package/dist/src/code/types.d.ts +36 -5
  168. package/dist/src/code/types.d.ts.map +1 -1
  169. package/dist/src/code/use-shiki-highlighter.d.ts.map +1 -1
  170. package/dist/src/components/autocomplete/autocomplete.d.ts.map +1 -1
  171. package/dist/src/components/badge/badge.d.ts +51 -3
  172. package/dist/src/components/badge/badge.d.ts.map +1 -1
  173. package/dist/src/components/chart/SankeyChart.d.ts +6 -1
  174. package/dist/src/components/chart/SankeyChart.d.ts.map +1 -1
  175. package/dist/src/components/combobox/combobox.d.ts.map +1 -1
  176. package/dist/src/components/dialog/dialog.d.ts +11 -4
  177. package/dist/src/components/dialog/dialog.d.ts.map +1 -1
  178. package/dist/src/components/input-group/input-group-button.d.ts.map +1 -1
  179. package/dist/src/components/input-group/input-group-input.d.ts.map +1 -1
  180. package/dist/src/components/input-group/input-group.d.ts.map +1 -1
  181. package/dist/src/components/select/select.d.ts.map +1 -1
  182. package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -1
  183. package/dist/src/components/toast/toast.d.ts.map +1 -1
  184. package/dist/styles/kumo-binding.css +0 -18
  185. package/dist/styles/kumo-standalone.css +1 -1
  186. package/dist/styles/theme-kumo.css +6 -6
  187. package/package.json +2 -2
  188. package/scripts/generate-primitives.ts +6 -1
  189. package/scripts/theme-generator/config.ts +3 -3
  190. package/dist/chunks/SankeyChart-dkq90770ad7hgzx3.js +0 -635
  191. package/dist/chunks/autocomplete-mhrvtq4y5n21vr0t.js.map +0 -1
  192. package/dist/chunks/badge-kqox9toi0sygfbno.js.map +0 -1
  193. package/dist/chunks/combobox-g3cudlfajecou4va.js.map +0 -1
  194. package/dist/chunks/dialog-fo3qhv9fgiadq5gp.js +0 -115
  195. package/dist/chunks/input-group-gy08vju7eoogil8k.js.map +0 -1
  196. package/dist/chunks/sensitive-input-hokm527ollnz9dqc.js.map +0 -1
  197. package/dist/chunks/vendor-base-ui-nbyiqqi138hcoz52.js +0 -24639
  198. package/dist/chunks/vendor-base-ui-nbyiqqi138hcoz52.js.map +0 -1
  199. package/dist/chunks/vendor-utils-ixnhxmehwihk5tr7.js +0 -534
  200. package/dist/chunks/vendor-utils-ixnhxmehwihk5tr7.js.map +0 -1
@@ -0,0 +1,217 @@
1
+ "use client";
2
+ import D from "react";
3
+ var V = { exports: {} }, w = {};
4
+ var I;
5
+ function W() {
6
+ if (I) return w;
7
+ I = 1;
8
+ var c = D;
9
+ function d(n, u) {
10
+ return n === u && (n !== 0 || 1 / n === 1 / u) || n !== n && u !== u;
11
+ }
12
+ var v = typeof Object.is == "function" ? Object.is : d, L = c.useState, l = c.useEffect, m = c.useLayoutEffect, h = c.useDebugValue;
13
+ function y(n, u) {
14
+ var e = u(), r = L({ inst: { value: e, getSnapshot: u } }), t = r[0].inst, a = r[1];
15
+ return m(
16
+ function() {
17
+ t.value = e, t.getSnapshot = u, O(t) && a({ inst: t });
18
+ },
19
+ [n, e, u]
20
+ ), l(
21
+ function() {
22
+ return O(t) && a({ inst: t }), n(function() {
23
+ O(t) && a({ inst: t });
24
+ });
25
+ },
26
+ [n]
27
+ ), h(e), e;
28
+ }
29
+ function O(n) {
30
+ var u = n.getSnapshot;
31
+ n = n.value;
32
+ try {
33
+ var e = u();
34
+ return !v(n, e);
35
+ } catch {
36
+ return !0;
37
+ }
38
+ }
39
+ function i(n, u) {
40
+ return u();
41
+ }
42
+ var o = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? i : y;
43
+ return w.useSyncExternalStore = c.useSyncExternalStore !== void 0 ? c.useSyncExternalStore : o, w;
44
+ }
45
+ var b = {};
46
+ var M;
47
+ function N() {
48
+ return M || (M = 1, process.env.NODE_ENV !== "production" && (function() {
49
+ function c(e, r) {
50
+ return e === r && (e !== 0 || 1 / e === 1 / r) || e !== e && r !== r;
51
+ }
52
+ function d(e, r) {
53
+ o || l.startTransition === void 0 || (o = !0, console.error(
54
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
55
+ ));
56
+ var t = r();
57
+ if (!n) {
58
+ var a = r();
59
+ m(t, a) || (console.error(
60
+ "The result of getSnapshot should be cached to avoid an infinite loop"
61
+ ), n = !0);
62
+ }
63
+ a = h({
64
+ inst: { value: t, getSnapshot: r }
65
+ });
66
+ var s = a[0].inst, S = a[1];
67
+ return O(
68
+ function() {
69
+ s.value = t, s.getSnapshot = r, v(s) && S({ inst: s });
70
+ },
71
+ [e, t, r]
72
+ ), y(
73
+ function() {
74
+ return v(s) && S({ inst: s }), e(function() {
75
+ v(s) && S({ inst: s });
76
+ });
77
+ },
78
+ [e]
79
+ ), i(t), t;
80
+ }
81
+ function v(e) {
82
+ var r = e.getSnapshot;
83
+ e = e.value;
84
+ try {
85
+ var t = r();
86
+ return !m(e, t);
87
+ } catch {
88
+ return !0;
89
+ }
90
+ }
91
+ function L(e, r) {
92
+ return r();
93
+ }
94
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
95
+ var l = D, m = typeof Object.is == "function" ? Object.is : c, h = l.useState, y = l.useEffect, O = l.useLayoutEffect, i = l.useDebugValue, o = !1, n = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? L : d;
96
+ b.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
97
+ })()), b;
98
+ }
99
+ var j;
100
+ function C() {
101
+ return j || (j = 1, process.env.NODE_ENV === "production" ? V.exports = W() : V.exports = N()), V.exports;
102
+ }
103
+ var $ = C(), A = { exports: {} }, G = {};
104
+ var B;
105
+ function U() {
106
+ if (B) return G;
107
+ B = 1;
108
+ var c = D, d = C();
109
+ function v(i, o) {
110
+ return i === o && (i !== 0 || 1 / i === 1 / o) || i !== i && o !== o;
111
+ }
112
+ var L = typeof Object.is == "function" ? Object.is : v, l = d.useSyncExternalStore, m = c.useRef, h = c.useEffect, y = c.useMemo, O = c.useDebugValue;
113
+ return G.useSyncExternalStoreWithSelector = function(i, o, n, u, e) {
114
+ var r = m(null);
115
+ if (r.current === null) {
116
+ var t = { hasValue: !1, value: null };
117
+ r.current = t;
118
+ } else t = r.current;
119
+ r = y(
120
+ function() {
121
+ function s(f) {
122
+ if (!S) {
123
+ if (S = !0, E = f, f = u(f), e !== void 0 && t.hasValue) {
124
+ var _ = t.value;
125
+ if (e(_, f))
126
+ return p = _;
127
+ }
128
+ return p = f;
129
+ }
130
+ if (_ = p, L(E, f)) return _;
131
+ var T = u(f);
132
+ return e !== void 0 && e(_, T) ? (E = f, _) : (E = f, p = T);
133
+ }
134
+ var S = !1, E, p, R = n === void 0 ? null : n;
135
+ return [
136
+ function() {
137
+ return s(o());
138
+ },
139
+ R === null ? void 0 : function() {
140
+ return s(R());
141
+ }
142
+ ];
143
+ },
144
+ [o, n, u, e]
145
+ );
146
+ var a = l(i, r[0], r[1]);
147
+ return h(
148
+ function() {
149
+ t.hasValue = !0, t.value = a;
150
+ },
151
+ [a]
152
+ ), O(a), a;
153
+ }, G;
154
+ }
155
+ var g = {};
156
+ var H;
157
+ function x() {
158
+ return H || (H = 1, process.env.NODE_ENV !== "production" && (function() {
159
+ function c(i, o) {
160
+ return i === o && (i !== 0 || 1 / i === 1 / o) || i !== i && o !== o;
161
+ }
162
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
163
+ var d = D, v = C(), L = typeof Object.is == "function" ? Object.is : c, l = v.useSyncExternalStore, m = d.useRef, h = d.useEffect, y = d.useMemo, O = d.useDebugValue;
164
+ g.useSyncExternalStoreWithSelector = function(i, o, n, u, e) {
165
+ var r = m(null);
166
+ if (r.current === null) {
167
+ var t = { hasValue: !1, value: null };
168
+ r.current = t;
169
+ } else t = r.current;
170
+ r = y(
171
+ function() {
172
+ function s(f) {
173
+ if (!S) {
174
+ if (S = !0, E = f, f = u(f), e !== void 0 && t.hasValue) {
175
+ var _ = t.value;
176
+ if (e(_, f))
177
+ return p = _;
178
+ }
179
+ return p = f;
180
+ }
181
+ if (_ = p, L(E, f))
182
+ return _;
183
+ var T = u(f);
184
+ return e !== void 0 && e(_, T) ? (E = f, _) : (E = f, p = T);
185
+ }
186
+ var S = !1, E, p, R = n === void 0 ? null : n;
187
+ return [
188
+ function() {
189
+ return s(o());
190
+ },
191
+ R === null ? void 0 : function() {
192
+ return s(R());
193
+ }
194
+ ];
195
+ },
196
+ [o, n, u, e]
197
+ );
198
+ var a = l(i, r[0], r[1]);
199
+ return h(
200
+ function() {
201
+ t.hasValue = !0, t.value = a;
202
+ },
203
+ [a]
204
+ ), O(a), a;
205
+ }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
206
+ })()), g;
207
+ }
208
+ var K;
209
+ function z() {
210
+ return K || (K = 1, process.env.NODE_ENV === "production" ? A.exports = U() : A.exports = x()), A.exports;
211
+ }
212
+ var k = z();
213
+ export {
214
+ $ as s,
215
+ k as w
216
+ };
217
+ //# sourceMappingURL=vendor-utils-m5h2xu7s2rs3pgk5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendor-utils-m5h2xu7s2rs3pgk5.js","sources":["../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/shim/index.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["React","require$$0","is","x","y","objectIs","useState","useEffect","useLayoutEffect","useDebugValue","useSyncExternalStore$2","subscribe","getSnapshot","value","_useState","inst","forceUpdate","checkIfSnapshotChanged","latestGetSnapshot","nextValue","useSyncExternalStore$1","shim","useSyncExternalStoreShim_production","didWarnOld18Alpha","didWarnUncachedGetSnapshot","cachedValue","useSyncExternalStoreShim_development","shimModule","require$$1","useSyncExternalStore","useRef","useMemo","withSelector_production","getServerSnapshot","selector","isEqual","instRef","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","withSelector_development","withSelectorModule"],"mappings":";;;;;;;AAWA,MAAIA,IAAQC;AACZ,WAASC,EAAGC,GAAGC,GAAG;AAChB,WAAQD,MAAMC,MAAYD,MAAN,KAAW,IAAIA,MAAM,IAAIC,MAAQD,MAAMA,KAAKC,MAAMA;AAAA,EACxE;AACA,MAAIC,IAA0B,OAAO,OAAO,MAA7B,aAAkC,OAAO,KAAKH,GAC3DI,IAAWN,EAAM,UACjBO,IAAYP,EAAM,WAClBQ,IAAkBR,EAAM,iBACxBS,IAAgBT,EAAM;AACxB,WAASU,EAAuBC,GAAWC,GAAa;AACtD,QAAIC,IAAQD,EAAW,GACrBE,IAAYR,EAAS,EAAE,MAAM,EAAE,OAAOO,GAAO,aAAaD,EAAW,GAAI,GACzEG,IAAOD,EAAU,CAAC,EAAE,MACpBE,IAAcF,EAAU,CAAC;AAC3B,WAAAN;AAAA,MACE,WAAY;AACV,QAAAO,EAAK,QAAQF,GACbE,EAAK,cAAcH,GACnBK,EAAuBF,CAAI,KAAKC,EAAY,EAAE,MAAMD,EAAI,CAAE;AAAA,MAChE;AAAA,MACI,CAACJ,GAAWE,GAAOD,CAAW;AAAA,OAEhCL;AAAA,MACE,WAAY;AACV,eAAAU,EAAuBF,CAAI,KAAKC,EAAY,EAAE,MAAMD,EAAI,CAAE,GACnDJ,EAAU,WAAY;AAC3B,UAAAM,EAAuBF,CAAI,KAAKC,EAAY,EAAE,MAAMD,EAAI,CAAE;AAAA,QAClE,CAAO;AAAA,MACP;AAAA,MACI,CAACJ,CAAS;AAAA,OAEZF,EAAcI,CAAK,GACZA;AAAA,EACT;AACA,WAASI,EAAuBF,GAAM;AACpC,QAAIG,IAAoBH,EAAK;AAC7B,IAAAA,IAAOA,EAAK;AACZ,QAAI;AACF,UAAII,IAAYD,EAAiB;AACjC,aAAO,CAACb,EAASU,GAAMI,CAAS;AAAA,IACpC,QAAkB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A,cAC9C;AACc,qBAAQC,IAAoBJ;AAAA,YAC1C;AAEY,gBADAG,IAAmBC,GACfrC,EAASmC,GAAkBF,CAAY;AACzC,qBAAOG;AACT,gBAAIE,IAAgBT,EAASI,CAAY;AACzC,mBAAeH,MAAX,UAAsBA,EAAQM,GAAkBE,CAAa,KACvDH,IAAmBF,GAAeG,MAC5CD,IAAmBF,GACXI,IAAoBC;AAAA,UACxC;AACU,cAAIJ,IAAU,IACZC,GACAE,GACAE,IACaX,MAAX,SAA+B,OAAOA;AAC1C,iBAAO;AAAA,YACL,WAAY;AACV,qBAAOI,EAAiBzB,GAAa;AAAA,YACnD;AAAA,YACqBgC,MAAT,OACI,SACA,WAAY;AACV,qBAAOP,EAAiBO,GAAwB;AAAA,YAClE;AAAA;QAEA;AAAA,QACQ,CAAChC,GAAaqB,GAAmBC,GAAUC,CAAO;AAAA;AAEpD,UAAItB,IAAQgB,EAAqBlB,GAAWyB,EAAQ,CAAC,GAAGA,EAAQ,CAAC,CAAC;AAClE,aAAA7B;AAAA,QACE,WAAY;AACV,UAAAQ,EAAK,WAAW,IAChBA,EAAK,QAAQF;AAAA,QACvB;AAAA,QACQ,CAACA,CAAK;AAAA,SAERJ,EAAcI,CAAK,GACZA;AAAA,IACb,GACoB,OAAO,iCAAvB,OAEI,OAAO,+BAA+B,8BADxC,cAEA,+BAA+B,2BAA2B,OAAO;AAAA,EACvE,GAAG;;;;sBC9FC,QAAQ,IAAI,aAAa,eAC3BiC,EAAA,UAAiB7C,EAAA,IAEjB6C,EAAA,UAAiBlB,EAAA;;;","x_google_ignoreList":[0,1,2,3,4,5]}
package/dist/code.js CHANGED
@@ -1,9 +1,22 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as v } from "react/jsx-runtime";
3
- import { createContext as T, useState as E, useEffect as A, useMemo as w, useContext as B, useCallback as P } from "react";
2
+ import { jsx as r, jsxs as b } from "react/jsx-runtime";
3
+ import { createContext as T, useState as j, useEffect as q, useMemo as w, useContext as B, useCallback as E } from "react";
4
4
  import { c as C } from "./chunks/cn-ct4n7r74mh8y0f48.js";
5
- import { B as F } from "./chunks/button-oevxukl0zmwoq4tb.js";
6
- const j = T(null), H = {
5
+ import { B as F } from "./chunks/button-fxdpoacmq5rv1adk.js";
6
+ const A = T(null), H = {
7
+ js: "javascript",
8
+ cjs: "javascript",
9
+ mjs: "javascript",
10
+ ts: "typescript",
11
+ cts: "typescript",
12
+ mts: "typescript",
13
+ sh: "bash",
14
+ zsh: "bash",
15
+ yml: "yaml",
16
+ py: "python",
17
+ md: "markdown",
18
+ gql: "graphql"
19
+ }, P = {
7
20
  javascript: () => import("./chunks/javascript-hhx3avh9uv2o27ay.js"),
8
21
  typescript: () => import("./chunks/typescript-k4ggjrxhrhcdni6u.js"),
9
22
  jsx: () => import("./chunks/jsx-ij885l2li2lzfoss.js"),
@@ -22,210 +35,222 @@ const j = T(null), H = {
22
35
  diff: () => import("./chunks/diff-cpj1h9lg0bw716mj.js"),
23
36
  hcl: () => import("./chunks/hcl-hcu7d6ja6t540ijn.js"),
24
37
  toml: () => import("./chunks/toml-nczb2z9n0o23o3ci.js")
25
- }, K = {
38
+ };
39
+ function z(e) {
40
+ return e in P ? e : e in H ? H[e] : null;
41
+ }
42
+ const I = {
26
43
  copy: "Copy",
27
44
  copied: "Copied!"
28
45
  };
29
- function M({
46
+ function K({
30
47
  engine: e,
31
- languages: i,
48
+ languages: o,
32
49
  labels: l,
33
- children: a
50
+ children: s
34
51
  }) {
35
- const [t, s] = E({
52
+ const [i, h] = j({
36
53
  highlighter: null,
37
54
  isLoading: !0,
38
- error: null
55
+ error: null,
56
+ languages: []
39
57
  });
40
- A(() => {
58
+ q(() => {
41
59
  let n = !1;
42
60
  async function c() {
43
61
  try {
44
- const { createHighlighterCore: h } = await import("./chunks/core-dyku7qctyc40nnhh.js"), u = e === "wasm" ? await import("./chunks/engine-oniguruma-g75h8oxao68cjmhg.js").then(
45
- (r) => r.createOnigurumaEngine(import("./chunks/wasm-oj22f8usru9h7dzg.js"))
62
+ const { createHighlighterCore: a } = await import("./chunks/core-dyku7qctyc40nnhh.js"), u = e === "wasm" ? await import("./chunks/engine-oniguruma-g75h8oxao68cjmhg.js").then(
63
+ (t) => t.createOnigurumaEngine(import("./chunks/wasm-oj22f8usru9h7dzg.js"))
46
64
  ) : await import("./chunks/engine-javascript-hi1kqifa6nkcridk.js").then(
47
- (r) => r.createJavaScriptRegexEngine()
65
+ (t) => t.createJavaScriptRegexEngine()
48
66
  ), [x, d] = await Promise.all([
49
67
  import("./chunks/github-light-ulev8flhimfg79ob.js"),
50
68
  import("./chunks/vesper-ebfu9ns65f2v830s.js")
51
- ]), y = i.filter(
52
- (r) => r in H
53
- ), f = await Promise.all(
54
- y.map((r) => H[r]())
55
- ), b = await h({
69
+ ]), v = [
70
+ ...new Set(
71
+ o.map((t) => z(t)).filter((t) => t !== null)
72
+ )
73
+ ], f = await Promise.all(
74
+ v.map((t) => P[t]())
75
+ ), y = await a({
56
76
  themes: [x.default, d.default],
57
- langs: f.map((r) => r.default),
77
+ langs: f.map((t) => t.default),
58
78
  engine: u
59
79
  });
60
- n || s({
61
- highlighter: b,
80
+ n || h({
81
+ highlighter: y,
62
82
  isLoading: !1,
63
- error: null
83
+ error: null,
84
+ languages: v
64
85
  });
65
- } catch (h) {
66
- n || s({
86
+ } catch (a) {
87
+ n || h({
67
88
  highlighter: null,
68
89
  isLoading: !1,
69
- error: h instanceof Error ? h : new Error("Failed to load Shiki")
90
+ error: a instanceof Error ? a : new Error("Failed to load Shiki"),
91
+ languages: []
70
92
  });
71
93
  }
72
94
  }
73
95
  return c(), () => {
74
96
  n = !0;
75
97
  };
76
- }, [e, i]);
98
+ }, [e, o]);
77
99
  const p = w(
78
- () => ({ ...K, ...l }),
100
+ () => ({ ...I, ...l }),
79
101
  [l]
80
102
  ), g = w(
81
103
  () => ({
82
- highlighter: t.highlighter,
83
- isLoading: t.isLoading,
84
- error: t.error,
85
- languages: i,
104
+ highlighter: i.highlighter,
105
+ isLoading: i.isLoading,
106
+ error: i.error,
107
+ languages: i.languages,
86
108
  labels: p
87
109
  }),
88
- [t.highlighter, t.isLoading, t.error, i, p]
110
+ [i.highlighter, i.isLoading, i.error, i.languages, p]
89
111
  );
90
- return /* @__PURE__ */ o(j.Provider, { value: g, children: a });
112
+ return /* @__PURE__ */ r(A.Provider, { value: g, children: s });
91
113
  }
92
- M.displayName = "ShikiProvider";
93
- function z() {
94
- const e = B(j);
114
+ K.displayName = "ShikiProvider";
115
+ function M() {
116
+ const e = B(A);
95
117
  if (!e)
96
118
  throw new Error(
97
119
  "useShikiHighlighter must be used within a ShikiProvider. Wrap your app with <ShikiProvider> from '@cloudflare/kumo/code'."
98
120
  );
99
- const { highlighter: i, isLoading: l, error: a, languages: t, labels: s } = e;
121
+ const { highlighter: o, isLoading: l, error: s, languages: i, labels: h } = e;
100
122
  return {
101
- highlight: P(
123
+ highlight: E(
102
124
  (g, n) => {
103
- if (!i)
125
+ if (!o)
104
126
  return null;
105
- if (!t.includes(n))
127
+ const c = z(n);
128
+ if (!c || !i.includes(c))
106
129
  return console.warn(
107
- `[Kumo CodeHighlighted] Language "${n}" is not in the ShikiProvider's languages list. Add it to the languages array: languages={[...existing, '${n}']}. Rendering as plain text.`
130
+ `[Kumo CodeHighlighted] Language "${n}" is not in the ShikiProvider's languages list. Add it to the languages array: languages={[...existing, '${c || n}']}. Rendering as plain text.`
108
131
  ), null;
109
132
  try {
110
- return i.codeToHtml(g, {
111
- lang: n,
133
+ return o.codeToHtml(g, {
134
+ lang: c,
112
135
  themes: {
113
136
  light: "github-light",
114
137
  dark: "vesper"
115
138
  }
116
139
  });
117
- } catch (c) {
140
+ } catch (a) {
118
141
  return console.warn(
119
142
  `[Kumo CodeHighlighted] Failed to highlight code with language "${n}":`,
120
- c
143
+ a
121
144
  ), null;
122
145
  }
123
146
  },
124
- [i, t]
147
+ [o, i]
125
148
  ),
126
149
  isLoading: l,
127
- isReady: !l && i !== null,
128
- error: a,
129
- labels: s
150
+ isReady: !l && o !== null,
151
+ error: s,
152
+ labels: h
130
153
  };
131
154
  }
132
155
  function D({
133
156
  code: e,
134
- lang: i,
157
+ lang: o,
135
158
  showLineNumbers: l = !1,
136
- highlightLines: a,
137
- showCopyButton: t = !1,
138
- labels: s,
159
+ highlightLines: s,
160
+ showCopyButton: i = !1,
161
+ labels: h,
139
162
  className: p
140
163
  }) {
141
164
  const {
142
165
  highlight: g,
143
166
  isLoading: n,
144
167
  error: c,
145
- labels: h
146
- } = z(), [u, x] = E(!1), d = w(
147
- () => ({ ...h, ...s }),
148
- [h, s]
149
- ), y = P(async () => {
168
+ labels: a
169
+ } = M(), [u, x] = j(!1), d = w(
170
+ () => ({ ...a, ...h }),
171
+ [a, h]
172
+ ), v = E(async () => {
150
173
  try {
151
174
  await navigator.clipboard.writeText(e), x(!0), setTimeout(() => x(!1), 2e3);
152
- } catch (S) {
153
- console.error("[Kumo CodeHighlighted] Failed to copy to clipboard:", S);
175
+ } catch (L) {
176
+ console.error("[Kumo CodeHighlighted] Failed to copy to clipboard:", L);
154
177
  }
155
- }, [e]), f = g(e, i), b = w(() => e.split(`
156
- `).length, [e]), r = b === 1, k = C(
178
+ }, [e]), f = g(e, o), y = w(() => e.split(`
179
+ `).length, [e]), t = y === 1, k = C(
157
180
  "group relative m-0 w-full min-w-0 rounded-md border border-kumo-fill bg-kumo-base p-0",
158
- t && r && "flex items-center",
181
+ i && t && "flex items-center",
159
182
  p
160
- ), N = t ? /* @__PURE__ */ o(
183
+ ), S = i ? /* @__PURE__ */ r(
161
184
  "div",
162
185
  {
163
186
  className: C(
164
- r ? "shrink-0 px-2" : "absolute right-2 top-2",
187
+ t ? "shrink-0 px-2" : "absolute right-2 top-2",
165
188
  !u && "opacity-0 transition-opacity group-hover:opacity-100"
166
189
  ),
167
- children: /* @__PURE__ */ o(
190
+ children: /* @__PURE__ */ r(
168
191
  F,
169
192
  {
170
193
  variant: "secondary",
171
194
  size: "sm",
172
- onClick: y,
195
+ onClick: v,
173
196
  "aria-label": u ? d.copied : d.copy,
174
197
  children: u ? d.copied : d.copy
175
198
  }
176
199
  )
177
200
  }
178
- ) : null, m = l && !r ? /* @__PURE__ */ o(
201
+ ) : null, m = l && !t ? /* @__PURE__ */ r(
179
202
  "div",
180
203
  {
181
204
  className: "kumo-line-numbers shrink-0 select-none py-4 pr-4 text-right font-mono text-sm opacity-40",
182
205
  "aria-hidden": "true",
183
- children: Array.from({ length: b }, (S, L) => /* @__PURE__ */ o("div", { className: "leading-relaxed", children: L + 1 }, L + 1))
206
+ children: Array.from({ length: y }, (L, N) => /* @__PURE__ */ r("div", { className: "leading-relaxed", children: N + 1 }, N + 1))
184
207
  }
185
208
  ) : null;
186
- return c && console.error("[Kumo CodeHighlighted] Shiki initialization error:", c), n || f === null ? /* @__PURE__ */ v("div", { className: k, children: [
187
- m && /* @__PURE__ */ v("div", { className: "flex", children: [
209
+ return c && console.error("[Kumo CodeHighlighted] Shiki initialization error:", c), n || f === null ? /* @__PURE__ */ b("div", { className: k, children: [
210
+ m && /* @__PURE__ */ b("div", { className: "flex", children: [
188
211
  m,
189
- /* @__PURE__ */ o("pre", { className: "!m-0 min-w-0 flex-1 overflow-x-auto !p-4 font-mono text-sm leading-relaxed text-kumo-subtle", children: /* @__PURE__ */ o("code", { className: "!m-0 !p-0", children: e }) })
212
+ /* @__PURE__ */ r("pre", { className: "!m-0 min-w-0 flex-1 overflow-x-auto !p-4 font-mono text-sm leading-relaxed text-kumo-subtle", children: /* @__PURE__ */ r("code", { className: "!m-0 !p-0", children: e }) })
190
213
  ] }),
191
- !m && /* @__PURE__ */ o("pre", { className: "!m-0 min-w-0 flex-1 overflow-x-auto !p-4 font-mono text-sm leading-relaxed text-kumo-subtle", children: /* @__PURE__ */ o("code", { className: "!m-0 !p-0", children: e }) }),
192
- N
193
- ] }) : /* @__PURE__ */ v("div", { className: k, children: [
194
- m && /* @__PURE__ */ v("div", { className: "flex w-full", children: [
214
+ !m && /* @__PURE__ */ r("pre", { className: "!m-0 min-w-0 flex-1 overflow-x-auto !p-4 font-mono text-sm leading-relaxed text-kumo-subtle", children: /* @__PURE__ */ r("code", { className: "!m-0 !p-0", children: e }) }),
215
+ S
216
+ ] }) : /* @__PURE__ */ b("div", { className: k, children: [
217
+ m && /* @__PURE__ */ b("div", { className: "flex w-full", children: [
195
218
  m,
196
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1 overflow-x-auto", children: /* @__PURE__ */ o(
219
+ /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 overflow-x-auto", children: /* @__PURE__ */ r(
197
220
  "div",
198
221
  {
199
222
  className: "kumo-shiki [&>pre]:!m-0 [&>pre]:!border-0 [&>pre]:!rounded-none [&>pre]:!bg-transparent [&>pre]:!p-4 [&>pre]:font-mono [&>pre]:text-sm [&>pre]:leading-relaxed [&_code]:!m-0 [&_code]:!p-0 [&_code]:!bg-transparent [&_code]:!border-0",
200
223
  dangerouslySetInnerHTML: {
201
- __html: _(f, a)
224
+ __html: _(f, s)
202
225
  }
203
226
  }
204
227
  ) })
205
228
  ] }),
206
- !m && /* @__PURE__ */ o("div", { className: "overflow-x-auto", children: /* @__PURE__ */ o(
229
+ !m && /* @__PURE__ */ r("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r(
207
230
  "div",
208
231
  {
209
232
  className: "kumo-shiki [&>pre]:!m-0 [&>pre]:!border-0 [&>pre]:!rounded-none [&>pre]:!bg-transparent [&>pre]:!p-4 [&>pre]:font-mono [&>pre]:text-sm [&>pre]:leading-relaxed [&_code]:!m-0 [&_code]:!p-0 [&_code]:!bg-transparent [&_code]:!border-0",
210
233
  dangerouslySetInnerHTML: {
211
- __html: _(f, a)
234
+ __html: _(f, s)
212
235
  }
213
236
  }
214
237
  ) }),
215
- N
238
+ S
216
239
  ] });
217
240
  }
218
241
  D.displayName = "CodeHighlighted";
219
- function _(e, i) {
220
- if (!i?.length)
242
+ function _(e, o) {
243
+ if (!o?.length)
221
244
  return e;
222
- const l = new Set(i);
223
- let a = 0;
224
- return e.replace(/<span class="line">/g, () => (a++, l.has(a) ? '<span class="line line-highlighted">' : '<span class="line">'));
245
+ const l = new Set(o);
246
+ let s = 0;
247
+ return e.replace(/<span class="line">/g, () => (s++, l.has(s) ? '<span class="line line-highlighted">' : '<span class="line">'));
225
248
  }
226
249
  export {
227
250
  D as CodeHighlighted,
228
- M as ShikiProvider,
229
- z as useShikiHighlighter
251
+ H as LANGUAGE_ALIASES,
252
+ K as ShikiProvider,
253
+ z as normalizeLanguage,
254
+ M as useShikiHighlighter
230
255
  };
231
256
  //# sourceMappingURL=code.js.map