@code0-tech/pictor 0.0.0-mvp.31 → 0.0.0-mvp.32

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 (134) hide show
  1. package/dist/components/avatar/Avatar.js +7 -7
  2. package/dist/components/breadcrumb/Breadcrumb.js +4 -4
  3. package/dist/components/button/Button.js +8 -8
  4. package/dist/components/context-menu/ContextMenu.js +131 -131
  5. package/dist/components/d-flow/DFlow.edges.hook.js +22 -22
  6. package/dist/components/d-flow/DFlow.js +32 -32
  7. package/dist/components/d-flow/DFlow.nodes.hook.js +8 -8
  8. package/dist/components/d-flow-file/DFlowTabDefault.js +16 -16
  9. package/dist/components/d-flow-folder/DFlowFolder.js +13 -13
  10. package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +5 -5
  11. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +13 -13
  12. package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +5 -5
  13. package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +11 -11
  14. package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +7 -7
  15. package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +9 -9
  16. package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +12 -12
  17. package/dist/components/d-flow-input/DFlowInputDataType.js +16 -16
  18. package/dist/components/d-flow-input/DFlowInputNodeBadge.js +8 -8
  19. package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +4 -4
  20. package/dist/components/d-flow-panel/DFlowExport.js +5 -5
  21. package/dist/components/d-flow-panel/DFlowPanelControl.js +4 -4
  22. package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +4 -4
  23. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +7 -7
  24. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +12 -12
  25. package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +5 -5
  26. package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +4 -4
  27. package/dist/components/d-flow-validation/DNodeValidation.hook.js +3 -3
  28. package/dist/components/d-fullscreen/DFullScreen.js +2 -2
  29. package/dist/components/d-member/DNamespaceMemberList.js +5 -5
  30. package/dist/components/d-organization/DOrganizationList.js +7 -7
  31. package/dist/components/d-organization/DOrganizationMenu.js +5 -5
  32. package/dist/components/d-organization/DOrganizatonContent.js +22 -22
  33. package/dist/components/d-project/DNamespaceProjectContent.js +6 -6
  34. package/dist/components/d-project/DNamespaceProjectList.js +5 -5
  35. package/dist/components/d-project/DNamespaceProjectMenu.js +2 -2
  36. package/dist/components/d-role/DNamespaceRolePermissions.js +5 -5
  37. package/dist/components/d-runtime/DRuntimeList.js +7 -7
  38. package/dist/components/d-user/DUser.session.hook.js +2 -2
  39. package/dist/components/d-user/DUserContent.js +13 -13
  40. package/dist/components/d-user/DUserList.js +9 -9
  41. package/dist/components/form/CheckboxInput.js +4 -4
  42. package/dist/components/form/EmailInput.js +9 -9
  43. package/dist/components/form/Input.js +311 -230
  44. package/dist/components/form/Input.utils.js +1 -1
  45. package/dist/components/form/InputContentEditable.hook.d.ts +14 -2
  46. package/dist/components/form/InputContentEditable.hook.js +296 -317
  47. package/dist/components/form/NumberInput.js +9 -9
  48. package/dist/components/form/PasswordInput.js +2 -2
  49. package/dist/components/form/SwitchInput.js +7 -7
  50. package/dist/components/form/TextInput.js +6 -6
  51. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
  52. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
  53. package/dist/utils/objectStore.js +15 -15
  54. package/dist/utils/reactiveArrayService.js +10 -10
  55. package/package.json +18 -18
  56. package/dist/_virtual/_commonjsHelpers.js +0 -6
  57. package/dist/_virtual/index.js +0 -4
  58. package/dist/_virtual/index2.js +0 -4
  59. package/dist/_virtual/react-contenteditable.js +0 -7
  60. package/dist/_virtual/react-contenteditable2.js +0 -4
  61. package/dist/_virtual/react-dom-server-legacy.browser.development.js +0 -4
  62. package/dist/_virtual/react-dom-server-legacy.browser.production.js +0 -4
  63. package/dist/_virtual/react-dom-server.browser.development.js +0 -4
  64. package/dist/_virtual/react-dom-server.browser.production.js +0 -4
  65. package/dist/_virtual/react-is.development.js +0 -4
  66. package/dist/_virtual/react-is.production.min.js +0 -4
  67. package/dist/_virtual/server.browser.js +0 -5
  68. package/dist/_virtual/server.browser2.js +0 -4
  69. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -527
  70. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -402
  71. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -208
  72. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -136
  73. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -130
  74. package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -9
  75. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
  76. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -48
  77. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
  78. package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -53
  79. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +0 -222
  80. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -10
  81. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
  82. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
  83. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
  84. package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -13
  85. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -636
  86. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -219
  87. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
  88. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
  89. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -36
  90. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -183
  91. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -49
  92. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
  93. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -52
  94. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
  95. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
  96. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -27
  97. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  98. package/dist/node_modules/fast-deep-equal/index.js +0 -31
  99. package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -7
  100. package/dist/node_modules/object-assign/index.js +0 -49
  101. package/dist/node_modules/prop-types/checkPropTypes.js +0 -54
  102. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -52
  103. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -329
  104. package/dist/node_modules/prop-types/index.js +0 -17
  105. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -10
  106. package/dist/node_modules/prop-types/lib/has.js +0 -7
  107. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -87
  108. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -70
  109. package/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -10
  110. package/dist/node_modules/react-contenteditable/lib/react-contenteditable.js +0 -132
  111. package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -6235
  112. package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +0 -4096
  113. package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -6753
  114. package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.js +0 -4645
  115. package/dist/node_modules/react-dom/server.browser.js +0 -15
  116. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
  117. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
  118. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
  119. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
  120. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -68
  121. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  122. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  123. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -71
  124. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
  125. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -25
  126. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
  127. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
  128. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -30
  129. package/dist/node_modules/tslib/tslib.es6.js +0 -27
  130. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -6
  131. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -26
  132. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -25
  133. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -18
  134. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -67
