@apipass/design-system 4.1.0 → 4.2.2

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 (77) hide show
  1. package/dist/lib/embedded-styles.js +1 -1
  2. package/dist/lib/lib.index.cjs +1 -1
  3. package/dist/lib/lib.index.js +696 -694
  4. package/dist/lib/lib.index.js.map +1 -1
  5. package/dist/lib/style.css +1 -1
  6. package/dist/lib/ui/components/DataTable/DataTable.cjs +1 -1
  7. package/dist/lib/ui/components/Widget/Widget.cjs +1 -1
  8. package/dist/lib/ui/components/WidgetGrid/WidgetGrid.cjs +1 -1
  9. package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.cjs +1 -1
  10. package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.cjs.map +1 -1
  11. package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.js +66 -50
  12. package/dist/lib/ui/components/charts/TimeSeriesChart/time-series-option.js.map +1 -1
  13. package/dist/lib/ui/primitives/Button/Button.cjs +1 -1
  14. package/dist/lib/ui/primitives/CodeBlock/CodeBlock.cjs +1 -1
  15. package/dist/lib/ui/primitives/CodeEditor/CodeEditor.cjs +1 -1
  16. package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs +1 -1
  17. package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs.map +1 -1
  18. package/dist/lib/ui/primitives/ComboBox/ComboBox.js +60 -37
  19. package/dist/lib/ui/primitives/ComboBox/ComboBox.js.map +1 -1
  20. package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs +1 -1
  21. package/dist/lib/ui/primitives/FileUpload/FileUpload.cjs +1 -1
  22. package/dist/lib/ui/primitives/FileUpload/FileUpload.js +10 -10
  23. package/dist/lib/ui/primitives/IconButton/IconButton.cjs +1 -1
  24. package/dist/lib/ui/primitives/Input/Input.js +2 -2
  25. package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs +1 -1
  26. package/dist/lib/ui/primitives/JsonViewer/JsonViewer.cjs +1 -1
  27. package/dist/lib/ui/primitives/Link/Link.cjs +1 -1
  28. package/dist/lib/ui/primitives/Link/Link.js +3 -3
  29. package/dist/lib/ui/primitives/Menu/Menu.cjs +1 -1
  30. package/dist/lib/ui/primitives/Menu/Menu.cjs.map +1 -1
  31. package/dist/lib/ui/primitives/Menu/Menu.js +28 -28
  32. package/dist/lib/ui/primitives/Menu/Menu.js.map +1 -1
  33. package/dist/lib/ui/primitives/Search/Search.cjs +1 -1
  34. package/dist/lib/ui/primitives/Search/Search.js +8 -8
  35. package/dist/lib/ui/primitives/Select/MultiSelect.cjs +2 -0
  36. package/dist/lib/ui/primitives/Select/MultiSelect.cjs.map +1 -0
  37. package/dist/lib/ui/primitives/Select/MultiSelect.js +113 -0
  38. package/dist/lib/ui/primitives/Select/MultiSelect.js.map +1 -0
  39. package/dist/lib/ui/primitives/Select/Select.cjs +1 -1
  40. package/dist/lib/ui/primitives/Select/Select.cjs.map +1 -1
  41. package/dist/lib/ui/primitives/Select/Select.js +19 -12
  42. package/dist/lib/ui/primitives/Select/Select.js.map +1 -1
  43. package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs +1 -1
  44. package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs.map +1 -1
  45. package/dist/lib/vendor/@monaco-editor/react/dist/index.js +21 -21
  46. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.cjs +1 -1
  47. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.js +4 -4
  48. package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.js.map +1 -1
  49. package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.cjs +1 -1
  50. package/dist/lib/vendor/react-draggable/build/cjs/Draggable.cjs +2 -2
  51. package/dist/lib/vendor/react-draggable/build/cjs/Draggable.js +8 -8
  52. package/dist/lib/vendor/react-grid-layout/build/GridItem.cjs +1 -1
  53. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.cjs +1 -1
  54. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js +6 -6
  55. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js.map +1 -1
  56. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayoutPropTypes.js +2 -2
  57. package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.cjs +1 -1
  58. package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.js.map +1 -1
  59. package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.cjs +1 -1
  60. package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js +6 -6
  61. package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js.map +1 -1
  62. package/dist/lib/vendor/react-grid-layout/build/utils.cjs +1 -1
  63. package/dist/lib/vendor/react-grid-layout/build/utils.js +27 -27
  64. package/dist/lib/vendor/react-resizable/build/Resizable.cjs +1 -1
  65. package/dist/lib/vendor/react-resizable/build/Resizable.js +17 -17
  66. package/dist/lib/vendor/react-resizable/build/Resizable.js.map +1 -1
  67. package/dist/lib/vendor/react-resizable/build/ResizableBox.cjs +1 -1
  68. package/dist/lib/vendor/react-resizable/build/ResizableBox.js +5 -5
  69. package/dist/lib/vendor/react-resizable/build/ResizableBox.js.map +1 -1
  70. package/dist/lib/vendor/react-resizable/build/utils.cjs +1 -1
  71. package/dist/lib/vendor/react-resizable/build/utils.cjs.map +1 -1
  72. package/dist/lib/vendor/react-resizable/build/utils.js +2 -2
  73. package/dist/lib/vendor/react-toastify/dist/index.cjs +1 -1
  74. package/dist/lib/vendor/react-toastify/dist/index.js +10 -10
  75. package/dist/types/ui/primitives/Select/MultiSelect.d.ts +15 -0
  76. package/dist/types/ui/primitives/index.d.ts +1 -0
  77. package/package.json +1 -1
