@xyd-js/framework 0.1.0-xyd.19 → 0.1.0-xyd.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.
- package/dist/hydration.d.mts +11 -0
- package/dist/hydration.js +31 -5
- package/dist/hydration.js.map +1 -1
- package/dist/hydration.mjs +245 -0
- package/dist/hydration.mjs.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/dist/react.d.mts +32 -0
- package/dist/react.js +1433 -103
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1938 -0
- package/dist/react.mjs.map +1 -0
- package/dist/sidebar-Dwf54qYp.d.mts +15 -0
- package/package.json +16 -17
- package/packages/hydration/README.md +3 -0
- package/packages/hydration/index.ts +3 -0
- package/packages/hydration/settings-to-props.ts +325 -0
- package/packages/react/README.md +3 -0
- package/packages/react/components/index.tsx +337 -0
- package/packages/react/components/sidebar/index.ts +3 -0
- package/packages/react/components/sidebar/sidebar-group.tsx +240 -0
- package/packages/react/components/sidebar/sidebar.tsx +127 -0
- package/packages/react/contexts/framework.tsx +78 -0
- package/packages/react/contexts/index.ts +2 -0
- package/packages/react/contexts/ui.tsx +6 -0
- package/packages/react/hooks/index.ts +3 -0
- package/packages/react/hooks/useMatchedNav.tsx +29 -0
- package/packages/react/index.ts +12 -0
- package/packages/react/utils/manualHydration.ts +25 -0
- package/packages/theme/context.tsx +19 -0
- package/packages/theme/index.ts +0 -0
- package/postcss.config.cjs +5 -0
- package/src/index.ts +1 -0
- package/src/types.ts +5 -0
- package/tsconfig.json +45 -0
- package/tsup.config.ts +28 -0
package/dist/react.mjs
ADDED
|
@@ -0,0 +1,1938 @@
|
|
|
1
|
+
// packages/react/components/index.tsx
|
|
2
|
+
import React18, { isValidElement as isValidElement2 } from "react";
|
|
3
|
+
import { useLocation as useLocation3 } from "react-router";
|
|
4
|
+
import { Toc, SubNav, UISidebar as UISidebar2 } from "@xyd-js/ui";
|
|
5
|
+
|
|
6
|
+
// ../xyd-components/dist/index-C0sBj-Rt.js
|
|
7
|
+
import e, { useRef as t } from "react";
|
|
8
|
+
var n = "hutvd2b";
|
|
9
|
+
var a = "hg9oorb";
|
|
10
|
+
var r = "h6jev6x";
|
|
11
|
+
var l = "i1uvewli";
|
|
12
|
+
function c(t5) {
|
|
13
|
+
var c2 = t5.children, o3 = t5.size, i3 = void 0 === o3 ? "sm" : o3, s2 = t5.kind, d3 = void 0 === s2 ? "warning" : s2;
|
|
14
|
+
return e.createElement("div", { className: "\n ".concat(n, "\n \n ").concat("sm" === i3 && r, "\n \n ").concat("warning" === d3 && a, "\n ") }, e.createElement("span", { className: l }, c2));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// ../xyd-components/dist/tslib.es6-nZyJ5rcw.js
|
|
18
|
+
function t2(t5, n4) {
|
|
19
|
+
var e3 = {};
|
|
20
|
+
for (var r4 in t5) Object.prototype.hasOwnProperty.call(t5, r4) && n4.indexOf(r4) < 0 && (e3[r4] = t5[r4]);
|
|
21
|
+
if (null != t5 && "function" == typeof Object.getOwnPropertySymbols) {
|
|
22
|
+
var o3 = 0;
|
|
23
|
+
for (r4 = Object.getOwnPropertySymbols(t5); o3 < r4.length; o3++) n4.indexOf(r4[o3]) < 0 && Object.prototype.propertyIsEnumerable.call(t5, r4[o3]) && (e3[r4[o3]] = t5[r4[o3]]);
|
|
24
|
+
}
|
|
25
|
+
return e3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ../xyd-components/dist/writer.js
|
|
29
|
+
import r3, { Fragment as n3 } from "react";
|
|
30
|
+
|
|
31
|
+
// ../../node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
|
|
32
|
+
import { forwardRef, createElement } from "react";
|
|
33
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
34
|
+
if (source == null) return {};
|
|
35
|
+
var target = {};
|
|
36
|
+
var sourceKeys = Object.keys(source);
|
|
37
|
+
var key, i3;
|
|
38
|
+
for (i3 = 0; i3 < sourceKeys.length; i3++) {
|
|
39
|
+
key = sourceKeys[i3];
|
|
40
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
41
|
+
target[key] = source[key];
|
|
42
|
+
}
|
|
43
|
+
return target;
|
|
44
|
+
}
|
|
45
|
+
var _excluded$f = ["color"];
|
|
46
|
+
var ArrowLeftIcon = /* @__PURE__ */ forwardRef(function(_ref, forwardedRef) {
|
|
47
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
48
|
+
return createElement("svg", Object.assign({
|
|
49
|
+
width: "15",
|
|
50
|
+
height: "15",
|
|
51
|
+
viewBox: "0 0 15 15",
|
|
52
|
+
fill: "none",
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
54
|
+
}, props, {
|
|
55
|
+
ref: forwardedRef
|
|
56
|
+
}), createElement("path", {
|
|
57
|
+
d: "M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",
|
|
58
|
+
fill: color,
|
|
59
|
+
fillRule: "evenodd",
|
|
60
|
+
clipRule: "evenodd"
|
|
61
|
+
}));
|
|
62
|
+
});
|
|
63
|
+
var _excluded$g = ["color"];
|
|
64
|
+
var ArrowRightIcon = /* @__PURE__ */ forwardRef(function(_ref, forwardedRef) {
|
|
65
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
66
|
+
return createElement("svg", Object.assign({
|
|
67
|
+
width: "15",
|
|
68
|
+
height: "15",
|
|
69
|
+
viewBox: "0 0 15 15",
|
|
70
|
+
fill: "none",
|
|
71
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
72
|
+
}, props, {
|
|
73
|
+
ref: forwardedRef
|
|
74
|
+
}), createElement("path", {
|
|
75
|
+
d: "M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",
|
|
76
|
+
fill: color,
|
|
77
|
+
fillRule: "evenodd",
|
|
78
|
+
clipRule: "evenodd"
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// ../xyd-components/dist/UnderlineNav-rNUvd4IV.js
|
|
83
|
+
import e2, { useState as t4, useRef as a2, useEffect as n2 } from "react";
|
|
84
|
+
|
|
85
|
+
// ../xyd-components/dist/_rollupPluginBabelHelpers-DOmTa7nq.js
|
|
86
|
+
function t3(t5, r4) {
|
|
87
|
+
(null == r4 || r4 > t5.length) && (r4 = t5.length);
|
|
88
|
+
for (var e3 = 0, n4 = Array(r4); e3 < r4; e3++) n4[e3] = t5[e3];
|
|
89
|
+
return n4;
|
|
90
|
+
}
|
|
91
|
+
function r2(t5) {
|
|
92
|
+
if (Array.isArray(t5)) return t5;
|
|
93
|
+
}
|
|
94
|
+
function u() {
|
|
95
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
96
|
+
}
|
|
97
|
+
function h(t5, e3) {
|
|
98
|
+
return r2(t5) || function(t6, r4) {
|
|
99
|
+
var e4 = null == t6 ? null : "undefined" != typeof Symbol && t6[Symbol.iterator] || t6["@@iterator"];
|
|
100
|
+
if (null != e4) {
|
|
101
|
+
var n4, o3, i3, a3, u4 = [], c2 = true, f2 = false;
|
|
102
|
+
try {
|
|
103
|
+
if (i3 = (e4 = e4.call(t6)).next, 0 === r4) {
|
|
104
|
+
if (Object(e4) !== e4) return;
|
|
105
|
+
c2 = false;
|
|
106
|
+
} else for (; !(c2 = (n4 = i3.call(e4)).done) && (u4.push(n4.value), u4.length !== r4); c2 = true) ;
|
|
107
|
+
} catch (t7) {
|
|
108
|
+
f2 = true, o3 = t7;
|
|
109
|
+
} finally {
|
|
110
|
+
try {
|
|
111
|
+
if (!c2 && null != e4.return && (a3 = e4.return(), Object(a3) !== a3)) return;
|
|
112
|
+
} finally {
|
|
113
|
+
if (f2) throw o3;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return u4;
|
|
117
|
+
}
|
|
118
|
+
}(t5, e3) || d(t5, e3) || u();
|
|
119
|
+
}
|
|
120
|
+
function d(r4, e3) {
|
|
121
|
+
if (r4) {
|
|
122
|
+
if ("string" == typeof r4) return t3(r4, e3);
|
|
123
|
+
var n4 = {}.toString.call(r4).slice(8, -1);
|
|
124
|
+
return "Object" === n4 && r4.constructor && (n4 = r4.constructor.name), "Map" === n4 || "Set" === n4 ? Array.from(r4) : "Arguments" === n4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n4) ? t3(r4, e3) : void 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18.3.18_qsyrobternj736o5ex7scdd3r4/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
129
|
+
import * as React13 from "react";
|
|
130
|
+
|
|
131
|
+
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
132
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
133
|
+
return function handleEvent(event) {
|
|
134
|
+
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
135
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
136
|
+
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
142
|
+
import * as React from "react";
|
|
143
|
+
import { jsx } from "react/jsx-runtime";
|
|
144
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
145
|
+
let defaultContexts = [];
|
|
146
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
147
|
+
const BaseContext = React.createContext(defaultContext);
|
|
148
|
+
const index = defaultContexts.length;
|
|
149
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
150
|
+
const Provider = (props) => {
|
|
151
|
+
var _a;
|
|
152
|
+
const { scope, children, ...context } = props;
|
|
153
|
+
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
154
|
+
const value = React.useMemo(() => context, Object.values(context));
|
|
155
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
156
|
+
};
|
|
157
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
158
|
+
function useContext22(consumerName, scope) {
|
|
159
|
+
var _a;
|
|
160
|
+
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
161
|
+
const context = React.useContext(Context);
|
|
162
|
+
if (context) return context;
|
|
163
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
164
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
165
|
+
}
|
|
166
|
+
return [Provider, useContext22];
|
|
167
|
+
}
|
|
168
|
+
const createScope = () => {
|
|
169
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
170
|
+
return React.createContext(defaultContext);
|
|
171
|
+
});
|
|
172
|
+
return function useScope(scope) {
|
|
173
|
+
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
174
|
+
return React.useMemo(
|
|
175
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
176
|
+
[scope, contexts]
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
createScope.scopeName = scopeName;
|
|
181
|
+
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
182
|
+
}
|
|
183
|
+
function composeContextScopes(...scopes) {
|
|
184
|
+
const baseScope = scopes[0];
|
|
185
|
+
if (scopes.length === 1) return baseScope;
|
|
186
|
+
const createScope = () => {
|
|
187
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
188
|
+
useScope: createScope2(),
|
|
189
|
+
scopeName: createScope2.scopeName
|
|
190
|
+
}));
|
|
191
|
+
return function useComposedScopes(overrideScopes) {
|
|
192
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
193
|
+
const scopeProps = useScope(overrideScopes);
|
|
194
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
195
|
+
return { ...nextScopes2, ...currentScope };
|
|
196
|
+
}, {});
|
|
197
|
+
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
createScope.scopeName = baseScope.scopeName;
|
|
201
|
+
return createScope;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
205
|
+
import * as React11 from "react";
|
|
206
|
+
|
|
207
|
+
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
208
|
+
import React4 from "react";
|
|
209
|
+
|
|
210
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
211
|
+
import * as React2 from "react";
|
|
212
|
+
function setRef(ref, value) {
|
|
213
|
+
if (typeof ref === "function") {
|
|
214
|
+
return ref(value);
|
|
215
|
+
} else if (ref !== null && ref !== void 0) {
|
|
216
|
+
ref.current = value;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function composeRefs(...refs) {
|
|
220
|
+
return (node) => {
|
|
221
|
+
let hasCleanup = false;
|
|
222
|
+
const cleanups = refs.map((ref) => {
|
|
223
|
+
const cleanup = setRef(ref, node);
|
|
224
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
225
|
+
hasCleanup = true;
|
|
226
|
+
}
|
|
227
|
+
return cleanup;
|
|
228
|
+
});
|
|
229
|
+
if (hasCleanup) {
|
|
230
|
+
return () => {
|
|
231
|
+
for (let i3 = 0; i3 < cleanups.length; i3++) {
|
|
232
|
+
const cleanup = cleanups[i3];
|
|
233
|
+
if (typeof cleanup == "function") {
|
|
234
|
+
cleanup();
|
|
235
|
+
} else {
|
|
236
|
+
setRef(refs[i3], null);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function useComposedRefs(...refs) {
|
|
244
|
+
return React2.useCallback(composeRefs(...refs), refs);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
248
|
+
import * as React3 from "react";
|
|
249
|
+
import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
|
|
250
|
+
var Slot = React3.forwardRef((props, forwardedRef) => {
|
|
251
|
+
const { children, ...slotProps } = props;
|
|
252
|
+
const childrenArray = React3.Children.toArray(children);
|
|
253
|
+
const slottable = childrenArray.find(isSlottable);
|
|
254
|
+
if (slottable) {
|
|
255
|
+
const newElement = slottable.props.children;
|
|
256
|
+
const newChildren = childrenArray.map((child) => {
|
|
257
|
+
if (child === slottable) {
|
|
258
|
+
if (React3.Children.count(newElement) > 1) return React3.Children.only(null);
|
|
259
|
+
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
|
260
|
+
} else {
|
|
261
|
+
return child;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
return /* @__PURE__ */ jsx2(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
265
|
+
}
|
|
266
|
+
return /* @__PURE__ */ jsx2(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
267
|
+
});
|
|
268
|
+
Slot.displayName = "Slot";
|
|
269
|
+
var SlotClone = React3.forwardRef((props, forwardedRef) => {
|
|
270
|
+
const { children, ...slotProps } = props;
|
|
271
|
+
if (React3.isValidElement(children)) {
|
|
272
|
+
const childrenRef = getElementRef(children);
|
|
273
|
+
return React3.cloneElement(children, {
|
|
274
|
+
...mergeProps(slotProps, children.props),
|
|
275
|
+
// @ts-ignore
|
|
276
|
+
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
|
280
|
+
});
|
|
281
|
+
SlotClone.displayName = "SlotClone";
|
|
282
|
+
var Slottable = ({ children }) => {
|
|
283
|
+
return /* @__PURE__ */ jsx2(Fragment, { children });
|
|
284
|
+
};
|
|
285
|
+
function isSlottable(child) {
|
|
286
|
+
return React3.isValidElement(child) && child.type === Slottable;
|
|
287
|
+
}
|
|
288
|
+
function mergeProps(slotProps, childProps) {
|
|
289
|
+
const overrideProps = { ...childProps };
|
|
290
|
+
for (const propName in childProps) {
|
|
291
|
+
const slotPropValue = slotProps[propName];
|
|
292
|
+
const childPropValue = childProps[propName];
|
|
293
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
294
|
+
if (isHandler) {
|
|
295
|
+
if (slotPropValue && childPropValue) {
|
|
296
|
+
overrideProps[propName] = (...args) => {
|
|
297
|
+
childPropValue(...args);
|
|
298
|
+
slotPropValue(...args);
|
|
299
|
+
};
|
|
300
|
+
} else if (slotPropValue) {
|
|
301
|
+
overrideProps[propName] = slotPropValue;
|
|
302
|
+
}
|
|
303
|
+
} else if (propName === "style") {
|
|
304
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
305
|
+
} else if (propName === "className") {
|
|
306
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return { ...slotProps, ...overrideProps };
|
|
310
|
+
}
|
|
311
|
+
function getElementRef(element) {
|
|
312
|
+
var _a, _b;
|
|
313
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
314
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
315
|
+
if (mayWarn) {
|
|
316
|
+
return element.ref;
|
|
317
|
+
}
|
|
318
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
319
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
320
|
+
if (mayWarn) {
|
|
321
|
+
return element.props.ref;
|
|
322
|
+
}
|
|
323
|
+
return element.props.ref || element.ref;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
327
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
328
|
+
function createCollection(name) {
|
|
329
|
+
const PROVIDER_NAME = name + "CollectionProvider";
|
|
330
|
+
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
331
|
+
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
332
|
+
PROVIDER_NAME,
|
|
333
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
334
|
+
);
|
|
335
|
+
const CollectionProvider = (props) => {
|
|
336
|
+
const { scope, children } = props;
|
|
337
|
+
const ref = React4.useRef(null);
|
|
338
|
+
const itemMap = React4.useRef(/* @__PURE__ */ new Map()).current;
|
|
339
|
+
return /* @__PURE__ */ jsx3(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
340
|
+
};
|
|
341
|
+
CollectionProvider.displayName = PROVIDER_NAME;
|
|
342
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
343
|
+
const CollectionSlot = React4.forwardRef(
|
|
344
|
+
(props, forwardedRef) => {
|
|
345
|
+
const { scope, children } = props;
|
|
346
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
347
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
348
|
+
return /* @__PURE__ */ jsx3(Slot, { ref: composedRefs, children });
|
|
349
|
+
}
|
|
350
|
+
);
|
|
351
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
352
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
353
|
+
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
354
|
+
const CollectionItemSlot = React4.forwardRef(
|
|
355
|
+
(props, forwardedRef) => {
|
|
356
|
+
const { scope, children, ...itemData } = props;
|
|
357
|
+
const ref = React4.useRef(null);
|
|
358
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
359
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
360
|
+
React4.useEffect(() => {
|
|
361
|
+
context.itemMap.set(ref, { ref, ...itemData });
|
|
362
|
+
return () => void context.itemMap.delete(ref);
|
|
363
|
+
});
|
|
364
|
+
return /* @__PURE__ */ jsx3(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
365
|
+
}
|
|
366
|
+
);
|
|
367
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
368
|
+
function useCollection2(scope) {
|
|
369
|
+
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
370
|
+
const getItems = React4.useCallback(() => {
|
|
371
|
+
const collectionNode = context.collectionRef.current;
|
|
372
|
+
if (!collectionNode) return [];
|
|
373
|
+
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
374
|
+
const items = Array.from(context.itemMap.values());
|
|
375
|
+
const orderedItems = items.sort(
|
|
376
|
+
(a3, b2) => orderedNodes.indexOf(a3.ref.current) - orderedNodes.indexOf(b2.ref.current)
|
|
377
|
+
);
|
|
378
|
+
return orderedItems;
|
|
379
|
+
}, [context.collectionRef, context.itemMap]);
|
|
380
|
+
return getItems;
|
|
381
|
+
}
|
|
382
|
+
return [
|
|
383
|
+
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
384
|
+
useCollection2,
|
|
385
|
+
createCollectionScope2
|
|
386
|
+
];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
390
|
+
import * as React6 from "react";
|
|
391
|
+
|
|
392
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
393
|
+
import * as React5 from "react";
|
|
394
|
+
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React5.useLayoutEffect : () => {
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
398
|
+
var useReactId = React6["useId".toString()] || (() => void 0);
|
|
399
|
+
var count = 0;
|
|
400
|
+
function useId(deterministicId) {
|
|
401
|
+
const [id, setId] = React6.useState(useReactId());
|
|
402
|
+
useLayoutEffect2(() => {
|
|
403
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
404
|
+
}, [deterministicId]);
|
|
405
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.0.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18_sspjpiczol7qxzbuuyfihuep4u/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
409
|
+
import * as React7 from "react";
|
|
410
|
+
import * as ReactDOM from "react-dom";
|
|
411
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
412
|
+
var NODES = [
|
|
413
|
+
"a",
|
|
414
|
+
"button",
|
|
415
|
+
"div",
|
|
416
|
+
"form",
|
|
417
|
+
"h2",
|
|
418
|
+
"h3",
|
|
419
|
+
"img",
|
|
420
|
+
"input",
|
|
421
|
+
"label",
|
|
422
|
+
"li",
|
|
423
|
+
"nav",
|
|
424
|
+
"ol",
|
|
425
|
+
"p",
|
|
426
|
+
"span",
|
|
427
|
+
"svg",
|
|
428
|
+
"ul"
|
|
429
|
+
];
|
|
430
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
431
|
+
const Node = React7.forwardRef((props, forwardedRef) => {
|
|
432
|
+
const { asChild, ...primitiveProps } = props;
|
|
433
|
+
const Comp = asChild ? Slot : node;
|
|
434
|
+
if (typeof window !== "undefined") {
|
|
435
|
+
window[Symbol.for("radix-ui")] = true;
|
|
436
|
+
}
|
|
437
|
+
return /* @__PURE__ */ jsx4(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
438
|
+
});
|
|
439
|
+
Node.displayName = `Primitive.${node}`;
|
|
440
|
+
return { ...primitive, [node]: Node };
|
|
441
|
+
}, {});
|
|
442
|
+
|
|
443
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
444
|
+
import * as React8 from "react";
|
|
445
|
+
function useCallbackRef(callback) {
|
|
446
|
+
const callbackRef = React8.useRef(callback);
|
|
447
|
+
React8.useEffect(() => {
|
|
448
|
+
callbackRef.current = callback;
|
|
449
|
+
});
|
|
450
|
+
return React8.useMemo(() => (...args) => {
|
|
451
|
+
var _a;
|
|
452
|
+
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
453
|
+
}, []);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
457
|
+
import * as React9 from "react";
|
|
458
|
+
function useControllableState({
|
|
459
|
+
prop,
|
|
460
|
+
defaultProp,
|
|
461
|
+
onChange = () => {
|
|
462
|
+
}
|
|
463
|
+
}) {
|
|
464
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
465
|
+
const isControlled = prop !== void 0;
|
|
466
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
467
|
+
const handleChange = useCallbackRef(onChange);
|
|
468
|
+
const setValue = React9.useCallback(
|
|
469
|
+
(nextValue) => {
|
|
470
|
+
if (isControlled) {
|
|
471
|
+
const setter = nextValue;
|
|
472
|
+
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
473
|
+
if (value2 !== prop) handleChange(value2);
|
|
474
|
+
} else {
|
|
475
|
+
setUncontrolledProp(nextValue);
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
479
|
+
);
|
|
480
|
+
return [value, setValue];
|
|
481
|
+
}
|
|
482
|
+
function useUncontrolledState({
|
|
483
|
+
defaultProp,
|
|
484
|
+
onChange
|
|
485
|
+
}) {
|
|
486
|
+
const uncontrolledState = React9.useState(defaultProp);
|
|
487
|
+
const [value] = uncontrolledState;
|
|
488
|
+
const prevValueRef = React9.useRef(value);
|
|
489
|
+
const handleChange = useCallbackRef(onChange);
|
|
490
|
+
React9.useEffect(() => {
|
|
491
|
+
if (prevValueRef.current !== value) {
|
|
492
|
+
handleChange(value);
|
|
493
|
+
prevValueRef.current = value;
|
|
494
|
+
}
|
|
495
|
+
}, [value, prevValueRef, handleChange]);
|
|
496
|
+
return uncontrolledState;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
500
|
+
import * as React10 from "react";
|
|
501
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
502
|
+
var DirectionContext = React10.createContext(void 0);
|
|
503
|
+
function useDirection(localDir) {
|
|
504
|
+
const globalDir = React10.useContext(DirectionContext);
|
|
505
|
+
return localDir || globalDir || "ltr";
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
509
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
510
|
+
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
511
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
512
|
+
var GROUP_NAME = "RovingFocusGroup";
|
|
513
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
514
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
515
|
+
GROUP_NAME,
|
|
516
|
+
[createCollectionScope]
|
|
517
|
+
);
|
|
518
|
+
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
519
|
+
var RovingFocusGroup = React11.forwardRef(
|
|
520
|
+
(props, forwardedRef) => {
|
|
521
|
+
return /* @__PURE__ */ jsx6(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx6(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx6(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
RovingFocusGroup.displayName = GROUP_NAME;
|
|
525
|
+
var RovingFocusGroupImpl = React11.forwardRef((props, forwardedRef) => {
|
|
526
|
+
const {
|
|
527
|
+
__scopeRovingFocusGroup,
|
|
528
|
+
orientation,
|
|
529
|
+
loop = false,
|
|
530
|
+
dir,
|
|
531
|
+
currentTabStopId: currentTabStopIdProp,
|
|
532
|
+
defaultCurrentTabStopId,
|
|
533
|
+
onCurrentTabStopIdChange,
|
|
534
|
+
onEntryFocus,
|
|
535
|
+
preventScrollOnEntryFocus = false,
|
|
536
|
+
...groupProps
|
|
537
|
+
} = props;
|
|
538
|
+
const ref = React11.useRef(null);
|
|
539
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
540
|
+
const direction = useDirection(dir);
|
|
541
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
542
|
+
prop: currentTabStopIdProp,
|
|
543
|
+
defaultProp: defaultCurrentTabStopId,
|
|
544
|
+
onChange: onCurrentTabStopIdChange
|
|
545
|
+
});
|
|
546
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React11.useState(false);
|
|
547
|
+
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
548
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
549
|
+
const isClickFocusRef = React11.useRef(false);
|
|
550
|
+
const [focusableItemsCount, setFocusableItemsCount] = React11.useState(0);
|
|
551
|
+
React11.useEffect(() => {
|
|
552
|
+
const node = ref.current;
|
|
553
|
+
if (node) {
|
|
554
|
+
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
555
|
+
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
556
|
+
}
|
|
557
|
+
}, [handleEntryFocus]);
|
|
558
|
+
return /* @__PURE__ */ jsx6(
|
|
559
|
+
RovingFocusProvider,
|
|
560
|
+
{
|
|
561
|
+
scope: __scopeRovingFocusGroup,
|
|
562
|
+
orientation,
|
|
563
|
+
dir: direction,
|
|
564
|
+
loop,
|
|
565
|
+
currentTabStopId,
|
|
566
|
+
onItemFocus: React11.useCallback(
|
|
567
|
+
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
568
|
+
[setCurrentTabStopId]
|
|
569
|
+
),
|
|
570
|
+
onItemShiftTab: React11.useCallback(() => setIsTabbingBackOut(true), []),
|
|
571
|
+
onFocusableItemAdd: React11.useCallback(
|
|
572
|
+
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
573
|
+
[]
|
|
574
|
+
),
|
|
575
|
+
onFocusableItemRemove: React11.useCallback(
|
|
576
|
+
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
577
|
+
[]
|
|
578
|
+
),
|
|
579
|
+
children: /* @__PURE__ */ jsx6(
|
|
580
|
+
Primitive.div,
|
|
581
|
+
{
|
|
582
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
583
|
+
"data-orientation": orientation,
|
|
584
|
+
...groupProps,
|
|
585
|
+
ref: composedRefs,
|
|
586
|
+
style: { outline: "none", ...props.style },
|
|
587
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
588
|
+
isClickFocusRef.current = true;
|
|
589
|
+
}),
|
|
590
|
+
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
591
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
592
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
593
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
594
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
595
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
596
|
+
const items = getItems().filter((item) => item.focusable);
|
|
597
|
+
const activeItem = items.find((item) => item.active);
|
|
598
|
+
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
599
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(
|
|
600
|
+
Boolean
|
|
601
|
+
);
|
|
602
|
+
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
603
|
+
focusFirst(candidateNodes, preventScrollOnEntryFocus);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
isClickFocusRef.current = false;
|
|
607
|
+
}),
|
|
608
|
+
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
});
|
|
614
|
+
var ITEM_NAME = "RovingFocusGroupItem";
|
|
615
|
+
var RovingFocusGroupItem = React11.forwardRef(
|
|
616
|
+
(props, forwardedRef) => {
|
|
617
|
+
const {
|
|
618
|
+
__scopeRovingFocusGroup,
|
|
619
|
+
focusable = true,
|
|
620
|
+
active = false,
|
|
621
|
+
tabStopId,
|
|
622
|
+
...itemProps
|
|
623
|
+
} = props;
|
|
624
|
+
const autoId = useId();
|
|
625
|
+
const id = tabStopId || autoId;
|
|
626
|
+
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
|
|
627
|
+
const isCurrentTabStop = context.currentTabStopId === id;
|
|
628
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
629
|
+
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
630
|
+
React11.useEffect(() => {
|
|
631
|
+
if (focusable) {
|
|
632
|
+
onFocusableItemAdd();
|
|
633
|
+
return () => onFocusableItemRemove();
|
|
634
|
+
}
|
|
635
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
636
|
+
return /* @__PURE__ */ jsx6(
|
|
637
|
+
Collection.ItemSlot,
|
|
638
|
+
{
|
|
639
|
+
scope: __scopeRovingFocusGroup,
|
|
640
|
+
id,
|
|
641
|
+
focusable,
|
|
642
|
+
active,
|
|
643
|
+
children: /* @__PURE__ */ jsx6(
|
|
644
|
+
Primitive.span,
|
|
645
|
+
{
|
|
646
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
647
|
+
"data-orientation": context.orientation,
|
|
648
|
+
...itemProps,
|
|
649
|
+
ref: forwardedRef,
|
|
650
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
651
|
+
if (!focusable) event.preventDefault();
|
|
652
|
+
else context.onItemFocus(id);
|
|
653
|
+
}),
|
|
654
|
+
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
655
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
656
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
657
|
+
context.onItemShiftTab();
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
if (event.target !== event.currentTarget) return;
|
|
661
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
662
|
+
if (focusIntent !== void 0) {
|
|
663
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
664
|
+
event.preventDefault();
|
|
665
|
+
const items = getItems().filter((item) => item.focusable);
|
|
666
|
+
let candidateNodes = items.map((item) => item.ref.current);
|
|
667
|
+
if (focusIntent === "last") candidateNodes.reverse();
|
|
668
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
669
|
+
if (focusIntent === "prev") candidateNodes.reverse();
|
|
670
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
671
|
+
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
672
|
+
}
|
|
673
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
674
|
+
}
|
|
675
|
+
})
|
|
676
|
+
}
|
|
677
|
+
)
|
|
678
|
+
}
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
);
|
|
682
|
+
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
683
|
+
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
684
|
+
ArrowLeft: "prev",
|
|
685
|
+
ArrowUp: "prev",
|
|
686
|
+
ArrowRight: "next",
|
|
687
|
+
ArrowDown: "next",
|
|
688
|
+
PageUp: "first",
|
|
689
|
+
Home: "first",
|
|
690
|
+
PageDown: "last",
|
|
691
|
+
End: "last"
|
|
692
|
+
};
|
|
693
|
+
function getDirectionAwareKey(key, dir) {
|
|
694
|
+
if (dir !== "rtl") return key;
|
|
695
|
+
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
696
|
+
}
|
|
697
|
+
function getFocusIntent(event, orientation, dir) {
|
|
698
|
+
const key = getDirectionAwareKey(event.key, dir);
|
|
699
|
+
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
700
|
+
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
701
|
+
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
702
|
+
}
|
|
703
|
+
function focusFirst(candidates, preventScroll = false) {
|
|
704
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
705
|
+
for (const candidate of candidates) {
|
|
706
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
707
|
+
candidate.focus({ preventScroll });
|
|
708
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
function wrapArray(array, startIndex) {
|
|
712
|
+
return array.map((_2, index) => array[(startIndex + index) % array.length]);
|
|
713
|
+
}
|
|
714
|
+
var Root = RovingFocusGroup;
|
|
715
|
+
var Item = RovingFocusGroupItem;
|
|
716
|
+
|
|
717
|
+
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18._pqwkltkxenlrsgmgun6icjiigu/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
718
|
+
import * as React22 from "react";
|
|
719
|
+
import * as React12 from "react";
|
|
720
|
+
function useStateMachine(initialState, machine) {
|
|
721
|
+
return React12.useReducer((state, event) => {
|
|
722
|
+
const nextState = machine[state][event];
|
|
723
|
+
return nextState ?? state;
|
|
724
|
+
}, initialState);
|
|
725
|
+
}
|
|
726
|
+
var Presence = (props) => {
|
|
727
|
+
const { present, children } = props;
|
|
728
|
+
const presence = usePresence(present);
|
|
729
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
|
|
730
|
+
const ref = useComposedRefs(presence.ref, getElementRef2(child));
|
|
731
|
+
const forceMount = typeof children === "function";
|
|
732
|
+
return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
|
|
733
|
+
};
|
|
734
|
+
Presence.displayName = "Presence";
|
|
735
|
+
function usePresence(present) {
|
|
736
|
+
const [node, setNode] = React22.useState();
|
|
737
|
+
const stylesRef = React22.useRef({});
|
|
738
|
+
const prevPresentRef = React22.useRef(present);
|
|
739
|
+
const prevAnimationNameRef = React22.useRef("none");
|
|
740
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
741
|
+
const [state, send] = useStateMachine(initialState, {
|
|
742
|
+
mounted: {
|
|
743
|
+
UNMOUNT: "unmounted",
|
|
744
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
745
|
+
},
|
|
746
|
+
unmountSuspended: {
|
|
747
|
+
MOUNT: "mounted",
|
|
748
|
+
ANIMATION_END: "unmounted"
|
|
749
|
+
},
|
|
750
|
+
unmounted: {
|
|
751
|
+
MOUNT: "mounted"
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
React22.useEffect(() => {
|
|
755
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
756
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
757
|
+
}, [state]);
|
|
758
|
+
useLayoutEffect2(() => {
|
|
759
|
+
const styles = stylesRef.current;
|
|
760
|
+
const wasPresent = prevPresentRef.current;
|
|
761
|
+
const hasPresentChanged = wasPresent !== present;
|
|
762
|
+
if (hasPresentChanged) {
|
|
763
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
764
|
+
const currentAnimationName = getAnimationName(styles);
|
|
765
|
+
if (present) {
|
|
766
|
+
send("MOUNT");
|
|
767
|
+
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
|
768
|
+
send("UNMOUNT");
|
|
769
|
+
} else {
|
|
770
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
771
|
+
if (wasPresent && isAnimating) {
|
|
772
|
+
send("ANIMATION_OUT");
|
|
773
|
+
} else {
|
|
774
|
+
send("UNMOUNT");
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
prevPresentRef.current = present;
|
|
778
|
+
}
|
|
779
|
+
}, [present, send]);
|
|
780
|
+
useLayoutEffect2(() => {
|
|
781
|
+
if (node) {
|
|
782
|
+
let timeoutId;
|
|
783
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
784
|
+
const handleAnimationEnd = (event) => {
|
|
785
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
786
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
787
|
+
if (event.target === node && isCurrentAnimation) {
|
|
788
|
+
send("ANIMATION_END");
|
|
789
|
+
if (!prevPresentRef.current) {
|
|
790
|
+
const currentFillMode = node.style.animationFillMode;
|
|
791
|
+
node.style.animationFillMode = "forwards";
|
|
792
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
793
|
+
if (node.style.animationFillMode === "forwards") {
|
|
794
|
+
node.style.animationFillMode = currentFillMode;
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
const handleAnimationStart = (event) => {
|
|
801
|
+
if (event.target === node) {
|
|
802
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
806
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
807
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
808
|
+
return () => {
|
|
809
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
810
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
811
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
812
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
813
|
+
};
|
|
814
|
+
} else {
|
|
815
|
+
send("ANIMATION_END");
|
|
816
|
+
}
|
|
817
|
+
}, [node, send]);
|
|
818
|
+
return {
|
|
819
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
820
|
+
ref: React22.useCallback((node2) => {
|
|
821
|
+
if (node2) stylesRef.current = getComputedStyle(node2);
|
|
822
|
+
setNode(node2);
|
|
823
|
+
}, [])
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
function getAnimationName(styles) {
|
|
827
|
+
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
828
|
+
}
|
|
829
|
+
function getElementRef2(element) {
|
|
830
|
+
var _a, _b;
|
|
831
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
832
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
833
|
+
if (mayWarn) {
|
|
834
|
+
return element.ref;
|
|
835
|
+
}
|
|
836
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
837
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
838
|
+
if (mayWarn) {
|
|
839
|
+
return element.props.ref;
|
|
840
|
+
}
|
|
841
|
+
return element.props.ref || element.ref;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18.3.18_qsyrobternj736o5ex7scdd3r4/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
845
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
846
|
+
var TABS_NAME = "Tabs";
|
|
847
|
+
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
|
|
848
|
+
createRovingFocusGroupScope
|
|
849
|
+
]);
|
|
850
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
851
|
+
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
852
|
+
var Tabs = React13.forwardRef(
|
|
853
|
+
(props, forwardedRef) => {
|
|
854
|
+
const {
|
|
855
|
+
__scopeTabs,
|
|
856
|
+
value: valueProp,
|
|
857
|
+
onValueChange,
|
|
858
|
+
defaultValue,
|
|
859
|
+
orientation = "horizontal",
|
|
860
|
+
dir,
|
|
861
|
+
activationMode = "automatic",
|
|
862
|
+
...tabsProps
|
|
863
|
+
} = props;
|
|
864
|
+
const direction = useDirection(dir);
|
|
865
|
+
const [value, setValue] = useControllableState({
|
|
866
|
+
prop: valueProp,
|
|
867
|
+
onChange: onValueChange,
|
|
868
|
+
defaultProp: defaultValue
|
|
869
|
+
});
|
|
870
|
+
return /* @__PURE__ */ jsx7(
|
|
871
|
+
TabsProvider,
|
|
872
|
+
{
|
|
873
|
+
scope: __scopeTabs,
|
|
874
|
+
baseId: useId(),
|
|
875
|
+
value,
|
|
876
|
+
onValueChange: setValue,
|
|
877
|
+
orientation,
|
|
878
|
+
dir: direction,
|
|
879
|
+
activationMode,
|
|
880
|
+
children: /* @__PURE__ */ jsx7(
|
|
881
|
+
Primitive.div,
|
|
882
|
+
{
|
|
883
|
+
dir: direction,
|
|
884
|
+
"data-orientation": orientation,
|
|
885
|
+
...tabsProps,
|
|
886
|
+
ref: forwardedRef
|
|
887
|
+
}
|
|
888
|
+
)
|
|
889
|
+
}
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
);
|
|
893
|
+
Tabs.displayName = TABS_NAME;
|
|
894
|
+
var TAB_LIST_NAME = "TabsList";
|
|
895
|
+
var TabsList = React13.forwardRef(
|
|
896
|
+
(props, forwardedRef) => {
|
|
897
|
+
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
898
|
+
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
899
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
900
|
+
return /* @__PURE__ */ jsx7(
|
|
901
|
+
Root,
|
|
902
|
+
{
|
|
903
|
+
asChild: true,
|
|
904
|
+
...rovingFocusGroupScope,
|
|
905
|
+
orientation: context.orientation,
|
|
906
|
+
dir: context.dir,
|
|
907
|
+
loop,
|
|
908
|
+
children: /* @__PURE__ */ jsx7(
|
|
909
|
+
Primitive.div,
|
|
910
|
+
{
|
|
911
|
+
role: "tablist",
|
|
912
|
+
"aria-orientation": context.orientation,
|
|
913
|
+
...listProps,
|
|
914
|
+
ref: forwardedRef
|
|
915
|
+
}
|
|
916
|
+
)
|
|
917
|
+
}
|
|
918
|
+
);
|
|
919
|
+
}
|
|
920
|
+
);
|
|
921
|
+
TabsList.displayName = TAB_LIST_NAME;
|
|
922
|
+
var TRIGGER_NAME = "TabsTrigger";
|
|
923
|
+
var TabsTrigger = React13.forwardRef(
|
|
924
|
+
(props, forwardedRef) => {
|
|
925
|
+
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
926
|
+
const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
|
|
927
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
928
|
+
const triggerId = makeTriggerId(context.baseId, value);
|
|
929
|
+
const contentId = makeContentId(context.baseId, value);
|
|
930
|
+
const isSelected = value === context.value;
|
|
931
|
+
return /* @__PURE__ */ jsx7(
|
|
932
|
+
Item,
|
|
933
|
+
{
|
|
934
|
+
asChild: true,
|
|
935
|
+
...rovingFocusGroupScope,
|
|
936
|
+
focusable: !disabled,
|
|
937
|
+
active: isSelected,
|
|
938
|
+
children: /* @__PURE__ */ jsx7(
|
|
939
|
+
Primitive.button,
|
|
940
|
+
{
|
|
941
|
+
type: "button",
|
|
942
|
+
role: "tab",
|
|
943
|
+
"aria-selected": isSelected,
|
|
944
|
+
"aria-controls": contentId,
|
|
945
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
946
|
+
"data-disabled": disabled ? "" : void 0,
|
|
947
|
+
disabled,
|
|
948
|
+
id: triggerId,
|
|
949
|
+
...triggerProps,
|
|
950
|
+
ref: forwardedRef,
|
|
951
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
952
|
+
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
953
|
+
context.onValueChange(value);
|
|
954
|
+
} else {
|
|
955
|
+
event.preventDefault();
|
|
956
|
+
}
|
|
957
|
+
}),
|
|
958
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
959
|
+
if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
|
|
960
|
+
}),
|
|
961
|
+
onFocus: composeEventHandlers(props.onFocus, () => {
|
|
962
|
+
const isAutomaticActivation = context.activationMode !== "manual";
|
|
963
|
+
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
964
|
+
context.onValueChange(value);
|
|
965
|
+
}
|
|
966
|
+
})
|
|
967
|
+
}
|
|
968
|
+
)
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
TabsTrigger.displayName = TRIGGER_NAME;
|
|
974
|
+
var CONTENT_NAME = "TabsContent";
|
|
975
|
+
var TabsContent = React13.forwardRef(
|
|
976
|
+
(props, forwardedRef) => {
|
|
977
|
+
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
978
|
+
const context = useTabsContext(CONTENT_NAME, __scopeTabs);
|
|
979
|
+
const triggerId = makeTriggerId(context.baseId, value);
|
|
980
|
+
const contentId = makeContentId(context.baseId, value);
|
|
981
|
+
const isSelected = value === context.value;
|
|
982
|
+
const isMountAnimationPreventedRef = React13.useRef(isSelected);
|
|
983
|
+
React13.useEffect(() => {
|
|
984
|
+
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
985
|
+
return () => cancelAnimationFrame(rAF);
|
|
986
|
+
}, []);
|
|
987
|
+
return /* @__PURE__ */ jsx7(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx7(
|
|
988
|
+
Primitive.div,
|
|
989
|
+
{
|
|
990
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
991
|
+
"data-orientation": context.orientation,
|
|
992
|
+
role: "tabpanel",
|
|
993
|
+
"aria-labelledby": triggerId,
|
|
994
|
+
hidden: !present,
|
|
995
|
+
id: contentId,
|
|
996
|
+
tabIndex: 0,
|
|
997
|
+
...contentProps,
|
|
998
|
+
ref: forwardedRef,
|
|
999
|
+
style: {
|
|
1000
|
+
...props.style,
|
|
1001
|
+
animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
|
|
1002
|
+
},
|
|
1003
|
+
children: present && children
|
|
1004
|
+
}
|
|
1005
|
+
) });
|
|
1006
|
+
}
|
|
1007
|
+
);
|
|
1008
|
+
TabsContent.displayName = CONTENT_NAME;
|
|
1009
|
+
function makeTriggerId(baseId, value) {
|
|
1010
|
+
return `${baseId}-trigger-${value}`;
|
|
1011
|
+
}
|
|
1012
|
+
function makeContentId(baseId, value) {
|
|
1013
|
+
return `${baseId}-content-${value}`;
|
|
1014
|
+
}
|
|
1015
|
+
var Root2 = Tabs;
|
|
1016
|
+
var List = TabsList;
|
|
1017
|
+
var Trigger = TabsTrigger;
|
|
1018
|
+
var Content = TabsContent;
|
|
1019
|
+
|
|
1020
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1021
|
+
import { forwardRef as forwardRef7, createElement as createElement3 } from "react";
|
|
1022
|
+
|
|
1023
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1024
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1025
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
1026
|
+
return Boolean(className) && array.indexOf(className) === index;
|
|
1027
|
+
}).join(" ");
|
|
1028
|
+
|
|
1029
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
1030
|
+
import { forwardRef as forwardRef6, createElement as createElement2 } from "react";
|
|
1031
|
+
|
|
1032
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1033
|
+
var defaultAttributes = {
|
|
1034
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1035
|
+
width: 24,
|
|
1036
|
+
height: 24,
|
|
1037
|
+
viewBox: "0 0 24 24",
|
|
1038
|
+
fill: "none",
|
|
1039
|
+
stroke: "currentColor",
|
|
1040
|
+
strokeWidth: 2,
|
|
1041
|
+
strokeLinecap: "round",
|
|
1042
|
+
strokeLinejoin: "round"
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
1046
|
+
var Icon = forwardRef6(
|
|
1047
|
+
({
|
|
1048
|
+
color = "currentColor",
|
|
1049
|
+
size = 24,
|
|
1050
|
+
strokeWidth = 2,
|
|
1051
|
+
absoluteStrokeWidth,
|
|
1052
|
+
className = "",
|
|
1053
|
+
children,
|
|
1054
|
+
iconNode,
|
|
1055
|
+
...rest
|
|
1056
|
+
}, ref) => {
|
|
1057
|
+
return createElement2(
|
|
1058
|
+
"svg",
|
|
1059
|
+
{
|
|
1060
|
+
ref,
|
|
1061
|
+
...defaultAttributes,
|
|
1062
|
+
width: size,
|
|
1063
|
+
height: size,
|
|
1064
|
+
stroke: color,
|
|
1065
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
1066
|
+
className: mergeClasses("lucide", className),
|
|
1067
|
+
...rest
|
|
1068
|
+
},
|
|
1069
|
+
[
|
|
1070
|
+
...iconNode.map(([tag, attrs]) => createElement2(tag, attrs)),
|
|
1071
|
+
...Array.isArray(children) ? children : [children]
|
|
1072
|
+
]
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
|
|
1077
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1078
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
1079
|
+
const Component = forwardRef7(
|
|
1080
|
+
({ className, ...props }, ref) => createElement3(Icon, {
|
|
1081
|
+
ref,
|
|
1082
|
+
iconNode,
|
|
1083
|
+
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
1084
|
+
...props
|
|
1085
|
+
})
|
|
1086
|
+
);
|
|
1087
|
+
Component.displayName = `${iconName}`;
|
|
1088
|
+
return Component;
|
|
1089
|
+
};
|
|
1090
|
+
|
|
1091
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
1092
|
+
var ChevronLeft = createLucideIcon("ChevronLeft", [
|
|
1093
|
+
["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
|
|
1094
|
+
]);
|
|
1095
|
+
|
|
1096
|
+
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
1097
|
+
var ChevronRight = createLucideIcon("ChevronRight", [
|
|
1098
|
+
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
1099
|
+
]);
|
|
1100
|
+
|
|
1101
|
+
// ../xyd-components/dist/UnderlineNav-rNUvd4IV.js
|
|
1102
|
+
var s = "hh34a3o";
|
|
1103
|
+
var m = "hilz89t";
|
|
1104
|
+
var o = "h1rnhmpa";
|
|
1105
|
+
var u2 = "lajci2p";
|
|
1106
|
+
var d2 = "iezrce7";
|
|
1107
|
+
var v = "i1vhi0b8";
|
|
1108
|
+
var h2 = "i1m2lps9";
|
|
1109
|
+
var f = "r1new93p";
|
|
1110
|
+
var E = "t1u3d3ty";
|
|
1111
|
+
var N = "t4udf3g";
|
|
1112
|
+
var p = "t1icpluq";
|
|
1113
|
+
var b = "badgd67";
|
|
1114
|
+
var g = "bcjznmh";
|
|
1115
|
+
var w = "p13ekkiz";
|
|
1116
|
+
var C = "h15733ml";
|
|
1117
|
+
function k(t5) {
|
|
1118
|
+
var a3 = t5.children, n4 = t5.href, r4 = t5.icon, c2 = t5.title, l2 = t5.kind, i3 = t5.size;
|
|
1119
|
+
return e2.createElement("div", { className: "\n ".concat(s, "\n ").concat("secondary" === l2 && m, "\n ").concat("secondary" === l2 && "md" == i3 && o, "\n ") }, e2.createElement("a", { className: u2, href: n4 }, e2.createElement("div", { className: "\n ".concat(d2, "\n ").concat("secondary" === l2 && v, "\n ") }, r4 && e2.createElement("div", { className: h2 }, r4), e2.createElement("div", { className: f }, e2.createElement("div", { className: E }, e2.createElement("div", { className: "\n ".concat(E, " \n ").concat(N, "\n ").concat("md" == i3 && p, "\n ") }, c2), e2.createElement(z, null)), e2.createElement("div", { className: "\n ".concat(b, "\n ").concat("md" == i3 && g, "\n ") }, a3)))));
|
|
1120
|
+
}
|
|
1121
|
+
function z() {
|
|
1122
|
+
return e2.createElement("div", { "data-pointer": "true", className: w }, e2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "currentColor", viewBox: "0 0 24 24" }, e2.createElement("path", { fillRule: "evenodd", d: "M9.293 7.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L12.586 12 9.293 8.707a1 1 0 0 1 0-1.414Z", clipRule: "evenodd" })));
|
|
1123
|
+
}
|
|
1124
|
+
k.List = function(t5) {
|
|
1125
|
+
var a3 = t5.children;
|
|
1126
|
+
return e2.createElement("div", { className: C }, a3);
|
|
1127
|
+
};
|
|
1128
|
+
var x = "h3kfd8c";
|
|
1129
|
+
var L = "l1et872q";
|
|
1130
|
+
function y(t5) {
|
|
1131
|
+
var a3 = t5.children;
|
|
1132
|
+
return e2.createElement("ol", { className: x }, a3);
|
|
1133
|
+
}
|
|
1134
|
+
y.Item = function(t5) {
|
|
1135
|
+
var a3 = t5.children;
|
|
1136
|
+
return e2.createElement("li", { className: L }, a3);
|
|
1137
|
+
};
|
|
1138
|
+
var T = "h14vj3ri";
|
|
1139
|
+
var j = "t1l6tz9b";
|
|
1140
|
+
var R = "thzxr0l";
|
|
1141
|
+
var B = "t1g1altt";
|
|
1142
|
+
function I(t5) {
|
|
1143
|
+
var a3 = t5.children;
|
|
1144
|
+
return e2.createElement("table", { className: T }, a3);
|
|
1145
|
+
}
|
|
1146
|
+
I.Th = function(t5) {
|
|
1147
|
+
var a3 = t5.children;
|
|
1148
|
+
return e2.createElement("th", { className: j }, a3);
|
|
1149
|
+
}, I.Tr = function(t5) {
|
|
1150
|
+
var a3 = t5.children;
|
|
1151
|
+
return e2.createElement("tr", { className: R }, a3);
|
|
1152
|
+
}, I.Td = function(t5) {
|
|
1153
|
+
var a3 = t5.children;
|
|
1154
|
+
return e2.createElement("td", { className: B }, a3);
|
|
1155
|
+
};
|
|
1156
|
+
var q = "hh8vcxa";
|
|
1157
|
+
var S = "b2p5907";
|
|
1158
|
+
var V = "coeb6fw";
|
|
1159
|
+
var W = "h196u2m6";
|
|
1160
|
+
var _ = "i1hlflsk";
|
|
1161
|
+
var G = "hownbu8";
|
|
1162
|
+
var H = "cuwerl2";
|
|
1163
|
+
var M = "hlivi01";
|
|
1164
|
+
function P(s2) {
|
|
1165
|
+
var m3 = s2.children, o3 = s2.items, u4 = s2.tabIndex, d3 = t4(false), v3 = h(d3, 2), h4 = v3[0], f2 = v3[1], E4 = t4(false), N3 = h(E4, 2), p3 = N3[0], b2 = N3[1], g2 = a2(null), w3 = t4(o3[u4 || 0] || ""), C2 = h(w3, 2), k2 = C2[0], z2 = C2[1], x3 = function() {
|
|
1166
|
+
if (g2.current) {
|
|
1167
|
+
var e3 = g2.current, t5 = e3.scrollLeft, a3 = e3.scrollWidth, n4 = e3.clientWidth;
|
|
1168
|
+
f2(t5 > 0), b2(t5 < a3 - n4);
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
n2(function() {
|
|
1172
|
+
return x3(), window.addEventListener("resize", x3), function() {
|
|
1173
|
+
return window.removeEventListener("resize", x3);
|
|
1174
|
+
};
|
|
1175
|
+
}, []);
|
|
1176
|
+
var L2 = function(e3) {
|
|
1177
|
+
if (g2.current) {
|
|
1178
|
+
var t5 = "left" === e3 ? -200 : 200;
|
|
1179
|
+
g2.current.scrollBy({ left: t5, behavior: "smooth" });
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
return e2.createElement(Root2, { asChild: true, value: k2, onValueChange: z2 }, e2.createElement("div", { className: q }, e2.createElement("div", { className: S }, h4 && e2.createElement("button", { onClick: function() {
|
|
1183
|
+
return L2("left");
|
|
1184
|
+
}, className: W }, e2.createElement(ChevronLeft, { className: _ })), e2.createElement("div", { ref: g2, onScroll: x3, className: G }, e2.createElement("div", { className: H }, e2.createElement(List, null, o3.map(function(t5, a3) {
|
|
1185
|
+
return e2.createElement(U, { key: a3, value: t5 }, t5);
|
|
1186
|
+
})))), p3 && e2.createElement("button", { onClick: function() {
|
|
1187
|
+
return L2("right");
|
|
1188
|
+
}, className: W }, e2.createElement(ChevronRight, { className: _ }))), e2.createElement("div", { className: V }, m3)));
|
|
1189
|
+
}
|
|
1190
|
+
function U(t5) {
|
|
1191
|
+
var a3 = t5.children, n4 = t5.value;
|
|
1192
|
+
return e2.createElement(Trigger, { asChild: true, value: n4 }, e2.createElement("button", { className: "".concat(M) }, a3));
|
|
1193
|
+
}
|
|
1194
|
+
P.Content = function(t5) {
|
|
1195
|
+
var a3 = t5.children, n4 = t5.value;
|
|
1196
|
+
return e2.createElement(Content, { asChild: true, value: n4 }, a3);
|
|
1197
|
+
};
|
|
1198
|
+
var Z = "h1bta36o";
|
|
1199
|
+
var A = "uxs4bf1";
|
|
1200
|
+
var D = "ifn7ecb";
|
|
1201
|
+
var F = "i441kmn";
|
|
1202
|
+
function J(t5) {
|
|
1203
|
+
var a3 = t5.children, n4 = t5.value, r4 = t5.onChange;
|
|
1204
|
+
return e2.createElement(Root2, { asChild: true, value: n4, onValueChange: r4 }, e2.createElement("nav", { className: Z }, e2.createElement(List, { asChild: true }, e2.createElement("ul", { className: A }, a3))));
|
|
1205
|
+
}
|
|
1206
|
+
J.Item = function(t5) {
|
|
1207
|
+
var a3 = t5.children, n4 = t5.value, r4 = t5.href;
|
|
1208
|
+
return e2.createElement(Trigger, { asChild: true, value: n4 }, e2.createElement("li", { className: D }, e2.createElement("a", { href: r4, className: "".concat(F) }, a3)));
|
|
1209
|
+
};
|
|
1210
|
+
|
|
1211
|
+
// ../xyd-components/dist/writer.js
|
|
1212
|
+
var i2 = "hwgsk4h";
|
|
1213
|
+
var m2 = "i1b95bxl";
|
|
1214
|
+
var o2 = "i1a3fa93";
|
|
1215
|
+
var u3 = "i1dl7ywj";
|
|
1216
|
+
function h3(e3) {
|
|
1217
|
+
var a3 = e3.children, n4 = t2(e3, ["children"]);
|
|
1218
|
+
return r3.createElement("a", Object.assign({}, n4), a3);
|
|
1219
|
+
}
|
|
1220
|
+
function p2(e3) {
|
|
1221
|
+
return r3.createElement("div", { className: i2 }, e3.items.map(function(t5, a3) {
|
|
1222
|
+
var s2 = a3 === e3.items.length - 1;
|
|
1223
|
+
return r3.createElement(n3, { key: t5.href + t5.title }, a3 > 0 && r3.createElement(ArrowRightIcon, { className: m2 }), r3.createElement("div", { className: "\n ".concat(o2, "\n ").concat(s2 && u3, "\n "), title: t5.title }, t5.href && !s2 ? r3.createElement(h3, { href: t5.href }, t5.title) : t5.title));
|
|
1224
|
+
}));
|
|
1225
|
+
}
|
|
1226
|
+
var v2 = "h1xhrk1";
|
|
1227
|
+
var E3 = "l1elq7ab";
|
|
1228
|
+
var x2 = "i1mmatje";
|
|
1229
|
+
function N2(e3) {
|
|
1230
|
+
var a3 = e3.children, n4 = t2(e3, ["children"]);
|
|
1231
|
+
return r3.createElement("a", Object.assign({}, n4), a3);
|
|
1232
|
+
}
|
|
1233
|
+
function j2(e3) {
|
|
1234
|
+
return r3.createElement("div", { className: v2 }, e3.prev ? r3.createElement(N2, { href: e3.prev.href, title: e3.prev.title, className: E3 }, r3.createElement(ArrowLeftIcon, { className: x2 }), e3.prev.title) : r3.createElement("div", null), e3.next && r3.createElement(N2, { href: e3.next.href, title: e3.next.title, className: E3 }, e3.next.title, r3.createElement(ArrowRightIcon, { className: x2 })));
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
// packages/react/contexts/framework.tsx
|
|
1238
|
+
import React14, { createContext as createContext3, useContext as useContext3 } from "react";
|
|
1239
|
+
var framework = {
|
|
1240
|
+
settings: {},
|
|
1241
|
+
sidebarGroups: []
|
|
1242
|
+
};
|
|
1243
|
+
var FrameworkContext = createContext3(framework);
|
|
1244
|
+
function Framework(props) {
|
|
1245
|
+
return /* @__PURE__ */ React14.createElement(FrameworkContext.Provider, { value: {
|
|
1246
|
+
settings: props.settings,
|
|
1247
|
+
sidebarGroups: props.sidebarGroups,
|
|
1248
|
+
toc: props.toc,
|
|
1249
|
+
breadcrumbs: props.breadcrumbs,
|
|
1250
|
+
navlinks: props.navlinks
|
|
1251
|
+
} }, props.children);
|
|
1252
|
+
}
|
|
1253
|
+
function useSidebarGroups() {
|
|
1254
|
+
const ctx = useContext3(FrameworkContext);
|
|
1255
|
+
return ctx.sidebarGroups;
|
|
1256
|
+
}
|
|
1257
|
+
function useSettings() {
|
|
1258
|
+
const ctx = useContext3(FrameworkContext);
|
|
1259
|
+
return ctx.settings;
|
|
1260
|
+
}
|
|
1261
|
+
function useToC() {
|
|
1262
|
+
const ctx = useContext3(FrameworkContext);
|
|
1263
|
+
return ctx.toc;
|
|
1264
|
+
}
|
|
1265
|
+
function useBreadcrumbs() {
|
|
1266
|
+
const ctx = useContext3(FrameworkContext);
|
|
1267
|
+
return ctx.breadcrumbs;
|
|
1268
|
+
}
|
|
1269
|
+
function useNavLinks() {
|
|
1270
|
+
const ctx = useContext3(FrameworkContext);
|
|
1271
|
+
return ctx.navlinks;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
// packages/react/components/sidebar/sidebar-group.tsx
|
|
1275
|
+
import React15, { createContext as createContext5, useContext as useContext4, useEffect as useEffect6, useState as useState5 } from "react";
|
|
1276
|
+
import { useLocation } from "react-router";
|
|
1277
|
+
|
|
1278
|
+
// packages/react/contexts/ui.tsx
|
|
1279
|
+
import { createContext as createContext4 } from "react";
|
|
1280
|
+
var UIContext = createContext4({
|
|
1281
|
+
href: "",
|
|
1282
|
+
setHref: (v3) => {
|
|
1283
|
+
}
|
|
1284
|
+
});
|
|
1285
|
+
|
|
1286
|
+
// packages/react/components/sidebar/sidebar-group.tsx
|
|
1287
|
+
var groupContext = createContext5({
|
|
1288
|
+
active: () => [false, () => {
|
|
1289
|
+
}],
|
|
1290
|
+
onClick: () => null
|
|
1291
|
+
// TODO: should be deprecated?
|
|
1292
|
+
});
|
|
1293
|
+
function FwSidebarGroupContext({
|
|
1294
|
+
children,
|
|
1295
|
+
onePathBehaviour,
|
|
1296
|
+
clientSideRouting,
|
|
1297
|
+
initialActiveItems
|
|
1298
|
+
}) {
|
|
1299
|
+
let groupBehaviour;
|
|
1300
|
+
if (onePathBehaviour) {
|
|
1301
|
+
groupBehaviour = useOnePathBehaviour(initialActiveItems);
|
|
1302
|
+
} else {
|
|
1303
|
+
groupBehaviour = useDefaultBehaviour(initialActiveItems);
|
|
1304
|
+
}
|
|
1305
|
+
const location = useLocation();
|
|
1306
|
+
const [href, setHref] = useState5(location.pathname);
|
|
1307
|
+
return /* @__PURE__ */ React15.createElement(UIContext.Provider, { value: {
|
|
1308
|
+
href,
|
|
1309
|
+
setHref: (value) => {
|
|
1310
|
+
setHref(value);
|
|
1311
|
+
}
|
|
1312
|
+
} }, /* @__PURE__ */ React15.createElement(groupContext.Provider, { value: {
|
|
1313
|
+
active: groupBehaviour,
|
|
1314
|
+
onClick: clientSideRouting ? (event, item) => {
|
|
1315
|
+
setHref(item.href);
|
|
1316
|
+
scrollToDataSlug(event, item);
|
|
1317
|
+
} : void 0
|
|
1318
|
+
} }, children));
|
|
1319
|
+
}
|
|
1320
|
+
function useGroup() {
|
|
1321
|
+
return useContext4(groupContext);
|
|
1322
|
+
}
|
|
1323
|
+
function getLastValue(set) {
|
|
1324
|
+
let value;
|
|
1325
|
+
for (value of set) ;
|
|
1326
|
+
return value;
|
|
1327
|
+
}
|
|
1328
|
+
function stringify(item) {
|
|
1329
|
+
var _a;
|
|
1330
|
+
return JSON.stringify({
|
|
1331
|
+
title: item.title,
|
|
1332
|
+
href: item.href,
|
|
1333
|
+
items: (_a = item.items) == null ? void 0 : _a.map((item2) => stringify(item2))
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
function recursiveSearch(items, href, levels = []) {
|
|
1337
|
+
for (let i3 = 0; i3 < items.length; i3++) {
|
|
1338
|
+
const item = items[i3];
|
|
1339
|
+
if (item.href === href) {
|
|
1340
|
+
return [...levels, i3];
|
|
1341
|
+
}
|
|
1342
|
+
if (item.items) {
|
|
1343
|
+
const result = recursiveSearch(item.items, href, [...levels, i3]);
|
|
1344
|
+
if (result) {
|
|
1345
|
+
return result;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
return null;
|
|
1350
|
+
}
|
|
1351
|
+
function calcActive(groups, url) {
|
|
1352
|
+
const initialActiveItems = [];
|
|
1353
|
+
groups.forEach((group) => {
|
|
1354
|
+
const activeLevels = recursiveSearch(group.items, url) || [];
|
|
1355
|
+
activeLevels.reduce((acc, index) => {
|
|
1356
|
+
initialActiveItems.push({
|
|
1357
|
+
...acc[index],
|
|
1358
|
+
active: true
|
|
1359
|
+
});
|
|
1360
|
+
return acc[index].items;
|
|
1361
|
+
}, group.items);
|
|
1362
|
+
return group;
|
|
1363
|
+
});
|
|
1364
|
+
return initialActiveItems;
|
|
1365
|
+
}
|
|
1366
|
+
function useDefaultBehaviour(initialActiveItems) {
|
|
1367
|
+
const groups = useSidebarGroups();
|
|
1368
|
+
const [weakSet] = useState5(() => new Set(initialActiveItems.map((item) => stringify(item))));
|
|
1369
|
+
const [, setForceUpdate] = useState5(0);
|
|
1370
|
+
useEffect6(() => {
|
|
1371
|
+
window.addEventListener("xyd.history.pushState", (event) => {
|
|
1372
|
+
var _a;
|
|
1373
|
+
const url = (_a = event.detail) == null ? void 0 : _a.url;
|
|
1374
|
+
if (!url) {
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1377
|
+
const active = calcActive(groups, url);
|
|
1378
|
+
weakSet.clear();
|
|
1379
|
+
active.forEach((item) => {
|
|
1380
|
+
addItem(item);
|
|
1381
|
+
});
|
|
1382
|
+
});
|
|
1383
|
+
}, []);
|
|
1384
|
+
const forceUpdate = () => setForceUpdate((prev) => prev + 1);
|
|
1385
|
+
const addItem = (item) => {
|
|
1386
|
+
weakSet.add(stringify(item));
|
|
1387
|
+
forceUpdate();
|
|
1388
|
+
};
|
|
1389
|
+
const deleteItem = (item) => {
|
|
1390
|
+
weakSet.delete(stringify(item));
|
|
1391
|
+
forceUpdate();
|
|
1392
|
+
};
|
|
1393
|
+
const hasItem = (item) => {
|
|
1394
|
+
return weakSet.has(stringify(item));
|
|
1395
|
+
};
|
|
1396
|
+
return (item) => [
|
|
1397
|
+
hasItem(item) || false,
|
|
1398
|
+
() => {
|
|
1399
|
+
if (hasItem(item)) {
|
|
1400
|
+
deleteItem(item);
|
|
1401
|
+
} else {
|
|
1402
|
+
addItem(item);
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
];
|
|
1406
|
+
}
|
|
1407
|
+
function useOnePathBehaviour(initialActiveItems) {
|
|
1408
|
+
const [weakSet] = useState5(() => new Set(initialActiveItems.map((item) => stringify(item))));
|
|
1409
|
+
const [lastLevel, setLastLevel] = useState5(false);
|
|
1410
|
+
const [, setForceUpdate] = useState5(0);
|
|
1411
|
+
const forceUpdate = () => setForceUpdate((prev) => prev + 1);
|
|
1412
|
+
const addItem = (item) => {
|
|
1413
|
+
weakSet.add(stringify(item));
|
|
1414
|
+
forceUpdate();
|
|
1415
|
+
};
|
|
1416
|
+
const deleteItem = (item) => {
|
|
1417
|
+
weakSet.delete(stringify(item));
|
|
1418
|
+
forceUpdate();
|
|
1419
|
+
};
|
|
1420
|
+
const hasItem = (item) => {
|
|
1421
|
+
return weakSet.has(stringify(item));
|
|
1422
|
+
};
|
|
1423
|
+
const clear = () => {
|
|
1424
|
+
weakSet.clear();
|
|
1425
|
+
forceUpdate();
|
|
1426
|
+
};
|
|
1427
|
+
return (item) => [
|
|
1428
|
+
hasItem(item),
|
|
1429
|
+
() => {
|
|
1430
|
+
setLastLevel(item.level);
|
|
1431
|
+
if (hasItem(item) && item.level == 0) {
|
|
1432
|
+
setLastLevel(false);
|
|
1433
|
+
clear();
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
if (hasItem(item)) {
|
|
1437
|
+
setLastLevel(false);
|
|
1438
|
+
deleteItem(item);
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
if ((item.level || 0) > (lastLevel || 0) || lastLevel == false) {
|
|
1442
|
+
addItem(item);
|
|
1443
|
+
} else {
|
|
1444
|
+
const v3 = getLastValue(weakSet);
|
|
1445
|
+
deleteItem(JSON.parse(v3));
|
|
1446
|
+
addItem(item);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
];
|
|
1450
|
+
}
|
|
1451
|
+
function scrollToDataSlug(event, item) {
|
|
1452
|
+
event.preventDefault();
|
|
1453
|
+
const dataSlug = document.querySelector(`[data-slug="${item.href}"]`);
|
|
1454
|
+
if (dataSlug) {
|
|
1455
|
+
dataSlug.scrollIntoView({ block: "start", inline: "nearest" });
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
// packages/react/components/sidebar/sidebar.tsx
|
|
1460
|
+
import React16 from "react";
|
|
1461
|
+
import { UISidebar } from "@xyd-js/ui";
|
|
1462
|
+
function FwSidebarItemGroup(props) {
|
|
1463
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(UISidebar.ItemHeader, null, props.group), props.items.map((item, index) => /* @__PURE__ */ React16.createElement(
|
|
1464
|
+
FwSidebarItem,
|
|
1465
|
+
{
|
|
1466
|
+
key: index + item.href,
|
|
1467
|
+
title: item.title,
|
|
1468
|
+
href: item.href,
|
|
1469
|
+
items: item.items,
|
|
1470
|
+
active: item.active,
|
|
1471
|
+
level: 0
|
|
1472
|
+
}
|
|
1473
|
+
)));
|
|
1474
|
+
}
|
|
1475
|
+
var components = {
|
|
1476
|
+
Frontmatter: {
|
|
1477
|
+
// TODO: css
|
|
1478
|
+
Title: ({ children }) => /* @__PURE__ */ React16.createElement("div", { style: {
|
|
1479
|
+
display: "flex",
|
|
1480
|
+
alignItems: "center",
|
|
1481
|
+
justifyContent: "space-between",
|
|
1482
|
+
width: "100%",
|
|
1483
|
+
gap: "10px"
|
|
1484
|
+
} }, children)
|
|
1485
|
+
},
|
|
1486
|
+
Badge: ({ children }) => /* @__PURE__ */ React16.createElement(c, null, children)
|
|
1487
|
+
};
|
|
1488
|
+
function mdxExport(code, components2) {
|
|
1489
|
+
const scope = {
|
|
1490
|
+
Fragment: React16.Fragment,
|
|
1491
|
+
jsxs: React16.createElement,
|
|
1492
|
+
jsx: React16.createElement,
|
|
1493
|
+
jsxDEV: React16.createElement,
|
|
1494
|
+
_jsxs: React16.createElement,
|
|
1495
|
+
_jsx: React16.createElement,
|
|
1496
|
+
...components2
|
|
1497
|
+
};
|
|
1498
|
+
const fn = new Function(...Object.keys(scope), `return ${code}`);
|
|
1499
|
+
return fn(...Object.values(scope));
|
|
1500
|
+
}
|
|
1501
|
+
function FwSidebarItem(props) {
|
|
1502
|
+
var _a, _b, _c;
|
|
1503
|
+
const { active, onClick } = useGroup();
|
|
1504
|
+
const [isActive, setActive] = active(props);
|
|
1505
|
+
let Title;
|
|
1506
|
+
if (typeof props.title === "object" && "code" in props.title) {
|
|
1507
|
+
const code = props.title.code;
|
|
1508
|
+
Title = () => mdxExport(
|
|
1509
|
+
// TODO: in the future better mechanism + support props + better components (provider?) - similar to codehik
|
|
1510
|
+
code.replace("() => ", ""),
|
|
1511
|
+
components
|
|
1512
|
+
);
|
|
1513
|
+
} else {
|
|
1514
|
+
Title = () => props.title;
|
|
1515
|
+
}
|
|
1516
|
+
return /* @__PURE__ */ React16.createElement(
|
|
1517
|
+
UISidebar.Item,
|
|
1518
|
+
{
|
|
1519
|
+
button: !!((_a = props.items) == null ? void 0 : _a.length),
|
|
1520
|
+
href: props.href,
|
|
1521
|
+
active: isActive,
|
|
1522
|
+
onClick: () => {
|
|
1523
|
+
setActive();
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
/* @__PURE__ */ React16.createElement(Title, null),
|
|
1527
|
+
((_b = props.items) == null ? void 0 : _b.length) && /* @__PURE__ */ React16.createElement(UISidebar.SubTree, { isOpen: isActive }, /* @__PURE__ */ React16.createElement(React16.Fragment, null, (_c = props.items) == null ? void 0 : _c.map((item, index) => /* @__PURE__ */ React16.createElement(
|
|
1528
|
+
FwSidebarItem,
|
|
1529
|
+
{
|
|
1530
|
+
key: index + item.href,
|
|
1531
|
+
title: item.title,
|
|
1532
|
+
href: item.href,
|
|
1533
|
+
items: item.items,
|
|
1534
|
+
active: active(item)[0],
|
|
1535
|
+
level: (props.level || 0) + 1
|
|
1536
|
+
}
|
|
1537
|
+
))))
|
|
1538
|
+
);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
// packages/react/components/index.tsx
|
|
1542
|
+
import { Nav } from "@xyd-js/ui";
|
|
1543
|
+
|
|
1544
|
+
// packages/react/utils/manualHydration.ts
|
|
1545
|
+
import React17 from "react";
|
|
1546
|
+
function manualHydration(obj, key = 0) {
|
|
1547
|
+
if (typeof obj !== "object" || obj === null) {
|
|
1548
|
+
return React17.createElement(React17.Fragment, { key });
|
|
1549
|
+
}
|
|
1550
|
+
const { type, props } = obj || {};
|
|
1551
|
+
if (typeof type !== "string" && typeof type !== "function") {
|
|
1552
|
+
return React17.createElement(React17.Fragment, { key });
|
|
1553
|
+
}
|
|
1554
|
+
let children = [];
|
|
1555
|
+
if (props == null ? void 0 : props.children) {
|
|
1556
|
+
if (Array.isArray(props.children)) {
|
|
1557
|
+
children = props.children.map((child, i3) => manualHydration(child, key + i3)) || [];
|
|
1558
|
+
} else {
|
|
1559
|
+
children = [manualHydration(props.children, key)];
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
const elementProps = { ...props, children, key };
|
|
1563
|
+
return React17.createElement(type, elementProps);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
// packages/react/hooks/useMatchedNav.tsx
|
|
1567
|
+
import { useLocation as useLocation2 } from "react-router";
|
|
1568
|
+
function normalizeHref(href) {
|
|
1569
|
+
if (href.startsWith("/")) {
|
|
1570
|
+
return href;
|
|
1571
|
+
}
|
|
1572
|
+
return `/${href}`;
|
|
1573
|
+
}
|
|
1574
|
+
function useMatchedSubNav() {
|
|
1575
|
+
var _a, _b, _c;
|
|
1576
|
+
const settings = useSettings();
|
|
1577
|
+
const location = useLocation2();
|
|
1578
|
+
const matchedSubnav = (_c = (_b = (_a = settings.structure) == null ? void 0 : _a.header) == null ? void 0 : _b.filter((item) => item.sub)) == null ? void 0 : _c.find((item) => {
|
|
1579
|
+
var _a2;
|
|
1580
|
+
return normalizeHref(location.pathname).startsWith(normalizeHref(((_a2 = item.sub) == null ? void 0 : _a2.match) || ""));
|
|
1581
|
+
});
|
|
1582
|
+
if (!matchedSubnav) {
|
|
1583
|
+
return null;
|
|
1584
|
+
}
|
|
1585
|
+
return matchedSubnav.sub || null;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// packages/react/components/index.tsx
|
|
1589
|
+
function FwNavLogo() {
|
|
1590
|
+
var _a, _b, _c;
|
|
1591
|
+
const settings = useSettings();
|
|
1592
|
+
const logo = isValidElement2((_a = settings == null ? void 0 : settings.styling) == null ? void 0 : _a.logo) ? (_b = settings == null ? void 0 : settings.styling) == null ? void 0 : _b.logo : manualHydration((_c = settings == null ? void 0 : settings.styling) == null ? void 0 : _c.logo);
|
|
1593
|
+
return /* @__PURE__ */ React18.createElement("a", { href: "/" }, logo);
|
|
1594
|
+
}
|
|
1595
|
+
function FwNav({ kind }) {
|
|
1596
|
+
var _a, _b, _c;
|
|
1597
|
+
const matchedSubnav = useMatchedSubNav();
|
|
1598
|
+
const location = useLocation3();
|
|
1599
|
+
const settings = useSettings();
|
|
1600
|
+
const headers = matchedSubnav ? matchedSubnav == null ? void 0 : matchedSubnav.items : (_a = settings == null ? void 0 : settings.structure) == null ? void 0 : _a.header;
|
|
1601
|
+
const active = headers == null ? void 0 : headers.find((item) => location.pathname.startsWith(item.url || ""));
|
|
1602
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1603
|
+
Nav,
|
|
1604
|
+
{
|
|
1605
|
+
value: (active == null ? void 0 : active.url) || "",
|
|
1606
|
+
kind,
|
|
1607
|
+
logo: /* @__PURE__ */ React18.createElement(FwNavLogo, null),
|
|
1608
|
+
onChange: () => {
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
(_c = (_b = settings == null ? void 0 : settings.structure) == null ? void 0 : _b.header) == null ? void 0 : _c.map((item, index) => {
|
|
1612
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1613
|
+
Nav.Item,
|
|
1614
|
+
{
|
|
1615
|
+
key: index + (item.url || "") + item.name,
|
|
1616
|
+
href: (item == null ? void 0 : item.url) || "",
|
|
1617
|
+
value: item.url
|
|
1618
|
+
},
|
|
1619
|
+
item.name
|
|
1620
|
+
);
|
|
1621
|
+
})
|
|
1622
|
+
);
|
|
1623
|
+
}
|
|
1624
|
+
function FwSubNav() {
|
|
1625
|
+
const matchedSubnav = useMatchedSubNav();
|
|
1626
|
+
const location = useLocation3();
|
|
1627
|
+
if (!matchedSubnav) {
|
|
1628
|
+
return null;
|
|
1629
|
+
}
|
|
1630
|
+
const active = matchedSubnav == null ? void 0 : matchedSubnav.items.findLast((item) => location.pathname.startsWith(item.url || ""));
|
|
1631
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1632
|
+
SubNav,
|
|
1633
|
+
{
|
|
1634
|
+
title: (matchedSubnav == null ? void 0 : matchedSubnav.name) || "",
|
|
1635
|
+
value: (active == null ? void 0 : active.url) || "",
|
|
1636
|
+
onChange: () => {
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
matchedSubnav == null ? void 0 : matchedSubnav.items.map((item, index) => {
|
|
1640
|
+
return /* @__PURE__ */ React18.createElement(SubNav.Item, { value: item.url || "", href: item.url }, item.name);
|
|
1641
|
+
})
|
|
1642
|
+
);
|
|
1643
|
+
}
|
|
1644
|
+
function recursiveSearch2(items, href, levels = []) {
|
|
1645
|
+
for (let i3 = 0; i3 < items.length; i3++) {
|
|
1646
|
+
const item = items[i3];
|
|
1647
|
+
if (item.href === href) {
|
|
1648
|
+
return [...levels, i3];
|
|
1649
|
+
}
|
|
1650
|
+
if (item.items) {
|
|
1651
|
+
const result = recursiveSearch2(item.items, href, [...levels, i3]);
|
|
1652
|
+
if (result) {
|
|
1653
|
+
return result;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
return null;
|
|
1658
|
+
}
|
|
1659
|
+
function FwSidebarGroups(props) {
|
|
1660
|
+
var _a, _b, _c;
|
|
1661
|
+
const groups = useSidebarGroups();
|
|
1662
|
+
const settings = useSettings();
|
|
1663
|
+
const footerItems = (_c = (_b = (_a = settings.structure) == null ? void 0 : _a.anchors) == null ? void 0 : _b.bottom) == null ? void 0 : _c.map((anchor) => {
|
|
1664
|
+
let icon;
|
|
1665
|
+
if (typeof anchor.icon === "string") {
|
|
1666
|
+
switch (anchor.icon) {
|
|
1667
|
+
case "icon-cookbook": {
|
|
1668
|
+
icon = /* @__PURE__ */ React18.createElement(IconCookbook, null);
|
|
1669
|
+
break;
|
|
1670
|
+
}
|
|
1671
|
+
case "icon-community": {
|
|
1672
|
+
icon = /* @__PURE__ */ React18.createElement(IconCommunity, null);
|
|
1673
|
+
break;
|
|
1674
|
+
}
|
|
1675
|
+
case "icon-marketplace": {
|
|
1676
|
+
icon = /* @__PURE__ */ React18.createElement(IconMarketplace, null);
|
|
1677
|
+
break;
|
|
1678
|
+
}
|
|
1679
|
+
case "icon-sdk": {
|
|
1680
|
+
icon = /* @__PURE__ */ React18.createElement(IconSDK, null);
|
|
1681
|
+
break;
|
|
1682
|
+
}
|
|
1683
|
+
default: {
|
|
1684
|
+
icon = null;
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
} else {
|
|
1688
|
+
icon = isValidElement2(anchor.icon) ? anchor.icon : manualHydration(anchor.icon);
|
|
1689
|
+
}
|
|
1690
|
+
return /* @__PURE__ */ React18.createElement(UISidebar2.FooterItem, { href: anchor.url, icon }, anchor.name);
|
|
1691
|
+
});
|
|
1692
|
+
const location = useLocation3();
|
|
1693
|
+
const initialActiveItems = [];
|
|
1694
|
+
groups.forEach((group) => {
|
|
1695
|
+
const activeLevels = recursiveSearch2(group.items, location.pathname) || [];
|
|
1696
|
+
activeLevels.reduce((acc, index) => {
|
|
1697
|
+
initialActiveItems.push(acc[index]);
|
|
1698
|
+
acc[index].active = true;
|
|
1699
|
+
return acc[index].items;
|
|
1700
|
+
}, group.items);
|
|
1701
|
+
return group;
|
|
1702
|
+
});
|
|
1703
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1704
|
+
FwSidebarGroupContext,
|
|
1705
|
+
{
|
|
1706
|
+
onePathBehaviour: props.onePathBehaviour,
|
|
1707
|
+
clientSideRouting: props.clientSideRouting,
|
|
1708
|
+
initialActiveItems
|
|
1709
|
+
},
|
|
1710
|
+
/* @__PURE__ */ React18.createElement(UISidebar2, { footerItems: footerItems && footerItems }, groups == null ? void 0 : groups.map((group, index) => /* @__PURE__ */ React18.createElement(
|
|
1711
|
+
FwSidebarItemGroup,
|
|
1712
|
+
{
|
|
1713
|
+
key: index + group.group,
|
|
1714
|
+
...group
|
|
1715
|
+
}
|
|
1716
|
+
)))
|
|
1717
|
+
);
|
|
1718
|
+
}
|
|
1719
|
+
function FwToc() {
|
|
1720
|
+
var _a;
|
|
1721
|
+
const toc = useToC();
|
|
1722
|
+
if (!toc) {
|
|
1723
|
+
return null;
|
|
1724
|
+
}
|
|
1725
|
+
const flatToc = [];
|
|
1726
|
+
const flatten = (toc2) => {
|
|
1727
|
+
if (!toc2) {
|
|
1728
|
+
return;
|
|
1729
|
+
}
|
|
1730
|
+
toc2.forEach((item) => {
|
|
1731
|
+
flatToc.push({
|
|
1732
|
+
depth: item.depth,
|
|
1733
|
+
value: item.value
|
|
1734
|
+
});
|
|
1735
|
+
flatten(item.children);
|
|
1736
|
+
});
|
|
1737
|
+
};
|
|
1738
|
+
flatten(toc);
|
|
1739
|
+
const tocFinal = flatToc.filter((item) => item.depth === 2);
|
|
1740
|
+
const location = useLocation3();
|
|
1741
|
+
const defaultValue = location.hash ? location.hash.replace("#", "") : (_a = tocFinal[0]) == null ? void 0 : _a.value;
|
|
1742
|
+
return /* @__PURE__ */ React18.createElement(Toc, { defaultValue }, tocFinal.map((item, index) => /* @__PURE__ */ React18.createElement(
|
|
1743
|
+
Toc.Item,
|
|
1744
|
+
{
|
|
1745
|
+
key: index + item.value + item.depth,
|
|
1746
|
+
value: item.value
|
|
1747
|
+
},
|
|
1748
|
+
item.value
|
|
1749
|
+
)));
|
|
1750
|
+
}
|
|
1751
|
+
function FwBreadcrumbs() {
|
|
1752
|
+
const breadcrumbs = useBreadcrumbs();
|
|
1753
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1754
|
+
p2,
|
|
1755
|
+
{
|
|
1756
|
+
items: breadcrumbs || []
|
|
1757
|
+
}
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
function FwNavLinks() {
|
|
1761
|
+
var _a, _b;
|
|
1762
|
+
const navlinks = useNavLinks();
|
|
1763
|
+
if (typeof ((_a = navlinks == null ? void 0 : navlinks.prev) == null ? void 0 : _a.title) !== "string" || typeof ((_b = navlinks == null ? void 0 : navlinks.next) == null ? void 0 : _b.title) !== "string") {
|
|
1764
|
+
return null;
|
|
1765
|
+
}
|
|
1766
|
+
if ((navlinks == null ? void 0 : navlinks.prev) || (navlinks == null ? void 0 : navlinks.next)) {
|
|
1767
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1768
|
+
j2,
|
|
1769
|
+
{
|
|
1770
|
+
prev: navlinks.prev,
|
|
1771
|
+
next: navlinks.next
|
|
1772
|
+
}
|
|
1773
|
+
);
|
|
1774
|
+
}
|
|
1775
|
+
return null;
|
|
1776
|
+
}
|
|
1777
|
+
function IconCookbook() {
|
|
1778
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1779
|
+
"svg",
|
|
1780
|
+
{
|
|
1781
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1782
|
+
viewBox: "0 0 24 24",
|
|
1783
|
+
width: "1em",
|
|
1784
|
+
height: "1em"
|
|
1785
|
+
},
|
|
1786
|
+
/* @__PURE__ */ React18.createElement(
|
|
1787
|
+
"path",
|
|
1788
|
+
{
|
|
1789
|
+
fillRule: "evenodd",
|
|
1790
|
+
d: "M14.447 7.106a1 1 0 0 1 .447 1.341l-4 8a1 1 0 1 1-1.788-.894l4-8a1 1 0 0 1 1.341-.447ZM6.6 7.2a1 1 0 0 1 .2 1.4L4.25 12l2.55 3.4a1 1 0 0 1-1.6 1.2l-3-4a1 1 0 0 1 0-1.2l3-4a1 1 0 0 1 1.4-.2Zm10.8 0a1 1 0 0 1 1.4.2l3 4a1 1 0 0 1 0 1.2l-3 4a1 1 0 0 1-1.6-1.2l2.55-3.4-2.55-3.4a1 1 0 0 1 .2-1.4Z",
|
|
1791
|
+
clipRule: "evenodd"
|
|
1792
|
+
}
|
|
1793
|
+
)
|
|
1794
|
+
);
|
|
1795
|
+
}
|
|
1796
|
+
function IconCommunity() {
|
|
1797
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1798
|
+
"svg",
|
|
1799
|
+
{
|
|
1800
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1801
|
+
fill: "currentColor",
|
|
1802
|
+
viewBox: "0 0 24 24",
|
|
1803
|
+
width: "1em",
|
|
1804
|
+
height: "1em"
|
|
1805
|
+
},
|
|
1806
|
+
/* @__PURE__ */ React18.createElement(
|
|
1807
|
+
"path",
|
|
1808
|
+
{
|
|
1809
|
+
fillRule: "evenodd",
|
|
1810
|
+
d: "M10.5 8.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM12 5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7ZM3 9.5a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm1-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm16 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-3 1a3 3 0 1 1 6 0 3 3 0 0 1-6 0ZM8 18c0-.974.438-1.684 1.142-2.185C9.876 15.293 10.911 15 12 15c1.09 0 2.124.293 2.858.815.704.5 1.142 1.21 1.142 2.185a1 1 0 1 0 2 0c0-1.692-.812-2.982-1.983-3.815C14.876 13.373 13.411 13 12 13c-1.41 0-2.876.373-4.017 1.185C6.812 15.018 6 16.308 6 18a1 1 0 1 0 2 0Zm-3.016-3.675a1 1 0 0 1-.809 1.16C2.79 15.732 2 16.486 2 17.5a1 1 0 1 1-2 0c0-2.41 1.978-3.655 3.825-3.985a1 1 0 0 1 1.16.81Zm14.84 1.16a1 1 0 1 1 .351-1.97C22.022 13.845 24 15.09 24 17.5a1 1 0 1 1-2 0c0-1.014-.79-1.768-2.175-2.015Z",
|
|
1811
|
+
clipRule: "evenodd"
|
|
1812
|
+
}
|
|
1813
|
+
)
|
|
1814
|
+
);
|
|
1815
|
+
}
|
|
1816
|
+
function IconMarketplace() {
|
|
1817
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1818
|
+
"svg",
|
|
1819
|
+
{
|
|
1820
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1821
|
+
viewBox: "0 0 24 24",
|
|
1822
|
+
fill: "none",
|
|
1823
|
+
width: "1em",
|
|
1824
|
+
height: "1em"
|
|
1825
|
+
},
|
|
1826
|
+
/* @__PURE__ */ React18.createElement(
|
|
1827
|
+
"path",
|
|
1828
|
+
{
|
|
1829
|
+
"fill-rule": "evenodd",
|
|
1830
|
+
"clip-rule": "evenodd",
|
|
1831
|
+
d: "M3.78163 3.28449C3.8768 2.96725 4.16879 2.75 4.5 2.75H19.5C19.8312 2.75 20.1232 2.96725 20.2184 3.28449L21.7184 8.28449C21.7393 8.3544 21.75 8.42701 21.75 8.5C21.75 10.5711 20.0711 12.25 18 12.25C16.7733 12.25 15.6842 11.661 15 10.7504C14.3158 11.661 13.2267 12.25 12 12.25C10.7733 12.25 9.68417 11.661 9 10.7504C8.31583 11.661 7.2267 12.25 6 12.25C3.92893 12.25 2.25 10.5711 2.25 8.5C2.25 8.42701 2.26066 8.3544 2.28163 8.28449L3.78163 3.28449ZM9.75 8.5C9.75 9.74264 10.7574 10.75 12 10.75C13.2426 10.75 14.25 9.74264 14.25 8.5C14.25 8.08579 14.5858 7.75 15 7.75C15.4142 7.75 15.75 8.08579 15.75 8.5C15.75 9.74264 16.7574 10.75 18 10.75C19.2083 10.75 20.1942 9.79754 20.2477 8.60244L18.942 4.25H5.05802L3.75229 8.60244C3.80584 9.79753 4.79169 10.75 6 10.75C7.24264 10.75 8.25 9.74264 8.25 8.5C8.25 8.08579 8.58579 7.75 9 7.75C9.41421 7.75 9.75 8.08579 9.75 8.5Z"
|
|
1832
|
+
}
|
|
1833
|
+
),
|
|
1834
|
+
/* @__PURE__ */ React18.createElement(
|
|
1835
|
+
"path",
|
|
1836
|
+
{
|
|
1837
|
+
"fill-rule": "evenodd",
|
|
1838
|
+
"clip-rule": "evenodd",
|
|
1839
|
+
d: "M4 10.25C4.41421 10.25 4.75 10.5858 4.75 11V19.75H6.5C6.91421 19.75 7.25 20.0858 7.25 20.5C7.25 20.9142 6.91421 21.25 6.5 21.25H4C3.58579 21.25 3.25 20.9142 3.25 20.5V11C3.25 10.5858 3.58579 10.25 4 10.25ZM20 10.25C20.4142 10.25 20.75 10.5858 20.75 11V20.5C20.75 20.9142 20.4142 21.25 20 21.25H10.5C10.0858 21.25 9.75 20.9142 9.75 20.5C9.75 20.0858 10.0858 19.75 10.5 19.75H19.25V11C19.25 10.5858 19.5858 10.25 20 10.25Z"
|
|
1840
|
+
}
|
|
1841
|
+
),
|
|
1842
|
+
/* @__PURE__ */ React18.createElement(
|
|
1843
|
+
"path",
|
|
1844
|
+
{
|
|
1845
|
+
d: "M12.003 19C11.31 18.9996 10.6384 18.7598 10.102 18.3213C9.56564 17.8829 9.19745 17.2726 9.05983 16.594C8.92222 15.9154 9.02364 15.2101 9.34693 14.5976C9.67022 13.9852 10.1955 13.5032 10.8337 13.2333C11.5673 12.9262 12.393 12.9221 13.1296 13.2222C13.8661 13.5222 14.4536 14.1018 14.7631 14.8338C15.0727 15.5659 15.0791 16.3907 14.7808 17.1274C14.4827 17.8642 13.9042 18.4527 13.1724 18.7641C12.8025 18.9205 12.4047 19.0007 12.003 19ZM11.1458 14.7215C11.1124 14.7215 11.0803 14.7348 11.0567 14.7584C11.0331 14.782 11.0198 14.8141 11.0198 14.8475V17.1923C11.0198 17.2258 11.0331 17.2578 11.0567 17.2814C11.0803 17.305 11.1124 17.3183 11.1458 17.3183C11.1671 17.3183 11.188 17.3128 11.2065 17.3024L13.3399 16.13C13.3597 16.1192 13.3761 16.1032 13.3876 16.0838C13.3991 16.0644 13.4052 16.0423 13.4052 16.0197C13.4052 15.9972 13.3991 15.9751 13.3876 15.9557C13.3761 15.9362 13.3597 15.9203 13.3399 15.9094L11.2063 14.7373C11.1879 14.727 11.1671 14.7215 11.1458 14.7215Z"
|
|
1846
|
+
}
|
|
1847
|
+
)
|
|
1848
|
+
);
|
|
1849
|
+
}
|
|
1850
|
+
function IconSDK() {
|
|
1851
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1852
|
+
"svg",
|
|
1853
|
+
{
|
|
1854
|
+
viewBox: "0 0 15 15",
|
|
1855
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1856
|
+
width: "1em",
|
|
1857
|
+
height: "1em"
|
|
1858
|
+
},
|
|
1859
|
+
/* @__PURE__ */ React18.createElement(
|
|
1860
|
+
"path",
|
|
1861
|
+
{
|
|
1862
|
+
d: "M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z",
|
|
1863
|
+
fill: "currentColor",
|
|
1864
|
+
fillRule: "evenodd",
|
|
1865
|
+
clipRule: "evenodd"
|
|
1866
|
+
}
|
|
1867
|
+
)
|
|
1868
|
+
);
|
|
1869
|
+
}
|
|
1870
|
+
export {
|
|
1871
|
+
Framework,
|
|
1872
|
+
FwBreadcrumbs,
|
|
1873
|
+
FwNav,
|
|
1874
|
+
FwNavLinks,
|
|
1875
|
+
FwSidebarGroups,
|
|
1876
|
+
FwSubNav,
|
|
1877
|
+
FwToc,
|
|
1878
|
+
useMatchedSubNav
|
|
1879
|
+
};
|
|
1880
|
+
/*! Bundled license information:
|
|
1881
|
+
|
|
1882
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
1883
|
+
(**
|
|
1884
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1885
|
+
*
|
|
1886
|
+
* This source code is licensed under the ISC license.
|
|
1887
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1888
|
+
*)
|
|
1889
|
+
|
|
1890
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
1891
|
+
(**
|
|
1892
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1893
|
+
*
|
|
1894
|
+
* This source code is licensed under the ISC license.
|
|
1895
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1896
|
+
*)
|
|
1897
|
+
|
|
1898
|
+
lucide-react/dist/esm/Icon.js:
|
|
1899
|
+
(**
|
|
1900
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1901
|
+
*
|
|
1902
|
+
* This source code is licensed under the ISC license.
|
|
1903
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1904
|
+
*)
|
|
1905
|
+
|
|
1906
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
1907
|
+
(**
|
|
1908
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1909
|
+
*
|
|
1910
|
+
* This source code is licensed under the ISC license.
|
|
1911
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1912
|
+
*)
|
|
1913
|
+
|
|
1914
|
+
lucide-react/dist/esm/icons/chevron-left.js:
|
|
1915
|
+
(**
|
|
1916
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1917
|
+
*
|
|
1918
|
+
* This source code is licensed under the ISC license.
|
|
1919
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1920
|
+
*)
|
|
1921
|
+
|
|
1922
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
1923
|
+
(**
|
|
1924
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1925
|
+
*
|
|
1926
|
+
* This source code is licensed under the ISC license.
|
|
1927
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1928
|
+
*)
|
|
1929
|
+
|
|
1930
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
1931
|
+
(**
|
|
1932
|
+
* @license lucide-react v0.447.0 - ISC
|
|
1933
|
+
*
|
|
1934
|
+
* This source code is licensed under the ISC license.
|
|
1935
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1936
|
+
*)
|
|
1937
|
+
*/
|
|
1938
|
+
//# sourceMappingURL=react.mjs.map
|