@@ -1,219 +0,0 @@
1
- import * as p from "react";
2
- import { useFloating as fe, offset as me, shift as he, flip as ue, size as ge, arrow as we, hide as Pe, limitShift as xe } from "../../../@floating-ui/react-dom/dist/floating-ui.react-dom.js";
3
- import { Root as ye } from "../../react-arrow/dist/index.js";
4
- import { useComposedRefs as I } from "../../react-compose-refs/dist/index.js";
5
- import { createContextScope as Ae } from "../../react-context/dist/index.js";
6
- import { Primitive as Y } from "../../react-primitive/dist/index.js";
7
- import { useCallbackRef as ve } from "../../react-use-callback-ref/dist/index.js";
8
- import { useLayoutEffect as z } from "../../react-use-layout-effect/dist/index.js";
9
- import { useSize as Ce } from "../../react-use-size/dist/index.js";
10
- import { jsx as f } from "react/jsx-runtime";
11
- import { autoUpdate as Se } from "../../../@floating-ui/dom/dist/floating-ui.dom.js";
12
- var R = "Popper", [M, ke] = Ae(R), [Re, X] = M(R), D = (e) => {
13
- const { __scopePopper: i, children: n } = e, [s, a] = p.useState(null);
14
- return /* @__PURE__ */ f(Re, { scope: i, anchor: s, onAnchorChange: a, children: n });
15
- };
16
- D.displayName = R;
17
- var F = "PopperAnchor", k = p.forwardRef(
18
- (e, i) => {
19
- const { __scopePopper: n, virtualRef: s, ...a } = e, t = X(F, n), r = p.useRef(null), u = I(i, r), o = p.useRef(null);
20
- return p.useEffect(() => {
21
- const c = o.current;
22
- o.current = s?.current || r.current, c !== o.current && t.onAnchorChange(o.current);
23
- }), s ? null : /* @__PURE__ */ f(Y.div, { ...a, ref: u });
24
- }
25
- );
26
- k.displayName = F;
27
- var b = "PopperContent", [be, Oe] = M(b), B = p.forwardRef(
28
- (e, i) => {
29
- const {
30
- __scopePopper: n,
31
- side: s = "bottom",
32
- sideOffset: a = 0,
33
- align: t = "center",
34
- alignOffset: r = 0,
35
- arrowPadding: u = 0,
36
- avoidCollisions: o = !0,
37
- collisionBoundary: c = [],
38
- collisionPadding: g = 0,
39
- sticky: m = "partial",
40
- hideWhenDetached: P = !1,
41
- updatePositionStrategy: x = "optimized",
42
- onPlaced: d,
43
- ...l
44
- } = e, Z = X(b, n), [C, U] = p.useState(null), q = I(i, (w) => U(w)), [S, G] = p.useState(null), O = Ce(S), J = O?.width ?? 0, E = O?.height ?? 0, K = s + (t !== "center" ? "-" + t : ""), Q = typeof g == "number" ? g : { top: 0, right: 0, bottom: 0, left: 0, ...g }, N = Array.isArray(c) ? c : [c], V = N.length > 0, y = {
45
- padding: Q,
46
- boundary: N.filter(Ne),
47
- // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
48
- altBoundary: V
49
- }, { refs: ee, floatingStyles: _, placement: te, isPositioned: A, middlewareData: h } = fe({
50
- // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
51
- strategy: "fixed",
52
- placement: K,
53
- whileElementsMounted: (...w) => Se(...w, {
54
- animationFrame: x === "always"
55
- }),
56
- elements: {
57
- reference: Z.anchor
58
- },
59
- middleware: [
60
- me({ mainAxis: a + E, alignmentAxis: r }),
61
- o && he({
62
- mainAxis: !0,
63
- crossAxis: !1,
64
- limiter: m === "partial" ? xe() : void 0,
65
- ...y
66
- }),
67
- o && ue({ ...y }),
68
- ge({
69
- ...y,
70
- apply: ({ elements: w, rects: W, availableWidth: ce, availableHeight: pe }) => {
71
- const { width: le, height: de } = W.reference, v = w.floating.style;
72
- v.setProperty("--radix-popper-available-width", `${ce}px`), v.setProperty("--radix-popper-available-height", `${pe}px`), v.setProperty("--radix-popper-anchor-width", `${le}px`), v.setProperty("--radix-popper-anchor-height", `${de}px`);
73
- }
74
- }),
75
- S && we({ element: S, padding: u }),
76
- _e({ arrowWidth: J, arrowHeight: E }),
77
- P && Pe({ strategy: "referenceHidden", ...y })
78
- ]
79
- }), [$, re] = L(te), H = ve(d);
80
- z(() => {
81
- A && H?.();
82
- }, [A, H]);
83
- const oe = h.arrow?.x, ne = h.arrow?.y, ae = h.arrow?.centerOffset !== 0, [ie, se] = p.useState();
84
- return z(() => {
85
- C && se(window.getComputedStyle(C).zIndex);
86
- }, [C]), /* @__PURE__ */ f(
87
- "div",
88
- {
89
- ref: ee.setFloating,
90
- "data-radix-popper-content-wrapper": "",
91
- style: {
92
- ..._,
93
- transform: A ? _.transform : "translate(0, -200%)",
94
- // keep off the page when measuring
95
- minWidth: "max-content",
96
- zIndex: ie,
97
- "--radix-popper-transform-origin": [
98
- h.transformOrigin?.x,
99
- h.transformOrigin?.y
100
- ].join(" "),
101
- // hide the content if using the hide middleware and should be hidden
102
- // set visibility to hidden and disable pointer events so the UI behaves
103
- // as if the PopperContent isn't there at all
104
- ...h.hide?.referenceHidden && {
105
- visibility: "hidden",
106
- pointerEvents: "none"
107
- }
108
- },
109
- dir: e.dir,
110
- children: /* @__PURE__ */ f(
111
- be,
112
- {
113
- scope: n,
114
- placedSide: $,
115
- onArrowChange: G,
116
- arrowX: oe,
117
- arrowY: ne,
118
- shouldHideArrow: ae,
119
- children: /* @__PURE__ */ f(
120
- Y.div,
121
- {
122
- "data-side": $,
123
- "data-align": re,
124
- ...l,
125
- ref: q,
126
- style: {
127
- ...l.style,
128
- // if the PopperContent hasn't been placed yet (not all measurements done)
129
- // we prevent animations so that users's animation don't kick in too early referring wrong sides
130
- animation: A ? void 0 : "none"
131
- }
132
- }
133
- )
134
- }
135
- )
136
- }
137
- );
138
- }
139
- );
140
- B.displayName = b;
141
- var T = "PopperArrow", Ee = {
142
- top: "bottom",
143
- right: "left",
144
- bottom: "top",
145
- left: "right"
146
- }, j = p.forwardRef(function(i, n) {
147
- const { __scopePopper: s, ...a } = i, t = Oe(T, s), r = Ee[t.placedSide];
148
- return (
149
- // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
150
- // doesn't report size as we'd expect on SVG elements.
151
- // it reports their bounding box which is effectively the largest path inside the SVG.
152
- /* @__PURE__ */ f(
153
- "span",
154
- {
155
- ref: t.onArrowChange,
156
- style: {
157
- position: "absolute",
158
- left: t.arrowX,
159
- top: t.arrowY,
160
- [r]: 0,
161
- transformOrigin: {
162
- top: "",
163
- right: "0 0",
164
- bottom: "center 0",
165
- left: "100% 0"
166
- }[t.placedSide],
167
- transform: {
168
- top: "translateY(100%)",
169
- right: "translateY(50%) rotate(90deg) translateX(-50%)",
170
- bottom: "rotate(180deg)",
171
- left: "translateY(50%) rotate(-90deg) translateX(50%)"
172
- }[t.placedSide],
173
- visibility: t.shouldHideArrow ? "hidden" : void 0
174
- },
175
- children: /* @__PURE__ */ f(
176
- ye,
177
- {
178
- ...a,
179
- ref: n,
180
- style: {
181
- ...a.style,
182
- // ensures the element can be measured correctly (mostly for if SVG)
183
- display: "block"
184
- }
185
- }
186
- )
187
- }
188
- )
189
- );
190
- });
191
- j.displayName = T;
192
- function Ne(e) {
193
- return e !== null;
194
- }
195
- var _e = (e) => ({
196
- name: "transformOrigin",
197
- options: e,
198
- fn(i) {
199
- const { placement: n, rects: s, middlewareData: a } = i, r = a.arrow?.centerOffset !== 0, u = r ? 0 : e.arrowWidth, o = r ? 0 : e.arrowHeight, [c, g] = L(n), m = { start: "0%", center: "50%", end: "100%" }[g], P = (a.arrow?.x ?? 0) + u / 2, x = (a.arrow?.y ?? 0) + o / 2;
200
- let d = "", l = "";
201
- return c === "bottom" ? (d = r ? m : `${P}px`, l = `${-o}px`) : c === "top" ? (d = r ? m : `${P}px`, l = `${s.floating.height + o}px`) : c === "right" ? (d = `${-o}px`, l = r ? m : `${x}px`) : c === "left" && (d = `${s.floating.width + o}px`, l = r ? m : `${x}px`), { data: { x: d, y: l } };
202
- }
203
- });
204
- function L(e) {
205
- const [i, n = "center"] = e.split("-");
206
- return [i, n];
207
- }
208
- var Be = D, Te = k, je = B, Le = j;
209
- export {
210
- Te as Anchor,
211
- Le as Arrow,
212
- je as Content,
213
- D as Popper,
214
- k as PopperAnchor,
215
- j as PopperArrow,
216
- B as PopperContent,
217
- Be as Root,
218
- ke as createPopperScope
219
- };
@@ -1,15 +0,0 @@
1
- import * as t from "react";
2
- import n from "react-dom";
3
- import { Primitive as s } from "../../react-primitive/dist/index.js";
4
- import { useLayoutEffect as u } from "../../react-use-layout-effect/dist/index.js";
5
- import { jsx as c } from "react/jsx-runtime";
6
- var l = "Portal", p = t.forwardRef((o, e) => {
7
- const { container: a, ...i } = o, [f, m] = t.useState(!1);
8
- u(() => m(!0), []);
9
- const r = a || f && globalThis?.document?.body;
10
- return r ? n.createPortal(/* @__PURE__ */ c(s.div, { ...i, ref: e }), r) : null;
11
- });
12
- p.displayName = l;
13
- export {
14
- p as Portal
15
- };
@@ -1,70 +0,0 @@
1
- import * as i from "react";
2
- import { useComposedRefs as O } from "../../react-compose-refs/dist/index.js";
3
- import { useLayoutEffect as A } from "../../react-use-layout-effect/dist/index.js";
4
- function E(n, e) {
5
- return i.useReducer((t, r) => e[t][r] ?? t, n);
6
- }
7
- var T = (n) => {
8
- const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
9
- return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
10
- };
11
- T.displayName = "Presence";
12
- function R(n) {
13
- const [e, t] = i.useState(), r = i.useRef(null), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
- mounted: {
15
- UNMOUNT: "unmounted",
16
- ANIMATION_OUT: "unmountSuspended"
17
- },
18
- unmountSuspended: {
19
- MOUNT: "mounted",
20
- ANIMATION_END: "unmounted"
21
- },
22
- unmounted: {
23
- MOUNT: "mounted"
24
- }
25
- });
26
- return i.useEffect(() => {
27
- const o = l(r.current);
28
- c.current = N === "mounted" ? o : "none";
29
- }, [N]), A(() => {
30
- const o = r.current, m = a.current;
31
- if (m !== n) {
32
- const f = c.current, u = l(o);
33
- n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
34
- }
35
- }, [n, s]), A(() => {
36
- if (e) {
37
- let o;
38
- const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
- const g = l(r.current).includes(CSS.escape(u.animationName));
40
- if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
41
- const y = e.style.animationFillMode;
42
- e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
44
- });
45
- }
46
- }, f = (u) => {
47
- u.target === e && (c.current = l(r.current));
48
- };
49
- return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
- m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
- };
52
- } else
53
- s("ANIMATION_END");
54
- }, [e, s]), {
55
- isPresent: ["mounted", "unmountSuspended"].includes(N),
56
- ref: i.useCallback((o) => {
57
- r.current = o ? getComputedStyle(o) : null, t(o);
58
- }, [])
59
- };
60
- }
61
- function l(n) {
62
- return n?.animationName || "none";
63
- }
64
- function v(n) {
65
- let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
66
- return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
67
- }
68
- export {
69
- T as Presence
70
- };
@@ -1,36 +0,0 @@
1
- import * as f from "react";
2
- import * as p from "react-dom";
3
- import { createSlot as c } from "../../react-slot/dist/index.js";
4
- import { jsx as u } from "react/jsx-runtime";
5
- var l = [
6
- "a",
7
- "button",
8
- "div",
9
- "form",
10
- "h2",
11
- "h3",
12
- "img",
13
- "input",
14
- "label",
15
- "li",
16
- "nav",
17
- "ol",
18
- "p",
19
- "select",
20
- "span",
21
- "svg",
22
- "ul"
23
- ], h = l.reduce((r, i) => {
24
- const o = c(`Primitive.${i}`), t = f.forwardRef((e, m) => {
25
- const { asChild: s, ...a } = e, n = s ? o : i;
26
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(n, { ...a, ref: m });
27
- });
28
- return t.displayName = `Primitive.${i}`, { ...r, [i]: t };
29
- }, {});
30
- function w(r, i) {
31
- r && p.flushSync(() => r.dispatchEvent(i));
32
- }
33
- export {
34
- h as Primitive,
35
- w as dispatchDiscreteCustomEvent
36
- };
@@ -1,183 +0,0 @@
1
- import * as c from "react";
2
- import { composeEventHandlers as p } from "../../primitive/dist/index.js";
3
- import { createCollection as V } from "../../react-collection/dist/index.js";
4
- import { useComposedRefs as j } from "../../react-compose-refs/dist/index.js";
5
- import { createContextScope as z } from "../../react-context/dist/index.js";
6
- import { useId as q } from "../../react-id/dist/index.js";
7
- import { Primitive as G } from "../../react-primitive/dist/index.js";
8
- import { useCallbackRef as J } from "../../react-use-callback-ref/dist/index.js";
9
- import { useControllableState as Q } from "../../react-use-controllable-state/dist/index.js";
10
- import { useDirection as W } from "../../react-direction/dist/index.js";
11
- import { jsx as d } from "react/jsx-runtime";
12
- var y = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [D, N, Z] = V(I), [$, Fe] = z(
13
- I,
14
- [Z]
15
- ), [ee, oe] = $(I), O = c.forwardRef(
16
- (e, r) => /* @__PURE__ */ d(D.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(D.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(te, { ...e, ref: r }) }) })
17
- );
18
- O.displayName = I;
19
- var te = c.forwardRef((e, r) => {
20
- const {
21
- __scopeRovingFocusGroup: s,
22
- orientation: o,
23
- loop: T = !1,
24
- dir: w,
25
- currentTabStopId: v,
26
- defaultCurrentTabStopId: C,
27
- onCurrentTabStopIdChange: S,
28
- onEntryFocus: m,
29
- preventScrollOnEntryFocus: u = !1,
30
- ...b
31
- } = e, F = c.useRef(null), g = j(r, F), R = W(w), [E, t] = Q({
32
- prop: v,
33
- defaultProp: C ?? null,
34
- onChange: S,
35
- caller: I
36
- }), [i, h] = c.useState(!1), a = J(m), l = N(s), A = c.useRef(!1), [L, P] = c.useState(0);
37
- return c.useEffect(() => {
38
- const n = F.current;
39
- if (n)
40
- return n.addEventListener(y, a), () => n.removeEventListener(y, a);
41
- }, [a]), /* @__PURE__ */ d(
42
- ee,
43
- {
44
- scope: s,
45
- orientation: o,
46
- dir: R,
47
- loop: T,
48
- currentTabStopId: E,
49
- onItemFocus: c.useCallback(
50
- (n) => t(n),
51
- [t]
52
- ),
53
- onItemShiftTab: c.useCallback(() => h(!0), []),
54
- onFocusableItemAdd: c.useCallback(
55
- () => P((n) => n + 1),
56
- []
57
- ),
58
- onFocusableItemRemove: c.useCallback(
59
- () => P((n) => n - 1),
60
- []
61
- ),
62
- children: /* @__PURE__ */ d(
63
- G.div,
64
- {
65
- tabIndex: i || L === 0 ? -1 : 0,
66
- "data-orientation": o,
67
- ...b,
68
- ref: g,
69
- style: { outline: "none", ...e.style },
70
- onMouseDown: p(e.onMouseDown, () => {
71
- A.current = !0;
72
- }),
73
- onFocus: p(e.onFocus, (n) => {
74
- const U = !A.current;
75
- if (n.target === n.currentTarget && U && !i) {
76
- const x = new CustomEvent(y, X);
77
- if (n.currentTarget.dispatchEvent(x), !x.defaultPrevented) {
78
- const _ = l().filter((f) => f.focusable), B = _.find((f) => f.active), Y = _.find((f) => f.id === E), H = [B, Y, ..._].filter(
79
- Boolean
80
- ).map((f) => f.ref.current);
81
- k(H, u);
82
- }
83
- }
84
- A.current = !1;
85
- }),
86
- onBlur: p(e.onBlur, () => h(!1))
87
- }
88
- )
89
- }
90
- );
91
- }), K = "RovingFocusGroupItem", M = c.forwardRef(
92
- (e, r) => {
93
- const {
94
- __scopeRovingFocusGroup: s,
95
- focusable: o = !0,
96
- active: T = !1,
97
- tabStopId: w,
98
- children: v,
99
- ...C
100
- } = e, S = q(), m = w || S, u = oe(K, s), b = u.currentTabStopId === m, F = N(s), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
101
- return c.useEffect(() => {
102
- if (o)
103
- return g(), () => R();
104
- }, [o, g, R]), /* @__PURE__ */ d(
105
- D.ItemSlot,
106
- {
107
- scope: s,
108
- id: m,
109
- focusable: o,
110
- active: T,
111
- children: /* @__PURE__ */ d(
112
- G.span,
113
- {
114
- tabIndex: b ? 0 : -1,
115
- "data-orientation": u.orientation,
116
- ...C,
117
- ref: r,
118
- onMouseDown: p(e.onMouseDown, (t) => {
119
- o ? u.onItemFocus(m) : t.preventDefault();
120
- }),
121
- onFocus: p(e.onFocus, () => u.onItemFocus(m)),
122
- onKeyDown: p(e.onKeyDown, (t) => {
123
- if (t.key === "Tab" && t.shiftKey) {
124
- u.onItemShiftTab();
125
- return;
126
- }
127
- if (t.target !== t.currentTarget) return;
128
- const i = ce(t, u.orientation, u.dir);
129
- if (i !== void 0) {
130
- if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
131
- t.preventDefault();
132
- let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
133
- if (i === "last") a.reverse();
134
- else if (i === "prev" || i === "next") {
135
- i === "prev" && a.reverse();
136
- const l = a.indexOf(t.currentTarget);
137
- a = u.loop ? se(a, l + 1) : a.slice(l + 1);
138
- }
139
- setTimeout(() => k(a));
140
- }
141
- }),
142
- children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
143
- }
144
- )
145
- }
146
- );
147
- }
148
- );
149
- M.displayName = K;
150
- var re = {
151
- ArrowLeft: "prev",
152
- ArrowUp: "prev",
153
- ArrowRight: "next",
154
- ArrowDown: "next",
155
- PageUp: "first",
156
- Home: "first",
157
- PageDown: "last",
158
- End: "last"
159
- };
160
- function ne(e, r) {
161
- return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
162
- }
163
- function ce(e, r, s) {
164
- const o = ne(e.key, s);
165
- if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
166
- return re[o];
167
- }
168
- function k(e, r = !1) {
169
- const s = document.activeElement;
170
- for (const o of e)
171
- if (o === s || (o.focus({ preventScroll: r }), document.activeElement !== s)) return;
172
- }
173
- function se(e, r) {
174
- return e.map((s, o) => e[(r + o) % e.length]);
175
- }
176
- var ge = O, Re = M;
177
- export {
178
- Re as Item,
179
- ge as Root,
180
- O as RovingFocusGroup,
181
- M as RovingFocusGroupItem,
182
- Fe as createRovingFocusGroupScope
183
- };
@@ -1,49 +0,0 @@
1
- import * as l from "react";
2
- import { composeRefs as m } from "../../react-compose-refs/dist/index.js";
3
- import { jsx as u } from "react/jsx-runtime";
4
- // @__NO_SIDE_EFFECTS__
5
- function b(e) {
6
- const r = /* @__PURE__ */ y(e), t = l.forwardRef((o, n) => {
7
- const { children: i, ...c } = o, s = l.Children.toArray(i), a = s.find(E);
8
- if (a) {
9
- const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
10
- return /* @__PURE__ */ u(r, { ...c, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
11
- }
12
- return /* @__PURE__ */ u(r, { ...c, ref: n, children: i });
13
- });
14
- return t.displayName = `${e}.Slot`, t;
15
- }
16
- // @__NO_SIDE_EFFECTS__
17
- function y(e) {
18
- const r = l.forwardRef((t, o) => {
19
- const { children: n, ...i } = t;
20
- if (l.isValidElement(n)) {
21
- const c = S(n), s = C(i, n.props);
22
- return n.type !== l.Fragment && (s.ref = o ? m(o, c) : c), l.cloneElement(n, s);
23
- }
24
- return l.Children.count(n) > 1 ? l.Children.only(null) : null;
25
- });
26
- return r.displayName = `${e}.SlotClone`, r;
27
- }
28
- var g = Symbol("radix.slottable");
29
- function E(e) {
30
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
31
- }
32
- function C(e, r) {
33
- const t = { ...r };
34
- for (const o in r) {
35
- const n = e[o], i = r[o];
36
- /^on[A-Z]/.test(o) ? n && i ? t[o] = (...s) => {
37
- const a = i(...s);
38
- return n(...s), a;
39
- } : n && (t[o] = n) : o === "style" ? t[o] = { ...n, ...i } : o === "className" && (t[o] = [n, i].filter(Boolean).join(" "));
40
- }
41
- return { ...e, ...t };
42
- }
43
- function S(e) {
44
- let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning;
45
- return t ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
46
- }
47
- export {
48
- b as createSlot
49
- };
@@ -1,10 +0,0 @@
1
- import * as e from "react";
2
- function c(r) {
3
- const t = e.useRef(r);
4
- return e.useEffect(() => {
5
- t.current = r;
6
- }), e.useMemo(() => (...u) => t.current?.(...u), []);
7
- }
8
- export {
9
- c as useCallbackRef
10
- };
@@ -1,52 +0,0 @@
1
- import * as o from "react";
2
- import { useLayoutEffect as m } from "../../react-use-layout-effect/dist/index.js";
3
- var v = o[" useInsertionEffect ".trim().toString()] || m;
4
- function w({
5
- prop: e,
6
- defaultProp: s,
7
- onChange: t = () => {
8
- },
9
- caller: f
10
- }) {
11
- const [u, c, i] = R({
12
- defaultProp: s,
13
- onChange: t
14
- }), n = e !== void 0, a = n ? e : u;
15
- {
16
- const r = o.useRef(e !== void 0);
17
- o.useEffect(() => {
18
- const l = r.current;
19
- l !== n && console.warn(
20
- `${f} is changing from ${l ? "controlled" : "uncontrolled"} to ${n ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
21
- ), r.current = n;
22
- }, [n, f]);
23
- }
24
- const d = o.useCallback(
25
- (r) => {
26
- if (n) {
27
- const l = C(r) ? r(e) : r;
28
- l !== e && i.current?.(l);
29
- } else
30
- c(r);
31
- },
32
- [n, e, c, i]
33
- );
34
- return [a, d];
35
- }
36
- function R({
37
- defaultProp: e,
38
- onChange: s
39
- }) {
40
- const [t, f] = o.useState(e), u = o.useRef(t), c = o.useRef(s);
41
- return v(() => {
42
- c.current = s;
43
- }, [s]), o.useEffect(() => {
44
- u.current !== t && (c.current?.(t), u.current = t);
45
- }, [t, u]), [t, f, c];
46
- }
47
- function C(e) {
48
- return typeof e == "function";
49
- }
50
- export {
51
- w as useControllableState
52
- };
@@ -1,14 +0,0 @@
1
- import * as r from "react";
2
- import { useCallbackRef as s } from "../../react-use-callback-ref/dist/index.js";
3
- function p(n, e = globalThis?.document) {
4
- const t = s(n);
5
- r.useEffect(() => {
6
- const o = (a) => {
7
- a.key === "Escape" && t(a);
8
- };
9
- return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
10
- }, [t, e]);
11
- }
12
- export {
13
- p as useEscapeKeydown
14
- };
@@ -1,6 +0,0 @@
1
- import * as t from "react";
2
- var e = globalThis?.document ? t.useLayoutEffect : () => {
3
- };
4
- export {
5
- e as useLayoutEffect
6
- };