@@ -0,0 +1,113 @@
1
+ import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
+ import { clsx as N } from "../../../vendor/clsx/dist/clsx.js";
3
+ import h, { useRef as R, useState as F, useCallback as I, useLayoutEffect as j } from "react";
4
+ import { MenuTrigger as B, Button as L, Popover as M } from "react-aria-components";
5
+ /* empty css */
6
+ import { IconChevronDown as O } from "../../icons/IconChevronDown.js";
7
+ import { useOverlayPortalContainer as W } from "../../hooks/useOverlayPortal.js";
8
+ import { Field as k, Label as z, Description as D, FieldError as P } from "../Fieldset/Fieldset.js";
9
+ import { ListBox as V } from "../ListBox/ListBox.js";
10
+ function g(t) {
11
+ const { id: e } = t.props;
12
+ return String(e ?? t.key ?? "");
13
+ }
14
+ function A(t) {
15
+ const { textValue: e, children: r } = t.props;
16
+ return e !== void 0 ? e : typeof r == "string" ? r : "";
17
+ }
18
+ function v(t, e) {
19
+ h.Children.forEach(t, (r) => {
20
+ h.isValidElement(r) && e(r);
21
+ });
22
+ }
23
+ function K(t) {
24
+ const e = /* @__PURE__ */ new Set();
25
+ return v(t, (r) => e.add(g(r))), e;
26
+ }
27
+ function U(t, e) {
28
+ const r = new Set([...e].map(String)), i = [];
29
+ return v(t, (s) => {
30
+ r.has(g(s)) && i.push(A(s));
31
+ }), i.join(", ");
32
+ }
33
+ function Z({
34
+ className: t,
35
+ label: e,
36
+ description: r,
37
+ errorMessage: i,
38
+ placeholder: s,
39
+ children: a,
40
+ selectedKeys: f,
41
+ onSelectionChange: x,
42
+ isDisabled: S,
43
+ isInvalid: y,
44
+ disallowEmptySelection: C,
45
+ "aria-label": m
46
+ }) {
47
+ const T = N(t, "select-container"), b = W(), c = R(null), [w, E] = F(), u = I(() => {
48
+ c.current && E(`${c.current.offsetWidth}px`);
49
+ }, []);
50
+ j(() => {
51
+ u();
52
+ const o = c.current;
53
+ if (!o || typeof ResizeObserver > "u") return;
54
+ const p = new ResizeObserver(u);
55
+ return p.observe(o), () => p.disconnect();
56
+ }, [u]);
57
+ const l = U(a, f);
58
+ return /* @__PURE__ */ n("div", { className: T, children: /* @__PURE__ */ d(k, { children: [
59
+ e && /* @__PURE__ */ n(z, { children: e }),
60
+ /* @__PURE__ */ d(B, { children: [
61
+ /* @__PURE__ */ d(
62
+ L,
63
+ {
64
+ ref: c,
65
+ className: "select",
66
+ "aria-label": m,
67
+ isDisabled: S,
68
+ "data-invalid": y || void 0,
69
+ children: [
70
+ /* @__PURE__ */ n(
71
+ "span",
72
+ {
73
+ className: "select-value",
74
+ "data-placeholder": l === "" || void 0,
75
+ title: l || void 0,
76
+ children: l === "" ? s : l
77
+ }
78
+ ),
79
+ /* @__PURE__ */ n(O, { "aria-hidden": "true" })
80
+ ]
81
+ }
82
+ ),
83
+ /* @__PURE__ */ n(
84
+ M,
85
+ {
86
+ className: "select-popover",
87
+ style: { "--trigger-width": w },
88
+ UNSTABLE_portalContainer: b,
89
+ children: /* @__PURE__ */ n(
90
+ V,
91
+ {
92
+ "aria-label": e ?? m,
93
+ autoFocus: !0,
94
+ selectionMode: "multiple",
95
+ disallowEmptySelection: C,
96
+ selectedKeys: f,
97
+ onSelectionChange: (o) => x(
98
+ o === "all" ? K(a) : new Set(o)
99
+ ),
100
+ children: a
101
+ }
102
+ )
103
+ }
104
+ )
105
+ ] }),
106
+ r && /* @__PURE__ */ n(D, { children: r }),
107
+ /* @__PURE__ */ n(P, { children: i })
108
+ ] }) });
109
+ }
110
+ export {
111
+ Z as MultiSelectField
112
+ };
113
+ //# sourceMappingURL=MultiSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSelect.js","sources":["../../../../../src/ui/primitives/Select/MultiSelect.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Label,\n ListBox,\n SharedFieldProps,\n} from \"primitives\";\nimport React, { useCallback, useLayoutEffect, useRef, useState } from \"react\";\nimport {\n Button as RACButton,\n MenuTrigger as RACMenuTrigger,\n Popover as RACPopover,\n type Key as RACKey,\n type Selection as RACSelection,\n} from \"react-aria-components\";\nimport \"./select.css\";\n\nfunction itemKey(item: React.ReactElement): string {\n const { id } = item.props as { id?: RACKey };\n return String(id ?? item.key ?? \"\");\n}\n\nfunction itemText(item: React.ReactElement): string {\n const { textValue, children } = item.props as {\n textValue?: string;\n children?: React.ReactNode;\n };\n if (textValue !== undefined) return textValue;\n return typeof children === \"string\" ? children : \"\";\n}\n\nfunction forEachItem(\n children: React.ReactNode,\n visit: (item: React.ReactElement) => void,\n) {\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child)) visit(child);\n });\n}\n\nfunction allItemKeys(children: React.ReactNode): Set<RACKey> {\n const keys = new Set<RACKey>();\n forEachItem(children, (item) => keys.add(itemKey(item)));\n return keys;\n}\n\nfunction selectedItemsText(\n children: React.ReactNode,\n selectedKeys: Iterable<RACKey>,\n): string {\n const selected = new Set([...selectedKeys].map(String));\n const texts: string[] = [];\n forEachItem(children, (item) => {\n if (selected.has(itemKey(item))) texts.push(itemText(item));\n });\n return texts.join(\", \");\n}\n\nexport interface MultiSelectFieldProps extends SharedFieldProps {\n children: React.ReactNode;\n selectedKeys: Iterable<RACKey>;\n onSelectionChange: (keys: Set<RACKey>) => void;\n className?: string;\n isDisabled?: boolean;\n isInvalid?: boolean;\n disallowEmptySelection?: boolean;\n \"aria-label\"?: string;\n}\n\nexport function MultiSelectField({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n selectedKeys,\n onSelectionChange,\n isDisabled,\n isInvalid,\n disallowEmptySelection,\n \"aria-label\": ariaLabel,\n}: MultiSelectFieldProps) {\n const classNames = clsx(className, \"select-container\");\n const portalContainer = useOverlayPortalContainer();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<string>();\n\n const measureTrigger = useCallback(() => {\n if (triggerRef.current) {\n setTriggerWidth(`${triggerRef.current.offsetWidth}px`);\n }\n }, []);\n\n useLayoutEffect(() => {\n measureTrigger();\n const trigger = triggerRef.current;\n if (!trigger || typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(measureTrigger);\n observer.observe(trigger);\n return () => observer.disconnect();\n }, [measureTrigger]);\n\n const chosenText = selectedItemsText(children, selectedKeys);\n\n return (\n <div className={classNames}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACMenuTrigger>\n <RACButton\n ref={triggerRef}\n className=\"select\"\n aria-label={ariaLabel}\n isDisabled={isDisabled}\n data-invalid={isInvalid || undefined}\n >\n <span\n className=\"select-value\"\n data-placeholder={chosenText === \"\" || undefined}\n title={chosenText || undefined}\n >\n {chosenText === \"\" ? placeholder : chosenText}\n </span>\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n <RACPopover\n className=\"select-popover\"\n style={{ \"--trigger-width\": triggerWidth } as React.CSSProperties}\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox\n aria-label={label ?? ariaLabel}\n autoFocus\n selectionMode=\"multiple\"\n disallowEmptySelection={disallowEmptySelection}\n selectedKeys={selectedKeys}\n onSelectionChange={(keys: RACSelection) =>\n onSelectionChange(\n keys === \"all\" ? allItemKeys(children) : new Set(keys),\n )\n }\n >\n {children}\n </ListBox>\n </RACPopover>\n </RACMenuTrigger>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </div>\n );\n}\n"],"names":["itemKey","item","id","itemText","textValue","children","forEachItem","visit","React","child","allItemKeys","keys","selectedItemsText","selectedKeys","selected","texts","MultiSelectField","className","label","description","errorMessage","placeholder","onSelectionChange","isDisabled","isInvalid","disallowEmptySelection","ariaLabel","classNames","clsx","portalContainer","useOverlayPortalContainer","triggerRef","useRef","triggerWidth","setTriggerWidth","useState","measureTrigger","useCallback","useLayoutEffect","trigger","observer","chosenText","jsx","Field","Label","RACMenuTrigger","jsxs","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError"],"mappings":";;;;;;;;;AAqBA,SAASA,EAAQC,GAAkC;AACjD,QAAM,EAAE,IAAAC,MAAOD,EAAK;AACpB,SAAO,OAAOC,KAAMD,EAAK,OAAO,EAAE;AACpC;AAEA,SAASE,EAASF,GAAkC;AAClD,QAAM,EAAE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S,QAAQD,EAAYL,CAAQ,IAAI,IAAI,IAAIM,CAAI;AAAA,cAAA;AAAA,cAIxD,UAAAN;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IACF,GACF;AAAA,IACCc,KAAe,gBAAAuB,EAACS,GAAA,EAAa,UAAAhC,EAAA,CAAY;AAAA,IAC1C,gBAAAuB,EAACU,KAAY,UAAAhC,EAAA,CAAa;AAAA,EAAA,EAAA,CAC5B,EAAA,CACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../vendor/clsx/dist/clsx.cjs"),n=require("react-aria-components");;/* empty css */const h=require("../../icons/IconChevronDown.cjs"),S=require("../../icons/IconCheck.cjs"),q=require("../../hooks/useOverlayPortal.cjs"),r=require("../Fieldset/Fieldset.cjs"),a=require("../ListBox/ListBox.cjs");function C({className:t,label:s,description:c,errorMessage:l,children:o,items:x,...j}){const m=i.clsx(t,"select-container"),d=q.useOverlayPortalContainer();return e.jsx(u,{className:m,...j,children:e.jsxs(r.Field,{children:[s&&e.jsx(r.Label,{children:s}),e.jsxs(n.Button,{className:"select",children:[e.jsx(n.SelectValue,{className:"select-value"}),e.jsx(h.IconChevronDown,{"aria-hidden":"true"})]}),e.jsx(n.Popover,{UNSTABLE_portalContainer:d,children:e.jsx(a.ListBox,{items:x,children:o})}),c&&e.jsx(r.Description,{children:c}),e.jsx(r.FieldError,{children:l})]})})}function u({...t}){return e.jsx(n.Select,{...t})}function N({children:t,className:s,...c}){const l=i.clsx(s,"select-item"),o=typeof t=="string"?t:"";return e.jsx(a.ListBoxItem,{textValue:o,className:l,...c,children:e.jsxs(e.Fragment,{children:[e.jsx(S.IconCheck,{className:"select-item-check"}),t]})})}exports.Select=u;exports.SelectField=C;exports.SelectItem=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../vendor/clsx/dist/clsx.cjs"),n=require("react-aria-components");;/* empty css */const h=require("../../icons/IconChevronDown.cjs"),S=require("../../icons/IconCheck.cjs"),q=require("../../hooks/useOverlayPortal.cjs"),r=require("../Fieldset/Fieldset.cjs"),a=require("../ListBox/ListBox.cjs");function N({className:s,label:t,description:c,errorMessage:l,children:o,items:x,...m}){const j=i.clsx(s,"select-container"),d=q.useOverlayPortalContainer();return e.jsx(u,{className:j,...m,children:e.jsxs(r.Field,{children:[t&&e.jsx(r.Label,{children:t}),e.jsxs(n.Button,{className:"select",children:[e.jsx(n.SelectValue,{className:"select-value"}),e.jsx(h.IconChevronDown,{"aria-hidden":"true"})]}),e.jsx(n.Popover,{className:"select-popover",UNSTABLE_portalContainer:d,children:e.jsx(a.ListBox,{items:x,children:o})}),c&&e.jsx(r.Description,{children:c}),e.jsx(r.FieldError,{children:l})]})})}function u({...s}){return e.jsx(n.Select,{...s})}function p({children:s,className:t,...c}){const l=i.clsx(t,"select-item"),o=typeof s=="string"?s:"";return e.jsx(a.ListBoxItem,{textValue:o,className:l,...c,children:e.jsxs(e.Fragment,{children:[e.jsx(S.IconCheck,{className:"select-item-check"}),s]})})}exports.Select=u;exports.SelectField=N;exports.SelectItem=p;
2
2
  //# sourceMappingURL=Select.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.cjs","sources":["../../../../../src/ui/primitives/Select/Select.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Label,\n ListBox,\n ListBoxItem,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport {\n Button as RACButton,\n Popover as RACPopover,\n Select as RACSelect,\n SelectValue as RACSelectValue,\n type SelectProps as RACSelectProps,\n} from \"react-aria-components\";\nimport \"./select.css\";\n\nexport interface SelectFieldProps<T extends object>\n extends Omit<SelectProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\nexport function SelectField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n children,\n items,\n ...props\n}: SelectFieldProps<T>) {\n const classNames = clsx(className, \"select-container\");\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <Select className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACButton className=\"select\">\n <RACSelectValue className=\"select-value\" />\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n <RACPopover UNSTABLE_portalContainer={portalContainer}>\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </Select>\n );\n}\n\nexport type SelectProps<T extends object> = RACSelectProps<T>;\nexport function Select<T extends object>({ ...props }: SelectProps<T>) {\n return <RACSelect<T> {...props} />;\n}\n\nexport type SelectItemProps = ListBoxItemProps;\nexport function SelectItem({ children, className, ...props }: SelectItemProps) {\n const classNames = clsx(className, \"select-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"select-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["SelectField","className","label","description","errorMessage","children","items","props","classNames","clsx","portalContainer","useOverlayPortalContainer","Select","Field","jsx","Label","jsxs","RACButton","RACSelectValue","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACSelect","SelectItem","textValue","ListBoxItem","Fragment","IconCheck"],"mappings":"sbA4BO,SAASA,EAA8B,CAC5C,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,SAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAAwB,CACtB,MAAMC,EAAaC,EAAAA,KAAKR,EAAW,kBAAkB,EAG/CS,EAAkBC,EAAAA,0BAAA,EACxB,aACGC,EAAA,CAAO,UAAWJ,EAAa,GAAGD,EACjC,gBAACM,EAAAA,MAAA,CACE,SAAA,CAAAX,GAASY,EAAAA,IAACC,EAAAA,OAAO,SAAAb,CAAA,CAAM,EACxBc,EAAAA,KAACC,EAAAA,OAAA,CAAU,UAAU,SACnB,SAAA,CAAAH,EAAAA,IAACI,EAAAA,YAAA,CAAe,UAAU,cAAA,CAAe,EACzCJ,EAAAA,IAACK,EAAAA,gBAAA,CAAgB,cAAY,MAAA,CAAO,CAAA,EACtC,EACAL,EAAAA,IAACM,EAAAA,SAAW,yBAA0BV,EACpC,eAACW,EAAAA,QAAA,CAAQ,MAAAf,EAAe,SAAAD,EAAS,CAAA,CACnC,EACCF,GAAeW,EAAAA,IAACQ,EAAAA,YAAA,CAAa,SAAAnB,CAAA,CAAY,EAC1CW,EAAAA,IAACS,EAAAA,YAAY,SAAAnB,CAAA,CAAa,CAAA,CAAA,CAC5B,CAAA,CACF,CAEJ,CAGO,SAASQ,EAAyB,CAAE,GAAGL,GAAyB,CACrE,OAAOO,MAACU,EAAAA,OAAA,CAAc,GAAGjB,CAAA,CAAO,CAClC,CAGO,SAASkB,EAAW,CAAE,SAAApB,EAAU,UAAAJ,EAAW,GAAGM,GAA0B,CAC7E,MAAMC,EAAaC,EAAAA,KAAKR,EAAW,aAAa,EAC1CyB,EAAY,OAAOrB,GAAa,SAAWA,EAAW,GAC5D,aACGsB,EAAAA,YAAA,CAAY,UAAAD,EAAsB,UAAWlB,EAAa,GAAGD,EAC5D,SAAAS,EAAAA,KAAAY,EAAAA,SAAA,CACE,SAAA,CAAAd,EAAAA,IAACe,EAAAA,UAAA,CAAU,UAAU,mBAAA,CAAoB,EACxCxB,CAAA,CAAA,CACH,CAAA,CACF,CAEJ"}
1
+ {"version":3,"file":"Select.cjs","sources":["../../../../../src/ui/primitives/Select/Select.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Label,\n ListBox,\n ListBoxItem,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport {\n Button as RACButton,\n Popover as RACPopover,\n Select as RACSelect,\n SelectValue as RACSelectValue,\n type SelectProps as RACSelectProps,\n} from \"react-aria-components\";\nimport \"./select.css\";\n\nexport interface SelectFieldProps<T extends object>\n extends Omit<SelectProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\nexport function SelectField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n children,\n items,\n ...props\n}: SelectFieldProps<T>) {\n const classNames = clsx(className, \"select-container\");\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <Select className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACButton className=\"select\">\n <RACSelectValue className=\"select-value\" />\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n <RACPopover\n className=\"select-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </Select>\n );\n}\n\nexport type SelectProps<T extends object> = RACSelectProps<T>;\nexport function Select<T extends object>({ ...props }: SelectProps<T>) {\n return <RACSelect<T> {...props} />;\n}\n\nexport type SelectItemProps = ListBoxItemProps;\nexport function SelectItem({ children, className, ...props }: SelectItemProps) {\n const classNames = clsx(className, \"select-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"select-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["SelectField","className","label","description","errorMessage","children","items","props","classNames","clsx","portalContainer","useOverlayPortalContainer","Select","Field","jsx","Label","jsxs","RACButton","RACSelectValue","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACSelect","SelectItem","textValue","ListBoxItem","Fragment","IconCheck"],"mappings":"sbA4BO,SAASA,EAA8B,CAC5C,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,SAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAAwB,CACtB,MAAMC,EAAaC,EAAAA,KAAKR,EAAW,kBAAkB,EAG/CS,EAAkBC,EAAAA,0BAAA,EACxB,aACGC,EAAA,CAAO,UAAWJ,EAAa,GAAGD,EACjC,gBAACM,EAAAA,MAAA,CACE,SAAA,CAAAX,GAASY,EAAAA,IAACC,EAAAA,OAAO,SAAAb,CAAA,CAAM,EACxBc,EAAAA,KAACC,EAAAA,OAAA,CAAU,UAAU,SACnB,SAAA,CAAAH,EAAAA,IAACI,EAAAA,YAAA,CAAe,UAAU,cAAA,CAAe,EACzCJ,EAAAA,IAACK,EAAAA,gBAAA,CAAgB,cAAY,MAAA,CAAO,CAAA,EACtC,EACAL,EAAAA,IAACM,EAAAA,QAAA,CACC,UAAU,iBACV,yBAA0BV,EAE1B,SAAAI,EAAAA,IAACO,EAAAA,QAAA,CAAQ,MAAAf,EAAe,SAAAD,CAAA,CAAS,CAAA,CAAA,EAElCF,GAAeW,EAAAA,IAACQ,EAAAA,YAAA,CAAa,SAAAnB,CAAA,CAAY,EAC1CW,EAAAA,IAACS,EAAAA,YAAY,SAAAnB,CAAA,CAAa,CAAA,CAAA,CAC5B,CAAA,CACF,CAEJ,CAGO,SAASQ,EAAyB,CAAE,GAAGL,GAAyB,CACrE,OAAOO,MAACU,EAAAA,OAAA,CAAc,GAAGjB,CAAA,CAAO,CAClC,CAGO,SAASkB,EAAW,CAAE,SAAApB,EAAU,UAAAJ,EAAW,GAAGM,GAA0B,CAC7E,MAAMC,EAAaC,EAAAA,KAAKR,EAAW,aAAa,EAC1CyB,EAAY,OAAOrB,GAAa,SAAWA,EAAW,GAC5D,aACGsB,EAAAA,YAAA,CAAY,UAAAD,EAAsB,UAAWlB,EAAa,GAAGD,EAC5D,SAAAS,EAAAA,KAAAY,EAAAA,SAAA,CACE,SAAA,CAAAd,EAAAA,IAACe,EAAAA,UAAA,CAAU,UAAU,mBAAA,CAAoB,EACxCxB,CAAA,CAAA,CACH,CAAA,CACF,CAEJ"}
@@ -1,38 +1,45 @@
1
1
  import { jsx as e, jsxs as l, Fragment as u } from "react/jsx-runtime";
2
- import { clsx as s } from "../../../vendor/clsx/dist/clsx.js";
3
- import { Button as f, SelectValue as d, Popover as h, Select as x } from "react-aria-components";
2
+ import { clsx as n } from "../../../vendor/clsx/dist/clsx.js";
3
+ import { Button as f, SelectValue as d, Popover as h, Select as N } from "react-aria-components";
4
4
  /* empty css */
5
- import { IconChevronDown as N } from "../../icons/IconChevronDown.js";
5
+ import { IconChevronDown as x } from "../../icons/IconChevronDown.js";
6
6
  import { IconCheck as S } from "../../icons/IconCheck.js";
7
- import { useOverlayPortalContainer as C } from "../../hooks/useOverlayPortal.js";
8
- import { Field as v, Label as B, Description as F, FieldError as I } from "../Fieldset/Fieldset.js";
7
+ import { useOverlayPortalContainer as v } from "../../hooks/useOverlayPortal.js";
8
+ import { Field as C, Label as B, Description as F, FieldError as I } from "../Fieldset/Fieldset.js";
9
9
  import { ListBox as L, ListBoxItem as V } from "../ListBox/ListBox.js";
10
10
  function T({
11
11
  className: t,
12
12
  label: r,
13
13
  description: o,
14
14
  errorMessage: c,
15
- children: n,
15
+ children: s,
16
16
  items: i,
17
17
  ...a
18
18
  }) {
19
- const m = s(t, "select-container"), p = C();
20
- return /* @__PURE__ */ e(g, { className: m, ...a, children: /* @__PURE__ */ l(v, { children: [
19
+ const m = n(t, "select-container"), p = v();
20
+ return /* @__PURE__ */ e(g, { className: m, ...a, children: /* @__PURE__ */ l(C, { children: [
21
21
  r && /* @__PURE__ */ e(B, { children: r }),
22
22
  /* @__PURE__ */ l(f, { className: "select", children: [
23
23
  /* @__PURE__ */ e(d, { className: "select-value" }),
24
- /* @__PURE__ */ e(N, { "aria-hidden": "true" })
24
+ /* @__PURE__ */ e(x, { "aria-hidden": "true" })
25
25
  ] }),
26
- /* @__PURE__ */ e(h, { UNSTABLE_portalContainer: p, children: /* @__PURE__ */ e(L, { items: i, children: n }) }),
26
+ /* @__PURE__ */ e(
27
+ h,
28
+ {
29
+ className: "select-popover",
30
+ UNSTABLE_portalContainer: p,
31
+ children: /* @__PURE__ */ e(L, { items: i, children: s })
32
+ }
33
+ ),
27
34
  o && /* @__PURE__ */ e(F, { children: o }),
28
35
  /* @__PURE__ */ e(I, { children: c })
29
36
  ] }) });
30
37
  }
31
38
  function g({ ...t }) {
32
- return /* @__PURE__ */ e(x, { ...t });
39
+ return /* @__PURE__ */ e(N, { ...t });
33
40
  }
34
41
  function U({ children: t, className: r, ...o }) {
35
- const c = s(r, "select-item");
42
+ const c = n(r, "select-item");
36
43
  return /* @__PURE__ */ e(V, { textValue: typeof t == "string" ? t : "", className: c, ...o, children: /* @__PURE__ */ l(u, { children: [
37
44
  /* @__PURE__ */ e(S, { className: "select-item-check" }),
38
45
  t
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../../../../../src/ui/primitives/Select/Select.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Label,\n ListBox,\n ListBoxItem,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport {\n Button as RACButton,\n Popover as RACPopover,\n Select as RACSelect,\n SelectValue as RACSelectValue,\n type SelectProps as RACSelectProps,\n} from \"react-aria-components\";\nimport \"./select.css\";\n\nexport interface SelectFieldProps<T extends object>\n extends Omit<SelectProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\nexport function SelectField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n children,\n items,\n ...props\n}: SelectFieldProps<T>) {\n const classNames = clsx(className, \"select-container\");\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <Select className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACButton className=\"select\">\n <RACSelectValue className=\"select-value\" />\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n <RACPopover UNSTABLE_portalContainer={portalContainer}>\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </Select>\n );\n}\n\nexport type SelectProps<T extends object> = RACSelectProps<T>;\nexport function Select<T extends object>({ ...props }: SelectProps<T>) {\n return <RACSelect<T> {...props} />;\n}\n\nexport type SelectItemProps = ListBoxItemProps;\nexport function SelectItem({ children, className, ...props }: SelectItemProps) {\n const classNames = clsx(className, \"select-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"select-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["SelectField","className","label","description","errorMessage","children","items","props","classNames","clsx","portalContainer","useOverlayPortalContainer","Select","Field","jsx","Label","jsxs","RACButton","RACSelectValue","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACSelect","SelectItem","ListBoxItem","Fragment","IconCheck"],"mappings":";;;;;;;;;AA4BO,SAASA,EAA8B;AAAA,EAC5C,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GAAwB;AACtB,QAAMC,IAAaC,EAAKR,GAAW,kBAAkB,GAG/CS,IAAkBC,EAAA;AACxB,2BACGC,GAAA,EAAO,WAAWJ,GAAa,GAAGD,GACjC,4BAACM,GAAA,EACE,UAAA;AAAA,IAAAX,KAAS,gBAAAY,EAACC,KAAO,UAAAb,EAAA,CAAM;AAAA,IACxB,gBAAAc,EAACC,GAAA,EAAU,WAAU,UACnB,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAA,EAAe,WAAU,eAAA,CAAe;AAAA,MACzC,gBAAAJ,EAACK,GAAA,EAAgB,eAAY,OAAA,CAAO;AAAA,IAAA,GACtC;AAAA,IACA,gBAAAL,EAACM,KAAW,0BAA0BV,GACpC,4BAACW,GAAA,EAAQ,OAAAf,GAAe,UAAAD,GAAS,EAAA,CACnC;AAAA,IACCF,KAAe,gBAAAW,EAACQ,GAAA,EAAa,UAAAnB,EAAA,CAAY;AAAA,IAC1C,gBAAAW,EAACS,KAAY,UAAAnB,EAAA,CAAa;AAAA,EAAA,EAAA,CAC5B,EAAA,CACF;AAEJ;AAGO,SAASQ,EAAyB,EAAE,GAAGL,KAAyB;AACrE,SAAO,gBAAAO,EAACU,GAAA,EAAc,GAAGjB,EAAA,CAAO;AAClC;AAGO,SAASkB,EAAW,EAAE,UAAApB,GAAU,WAAAJ,GAAW,GAAGM,KAA0B;AAC7E,QAAMC,IAAaC,EAAKR,GAAW,aAAa;AAEhD,2BACGyB,GAAA,EAAY,WAFG,OAAOrB,KAAa,WAAWA,IAAW,IAEvB,WAAWG,GAAa,GAAGD,GAC5D,UAAA,gBAAAS,EAAAW,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAb,EAACc,GAAA,EAAU,WAAU,oBAAA,CAAoB;AAAA,IACxCvB;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"Select.js","sources":["../../../../../src/ui/primitives/Select/Select.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Label,\n ListBox,\n ListBoxItem,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport {\n Button as RACButton,\n Popover as RACPopover,\n Select as RACSelect,\n SelectValue as RACSelectValue,\n type SelectProps as RACSelectProps,\n} from \"react-aria-components\";\nimport \"./select.css\";\n\nexport interface SelectFieldProps<T extends object>\n extends Omit<SelectProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\nexport function SelectField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n children,\n items,\n ...props\n}: SelectFieldProps<T>) {\n const classNames = clsx(className, \"select-container\");\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <Select className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACButton className=\"select\">\n <RACSelectValue className=\"select-value\" />\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n <RACPopover\n className=\"select-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </Select>\n );\n}\n\nexport type SelectProps<T extends object> = RACSelectProps<T>;\nexport function Select<T extends object>({ ...props }: SelectProps<T>) {\n return <RACSelect<T> {...props} />;\n}\n\nexport type SelectItemProps = ListBoxItemProps;\nexport function SelectItem({ children, className, ...props }: SelectItemProps) {\n const classNames = clsx(className, \"select-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"select-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["SelectField","className","label","description","errorMessage","children","items","props","classNames","clsx","portalContainer","useOverlayPortalContainer","Select","Field","jsx","Label","jsxs","RACButton","RACSelectValue","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACSelect","SelectItem","ListBoxItem","Fragment","IconChe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,UAAA,gBAAAS,EAAAW,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAb,EAACc,GAAA,EAAU,WAAU,oBAAA,CAAoB;AAAA,IACxCvB;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const J=require("../../loader/lib/es/loader/index.cjs"),e=require("react");var K={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},G=K,ee={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},te=ee;function re({children:r}){return e.createElement("div",{style:te.container},r)}var ne=re,ue=ne;function ie({width:r,height:o,isEditorReady:l,loading:u,_ref:p,className:h,wrapperProps:w}){return e.createElement("section",{style:{...G.wrapper,width:r,height:o},...w},!l&&e.createElement(ue,null,u),e.createElement("div",{ref:p,style:{...G.fullWidth,...!l&&G.hide},className:h}))}var oe=ie,Q=e.memo(oe);function ae(r){e.useEffect(r,[])}var T=ae;function ce(r,o,l=!0){let u=e.useRef(!0);e.useEffect(u.current||!l?()=>{u.current=!1}:r,o)}var m=ce;function D(){}function b(r,o,l,u){return le(r,u)||de(r,o,l,u)}function le(r,o){return r.editor.getModel(X(r,o))}function de(r,o,l,u){return r.editor.createModel(o,l,u?X(r,u):void 0)}function X(r,o){return r.Uri.parse(o)}function se({original:r,modified:o,language:l,originalLanguage:u,modifiedLanguage:p,originalModelPath:h,modifiedModelPath:w,keepCurrentOriginalModel:L=!1,keepCurrentModifiedModel:j=!1,theme:R="light",loading:U="Loading...",options:E={},height:q="100%",width:z="100%",className:B,wrapperProps:H={},beforeMount:W=D,onMount:A=D}){let[M,y]=e.useState(!1),[V,s]=e.useState(!0),f=e.useRef(null),d=e.useRef(null),x=e.useRef(null),g=e.useRef(A),i=e.useRef(W),C=e.useRef(!1);T(()=>{let t=J.init();return t.then(a=>(d.current=a)&&s(!1)).catch(a=>(a==null?void 0:a.type)!=="cancelation"&&console.error("Monaco initialization: error:",a)),()=>f.current?P():t.cancel()}),m(()=>{if(f.current&&d.current){let t=f.current.getOriginalEditor(),a=b(d.current,r||"",u||l||"text",h||"");a!==t.getModel()&&t.setModel(a)}},[h],M),m(()=>{if(f.current&&d.current){let t=f.current.getModifiedEditor(),a=b(d.current,o||"",p||l||"text",w||"");a!==t.getModel()&&t.setModel(a)}},[w],M),m(()=>{let t=f.current.getModifiedEditor();t.getOption(d.current.editor.EditorOption.readOnly)?t.setValue(o||""):o!==t.getValue()&&(t.executeEdits("",[{range:t.getModel().getFullModelRange(),text:o||"",forceMoveMarkers:!0}]),t.pushUndoStop())},[o],M),m(()=>{var t,a;(a=(t=f.current)==null?void 0:t.getModel())==null||a.original.setValue(r||"")},[r],M),m(()=>{let{original:t,modified:a}=f.current.getModel();d.current.editor.setModelLanguage(t,u||l||"text"),d.current.editor.setModelLanguage(a,p||l||"text")},[l,u,p],M),m(()=>{var t;(t=d.current)==null||t.editor.setTheme(R)},[R],M),m(()=>{var t;(t=f.current)==null||t.updateOptions(E)},[E],M);let F=e.useCallback(()=>{var S;if(!d.current)return;i.current(d.current);let t=b(d.current,r||"",u||l||"text",h||""),a=b(d.current,o||"",p||l||"text",w||"");(S=f.current)==null||S.setModel({original:t,modified:a})},[l,o,p,r,u,h,w]),I=e.useCallback(()=>{var t;!C.current&&x.current&&(f.current=d.current.editor.createDiffEditor(x.current,{automaticLayout:!0,...E}),F(),(t=d.current)==null||t.editor.setTheme(R),y(!0),C.current=!0)},[E,R,F]);e.useEffect(()=>{M&&g.current(f.current,d.current)},[M]),e.useEffect(()=>{!V&&!M&&I()},[V,M,I]);function P(){var a,S,k,N;let t=(a=f.current)==null?void 0:a.getModel();L||((S=t==null?void 0:t.original)==null||S.dispose()),j||((k=t==null?void 0:t.modified)==null||k.dispose()),(N=f.current)==null||N.dispose()}return e.createElement(Q,{width:z,height:q,isEditorReady:M,loading:U,_ref:x,className:B,wrapperProps:H})}var fe=se;e.memo(fe);function ge(r){let o=e.useRef();return e.useEffect(()=>{o.current=r},[r]),o.current}var pe=ge,$=new Map;function he({defaultValue:r,defaultLanguage:o,defaultPath:l,value:u,language:p,path:h,theme:w="light",line:L,loading:j="Loading...",options:R={},overrideServices:U={},saveViewState:E=!0,keepCurrentModel:q=!1,width:z="100%",height:B="100%",className:H,wrapperProps:W={},beforeMount:A=D,onMount:M=D,onChange:y,onValidate:V=D}){let[s,f]=e.useState(!1),[d,x]=e.useState(!0),g=e.useRef(null),i=e.useRef(null),C=e.useRef(null),F=e.useRef(M),I=e.useRef(A),P=e.useRef(),t=e.useRef(u),a=pe(h),S=e.useRef(!1),k=e.useRef(!1);T(()=>{let n=J.init();return n.then(c=>(g.current=c)&&x(!1)).catch(c=>(c==null?void 0:c.type)!=="cancelation"&&console.error("Monaco initialization: error:",c)),()=>i.current?Z():n.cancel()}),m(()=>{var c,v,_,O;let n=b(g.current,r||u||"",o||p||"",h||l||"");n!==((c=i.current)==null?void 0:c.getModel())&&(E&&$.set(a,(v=i.current)==null?void 0:v.saveViewState()),(_=i.current)==null||_.setModel(n),E&&((O=i.current)==null||O.restoreViewState($.get(h))))},[h],s),m(()=>{var n;(n=i.current)==null||n.updateOptions(R)},[R],s),m(()=>{!i.current||u===void 0||(i.current.getOption(g.current.editor.EditorOption.readOnly)?i.current.setValue(u):u!==i.current.getValue()&&(k.current=!0,i.current.executeEdits("",[{range:i.current.getModel().getFullModelRange(),text:u,forceMoveMarkers:!0}]),i.current.pushUndoStop(),k.current=!1))},[u],s),m(()=>{var c,v;let n=(c=i.current)==null?void 0:c.getModel();n&&p&&((v=g.current)==null||v.editor.setModelLanguage(n,p))},[p],s),m(()=>{var n;L!==void 0&&((n=i.current)==null||n.revealLine(L))},[L],s),m(()=>{var n;(n=g.current)==null||n.editor.setTheme(w)},[w],s);let N=e.useCallback(()=>{var n;if(!(!C.current||!g.current)&&!S.current){I.current(g.current);let c=h||l,v=b(g.current,u||r||"",o||p||"",c||"");i.current=(n=g.current)==null?void 0:n.editor.create(C.current,{model:v,automaticLayout:!0,...R},U),E&&i.current.restoreViewState($.get(c)),g.current.editor.setTheme(w),L!==void 0&&i.current.revealLine(L),f(!0),S.current=!0}},[r,o,l,u,p,h,R,U,E,w,L]);e.useEffect(()=>{s&&F.current(i.current,g.current)},[s]),e.useEffect(()=>{!d&&!s&&N()},[d,s,N]),t.current=u,e.useEffect(()=>{var n,c;s&&y&&((n=P.current)==null||n.dispose(),P.current=(c=i.current)==null?void 0:c.onDidChangeModelContent(v=>{k.current||y(i.current.getValue(),v)}))},[s,y]),e.useEffect(()=>{if(s){let n=g.current.editor.onDidChangeMarkers(c=>{var _;let v=(_=i.current.getModel())==null?void 0:_.uri;if(v&&c.find(O=>O.path===v.path)){let O=g.current.editor.getModelMarkers({resource:v});V==null||V(O)}});return()=>{n==null||n.dispose()}}return()=>{}},[s,V]);function Z(){var n,c;(n=P.current)==null||n.dispose(),q?E&&$.set(h,i.current.saveViewState()):(c=i.current.getModel())==null||c.dispose(),i.current.dispose()}return e.createElement(Q,{width:z,height:B,isEditorReady:s,loading:j,_ref:C,className:H,wrapperProps:W})}var Me=he,Y=e.memo(Me),ve=Y;exports.loader=J;exports.Editor=Y;exports.default=ve;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Q=require("../../loader/lib/es/loader/index.cjs"),e=require("react");var K={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},J=K,ee={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},te=ee;function re({children:r}){return e.createElement("div",{style:te.container},r)}var ne=re,ue=ne;function ie({width:r,height:o,isEditorReady:l,loading:u,_ref:p,className:h,wrapperProps:w}){return e.createElement("section",{style:{...J.wrapper,width:r,height:o},...w},!l&&e.createElement(ue,null,u),e.createElement("div",{ref:p,style:{...J.fullWidth,...!l&&J.hide},className:h}))}var oe=ie,T=e.memo(oe);function ae(r){e.useEffect(r,[])}var X=ae;function ce(r,o,l=!0){let u=e.useRef(!0);e.useEffect(u.current||!l?()=>{u.current=!1}:r,o)}var m=ce;function D(){}function b(r,o,l,u){return le(r,u)||de(r,o,l,u)}function le(r,o){return r.editor.getModel(Y(r,o))}function de(r,o,l,u){return r.editor.createModel(o,l,u?Y(r,u):void 0)}function Y(r,o){return r.Uri.parse(o)}function se({original:r,modified:o,language:l,originalLanguage:u,modifiedLanguage:p,originalModelPath:h,modifiedModelPath:w,keepCurrentOriginalModel:L=!1,keepCurrentModifiedModel:q=!1,theme:R="light",loading:U="Loading...",options:E={},height:z="100%",width:H="100%",className:W,wrapperProps:A={},beforeMount:B=D,onMount:G=D}){let[M,y]=e.useState(!1),[V,s]=e.useState(!0),f=e.useRef(null),d=e.useRef(null),x=e.useRef(null),g=e.useRef(G),i=e.useRef(B),C=e.useRef(!1);X(()=>{let t=Q.init();return t.then(a=>(d.current=a)&&s(!1)).catch(a=>(a==null?void 0:a.type)!=="cancelation"&&console.error("Monaco initialization: error:",a)),()=>f.current?P():t.cancel()}),m(()=>{if(f.current&&d.current){let t=f.current.getOriginalEditor(),a=b(d.current,r||"",u||l||"text",h||"");a!==t.getModel()&&t.setModel(a)}},[h],M),m(()=>{if(f.current&&d.current){let t=f.current.getModifiedEditor(),a=b(d.current,o||"",p||l||"text",w||"");a!==t.getModel()&&t.setModel(a)}},[w],M),m(()=>{let t=f.current.getModifiedEditor();t.getOption(d.current.editor.EditorOption.readOnly)?t.setValue(o||""):o!==t.getValue()&&(t.executeEdits("",[{range:t.getModel().getFullModelRange(),text:o||"",forceMoveMarkers:!0}]),t.pushUndoStop())},[o],M),m(()=>{var t,a;(a=(t=f.current)==null?void 0:t.getModel())==null||a.original.setValue(r||"")},[r],M),m(()=>{let{original:t,modified:a}=f.current.getModel();d.current.editor.setModelLanguage(t,u||l||"text"),d.current.editor.setModelLanguage(a,p||l||"text")},[l,u,p],M),m(()=>{var t;(t=d.current)==null||t.editor.setTheme(R)},[R],M),m(()=>{var t;(t=f.current)==null||t.updateOptions(E)},[E],M);let F=e.useCallback(()=>{var S;if(!d.current)return;i.current(d.current);let t=b(d.current,r||"",u||l||"text",h||""),a=b(d.current,o||"",p||l||"text",w||"");(S=f.current)==null||S.setModel({original:t,modified:a})},[l,o,p,r,u,h,w]),I=e.useCallback(()=>{var t;!C.current&&x.current&&(f.current=d.current.editor.createDiffEditor(x.current,{automaticLayout:!0,...E}),F(),(t=d.current)==null||t.editor.setTheme(R),y(!0),C.current=!0)},[E,R,F]);e.useEffect(()=>{M&&g.current(f.current,d.current)},[M]),e.useEffect(()=>{!V&&!M&&I()},[V,M,I]);function P(){var a,S,k,N;let t=(a=f.current)==null?void 0:a.getModel();L||((S=t==null?void 0:t.original)==null||S.dispose()),q||((k=t==null?void 0:t.modified)==null||k.dispose()),(N=f.current)==null||N.dispose()}return e.createElement(T,{width:H,height:z,isEditorReady:M,loading:U,_ref:x,className:W,wrapperProps:A})}var fe=se;e.memo(fe);function ge(r){let o=e.useRef();return e.useEffect(()=>{o.current=r},[r]),o.current}var pe=ge,j=new Map;function he({defaultValue:r,defaultLanguage:o,defaultPath:l,value:u,language:p,path:h,theme:w="light",line:L,loading:q="Loading...",options:R={},overrideServices:U={},saveViewState:E=!0,keepCurrentModel:z=!1,width:H="100%",height:W="100%",className:A,wrapperProps:B={},beforeMount:G=D,onMount:M=D,onChange:y,onValidate:V=D}){let[s,f]=e.useState(!1),[d,x]=e.useState(!0),g=e.useRef(null),i=e.useRef(null),C=e.useRef(null),F=e.useRef(M),I=e.useRef(G),P=e.useRef(),t=e.useRef(u),a=pe(h),S=e.useRef(!1),k=e.useRef(!1);X(()=>{let n=Q.init();return n.then(c=>(g.current=c)&&x(!1)).catch(c=>(c==null?void 0:c.type)!=="cancelation"&&console.error("Monaco initialization: error:",c)),()=>i.current?$():n.cancel()}),m(()=>{var c,v,_,O;let n=b(g.current,r||u||"",o||p||"",h||l||"");n!==((c=i.current)==null?void 0:c.getModel())&&(E&&j.set(a,(v=i.current)==null?void 0:v.saveViewState()),(_=i.current)==null||_.setModel(n),E&&((O=i.current)==null||O.restoreViewState(j.get(h))))},[h],s),m(()=>{var n;(n=i.current)==null||n.updateOptions(R)},[R],s),m(()=>{!i.current||u===void 0||(i.current.getOption(g.current.editor.EditorOption.readOnly)?i.current.setValue(u):u!==i.current.getValue()&&(k.current=!0,i.current.executeEdits("",[{range:i.current.getModel().getFullModelRange(),text:u,forceMoveMarkers:!0}]),i.current.pushUndoStop(),k.current=!1))},[u],s),m(()=>{var c,v;let n=(c=i.current)==null?void 0:c.getModel();n&&p&&((v=g.current)==null||v.editor.setModelLanguage(n,p))},[p],s),m(()=>{var n;L!==void 0&&((n=i.current)==null||n.revealLine(L))},[L],s),m(()=>{var n;(n=g.current)==null||n.editor.setTheme(w)},[w],s);let N=e.useCallback(()=>{var n;if(!(!C.current||!g.current)&&!S.current){I.current(g.current);let c=h||l,v=b(g.current,u||r||"",o||p||"",c||"");i.current=(n=g.current)==null?void 0:n.editor.create(C.current,{model:v,automaticLayout:!0,...R},U),E&&i.current.restoreViewState(j.get(c)),g.current.editor.setTheme(w),L!==void 0&&i.current.revealLine(L),f(!0),S.current=!0}},[r,o,l,u,p,h,R,U,E,w,L]);e.useEffect(()=>{s&&F.current(i.current,g.current)},[s]),e.useEffect(()=>{!d&&!s&&N()},[d,s,N]),t.current=u,e.useEffect(()=>{var n,c;s&&y&&((n=P.current)==null||n.dispose(),P.current=(c=i.current)==null?void 0:c.onDidChangeModelContent(v=>{k.current||y(i.current.getValue(),v)}))},[s,y]),e.useEffect(()=>{if(s){let n=g.current.editor.onDidChangeMarkers(c=>{var _;let v=(_=i.current.getModel())==null?void 0:_.uri;if(v&&c.find(O=>O.path===v.path)){let O=g.current.editor.getModelMarkers({resource:v});V==null||V(O)}});return()=>{n==null||n.dispose()}}return()=>{}},[s,V]);function $(){var n,c;(n=P.current)==null||n.dispose(),z?E&&j.set(h,i.current.saveViewState()):(c=i.current.getModel())==null||c.dispose(),i.current.dispose()}return e.createElement(T,{width:H,height:W,isEditorReady:s,loading:q,_ref:C,className:A,wrapperProps:B})}var Me=he,Z=e.memo(Me),ve=Z;exports.loader=Q;exports.Editor=Z;exports.default=ve;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@monaco-editor/react/dist/index.mjs"],"sourcesContent":["import _t from\"@monaco-editor/loader\";import{memo as Te}from\"react\";import ke,{useState as re,useRef as S,useCallback as oe,useEffect as ne}from\"react\";import Se from\"@monaco-editor/loader\";import{memo as ye}from\"react\";import K from\"react\";var le={wrapper:{display:\"flex\",position:\"relative\",textAlign:\"initial\"},fullWidth:{width:\"100%\"},hide:{display:\"none\"}},v=le;import me from\"react\";var ae={container:{display:\"flex\",height:\"100%\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"}},Y=ae;function Me({children:e}){return me.createElement(\"div\",{style:Y.container},e)}var Z=Me;var $=Z;function Ee({width:e,height:r,isEditorReady:n,loading:t,_ref:a,className:m,wrapperProps:E}){return K.createElement(\"section\",{style:{...v.wrapper,width:e,height:r},...E},!n&&K.createElement($,null,t),K.createElement(\"div\",{ref:a,style:{...v.fullWidth,...!n&&v.hide},className:m}))}var ee=Ee;var H=ye(ee);import{useEffect as xe}from\"react\";function Ce(e){xe(e,[])}var k=Ce;import{useEffect as ge,useRef as Re}from\"react\";function he(e,r,n=!0){let t=Re(!0);ge(t.current||!n?()=>{t.current=!1}:e,r)}var l=he;function D(){}function h(e,r,n,t){return De(e,t)||be(e,r,n,t)}function De(e,r){return e.editor.getModel(te(e,r))}function be(e,r,n,t){return e.editor.createModel(r,n,t?te(e,t):void 0)}function te(e,r){return e.Uri.parse(r)}function Oe({original:e,modified:r,language:n,originalLanguage:t,modifiedLanguage:a,originalModelPath:m,modifiedModelPath:E,keepCurrentOriginalModel:g=!1,keepCurrentModifiedModel:N=!1,theme:x=\"light\",loading:P=\"Loading...\",options:y={},height:V=\"100%\",width:z=\"100%\",className:F,wrapperProps:j={},beforeMount:A=D,onMount:q=D}){let[M,O]=re(!1),[T,s]=re(!0),u=S(null),c=S(null),w=S(null),d=S(q),o=S(A),b=S(!1);k(()=>{let i=Se.init();return i.then(f=>(c.current=f)&&s(!1)).catch(f=>f?.type!==\"cancelation\"&&console.error(\"Monaco initialization: error:\",f)),()=>u.current?I():i.cancel()}),l(()=>{if(u.current&&c.current){let i=u.current.getOriginalEditor(),f=h(c.current,e||\"\",t||n||\"text\",m||\"\");f!==i.getModel()&&i.setModel(f)}},[m],M),l(()=>{if(u.current&&c.current){let i=u.current.getModifiedEditor(),f=h(c.current,r||\"\",a||n||\"text\",E||\"\");f!==i.getModel()&&i.setModel(f)}},[E],M),l(()=>{let i=u.current.getModifiedEditor();i.getOption(c.current.editor.EditorOption.readOnly)?i.setValue(r||\"\"):r!==i.getValue()&&(i.executeEdits(\"\",[{range:i.getModel().getFullModelRange(),text:r||\"\",forceMoveMarkers:!0}]),i.pushUndoStop())},[r],M),l(()=>{u.current?.getModel()?.original.setValue(e||\"\")},[e],M),l(()=>{let{original:i,modified:f}=u.current.getModel();c.current.editor.setModelLanguage(i,t||n||\"text\"),c.current.editor.setModelLanguage(f,a||n||\"text\")},[n,t,a],M),l(()=>{c.current?.editor.setTheme(x)},[x],M),l(()=>{u.current?.updateOptions(y)},[y],M);let L=oe(()=>{if(!c.current)return;o.current(c.current);let i=h(c.current,e||\"\",t||n||\"text\",m||\"\"),f=h(c.current,r||\"\",a||n||\"text\",E||\"\");u.current?.setModel({original:i,modified:f})},[n,r,a,e,t,m,E]),U=oe(()=>{!b.current&&w.current&&(u.current=c.current.editor.createDiffEditor(w.current,{automaticLayout:!0,...y}),L(),c.current?.editor.setTheme(x),O(!0),b.current=!0)},[y,x,L]);ne(()=>{M&&d.current(u.current,c.current)},[M]),ne(()=>{!T&&!M&&U()},[T,M,U]);function I(){let i=u.current?.getModel();g||i?.original?.dispose(),N||i?.modified?.dispose(),u.current?.dispose()}return ke.createElement(H,{width:z,height:V,isEditorReady:M,loading:P,_ref:w,className:F,wrapperProps:j})}var ie=Oe;var we=Te(ie);import{useState as Ie}from\"react\";import ce from\"@monaco-editor/loader\";function Pe(){let[e,r]=Ie(ce.__getMonacoInstance());return k(()=>{let n;return e||(n=ce.init(),n.then(t=>{r(t)})),()=>n?.cancel()}),e}var Le=Pe;import{memo as ze}from\"react\";import We,{useState as ue,useEffect as W,useRef as C,useCallback as _e}from\"react\";import Ne from\"@monaco-editor/loader\";import{useEffect as Ue,useRef as ve}from\"react\";function He(e){let r=ve();return Ue(()=>{r.current=e},[e]),r.current}var se=He;var _=new Map;function Ve({defaultValue:e,defaultLanguage:r,defaultPath:n,value:t,language:a,path:m,theme:E=\"light\",line:g,loading:N=\"Loading...\",options:x={},overrideServices:P={},saveViewState:y=!0,keepCurrentModel:V=!1,width:z=\"100%\",height:F=\"100%\",className:j,wrapperProps:A={},beforeMount:q=D,onMount:M=D,onChange:O,onValidate:T=D}){let[s,u]=ue(!1),[c,w]=ue(!0),d=C(null),o=C(null),b=C(null),L=C(M),U=C(q),I=C(),i=C(t),f=se(m),Q=C(!1),B=C(!1);k(()=>{let p=Ne.init();return p.then(R=>(d.current=R)&&w(!1)).catch(R=>R?.type!==\"cancelation\"&&console.error(\"Monaco initialization: error:\",R)),()=>o.current?pe():p.cancel()}),l(()=>{let p=h(d.current,e||t||\"\",r||a||\"\",m||n||\"\");p!==o.current?.getModel()&&(y&&_.set(f,o.current?.saveViewState()),o.current?.setModel(p),y&&o.current?.restoreViewState(_.get(m)))},[m],s),l(()=>{o.current?.updateOptions(x)},[x],s),l(()=>{!o.current||t===void 0||(o.current.getOption(d.current.editor.EditorOption.readOnly)?o.current.setValue(t):t!==o.current.getValue()&&(B.current=!0,o.current.executeEdits(\"\",[{range:o.current.getModel().getFullModelRange(),text:t,forceMoveMarkers:!0}]),o.current.pushUndoStop(),B.current=!1))},[t],s),l(()=>{let p=o.current?.getModel();p&&a&&d.current?.editor.setModelLanguage(p,a)},[a],s),l(()=>{g!==void 0&&o.current?.revealLine(g)},[g],s),l(()=>{d.current?.editor.setTheme(E)},[E],s);let X=_e(()=>{if(!(!b.current||!d.current)&&!Q.current){U.current(d.current);let p=m||n,R=h(d.current,t||e||\"\",r||a||\"\",p||\"\");o.current=d.current?.editor.create(b.current,{model:R,automaticLayout:!0,...x},P),y&&o.current.restoreViewState(_.get(p)),d.current.editor.setTheme(E),g!==void 0&&o.current.revealLine(g),u(!0),Q.current=!0}},[e,r,n,t,a,m,x,P,y,E,g]);W(()=>{s&&L.current(o.current,d.current)},[s]),W(()=>{!c&&!s&&X()},[c,s,X]),i.current=t,W(()=>{s&&O&&(I.current?.dispose(),I.current=o.current?.onDidChangeModelContent(p=>{B.current||O(o.current.getValue(),p)}))},[s,O]),W(()=>{if(s){let p=d.current.editor.onDidChangeMarkers(R=>{let G=o.current.getModel()?.uri;if(G&&R.find(J=>J.path===G.path)){let J=d.current.editor.getModelMarkers({resource:G});T?.(J)}});return()=>{p?.dispose()}}return()=>{}},[s,T]);function pe(){I.current?.dispose(),V?y&&_.set(m,o.current.saveViewState()):o.current.getModel()?.dispose(),o.current.dispose()}return We.createElement(H,{width:z,height:F,isEditorReady:s,loading:N,_ref:b,className:j,wrapperProps:A})}var fe=Ve;var de=ze(fe);var Ft=de;export{we as DiffEditor,de as Editor,Ft as default,_t as loader,Le as useMonaco};\n//# sourceMappingURL=index.mjs.map"],"names":["le","v","ae","Y","Me","e","me","Z","$","Ee","r","n","t","a","m","E","K","ee","H","ye","Ce","xe","k","he","Re","ge","l","h","De","be","te","Oe","g","N","x","P","y","V","F","j","A","q","O","re","T","u","S","c","w","d","o","b","i","Se","f","I","_b","_a","L","oe","U","ne","_c","_d","ke","ie","Te","He","ve","Ue","se","_","Ve","ue","C","Q","B","p","Ne","R","pe","X","_e","W","G","J","We","fe","de","ze","Ft"],"mappings":"uLAAiP,IAAIA,EAAG,CAAC,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AI,CAACR,GAAA,MAAAA,EAAG,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC,EAAEjC,CAAC,CAAC,EAAE,SAASoC,GAAI,UAACvB,EAAAF,EAAE,UAAF,MAAAE,EAAW,UAAUpB,EAAED,GAAGmC,EAAE,IAAIzD,EAAEoC,EAAE,QAAQ,cAAa,CAAE,GAAEM,EAAAN,EAAE,QAAQ,aAAV,MAAAM,EAAsB,UAAUN,EAAE,QAAQ,QAAO,CAAE,CAAC,OAAOoC,EAAG,cAAcpE,EAAE,CAAC,MAAM,EAAE,OAAOoB,EAAE,cAAc,EAAE,QAAQL,EAAE,KAAKkB,EAAE,UAAUZ,EAAE,aAAaC,CAAC,CAAC,CAAC,CAAC,IAAI+C,GAAGf,GAAOgB,EAAGC,OAAGF,EAAE,EAAMG,GAAGF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@monaco-editor/react/dist/index.mjs"],"sourcesContent":["import _t from\"@monaco-editor/loader\";import{memo as Te}from\"react\";import ke,{useState as re,useRef as S,useCallback as oe,useEffect as ne}from\"react\";import Se from\"@monaco-editor/loader\";import{memo as ye}from\"react\";import K from\"react\";var le={wrapper:{display:\"flex\",position:\"relative\",textAlign:\"initial\"},fullWidth:{width:\"100%\"},hide:{display:\"none\"}},v=le;import me from\"react\";var ae={container:{display:\"flex\",height:\"100%\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"}},Y=ae;function Me({children:e}){return me.createElement(\"div\",{style:Y.container},e)}var Z=Me;var $=Z;function Ee({width:e,height:r,isEditorReady:n,loading:t,_ref:a,className:m,wrapperProps:E}){return K.createElement(\"section\",{style:{...v.wrapper,width:e,height:r},...E},!n&&K.createElement($,null,t),K.createElement(\"div\",{ref:a,style:{...v.fullWidth,...!n&&v.hide},className:m}))}var ee=Ee;var H=ye(ee);import{useEffect as xe}from\"react\";function Ce(e){xe(e,[])}var k=Ce;import{useEffect as ge,useRef as Re}from\"react\";function he(e,r,n=!0){let t=Re(!0);ge(t.current||!n?()=>{t.current=!1}:e,r)}var l=he;function D(){}function h(e,r,n,t){return De(e,t)||be(e,r,n,t)}function De(e,r){return e.editor.getModel(te(e,r))}function be(e,r,n,t){return e.editor.createModel(r,n,t?te(e,t):void 0)}function te(e,r){return e.Uri.parse(r)}function Oe({original:e,modified:r,language:n,originalLanguage:t,modifiedLanguage:a,originalModelPath:m,modifiedModelPath:E,keepCurrentOriginalModel:g=!1,keepCurrentModifiedModel:N=!1,theme:x=\"light\",loading:P=\"Loading...\",options:y={},height:V=\"100%\",width:z=\"100%\",className:F,wrapperProps:j={},beforeMount:A=D,onMount:q=D}){let[M,O]=re(!1),[T,s]=re(!0),u=S(null),c=S(null),w=S(null),d=S(q),o=S(A),b=S(!1);k(()=>{let i=Se.init();return i.then(f=>(c.current=f)&&s(!1)).catch(f=>f?.type!==\"cancelation\"&&console.error(\"Monaco initialization: error:\",f)),()=>u.current?I():i.cancel()}),l(()=>{if(u.current&&c.current){let i=u.current.getOriginalEditor(),f=h(c.current,e||\"\",t||n||\"text\",m||\"\");f!==i.getModel()&&i.setModel(f)}},[m],M),l(()=>{if(u.current&&c.current){let i=u.current.getModifiedEditor(),f=h(c.current,r||\"\",a||n||\"text\",E||\"\");f!==i.getModel()&&i.setModel(f)}},[E],M),l(()=>{let i=u.current.getModifiedEditor();i.getOption(c.current.editor.EditorOption.readOnly)?i.setValue(r||\"\"):r!==i.getValue()&&(i.executeEdits(\"\",[{range:i.getModel().getFullModelRange(),text:r||\"\",forceMoveMarkers:!0}]),i.pushUndoStop())},[r],M),l(()=>{u.current?.getModel()?.original.setValue(e||\"\")},[e],M),l(()=>{let{original:i,modified:f}=u.current.getModel();c.current.editor.setModelLanguage(i,t||n||\"text\"),c.current.editor.setModelLanguage(f,a||n||\"text\")},[n,t,a],M),l(()=>{c.current?.editor.setTheme(x)},[x],M),l(()=>{u.current?.updateOptions(y)},[y],M);let L=oe(()=>{if(!c.current)return;o.current(c.current);let i=h(c.current,e||\"\",t||n||\"text\",m||\"\"),f=h(c.current,r||\"\",a||n||\"text\",E||\"\");u.current?.setModel({original:i,modified:f})},[n,r,a,e,t,m,E]),U=oe(()=>{!b.current&&w.current&&(u.current=c.current.editor.createDiffEditor(w.current,{automaticLayout:!0,...y}),L(),c.current?.editor.setTheme(x),O(!0),b.current=!0)},[y,x,L]);ne(()=>{M&&d.current(u.current,c.current)},[M]),ne(()=>{!T&&!M&&U()},[T,M,U]);function I(){let i=u.current?.getModel();g||i?.original?.dispose(),N||i?.modified?.dispose(),u.current?.dispose()}return ke.createElement(H,{width:z,height:V,isEditorReady:M,loading:P,_ref:w,className:F,wrapperProps:j})}var ie=Oe;var we=Te(ie);import{useState as Ie}from\"react\";import ce from\"@monaco-editor/loader\";function Pe(){let[e,r]=Ie(ce.__getMonacoInstance());return k(()=>{let n;return e||(n=ce.init(),n.then(t=>{r(t)})),()=>n?.cancel()}),e}var Le=Pe;import{memo as ze}from\"react\";import We,{useState as ue,useEffect as W,useRef as C,useCallback as _e}from\"react\";import Ne from\"@monaco-editor/loader\";import{useEffect as Ue,useRef as ve}from\"react\";function He(e){let r=ve();return Ue(()=>{r.current=e},[e]),r.current}var se=He;var _=new Map;function Ve({defaultValue:e,defaultLanguage:r,defaultPath:n,value:t,language:a,path:m,theme:E=\"light\",line:g,loading:N=\"Loading...\",options:x={},overrideServices:P={},saveViewState:y=!0,keepCurrentModel:V=!1,width:z=\"100%\",height:F=\"100%\",className:j,wrapperProps:A={},beforeMount:q=D,onMount:M=D,onChange:O,onValidate:T=D}){let[s,u]=ue(!1),[c,w]=ue(!0),d=C(null),o=C(null),b=C(null),L=C(M),U=C(q),I=C(),i=C(t),f=se(m),Q=C(!1),B=C(!1);k(()=>{let p=Ne.init();return p.then(R=>(d.current=R)&&w(!1)).catch(R=>R?.type!==\"cancelation\"&&console.error(\"Monaco initialization: error:\",R)),()=>o.current?pe():p.cancel()}),l(()=>{let p=h(d.current,e||t||\"\",r||a||\"\",m||n||\"\");p!==o.current?.getModel()&&(y&&_.set(f,o.current?.saveViewState()),o.current?.setModel(p),y&&o.current?.restoreViewState(_.get(m)))},[m],s),l(()=>{o.current?.updateOptions(x)},[x],s),l(()=>{!o.current||t===void 0||(o.current.getOption(d.current.editor.EditorOption.readOnly)?o.current.setValue(t):t!==o.current.getValue()&&(B.current=!0,o.current.executeEdits(\"\",[{range:o.current.getModel().getFullModelRange(),text:t,forceMoveMarkers:!0}]),o.current.pushUndoStop(),B.current=!1))},[t],s),l(()=>{let p=o.current?.getModel();p&&a&&d.current?.editor.setModelLanguage(p,a)},[a],s),l(()=>{g!==void 0&&o.current?.revealLine(g)},[g],s),l(()=>{d.current?.editor.setTheme(E)},[E],s);let X=_e(()=>{if(!(!b.current||!d.current)&&!Q.current){U.current(d.current);let p=m||n,R=h(d.current,t||e||\"\",r||a||\"\",p||\"\");o.current=d.current?.editor.create(b.current,{model:R,automaticLayout:!0,...x},P),y&&o.current.restoreViewState(_.get(p)),d.current.editor.setTheme(E),g!==void 0&&o.current.revealLine(g),u(!0),Q.current=!0}},[e,r,n,t,a,m,x,P,y,E,g]);W(()=>{s&&L.current(o.current,d.current)},[s]),W(()=>{!c&&!s&&X()},[c,s,X]),i.current=t,W(()=>{s&&O&&(I.current?.dispose(),I.current=o.current?.onDidChangeModelContent(p=>{B.current||O(o.current.getValue(),p)}))},[s,O]),W(()=>{if(s){let p=d.current.editor.onDidChangeMarkers(R=>{let G=o.current.getModel()?.uri;if(G&&R.find(J=>J.path===G.path)){let J=d.current.editor.getModelMarkers({resource:G});T?.(J)}});return()=>{p?.dispose()}}return()=>{}},[s,T]);function pe(){I.current?.dispose(),V?y&&_.set(m,o.current.saveViewState()):o.current.getModel()?.dispose(),o.current.dispose()}return We.createElement(H,{width:z,height:F,isEditorReady:s,loading:N,_ref:b,className:j,wrapperProps:A})}var fe=Ve;var de=ze(fe);var Ft=de;export{we as DiffEditor,de as Editor,Ft as default,_t as loader,Le as useMonaco};\n//# sourceMappingURL=index.mjs.map"],"names":["le","v","ae","Y","Me","e","me","Z","$","Ee","r","n","t","a","m","E","K","ee","H","ye","Ce","xe","k","he","Re","ge","l","h","De","be","te","Oe","g","N","x","P","y","V","z","F","j","A","q","O","re","T","u","S","c","w","d","o","b","i","Se","f","I","_b","_a","L","oe","U","ne","_c","_d","ke","ie","Te","He","ve","Ue","se","_","Ve","ue","C","Q","B","p","Ne","R","pe","X","_e","W","G","J","We","fe","de","ze","Ft"],"mappings":"uLAAiP,IAAIA,EAAG,CAAC,QAAQ,CAAC,QAAQ,OAAO,SAAS,WAAW,UAAU,SAAS,EAAE,UAAU,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC,QAAQ,MAAM,CAAC,EAAEC,EAAED,EAA6BE,GAAG,CAAC,UAAU,CAAC,QAAQ,OAAO,OAAO,OAAO,MAAM,OAAO,eAAe,SAAS,WAAW,QAAQ,CAAC,EAAEC,GAAED,GAAG,SAASE,GAAG,CAAC,SAASC,CAAC,EAAE,CAAC,OAAOC,EAAG,cAAc,MAAM,CAAC,MAAMH,GAAE,SAAS,EAAEE,CAAC,CAAC,CAAC,IAAIE,GAAEH,GAAOI,GAAED,GAAE,SAASE,GAAG,CAAC,MAAMJ,EAAE,OAAOK,EAAE,cAAcC,EAAE,QAAQC,EAAE,KAAKC,EAAE,UAAUC,EAAE,aAAaC,CAAC,EAAE,CAAC,OAAOC,EAAE,cAAc,UAAU,CAAC,MAAM,CAAC,GAAGf,EAAE,QAAQ,MAAMI,EAAE,OAAOK,CAAC,EAAE,GAAGK,CAAC,EAAE,CAACJ,GAAGK,EAAE,cAAcR,GAAE,KAAKI,CAAC,EAAEI,EAAE,cAAc,MAAM,CAAC,IAAIH,EAAE,MAAM,CAAC,GAAGZ,EAAE,UAAU,GAAG,CAACU,GAAGV,EAAE,IAAI,EAAE,UAAUa,CAAC,CAAC,CAAC,CAAC,CAAC,IAAIG,GAAGR,GAAOS,EAAEC,EAAAA,KAAGF,EAAE,EAAqC,S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E,CAAC,IAAIN,EAAE5B,EAAE,QAAQ,OAAO,mBAAmB8B,GAAG,OAAC,IAAIK,GAAE3B,EAAAP,EAAE,QAAQ,aAAV,YAAAO,EAAsB,IAAI,GAAG2B,GAAGL,EAAE,KAAKM,GAAGA,EAAE,OAAOD,EAAE,IAAI,EAAE,CAAC,IAAIC,EAAEpC,EAAE,QAAQ,OAAO,gBAAgB,CAAC,SAASmC,CAAC,CAAC,EAAExC,GAAA,MAAAA,EAAIyC,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,CAACR,GAAA,MAAAA,EAAG,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC,EAAEjC,CAAC,CAAC,EAAE,SAASoC,GAAI,UAACvB,EAAAF,EAAE,UAAF,MAAAE,EAAW,UAAUrB,EAAED,GAAGoC,EAAE,IAAI1D,EAAEqC,EAAE,QAAQ,cAAa,CAAE,GAAEM,EAAAN,EAAE,QAAQ,aAAV,MAAAM,EAAsB,UAAUN,EAAE,QAAQ,QAAO,CAAE,CAAC,OAAOoC,EAAG,cAAcrE,EAAE,CAAC,MAAMoB,EAAE,OAAOC,EAAE,cAAc,EAAE,QAAQN,EAAE,KAAKmB,EAAE,UAAUZ,EAAE,aAAaC,CAAC,CAAC,CAAC,CAAC,IAAI+C,GAAGf,GAAOgB,EAAGC,OAAGF,EAAE,EAAMG,GAAGF","x_google_ignoreList":[0]}
@@ -1,12 +1,12 @@
1
1
  import K from "../../loader/lib/es/loader/index.js";
2
- import b, { memo as q, useState as R, useRef as s, useCallback as Z, useEffect as V } from "react";
3
- var ne = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, Y = ne, ie = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, ue = ie;
2
+ import b, { memo as q, useState as j, useRef as s, useCallback as $, useEffect as V } from "react";
3
+ var ne = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, Z = ne, ie = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, ue = ie;
4
4
  function oe({ children: r }) {
5
5
  return b.createElement("div", { style: ue.container }, r);
6
6
  }
7
7
  var ae = oe, le = ae;
8
8
  function ce({ width: r, height: u, isEditorReady: l, loading: n, _ref: p, className: h, wrapperProps: w }) {
9
- return b.createElement("section", { style: { ...Y.wrapper, width: r, height: u }, ...w }, !l && b.createElement(le, null, n), b.createElement("div", { ref: p, style: { ...Y.fullWidth, ...!l && Y.hide }, className: h }));
9
+ return b.createElement("section", { style: { ...Z.wrapper, width: r, height: u }, ...w }, !l && b.createElement(le, null, n), b.createElement("div", { ref: p, style: { ...Z.fullWidth, ...!l && Z.hide }, className: h }));
10
10
  }
11
11
  var de = ce, T = q(de);
12
12
  function se(r) {
@@ -34,8 +34,8 @@ function pe(r, u, l, n) {
34
34
  function re(r, u) {
35
35
  return r.Uri.parse(u);
36
36
  }
37
- function he({ original: r, modified: u, language: l, originalLanguage: n, modifiedLanguage: p, originalModelPath: h, modifiedModelPath: w, keepCurrentOriginalModel: C = !1, keepCurrentModifiedModel: W = !1, theme: L = "light", loading: $ = "Loading...", options: E = {}, height: j = "100%", width: A = "100%", className: G, wrapperProps: J = {}, beforeMount: Q = I, onMount: X = I }) {
38
- let [M, N] = R(!1), [k, d] = R(!0), g = s(null), c = s(null), D = s(null), f = s(X), i = s(Q), y = s(!1);
37
+ function he({ original: r, modified: u, language: l, originalLanguage: n, modifiedLanguage: p, originalModelPath: h, modifiedModelPath: w, keepCurrentOriginalModel: C = !1, keepCurrentModifiedModel: A = !1, theme: L = "light", loading: R = "Loading...", options: E = {}, height: B = "100%", width: G = "100%", className: J, wrapperProps: Q = {}, beforeMount: X = I, onMount: Y = I }) {
38
+ let [M, N] = j(!1), [k, d] = j(!0), g = s(null), c = s(null), D = s(null), f = s(Y), i = s(X), y = s(!1);
39
39
  ee(() => {
40
40
  let e = K.init();
41
41
  return e.then((o) => (c.current = o) && d(!1)).catch((o) => (o == null ? void 0 : o.type) !== "cancelation" && console.error("Monaco initialization: error:", o)), () => g.current ? U() : e.cancel();
@@ -65,27 +65,27 @@ function he({ original: r, modified: u, language: l, originalLanguage: n, modifi
65
65
  var e;
66
66
  (e = g.current) == null || e.updateOptions(E);
67
67
  }, [E], M);
68
- let z = Z(() => {
68
+ let z = $(() => {
69
69
  var O;
70
70
  if (!c.current) return;
71
71
  i.current(c.current);
72
72
  let e = P(c.current, r || "", n || l || "text", h || ""), o = P(c.current, u || "", p || l || "text", w || "");
73
73
  (O = g.current) == null || O.setModel({ original: e, modified: o });
74
- }, [l, u, p, r, n, h, w]), B = Z(() => {
74
+ }, [l, u, p, r, n, h, w]), H = $(() => {
75
75
  var e;
76
76
  !y.current && D.current && (g.current = c.current.editor.createDiffEditor(D.current, { automaticLayout: !0, ...E }), z(), (e = c.current) == null || e.editor.setTheme(L), N(!0), y.current = !0);
77
77
  }, [E, L, z]);
78
78
  V(() => {
79
79
  M && f.current(g.current, c.current);
80
80
  }, [M]), V(() => {
81
- !k && !M && B();
82
- }, [k, M, B]);
81
+ !k && !M && H();
82
+ }, [k, M, H]);
83
83
  function U() {
84
84
  var o, O, S, _;
85
85
  let e = (o = g.current) == null ? void 0 : o.getModel();
86
- C || ((O = e == null ? void 0 : e.original) == null || O.dispose()), W || ((S = e == null ? void 0 : e.modified) == null || S.dispose()), (_ = g.current) == null || _.dispose();
86
+ C || ((O = e == null ? void 0 : e.original) == null || O.dispose()), A || ((S = e == null ? void 0 : e.modified) == null || S.dispose()), (_ = g.current) == null || _.dispose();
87
87
  }
88
- return b.createElement(T, { width: A, height: j, isEditorReady: M, loading: $, _ref: D, className: G, wrapperProps: J });
88
+ return b.createElement(T, { width: G, height: B, isEditorReady: M, loading: R, _ref: D, className: J, wrapperProps: Q });
89
89
  }
90
90
  var Me = he;
91
91
  q(Me);
@@ -95,16 +95,16 @@ function ve(r) {
95
95
  u.current = r;
96
96
  }, [r]), u.current;
97
97
  }
98
- var me = ve, H = /* @__PURE__ */ new Map();
99
- function we({ defaultValue: r, defaultLanguage: u, defaultPath: l, value: n, language: p, path: h, theme: w = "light", line: C, loading: W = "Loading...", options: L = {}, overrideServices: $ = {}, saveViewState: E = !0, keepCurrentModel: j = !1, width: A = "100%", height: G = "100%", className: J, wrapperProps: Q = {}, beforeMount: X = I, onMount: M = I, onChange: N, onValidate: k = I }) {
100
- let [d, g] = R(!1), [c, D] = R(!0), f = s(null), i = s(null), y = s(null), z = s(M), B = s(X), U = s(), e = s(n), o = me(h), O = s(!1), S = s(!1);
98
+ var me = ve, W = /* @__PURE__ */ new Map();
99
+ function we({ defaultValue: r, defaultLanguage: u, defaultPath: l, value: n, language: p, path: h, theme: w = "light", line: C, loading: A = "Loading...", options: L = {}, overrideServices: R = {}, saveViewState: E = !0, keepCurrentModel: B = !1, width: G = "100%", height: J = "100%", className: Q, wrapperProps: X = {}, beforeMount: Y = I, onMount: M = I, onChange: N, onValidate: k = I }) {
100
+ let [d, g] = j(!1), [c, D] = j(!0), f = s(null), i = s(null), y = s(null), z = s(M), H = s(Y), U = s(), e = s(n), o = me(h), O = s(!1), S = s(!1);
101
101
  ee(() => {
102
102
  let t = K.init();
103
103
  return t.then((a) => (f.current = a) && D(!1)).catch((a) => (a == null ? void 0 : a.type) !== "cancelation" && console.error("Monaco initialization: error:", a)), () => i.current ? te() : t.cancel();
104
104
  }), m(() => {
105
105
  var a, v, F, x;
106
106
  let t = P(f.current, r || n || "", u || p || "", h || l || "");
107
- t !== ((a = i.current) == null ? void 0 : a.getModel()) && (E && H.set(o, (v = i.current) == null ? void 0 : v.saveViewState()), (F = i.current) == null || F.setModel(t), E && ((x = i.current) == null || x.restoreViewState(H.get(h))));
107
+ t !== ((a = i.current) == null ? void 0 : a.getModel()) && (E && W.set(o, (v = i.current) == null ? void 0 : v.saveViewState()), (F = i.current) == null || F.setModel(t), E && ((x = i.current) == null || x.restoreViewState(W.get(h))));
108
108
  }, [h], d), m(() => {
109
109
  var t;
110
110
  (t = i.current) == null || t.updateOptions(L);
@@ -121,14 +121,14 @@ function we({ defaultValue: r, defaultLanguage: u, defaultPath: l, value: n, lan
121
121
  var t;
122
122
  (t = f.current) == null || t.editor.setTheme(w);
123
123
  }, [w], d);
124
- let _ = Z(() => {
124
+ let _ = $(() => {
125
125
  var t;
126
126
  if (!(!y.current || !f.current) && !O.current) {
127
- B.current(f.current);
127
+ H.current(f.current);
128
128
  let a = h || l, v = P(f.current, n || r || "", u || p || "", a || "");
129
- i.current = (t = f.current) == null ? void 0 : t.editor.create(y.current, { model: v, automaticLayout: !0, ...L }, $), E && i.current.restoreViewState(H.get(a)), f.current.editor.setTheme(w), C !== void 0 && i.current.revealLine(C), g(!0), O.current = !0;
129
+ i.current = (t = f.current) == null ? void 0 : t.editor.create(y.current, { model: v, automaticLayout: !0, ...L }, R), E && i.current.restoreViewState(W.get(a)), f.current.editor.setTheme(w), C !== void 0 && i.current.revealLine(C), g(!0), O.current = !0;
130
130
  }
131
- }, [r, u, l, n, p, h, L, $, E, w, C]);
131
+ }, [r, u, l, n, p, h, L, R, E, w, C]);
132
132
  V(() => {
133
133
  d && z.current(i.current, f.current);
134
134
  }, [d]), V(() => {
@@ -157,9 +157,9 @@ function we({ defaultValue: r, defaultLanguage: u, defaultPath: l, value: n, lan
157
157
  }, [d, k]);
158
158
  function te() {
159
159
  var t, a;
160
- (t = U.current) == null || t.dispose(), j ? E && H.set(h, i.current.saveViewState()) : (a = i.current.getModel()) == null || a.dispose(), i.current.dispose();
160
+ (t = U.current) == null || t.dispose(), B ? E && W.set(h, i.current.saveViewState()) : (a = i.current.getModel()) == null || a.dispose(), i.current.dispose();
161
161
  }
162
- return b.createElement(T, { width: A, height: G, isEditorReady: d, loading: W, _ref: y, className: J, wrapperProps: Q });
162
+ return b.createElement(T, { width: G, height: J, isEditorReady: d, loading: A, _ref: y, className: Q, wrapperProps: X });
163
163
  }
164
164
  var Ee = we, Le = q(Ee), Oe = Le;
165
165
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./focusSafely.cjs"),$=require("./useFocus.cjs"),d=require("./useKeyboard.cjs"),n=require("../../utils/dist/mergeProps.cjs"),P=require("../../utils/dist/useSyncRef.cjs"),r=require("react");let a=r.createContext(null);function x(e){let t=r.useContext(a)||{};P.useSyncRef(t,e);let{ref:o,...u}=t;return u}function y(e,t){let{focusProps:o}=$.useFocus(e),{keyboardProps:u}=d.useKeyboard(e),f=n.mergeProps(o,u),l=x(t),i=e.isDisabled?{}:l,s=r.useRef(e.autoFocus);r.useEffect(()=>{s.current&&t.current&&b.focusSafely(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:n.mergeProps({...f,tabIndex:c},i)}}exports.FocusableContext=a;exports.useFocusable=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./focusSafely.cjs"),d=require("./useFocus.cjs"),P=require("./useKeyboard.cjs"),n=require("../../utils/dist/mergeProps.cjs"),x=require("../../utils/dist/useSyncRef.cjs"),r=require("react");let a=r.createContext(null);function y(e){let t=r.useContext(a)||{};x.useSyncRef(t,e);let{ref:o,...u}=t;return u}function $(e,t){let{focusProps:o}=d.useFocus(e),{keyboardProps:u}=P.useKeyboard(e),f=n.mergeProps(o,u),l=y(t),i=e.isDisabled?{}:l,s=r.useRef(e.autoFocus);r.useEffect(()=>{s.current&&t.current&&b.focusSafely(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:n.mergeProps({...f,tabIndex:c},i)}}exports.FocusableContext=a;exports.useFocusable=$;
2
2
  //# sourceMappingURL=useFocusable.cjs.map
@@ -1,4 +1,4 @@
1
- import { focusSafely as b } from "./focusSafely.js";
1
+ import { focusSafely as $ } from "./focusSafely.js";
2
2
  import { useFocus as d } from "./useFocus.js";
3
3
  import { useKeyboard as n } from "./useKeyboard.js";
4
4
  import { mergeProps as c } from "../../utils/dist/mergeProps.js";
@@ -12,9 +12,9 @@ function P(e) {
12
12
  return r;
13
13
  }
14
14
  function h(e, t) {
15
- let { focusProps: o } = d(e), { keyboardProps: r } = n(e), s = c(o, r), u = P(t), $ = e.isDisabled ? {} : u, f = x(e.autoFocus);
15
+ let { focusProps: o } = d(e), { keyboardProps: r } = n(e), s = c(o, r), u = P(t), b = e.isDisabled ? {} : u, f = x(e.autoFocus);
16
16
  m(() => {
17
- f.current && t.current && b(t.current), f.current = !1;
17
+ f.current && t.current && $(t.current), f.current = !1;
18
18
  }, [
19
19
  t
20
20
  ]);
@@ -23,7 +23,7 @@ function h(e, t) {
23
23
  focusableProps: c({
24
24
  ...s,
25
25
  tabIndex: a
26
- }, $)
26
+ }, b)
27
27
  };
28
28
  }
29
29
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"SSRProvider.js","sources":["../../../../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs"],"sourcesContent":["import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n"],"names":["$b5e257d569688ac6$var$defaultContext","$b5e257d569688ac6$var$SSRContext","$670gB$react","$b5e257d569688ac6$var$IsSSRContext","$b5e257d569688ac6$var$componentIds","$b5e257d569688ac6$var$useCounter","isDisabled","ctx","$670gB$useContext","ref","$670gB$useRef","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","currentOwner","prevComponentValue","$b5e257d569688ac6$var$useLegacySSRSafeId","defaultId","counter","prefix","$b5e257d569688ac6$var$useModernSSRSafeId","id","didSSR","$670gB$useState","$b5e257d569688ac6$export$535bd6ca7f90a273","$b5e257d569688ac6$export$619500959fc48b26","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange"],"mappings":";AAqBA,MAAMA,IAAuC;AAAA,EACzC,QAAQ,OAAO,KAAK,MAAM,KAAK,OAAA,IAAW,IAAW,CAAC;AAAA,EACtD,SAAS;AACb,GACMC,IAAqD,gBAAAC,EAAc,cAAcF,CAAoC,GACrHG,IAAuD,gBAAAD,EAAc,cAAc,EAAK;AAyC9F,IAAIE,wBAAyC,QAAA;AAC7C,SAASC,EAAiCC,IAAa,IAAO;AAC1D,MAAIC,IAAUC,EAAmBP,CAAgC,GAC7DQ,IAAUC,EAAe,IAAI;AAEjC,MAAID,EAAI,YAAY,QAAQ,CAACH,GAAY;AACrC,QAAIK,GAA6EC;AAWjF,QAAIC,KAAgBD,IAAgEV,EAAc,wDAAwD,QAAQU,MAA8D,WAAmBD,IAA8EC,EAA0D,uBAAuB,QAAQD,MAAgF,SAAjQ,SAAmRA,EAA4E;AACxkB,QAAIE,GAAc;AACd,UAAIC,IAAqBV,EAAmC,IAAIS,CAAY;AAC5E,MAAIC,KAAsB,OAC1BV,EAAmC,IAAIS,GAAc;AAAA,QACjD,IAAIN,EAAI;AAAA,QACR,OAAOM,EAAa;AAAA,MAAA,CACvB,IACQA,EAAa,kBAAkBC,EAAmB,UAIvDP,EAAI,UAAUO,EAAmB,IACjCV,EAAmC,OAAOS,CAAY;AAAA,IAE9D;AAEA,IAAAJ,EAAI,UAAU,EAAEF,EAAI;AAAA,EACxB;AAEA,SAAOE,EAAI;AACf;AACA,SAASM,EAAyCC,GAAW;AACzD,MAAIT,IAAUC,EAAmBP,CAAgC,GAI7DgB,IAAUZ,EAAiC,CAAC,CAACW,CAAS,GACtDE,IAA0G,aAAaX,EAAI,MAAM;AACrI,SAAOS,KAAa,GAAGE,CAAM,IAAID,CAAO;AAC5C;AACA,SAASE,EAAyCH,GAAW;AACzD,MAAII,IAASlB,EAAc,MAAA,GACvB,CAACmB,CAAM,IAAQC,EAAiBC,GAA2C,GAC3EL,IAASG,IAA4C,eAAe,aAAarB,EAAqC,MAAM;AAChI,SAAOgB,KAAa,GAAGE,CAAM,IAAIE,CAAE;AACvC;AACA,MAAMI,IAA4C,OAAWtB,EAAc,SAAa,aAAaiB,IAA2CJ;AAChJ,SAASU,IAAoC;AACzC,SAAO;AACX;AACA,SAASC,IAA0C;AAC/C,SAAO;AACX;AAEA,SAASC,EAAgCC,GAAe;AAEpD,SAAO,MAAI;AAAA,EAAC;AAChB;AACA,SAASL,IAA4C;AAEjD,SAAI,OAAWrB,EAAc,wBAA4B,aAAuBA,EAAc,qBAAwByB,GAAiCF,GAAmCC,CAAuC,IAEtNlB,EAAmBL,CAAkC;AACpE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"SSRProvider.js","sources":["../../../../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs"],"sourcesContent":["import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n"],"names":["$b5e257d569688ac6$var$defaultContext","$b5e257d569688ac6$var$SSRContext","$670gB$react","$b5e257d569688ac6$var$IsSSRContext","$b5e257d569688ac6$var$componentIds","$b5e257d569688ac6$var$useCounter","isDisabled","ctx","$670gB$useContext","ref","$670gB$useRef","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","currentOwner","prevComponentValue","$b5e257d569688ac6$var$useLegacySSRSafeId","defaultId","counter","prefix","$b5e257d569688ac6$var$useModernSSRSafeId","id","didSSR","$670gB$useState","$b5e257d569688ac6$export$535bd6ca7f90a273","$b5e257d569688ac6$export$619500959fc48b26","$b5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,IAAQC,EAAiBC,GAA2C,GAC3EL,IAASG,IAA4C,eAAe,aAAarB,EAAqC,MAAM;AAChI,SAAOgB,KAAa,GAAGE,CAAM,IAAIE,CAAE;AACvC;AACA,MAAMI,IAA4C,OAAWtB,EAAc,SAAa,aAAaiB,IAA2CJ;AAChJ,SAASU,IAAoC;AACzC,SAAO;AACX;AACA,SAASC,IAA0C;AAC/C,SAAO;AACX;AAEA,SAASC,EAAgCC,GAAe;AAEpD,SAAO,MAAI;AAAA,EAAC;AAChB;AACA,SAASL,IAA4C;AAEjD,SAAI,OAAWrB,EAAc,wBAA4B,aAAuBA,EAAc,qBAAwByB,GAAiCF,GAAmCC,CAAuC,IAEtNlB,EAAmBL,CAAkC;AACpE;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function C(r,b,o){let[p,u]=l.useState(r||b),f=l.useRef(r!==void 0),e=r!==void 0;l.useEffect(()=>{f.current,f.current=e},[e]);let t=e?r:p,S=l.useCallback((i,...s)=>{let a=(n,...c)=>{o&&(Object.is(t,n)||o(n,...c)),e||(t=n)};typeof i=="function"?u((c,...$)=>{let d=i(e?t:c,...$);return a(d,...s),e?c:d}):(e||u(i),a(i,...s))},[e,t,o]);return[t,S]}exports.useControlledState=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function V(r,b,o){let[p,u]=l.useState(r||b),f=l.useRef(r!==void 0),e=r!==void 0;l.useEffect(()=>{f.current,f.current=e},[e]);let t=e?r:p,S=l.useCallback((i,...s)=>{let a=(n,...c)=>{o&&(Object.is(t,n)||o(n,...c)),e||(t=n)};typeof i=="function"?u((c,...C)=>{let d=i(e?t:c,...C);return a(d,...s),e?c:d}):(e||u(i),a(i,...s))},[e,t,o]);return[t,S]}exports.useControlledState=V;
2
2
  //# sourceMappingURL=useControlledState.cjs.map