@ikonai/sdk-react-ui 0.0.10 → 0.0.11
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/base/base-div.d.ts +1 -0
- package/base/base-module.d.ts +3 -2
- package/index.js +396 -303
- package/package.json +1 -1
package/base/base-div.d.ts
CHANGED
package/base/base-module.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IkonUiModuleLoader, IkonUiRegistry } from '../ikon-ui-registry';
|
|
2
|
+
import { createBaseResolvers } from './base-div';
|
|
2
3
|
export declare const IKON_UI_BASE_MODULE = "base";
|
|
3
|
-
export declare function createBaseResolvers(): IkonUiComponentResolver[];
|
|
4
4
|
export declare const loadBaseModule: IkonUiModuleLoader;
|
|
5
5
|
export declare function registerBaseModule(registry: IkonUiRegistry): void;
|
|
6
|
+
export { createBaseResolvers };
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
var
|
|
1
|
+
import { IkonUICore as Ne, UiStreamStore as we } from "@ikonai/sdk-ui";
|
|
2
|
+
import { UiStreamStore as Lt } from "@ikonai/sdk-ui";
|
|
3
|
+
import Oe, { useSyncExternalStore as Ae, Fragment as _e, useMemo as Me, memo as B, useEffect as G, useCallback as ae } from "react";
|
|
4
|
+
import { createLogger as K } from "@ikonai/sdk";
|
|
5
|
+
var z = { exports: {} }, j = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,17 +12,17 @@ var x = { exports: {} }, j = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
var ce;
|
|
16
|
+
function je() {
|
|
17
|
+
if (ce) return j;
|
|
18
|
+
ce = 1;
|
|
19
19
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
20
20
|
function t(r, s, i) {
|
|
21
21
|
var a = null;
|
|
22
22
|
if (i !== void 0 && (a = "" + i), s.key !== void 0 && (a = "" + s.key), "key" in s) {
|
|
23
23
|
i = {};
|
|
24
|
-
for (var
|
|
25
|
-
|
|
24
|
+
for (var c in s)
|
|
25
|
+
c !== "key" && (i[c] = s[c]);
|
|
26
26
|
} else i = s;
|
|
27
27
|
return s = i.ref, {
|
|
28
28
|
$$typeof: n,
|
|
@@ -44,26 +44,26 @@ var I = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
47
|
+
var le;
|
|
48
|
+
function Ie() {
|
|
49
|
+
return le || (le = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
50
|
function n(o) {
|
|
51
51
|
if (o == null) return null;
|
|
52
52
|
if (typeof o == "function")
|
|
53
|
-
return o.$$typeof ===
|
|
53
|
+
return o.$$typeof === Te ? null : o.displayName || o.name || null;
|
|
54
54
|
if (typeof o == "string") return o;
|
|
55
55
|
switch (o) {
|
|
56
56
|
case b:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case p:
|
|
59
59
|
return "Profiler";
|
|
60
60
|
case f:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case A:
|
|
63
63
|
return "Suspense";
|
|
64
64
|
case L:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case Re:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
69
|
if (typeof o == "object")
|
|
@@ -72,19 +72,19 @@ function _e() {
|
|
|
72
72
|
), o.$$typeof) {
|
|
73
73
|
case _:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
75
|
+
case C:
|
|
76
76
|
return (o.displayName || "Context") + ".Provider";
|
|
77
77
|
case y:
|
|
78
78
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
79
|
-
case
|
|
80
|
-
var
|
|
81
|
-
return o = o.displayName, o || (o =
|
|
82
|
-
case
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
|
|
79
|
+
case T:
|
|
80
|
+
var u = o.render;
|
|
81
|
+
return o = o.displayName, o || (o = u.displayName || u.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
82
|
+
case Ee:
|
|
83
|
+
return u = o.displayName || null, u !== null ? u : n(o.type) || "Memo";
|
|
84
|
+
case ee:
|
|
85
|
+
u = o._payload, o = o._init;
|
|
86
86
|
try {
|
|
87
|
-
return n(o(
|
|
87
|
+
return n(o(u));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -96,15 +96,15 @@ function _e() {
|
|
|
96
96
|
function t(o) {
|
|
97
97
|
try {
|
|
98
98
|
e(o);
|
|
99
|
-
var
|
|
99
|
+
var u = !1;
|
|
100
100
|
} catch {
|
|
101
|
-
|
|
101
|
+
u = !0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
103
|
+
if (u) {
|
|
104
|
+
u = console;
|
|
105
|
+
var h = u.error, S = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
106
|
+
return h.call(
|
|
107
|
+
u,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
109
|
S
|
|
110
110
|
), e(o);
|
|
@@ -112,57 +112,57 @@ function _e() {
|
|
|
112
112
|
}
|
|
113
113
|
function r(o) {
|
|
114
114
|
if (o === b) return "<>";
|
|
115
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
115
|
+
if (typeof o == "object" && o !== null && o.$$typeof === ee)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
118
|
+
var u = n(o);
|
|
119
|
+
return u ? "<" + u + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function s() {
|
|
125
|
-
var o =
|
|
125
|
+
var o = $.A;
|
|
126
126
|
return o === null ? null : o.getOwner();
|
|
127
127
|
}
|
|
128
128
|
function i() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
131
|
function a(o) {
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
132
|
+
if (te.call(o, "key")) {
|
|
133
|
+
var u = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
134
|
+
if (u && u.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
136
|
return o.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
|
|
138
|
+
function c(o, u) {
|
|
139
|
+
function h() {
|
|
140
|
+
re || (re = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
|
-
|
|
142
|
+
u
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
h.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
146
|
+
get: h,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function l() {
|
|
151
151
|
var o = n(this.type);
|
|
152
|
-
return
|
|
152
|
+
return ne[o] || (ne[o] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
155
155
|
}
|
|
156
|
-
function d(o,
|
|
157
|
-
return
|
|
156
|
+
function d(o, u, h, S, w, k, q, Y) {
|
|
157
|
+
return h = k.ref, o = {
|
|
158
158
|
$$typeof: O,
|
|
159
159
|
type: o,
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
160
|
+
key: u,
|
|
161
|
+
props: k,
|
|
162
|
+
_owner: w
|
|
163
|
+
}, (h !== void 0 ? h : null) !== null ? Object.defineProperty(o, "ref", {
|
|
164
164
|
enumerable: !1,
|
|
165
|
-
get:
|
|
165
|
+
get: l
|
|
166
166
|
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
@@ -177,19 +177,19 @@ function _e() {
|
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
|
-
value:
|
|
180
|
+
value: q
|
|
181
181
|
}), Object.defineProperty(o, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
|
-
value:
|
|
185
|
+
value: Y
|
|
186
186
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
var g =
|
|
188
|
+
function m(o, u, h, S, w, k, q, Y) {
|
|
189
|
+
var g = u.children;
|
|
190
190
|
if (g !== void 0)
|
|
191
191
|
if (S)
|
|
192
|
-
if (
|
|
192
|
+
if (Ce(g)) {
|
|
193
193
|
for (S = 0; S < g.length; S++)
|
|
194
194
|
E(g[S]);
|
|
195
195
|
Object.freeze && Object.freeze(g);
|
|
@@ -198,12 +198,12 @@ function _e() {
|
|
|
198
198
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
199
|
);
|
|
200
200
|
else E(g);
|
|
201
|
-
if (
|
|
201
|
+
if (te.call(u, "key")) {
|
|
202
202
|
g = n(o);
|
|
203
|
-
var M = Object.keys(
|
|
204
|
-
return
|
|
203
|
+
var M = Object.keys(u).filter(function(ke) {
|
|
204
|
+
return ke !== "key";
|
|
205
205
|
});
|
|
206
|
-
S = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
206
|
+
S = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", ie[g + S] || (M = 0 < M.length ? "{" + M.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
207
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
208
|
let props = %s;
|
|
209
209
|
<%s {...props} />
|
|
@@ -214,83 +214,83 @@ React keys must be passed directly to JSX without using spread:
|
|
|
214
214
|
g,
|
|
215
215
|
M,
|
|
216
216
|
g
|
|
217
|
-
),
|
|
217
|
+
), ie[g + S] = !0);
|
|
218
218
|
}
|
|
219
|
-
if (g = null,
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
224
|
-
return g &&
|
|
225
|
-
|
|
219
|
+
if (g = null, h !== void 0 && (t(h), g = "" + h), a(u) && (t(u.key), g = "" + u.key), "key" in u) {
|
|
220
|
+
h = {};
|
|
221
|
+
for (var W in u)
|
|
222
|
+
W !== "key" && (h[W] = u[W]);
|
|
223
|
+
} else h = u;
|
|
224
|
+
return g && c(
|
|
225
|
+
h,
|
|
226
226
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
227
227
|
), d(
|
|
228
228
|
o,
|
|
229
229
|
g,
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
k,
|
|
231
|
+
w,
|
|
232
232
|
s(),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
h,
|
|
234
|
+
q,
|
|
235
|
+
Y
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
function E(o) {
|
|
239
239
|
typeof o == "object" && o !== null && o.$$typeof === O && o._store && (o._store.validated = 1);
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var R = Oe, O = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), C = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), Ee = Symbol.for("react.memo"), ee = Symbol.for("react.lazy"), Re = Symbol.for("react.activity"), Te = Symbol.for("react.client.reference"), $ = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, Ce = Array.isArray, D = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
R = {
|
|
245
245
|
"react-stack-bottom-frame": function(o) {
|
|
246
246
|
return o();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
249
|
+
var re, ne = {}, se = R["react-stack-bottom-frame"].bind(
|
|
250
|
+
R,
|
|
251
251
|
i
|
|
252
|
-
)(),
|
|
253
|
-
I.Fragment = b, I.jsx = function(o,
|
|
254
|
-
var
|
|
255
|
-
return
|
|
252
|
+
)(), oe = D(r(i)), ie = {};
|
|
253
|
+
I.Fragment = b, I.jsx = function(o, u, h, S, w) {
|
|
254
|
+
var k = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return m(
|
|
256
256
|
o,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
u,
|
|
258
|
+
h,
|
|
259
259
|
!1,
|
|
260
260
|
S,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
w,
|
|
262
|
+
k ? Error("react-stack-top-frame") : se,
|
|
263
|
+
k ? D(r(o)) : oe
|
|
264
264
|
);
|
|
265
|
-
}, I.jsxs = function(o,
|
|
266
|
-
var
|
|
267
|
-
return
|
|
265
|
+
}, I.jsxs = function(o, u, h, S, w) {
|
|
266
|
+
var k = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return m(
|
|
268
268
|
o,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
u,
|
|
270
|
+
h,
|
|
271
271
|
!0,
|
|
272
272
|
S,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
w,
|
|
274
|
+
k ? Error("react-stack-top-frame") : se,
|
|
275
|
+
k ? D(r(o)) : oe
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
278
|
}()), I;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var ue;
|
|
281
|
+
function Pe() {
|
|
282
|
+
return ue || (ue = 1, process.env.NODE_ENV === "production" ? z.exports = je() : z.exports = Ie()), z.exports;
|
|
283
283
|
}
|
|
284
|
-
var
|
|
285
|
-
function
|
|
286
|
-
return
|
|
284
|
+
var N = Pe();
|
|
285
|
+
function Ue(n) {
|
|
286
|
+
return Ae(
|
|
287
287
|
(e) => n.subscribe(e),
|
|
288
288
|
() => n.getSnapshot(),
|
|
289
289
|
() => n.getSnapshot()
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
function
|
|
292
|
+
const xe = K("UIRenderer");
|
|
293
|
+
function Le(n) {
|
|
294
294
|
if (n === void 0)
|
|
295
295
|
return "{}";
|
|
296
296
|
if (typeof n == "string")
|
|
@@ -301,26 +301,26 @@ function Pe(n) {
|
|
|
301
301
|
return "{}";
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const e =
|
|
304
|
+
function be(n) {
|
|
305
|
+
const e = Fe(n), t = ze(n);
|
|
306
306
|
return e === n.children && t === n.styleIds ? n : {
|
|
307
307
|
...n,
|
|
308
308
|
...e !== n.children ? { children: e } : {},
|
|
309
309
|
...t !== n.styleIds ? { styleIds: t } : {}
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function ze(n) {
|
|
313
313
|
const e = n.styleIds;
|
|
314
314
|
return Array.isArray(e) ? e : [];
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Fe(n) {
|
|
317
317
|
const e = n.children;
|
|
318
318
|
return Array.isArray(e) ? e : [];
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
const i =
|
|
322
|
-
return /* @__PURE__ */
|
|
323
|
-
|
|
320
|
+
function Be({ node: n, renderer: e, library: t, context: r, className: s }) {
|
|
321
|
+
const i = be(n), a = i.children.map((l) => U(l, t, r)), c = e;
|
|
322
|
+
return /* @__PURE__ */ N.jsx(
|
|
323
|
+
c,
|
|
324
324
|
{
|
|
325
325
|
node: i,
|
|
326
326
|
context: r,
|
|
@@ -331,47 +331,47 @@ function xe({ node: n, renderer: e, library: t, context: r, className: s }) {
|
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
333
|
function U(n, e, t) {
|
|
334
|
-
const r =
|
|
334
|
+
const r = be(n), s = r.children;
|
|
335
335
|
if (r.type === "root")
|
|
336
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ N.jsx(_e, { children: s.map((l) => U(l, e, t)) }, r.id);
|
|
337
337
|
const i = e.resolve(r);
|
|
338
338
|
if (!i)
|
|
339
|
-
return
|
|
340
|
-
const a = r.styleIds,
|
|
341
|
-
return /* @__PURE__ */
|
|
342
|
-
|
|
339
|
+
return xe.warn(`No renderer for node type ${r.type}`), null;
|
|
340
|
+
const a = r.styleIds, c = a.length > 0 ? a.join(" ") : void 0;
|
|
341
|
+
return /* @__PURE__ */ N.jsx(
|
|
342
|
+
Be,
|
|
343
343
|
{
|
|
344
344
|
node: r,
|
|
345
345
|
renderer: i,
|
|
346
346
|
library: e,
|
|
347
347
|
context: t,
|
|
348
|
-
className:
|
|
348
|
+
className: c
|
|
349
349
|
},
|
|
350
350
|
r.id
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
const i =
|
|
353
|
+
function $e({ store: n, library: e, containerId: t, emptyFallback: r = null, onAction: s }) {
|
|
354
|
+
const i = Ue(n), a = t ?? i.rootContainerId;
|
|
355
355
|
if (!a) return r;
|
|
356
|
-
const
|
|
357
|
-
if (!
|
|
358
|
-
const
|
|
356
|
+
const c = i.containers.get(a);
|
|
357
|
+
if (!c) return r;
|
|
358
|
+
const l = {
|
|
359
359
|
getPayload: (d) => i.payloads.get(d),
|
|
360
|
-
renderChildren: (d) => Array.isArray(d) ? d.map((
|
|
360
|
+
renderChildren: (d) => Array.isArray(d) ? d.map((m) => U(m, e, l)) : [],
|
|
361
361
|
renderContainer: (d) => {
|
|
362
|
-
const
|
|
363
|
-
return
|
|
362
|
+
const m = i.containers.get(d);
|
|
363
|
+
return m ? U(m, e, l) : null;
|
|
364
364
|
},
|
|
365
|
-
dispatchAction: (d,
|
|
365
|
+
dispatchAction: (d, m) => {
|
|
366
366
|
if (!d)
|
|
367
367
|
return;
|
|
368
|
-
const E =
|
|
368
|
+
const E = Le(m);
|
|
369
369
|
s?.(d, E);
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
|
-
return U(
|
|
372
|
+
return U(c, e, l);
|
|
373
373
|
}
|
|
374
|
-
class
|
|
374
|
+
class De {
|
|
375
375
|
constructor(e, t) {
|
|
376
376
|
if (this.fallback = t, e)
|
|
377
377
|
for (const [r, s] of e)
|
|
@@ -388,29 +388,28 @@ class Be {
|
|
|
388
388
|
return this.renderers.get(e.type) ?? this.fallback;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function wt(n, e) {
|
|
392
392
|
const t = Object.entries(n);
|
|
393
|
-
return new
|
|
393
|
+
return new De(t, e);
|
|
394
394
|
}
|
|
395
|
-
const
|
|
396
|
-
function
|
|
395
|
+
const H = "ikon-ui";
|
|
396
|
+
function qe(n, e) {
|
|
397
397
|
return n === e;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
const i =
|
|
399
|
+
function Ot({ stores: n, library: e, category: t = H, version: r, onAction: s }) {
|
|
400
|
+
const i = Me(() => {
|
|
401
401
|
const a = [];
|
|
402
|
-
for (const [
|
|
403
|
-
if (!
|
|
402
|
+
for (const [c, l] of n) {
|
|
403
|
+
if (!qe(l.category, t))
|
|
404
404
|
continue;
|
|
405
|
-
const d =
|
|
406
|
-
!d.rootContainerId || !d.containers.has(d.rootContainerId) || a.push({ key:
|
|
405
|
+
const d = l.store.getSnapshot();
|
|
406
|
+
!d.rootContainerId || !d.containers.has(d.rootContainerId) || a.push({ key: c, store: l.store });
|
|
407
407
|
}
|
|
408
408
|
return a;
|
|
409
409
|
}, [n, t, r]);
|
|
410
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
410
|
+
return i.length === 0 ? null : /* @__PURE__ */ N.jsx(N.Fragment, { children: i.map(({ key: a, store: c }) => /* @__PURE__ */ N.jsx($e, { store: c, library: e, onAction: s }, a)) });
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
class Rt {
|
|
412
|
+
class At {
|
|
414
413
|
core;
|
|
415
414
|
ownsCore;
|
|
416
415
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -419,7 +418,7 @@ class Rt {
|
|
|
419
418
|
unsubscribeClears;
|
|
420
419
|
unsubscribeStoreChanges;
|
|
421
420
|
constructor(e) {
|
|
422
|
-
this.core = e?.core ?? new
|
|
421
|
+
this.core = e?.core ?? new Ne({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeUpdates = this.core.subscribeToUiUpdates(this.handleUiUpdate), this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
|
|
423
422
|
}
|
|
424
423
|
dispose() {
|
|
425
424
|
this.unsubscribeUpdates(), this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
@@ -464,8 +463,8 @@ class Rt {
|
|
|
464
463
|
root: r
|
|
465
464
|
},
|
|
466
465
|
payloads: t.payloads
|
|
467
|
-
}, a = s.store.apply(i),
|
|
468
|
-
(a ||
|
|
466
|
+
}, a = s.store.apply(i), c = this.updateCategory(e, t.category);
|
|
467
|
+
(a || c) && this.notify(e);
|
|
469
468
|
};
|
|
470
469
|
syncAllStreams() {
|
|
471
470
|
const e = this.core.uiStore.getSnapshots(), t = /* @__PURE__ */ new Set();
|
|
@@ -479,8 +478,8 @@ class Rt {
|
|
|
479
478
|
if (t)
|
|
480
479
|
return t;
|
|
481
480
|
const r = {
|
|
482
|
-
category:
|
|
483
|
-
store: new
|
|
481
|
+
category: H,
|
|
482
|
+
store: new we()
|
|
484
483
|
};
|
|
485
484
|
return this.stores.set(e, r), r;
|
|
486
485
|
}
|
|
@@ -488,7 +487,7 @@ class Rt {
|
|
|
488
487
|
const r = this.stores.get(e);
|
|
489
488
|
if (!r)
|
|
490
489
|
return !1;
|
|
491
|
-
const s = t ?? this.core.uiStore.getSnapshot(e)?.category ??
|
|
490
|
+
const s = t ?? this.core.uiStore.getSnapshot(e)?.category ?? H;
|
|
492
491
|
return r.category === s ? !1 : (this.stores.set(e, { ...r, category: s }), !0);
|
|
493
492
|
}
|
|
494
493
|
notify(e) {
|
|
@@ -496,26 +495,118 @@ class Rt {
|
|
|
496
495
|
t(e);
|
|
497
496
|
}
|
|
498
497
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
501
|
-
const
|
|
502
|
-
return
|
|
498
|
+
function x(n) {
|
|
499
|
+
if (typeof n == "string") {
|
|
500
|
+
const e = n.trim();
|
|
501
|
+
return e.length > 0 ? e : void 0;
|
|
502
|
+
}
|
|
503
|
+
if (Array.isArray(n)) {
|
|
504
|
+
const e = n.filter((t) => typeof t == "string").map((t) => t.trim()).filter(Boolean);
|
|
505
|
+
return e.length > 0 ? e.join(" ") : void 0;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
function Z(...n) {
|
|
509
|
+
const e = [];
|
|
510
|
+
for (const t of n)
|
|
511
|
+
t && t.trim() && e.push(t.trim());
|
|
512
|
+
return e.length > 0 ? e.join(" ") : void 0;
|
|
513
|
+
}
|
|
514
|
+
function Q(n) {
|
|
515
|
+
if (!n)
|
|
516
|
+
return {};
|
|
517
|
+
const e = {};
|
|
518
|
+
for (const [t, r] of Object.entries(n))
|
|
519
|
+
r != null && (typeof r == "string" || typeof r == "number" || typeof r == "boolean") && (e[t] = r);
|
|
520
|
+
return e;
|
|
521
|
+
}
|
|
522
|
+
function Ye() {
|
|
523
|
+
const n = B(function({ node: t }) {
|
|
524
|
+
const r = x(t.props?.targetElementId ?? t.props?.TargetElementId), s = x(t.props?.targetContainerId ?? t.props?.TargetContainerId), i = t.props?.focusOnly ?? t.props?.FocusOnly, a = typeof i == "boolean" ? i : void 0;
|
|
525
|
+
return G(() => {
|
|
526
|
+
if (typeof document > "u")
|
|
527
|
+
return;
|
|
528
|
+
const c = (r ? document.querySelector(`[data-ikon-element-id="${r}"]`) : null) ?? (r ? document.getElementById(r) : null);
|
|
529
|
+
if (!c)
|
|
530
|
+
return;
|
|
531
|
+
const l = (s ? document.querySelector(`[data-ikon-container-id="${s}"]`) : null) ?? c.closest("[data-ikon-container-id]") ?? c.closest('[data-ikon-container-type="scroll-view"]') ?? c;
|
|
532
|
+
if (l && l !== c && typeof l.scrollIntoView == "function")
|
|
533
|
+
try {
|
|
534
|
+
l.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
535
|
+
} catch {
|
|
536
|
+
l.scrollIntoView();
|
|
537
|
+
}
|
|
538
|
+
if (typeof c.focus == "function")
|
|
539
|
+
try {
|
|
540
|
+
c.focus({ preventScroll: a !== !1 });
|
|
541
|
+
} catch {
|
|
542
|
+
c.focus();
|
|
543
|
+
}
|
|
544
|
+
}, [a, s, r]), null;
|
|
545
|
+
});
|
|
546
|
+
return ({ type: e }) => {
|
|
547
|
+
if (e === "common.focus-hint")
|
|
548
|
+
return n;
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
function We() {
|
|
552
|
+
const n = B(function({ node: t, context: r, className: s }) {
|
|
553
|
+
const i = Q(t.props), a = Z(x(t.props?.className), s), c = t.children?.length ? r.renderChildren(t.children) : void 0;
|
|
554
|
+
return /* @__PURE__ */ N.jsx("div", { ...i, "data-ikon-element-id": t.id, className: a, children: c });
|
|
503
555
|
});
|
|
504
556
|
return ({ type: e }) => {
|
|
505
557
|
if (e === "common.div")
|
|
506
558
|
return n;
|
|
507
559
|
};
|
|
508
560
|
}
|
|
509
|
-
|
|
510
|
-
function
|
|
511
|
-
|
|
561
|
+
function Ve() {
|
|
562
|
+
const n = B(function({ node: t, context: r, className: s }) {
|
|
563
|
+
const i = Q(t.props), a = Z(x(t.props?.className), s), c = t.children?.length ? r.renderChildren(t.children) : void 0;
|
|
564
|
+
return /* @__PURE__ */ N.jsx(
|
|
565
|
+
"form",
|
|
566
|
+
{
|
|
567
|
+
...i,
|
|
568
|
+
"data-ikon-element-id": t.id,
|
|
569
|
+
"data-ikon-container-id": t.id,
|
|
570
|
+
className: a,
|
|
571
|
+
onSubmit: (l) => l.preventDefault(),
|
|
572
|
+
children: c
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
});
|
|
576
|
+
return ({ type: e }) => {
|
|
577
|
+
if (e === "common.form")
|
|
578
|
+
return n;
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
function Je() {
|
|
582
|
+
const n = B(function({ node: t, context: r, className: s }) {
|
|
583
|
+
const i = Q(t.props), a = Z(x(t.props?.className), s), c = t.children?.length ? r.renderChildren(t.children) : void 0;
|
|
584
|
+
return /* @__PURE__ */ N.jsx(
|
|
585
|
+
"div",
|
|
586
|
+
{
|
|
587
|
+
...i,
|
|
588
|
+
"data-ikon-element-id": t.id,
|
|
589
|
+
"data-ikon-container-id": t.id,
|
|
590
|
+
"data-ikon-container-type": "scroll-view",
|
|
591
|
+
className: a,
|
|
592
|
+
children: c
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
});
|
|
596
|
+
return ({ type: e }) => {
|
|
597
|
+
if (e === "common.scroll-view")
|
|
598
|
+
return n;
|
|
599
|
+
};
|
|
512
600
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
n.registerModule(De, Ye);
|
|
601
|
+
function Ge() {
|
|
602
|
+
return [We(), Ve(), Je(), Ye()];
|
|
516
603
|
}
|
|
517
|
-
const
|
|
518
|
-
|
|
604
|
+
const He = "base", Xe = async () => Ge();
|
|
605
|
+
function Ke(n) {
|
|
606
|
+
n.registerModule(He, Xe);
|
|
607
|
+
}
|
|
608
|
+
const de = K("UIRegistry");
|
|
609
|
+
class Ze {
|
|
519
610
|
baseResolvers = [];
|
|
520
611
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
521
612
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -537,15 +628,15 @@ class Ve {
|
|
|
537
628
|
for (const [r, s] of this.moduleLoaders.entries())
|
|
538
629
|
if (!this.moduleResolvers.has(r))
|
|
539
630
|
try {
|
|
540
|
-
const i = await s(), a =
|
|
631
|
+
const i = await s(), a = et(i);
|
|
541
632
|
this.moduleResolvers.set(r, a), e = !0;
|
|
542
633
|
} catch (i) {
|
|
543
|
-
|
|
634
|
+
de.error(`[IkonUiRegistry] Failed to load module '${r}'.`, i);
|
|
544
635
|
}
|
|
545
636
|
const t = [];
|
|
546
637
|
for (const r of this.moduleLoaders.keys())
|
|
547
638
|
this.moduleResolvers.has(r) && t.push(r);
|
|
548
|
-
return
|
|
639
|
+
return tt(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
|
|
549
640
|
}
|
|
550
641
|
resolve(e) {
|
|
551
642
|
for (const t of this.baseResolvers) {
|
|
@@ -555,7 +646,7 @@ class Ve {
|
|
|
555
646
|
for (const t of this.activeModuleOrder) {
|
|
556
647
|
const r = this.moduleResolvers.get(t);
|
|
557
648
|
if (!r) {
|
|
558
|
-
|
|
649
|
+
de.warn(`Missing resolvers for module ${t}`);
|
|
559
650
|
continue;
|
|
560
651
|
}
|
|
561
652
|
for (const s of r) {
|
|
@@ -565,17 +656,17 @@ class Ve {
|
|
|
565
656
|
}
|
|
566
657
|
}
|
|
567
658
|
}
|
|
568
|
-
function
|
|
569
|
-
const n = new
|
|
570
|
-
return
|
|
659
|
+
function _t() {
|
|
660
|
+
const n = new Ze();
|
|
661
|
+
return Ke(n), n.loadRegisteredModules(), n;
|
|
571
662
|
}
|
|
572
|
-
function
|
|
663
|
+
function Qe(n) {
|
|
573
664
|
return Array.isArray(n) ? n : [n];
|
|
574
665
|
}
|
|
575
|
-
function
|
|
576
|
-
return n ?
|
|
666
|
+
function et(n) {
|
|
667
|
+
return n ? Qe(n).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
577
668
|
}
|
|
578
|
-
function
|
|
669
|
+
function tt(n, e) {
|
|
579
670
|
if (n.length !== e.length)
|
|
580
671
|
return !1;
|
|
581
672
|
for (let t = 0; t < n.length; t += 1)
|
|
@@ -583,7 +674,7 @@ function Xe(n, e) {
|
|
|
583
674
|
return !1;
|
|
584
675
|
return !0;
|
|
585
676
|
}
|
|
586
|
-
const
|
|
677
|
+
const V = K("MotionController"), fe = {
|
|
587
678
|
ease: [0.25, 0.1, 0.25, 1],
|
|
588
679
|
"ease-in": [0.42, 0, 1, 1],
|
|
589
680
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -616,86 +707,85 @@ const W = B("MotionController"), ce = {
|
|
|
616
707
|
function v(n) {
|
|
617
708
|
return n <= 0 ? 0 : n >= 1 ? 1 : n;
|
|
618
709
|
}
|
|
619
|
-
function
|
|
710
|
+
function pe(n) {
|
|
620
711
|
if (n == null) return;
|
|
621
712
|
const e = `${n}`.trim();
|
|
622
713
|
if (!e) return;
|
|
623
714
|
const t = Number.parseFloat(e);
|
|
624
715
|
return Number.isFinite(t) ? t : void 0;
|
|
625
716
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
return e?.escape ? e.escape(n) : n.replace(/[^a-zA-Z0-9_-]/g, (t) => `\\${t}`);
|
|
717
|
+
function me(n) {
|
|
718
|
+
return typeof CSS < "u" && CSS.escape ? CSS.escape(n) : n.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
629
719
|
}
|
|
630
|
-
function
|
|
631
|
-
const
|
|
632
|
-
function E(f,
|
|
633
|
-
return ((3 *
|
|
720
|
+
function he(n, e, t, r) {
|
|
721
|
+
const m = new Float32Array(11);
|
|
722
|
+
function E(f, p, y) {
|
|
723
|
+
return ((3 * p - 3 * y + 1) * f + (3 * y - 6 * p)) * f * f + 3 * p * f;
|
|
634
724
|
}
|
|
635
|
-
function
|
|
636
|
-
return 3 * (3 *
|
|
725
|
+
function R(f, p, y) {
|
|
726
|
+
return 3 * (3 * p - 3 * y + 1) * f * f + 2 * (3 * y - 6 * p) * f + 3 * p;
|
|
637
727
|
}
|
|
638
|
-
function O(f,
|
|
728
|
+
function O(f, p) {
|
|
639
729
|
for (let y = 0; y < 4; y += 1) {
|
|
640
|
-
const
|
|
641
|
-
if (
|
|
642
|
-
return
|
|
643
|
-
const
|
|
644
|
-
|
|
730
|
+
const C = R(p, n, t);
|
|
731
|
+
if (C === 0)
|
|
732
|
+
return p;
|
|
733
|
+
const T = E(p, n, t) - f;
|
|
734
|
+
p -= T / C;
|
|
645
735
|
}
|
|
646
|
-
return
|
|
736
|
+
return p;
|
|
647
737
|
}
|
|
648
|
-
function _(f,
|
|
649
|
-
let
|
|
738
|
+
function _(f, p, y) {
|
|
739
|
+
let C = 0, T = 0, A = 0;
|
|
650
740
|
do
|
|
651
|
-
|
|
652
|
-
while (Math.abs(
|
|
653
|
-
return
|
|
741
|
+
T = p + (y - p) / 2, C = E(T, n, t) - f, C > 0 ? y = T : p = T;
|
|
742
|
+
while (Math.abs(C) > 1e-7 && ++A < 10);
|
|
743
|
+
return T;
|
|
654
744
|
}
|
|
655
745
|
function b(f) {
|
|
656
|
-
let
|
|
657
|
-
const
|
|
658
|
-
for (; y !==
|
|
659
|
-
|
|
746
|
+
let p = 0, y = 1;
|
|
747
|
+
const C = 10;
|
|
748
|
+
for (; y !== C && m[y] <= f; y += 1)
|
|
749
|
+
p += 0.1;
|
|
660
750
|
y -= 1;
|
|
661
|
-
const
|
|
662
|
-
return L >= 1e-3 ? O(f,
|
|
751
|
+
const T = (f - m[y]) / (m[y + 1] - m[y]), A = p + T * 0.1, L = R(A, n, t);
|
|
752
|
+
return L >= 1e-3 ? O(f, A) : L === 0 ? A : _(f, p, p + 0.1);
|
|
663
753
|
}
|
|
664
754
|
for (let f = 0; f < 11; f += 1)
|
|
665
|
-
|
|
755
|
+
m[f] = E(f * 0.1, n, t);
|
|
666
756
|
return (f) => f <= 0 ? 0 : f >= 1 ? 1 : E(b(f), e, r);
|
|
667
757
|
}
|
|
668
|
-
function
|
|
758
|
+
function rt(n) {
|
|
669
759
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(n);
|
|
670
760
|
if (!e)
|
|
671
761
|
return (s) => v(s);
|
|
672
762
|
const t = Math.max(1, parseInt(e[1], 10)), r = (e[2] ?? "end").toLowerCase();
|
|
673
763
|
return r === "start" || r === "jump-start" ? (s) => v(Math.ceil(s * t) / t) : r === "none" || r === "jump-none" ? (s) => v(Math.round(s * t) / t) : r === "both" || r === "jump-both" ? (s) => v((Math.floor(s * t) + 0.5) / t) : (s) => v(Math.floor(s * t) / t);
|
|
674
764
|
}
|
|
675
|
-
function
|
|
765
|
+
function nt(n) {
|
|
676
766
|
if (!n)
|
|
677
767
|
return (t) => v(t);
|
|
678
768
|
const e = n.trim().toLowerCase();
|
|
679
769
|
if (!e || e === "linear")
|
|
680
770
|
return (t) => v(t);
|
|
681
|
-
if (
|
|
682
|
-
const [t, r, s, i] =
|
|
683
|
-
return (
|
|
771
|
+
if (fe[e]) {
|
|
772
|
+
const [t, r, s, i] = fe[e], a = he(t, r, s, i);
|
|
773
|
+
return (c) => v(a(v(c)));
|
|
684
774
|
}
|
|
685
775
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
686
776
|
const r = e.slice(13, -1).split(",").map((s) => Number.parseFloat(s.trim()));
|
|
687
777
|
if (r.length === 4 && r.every((s) => Number.isFinite(s))) {
|
|
688
|
-
const [s, i, a,
|
|
689
|
-
return (d) => v(
|
|
778
|
+
const [s, i, a, c] = r, l = he(s, i, a, c);
|
|
779
|
+
return (d) => v(l(v(d)));
|
|
690
780
|
}
|
|
691
781
|
}
|
|
692
782
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
693
|
-
const t =
|
|
783
|
+
const t = rt(e);
|
|
694
784
|
return (r) => t(v(r));
|
|
695
785
|
}
|
|
696
786
|
return (t) => v(t);
|
|
697
787
|
}
|
|
698
|
-
function
|
|
788
|
+
function st(n) {
|
|
699
789
|
if (!n)
|
|
700
790
|
return;
|
|
701
791
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(n);
|
|
@@ -705,7 +795,7 @@ function Ze(n) {
|
|
|
705
795
|
if (![t, r, s, i].some((a) => !Number.isFinite(a)))
|
|
706
796
|
return { inStart: t, inEnd: r, outStart: s, outEnd: i };
|
|
707
797
|
}
|
|
708
|
-
class
|
|
798
|
+
class ot {
|
|
709
799
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
710
800
|
observer;
|
|
711
801
|
observeScheduled = !1;
|
|
@@ -729,7 +819,7 @@ class Qe {
|
|
|
729
819
|
try {
|
|
730
820
|
e();
|
|
731
821
|
} catch (t) {
|
|
732
|
-
|
|
822
|
+
V.warn("Failed to cleanup binding listener", t);
|
|
733
823
|
}
|
|
734
824
|
this.globalCleanups.clear(), this.elementStates.clear(), this.styleToElements.clear(), this.bindingsByStyle.clear(), this.pendingScanStyles.clear(), this.scanScheduled = !1, this.observer && (this.observer.disconnect(), this.observer = void 0);
|
|
735
825
|
}
|
|
@@ -739,7 +829,7 @@ class Qe {
|
|
|
739
829
|
const r = (JSON.parse(e).motionBindings ?? []).map((s) => this.parseBinding(s)).filter((s) => s !== void 0);
|
|
740
830
|
return r.length === 0 ? void 0 : { bindings: r };
|
|
741
831
|
} catch (t) {
|
|
742
|
-
|
|
832
|
+
V.warn("Failed to parse motion metadata", t);
|
|
743
833
|
return;
|
|
744
834
|
}
|
|
745
835
|
}
|
|
@@ -747,16 +837,16 @@ class Qe {
|
|
|
747
837
|
const t = e.source?.trim();
|
|
748
838
|
if (!t)
|
|
749
839
|
return;
|
|
750
|
-
const r =
|
|
840
|
+
const r = pe(e.min) ?? 0, s = pe(e.max), i = s === void 0 ? r + 100 : s, a = (e.clamp ?? "clamp").trim().toLowerCase(), c = !!e.reverse, l = nt(e.ease), d = st(e.map), m = e.targetId?.trim() || void 0;
|
|
751
841
|
return Number.isNaN(r) || Number.isNaN(i) ? void 0 : {
|
|
752
842
|
source: t.toLowerCase(),
|
|
753
843
|
min: r,
|
|
754
844
|
max: i,
|
|
755
845
|
clamp: a === "freeze-start" || a === "freeze-end" || a === "unclamped" ? a : "clamp",
|
|
756
|
-
reverse:
|
|
757
|
-
ease:
|
|
846
|
+
reverse: c,
|
|
847
|
+
ease: l,
|
|
758
848
|
map: d,
|
|
759
|
-
targetId:
|
|
849
|
+
targetId: m
|
|
760
850
|
};
|
|
761
851
|
}
|
|
762
852
|
ensureObserver() {
|
|
@@ -805,7 +895,7 @@ class Qe {
|
|
|
805
895
|
const t = this.bindingsByStyle.get(e);
|
|
806
896
|
if (!t || typeof document > "u")
|
|
807
897
|
return;
|
|
808
|
-
const r = `.${
|
|
898
|
+
const r = `.${me(e)}`;
|
|
809
899
|
document.querySelectorAll(r).forEach((i) => this.applyStyleToElement(i, e, t));
|
|
810
900
|
}
|
|
811
901
|
applyStyleToElement(e, t, r) {
|
|
@@ -840,12 +930,12 @@ class Qe {
|
|
|
840
930
|
i();
|
|
841
931
|
const a = new AbortController();
|
|
842
932
|
s.addEventListener("scroll", i, { passive: !0, signal: a.signal }), this.registerCleanup(e, t, () => a.abort());
|
|
843
|
-
const
|
|
844
|
-
window.addEventListener("resize",
|
|
933
|
+
const c = () => i();
|
|
934
|
+
window.addEventListener("resize", c), this.registerCleanup(e, t, () => window.removeEventListener("resize", c));
|
|
845
935
|
}
|
|
846
936
|
resolveScrollContainer(e, t) {
|
|
847
937
|
if (t.targetId) {
|
|
848
|
-
const r = `[data-ikon-motion-source="${
|
|
938
|
+
const r = `[data-ikon-motion-source="${me(t.targetId)}"]`, s = typeof document < "u" ? document.querySelector(r) : null;
|
|
849
939
|
if (s)
|
|
850
940
|
return s;
|
|
851
941
|
}
|
|
@@ -855,10 +945,10 @@ class Qe {
|
|
|
855
945
|
const s = t.max - t.min, i = s === 0 ? r > t.min ? 1 : 0 : (r - t.min) / s;
|
|
856
946
|
let a = this.applyClamp(i, t.clamp);
|
|
857
947
|
t.reverse && (a = 1 - a);
|
|
858
|
-
const
|
|
859
|
-
if (e.style.setProperty("--tw-motion-bind-source-value", `${r}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${
|
|
860
|
-
const
|
|
861
|
-
|
|
948
|
+
const c = t.ease(a), l = Number.isFinite(c) ? c : 0, d = l * 100;
|
|
949
|
+
if (e.style.setProperty("--tw-motion-bind-source-value", `${r}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${l}`), e.style.setProperty("--tw-motion-bind-progress", `${d}`), t.map) {
|
|
950
|
+
const m = this.applyMap(d, t.map);
|
|
951
|
+
m !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${m}`);
|
|
862
952
|
} else
|
|
863
953
|
e.style.removeProperty("--tw-motion-bind-value");
|
|
864
954
|
}
|
|
@@ -905,14 +995,17 @@ class Qe {
|
|
|
905
995
|
this.cleanupElementStyle(e, s);
|
|
906
996
|
}
|
|
907
997
|
cleanupElementStyle(e, t) {
|
|
908
|
-
const r = this.elementStates.get(e)
|
|
998
|
+
const r = this.elementStates.get(e);
|
|
999
|
+
if (!r)
|
|
1000
|
+
return;
|
|
1001
|
+
const s = r.get(t);
|
|
909
1002
|
if (!s)
|
|
910
1003
|
return;
|
|
911
1004
|
for (const a of s) {
|
|
912
1005
|
try {
|
|
913
1006
|
a();
|
|
914
|
-
} catch (
|
|
915
|
-
|
|
1007
|
+
} catch (c) {
|
|
1008
|
+
V.warn("Failed to cleanup listener", c);
|
|
916
1009
|
}
|
|
917
1010
|
this.globalCleanups.delete(a);
|
|
918
1011
|
}
|
|
@@ -956,16 +1049,16 @@ class Qe {
|
|
|
956
1049
|
}
|
|
957
1050
|
}
|
|
958
1051
|
}
|
|
959
|
-
const
|
|
960
|
-
function
|
|
961
|
-
const e =
|
|
1052
|
+
const ye = new ot(), J = "ikon-ds";
|
|
1053
|
+
function Mt(n) {
|
|
1054
|
+
const e = ae(({ styleId: r, css: s, common: i }) => {
|
|
962
1055
|
if (!r || typeof document > "u") return;
|
|
963
|
-
let a = document.getElementById(
|
|
964
|
-
a || (a = document.createElement("style"), a.id =
|
|
965
|
-
}, []), t =
|
|
966
|
-
typeof document < "u" && document.getElementById(
|
|
1056
|
+
let a = document.getElementById(J);
|
|
1057
|
+
a || (a = document.createElement("style"), a.id = J, document.head.appendChild(a)), s && (a.innerHTML += s), ye.registerStyle(r, i);
|
|
1058
|
+
}, []), t = ae(() => {
|
|
1059
|
+
typeof document < "u" && document.getElementById(J)?.remove(), ye.reset();
|
|
967
1060
|
}, []);
|
|
968
|
-
return
|
|
1061
|
+
return G(() => {
|
|
969
1062
|
if (!n) return;
|
|
970
1063
|
for (const s of n.getUiStyles())
|
|
971
1064
|
e(s);
|
|
@@ -973,50 +1066,50 @@ function Ct(n) {
|
|
|
973
1066
|
return () => {
|
|
974
1067
|
r?.(), t();
|
|
975
1068
|
};
|
|
976
|
-
}, [n, t, e]),
|
|
1069
|
+
}, [n, t, e]), G(() => () => t(), [t]), { setStyle: e, reset: t };
|
|
977
1070
|
}
|
|
978
|
-
var
|
|
979
|
-
function
|
|
980
|
-
var e =
|
|
1071
|
+
var it = typeof global == "object" && global && global.Object === Object && global, at = typeof self == "object" && self && self.Object === Object && self, ct = it || at || Function("return this")(), F = ct.Symbol, ve = Object.prototype, lt = ve.hasOwnProperty, ut = ve.toString, P = F ? F.toStringTag : void 0;
|
|
1072
|
+
function dt(n) {
|
|
1073
|
+
var e = lt.call(n, P), t = n[P];
|
|
981
1074
|
try {
|
|
982
1075
|
n[P] = void 0;
|
|
983
1076
|
var r = !0;
|
|
984
1077
|
} catch {
|
|
985
1078
|
}
|
|
986
|
-
var s =
|
|
1079
|
+
var s = ut.call(n);
|
|
987
1080
|
return r && (e ? n[P] = t : delete n[P]), s;
|
|
988
1081
|
}
|
|
989
|
-
var
|
|
990
|
-
function
|
|
991
|
-
return
|
|
1082
|
+
var ft = Object.prototype, pt = ft.toString;
|
|
1083
|
+
function mt(n) {
|
|
1084
|
+
return pt.call(n);
|
|
992
1085
|
}
|
|
993
|
-
var
|
|
994
|
-
function
|
|
995
|
-
return n == null ? n === void 0 ?
|
|
1086
|
+
var ht = "[object Null]", yt = "[object Undefined]", Se = F ? F.toStringTag : void 0;
|
|
1087
|
+
function St(n) {
|
|
1088
|
+
return n == null ? n === void 0 ? yt : ht : Se && Se in Object(n) ? dt(n) : mt(n);
|
|
996
1089
|
}
|
|
997
|
-
function
|
|
1090
|
+
function gt(n) {
|
|
998
1091
|
return n != null && typeof n == "object";
|
|
999
1092
|
}
|
|
1000
|
-
var
|
|
1001
|
-
function
|
|
1002
|
-
return typeof n == "string" || !
|
|
1093
|
+
var bt = Array.isArray, vt = "[object String]";
|
|
1094
|
+
function Et(n) {
|
|
1095
|
+
return typeof n == "string" || !bt(n) && gt(n) && St(n) == vt;
|
|
1003
1096
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1097
|
+
const ge = "ikonUiModules";
|
|
1098
|
+
function X(n) {
|
|
1006
1099
|
return typeof n == "object" && n !== null && !Array.isArray(n);
|
|
1007
1100
|
}
|
|
1008
|
-
function
|
|
1101
|
+
function Rt(n) {
|
|
1009
1102
|
if (!Array.isArray(n))
|
|
1010
1103
|
return;
|
|
1011
1104
|
const e = /* @__PURE__ */ new Set();
|
|
1012
1105
|
for (const t of n) {
|
|
1013
|
-
if (!
|
|
1106
|
+
if (!Et(t)) continue;
|
|
1014
1107
|
const r = t.trim();
|
|
1015
1108
|
r && (e.has(r) || e.add(r));
|
|
1016
1109
|
}
|
|
1017
1110
|
return Array.from(e);
|
|
1018
1111
|
}
|
|
1019
|
-
function
|
|
1112
|
+
function jt(n, e) {
|
|
1020
1113
|
if (n === e)
|
|
1021
1114
|
return !0;
|
|
1022
1115
|
if (!n || !e)
|
|
@@ -1028,21 +1121,21 @@ function Nt(n, e) {
|
|
|
1028
1121
|
return !1;
|
|
1029
1122
|
return !0;
|
|
1030
1123
|
}
|
|
1031
|
-
function
|
|
1032
|
-
if (!(!
|
|
1033
|
-
return
|
|
1124
|
+
function Tt(n) {
|
|
1125
|
+
if (!(!X(n) || !Object.prototype.hasOwnProperty.call(n, ge)))
|
|
1126
|
+
return Rt(n[ge]);
|
|
1034
1127
|
}
|
|
1035
|
-
function
|
|
1128
|
+
function It(...n) {
|
|
1036
1129
|
for (const e of n) {
|
|
1037
|
-
const t =
|
|
1130
|
+
const t = Tt(e);
|
|
1038
1131
|
if (t !== void 0)
|
|
1039
1132
|
return t;
|
|
1040
1133
|
}
|
|
1041
1134
|
}
|
|
1042
|
-
function
|
|
1043
|
-
if (!
|
|
1135
|
+
function Pt(n) {
|
|
1136
|
+
if (!X(n))
|
|
1044
1137
|
return;
|
|
1045
|
-
const e = n, t = Object.keys(e).find((
|
|
1138
|
+
const e = n, t = Object.keys(e).find((l) => l.toLowerCase() === "modules");
|
|
1046
1139
|
if (!t)
|
|
1047
1140
|
return;
|
|
1048
1141
|
const r = e[t];
|
|
@@ -1051,56 +1144,56 @@ function kt(n) {
|
|
|
1051
1144
|
if (!Array.isArray(r))
|
|
1052
1145
|
return;
|
|
1053
1146
|
const s = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
1054
|
-
for (const
|
|
1055
|
-
if (typeof
|
|
1056
|
-
const b =
|
|
1147
|
+
for (const l of r) {
|
|
1148
|
+
if (typeof l == "string") {
|
|
1149
|
+
const b = l.trim();
|
|
1057
1150
|
if (!b || a.has(b))
|
|
1058
1151
|
continue;
|
|
1059
1152
|
s.push(b), a.add(b);
|
|
1060
1153
|
continue;
|
|
1061
1154
|
}
|
|
1062
|
-
if (!
|
|
1155
|
+
if (!X(l))
|
|
1063
1156
|
continue;
|
|
1064
|
-
const d =
|
|
1065
|
-
if (!
|
|
1157
|
+
const d = l, m = Object.keys(d).find((b) => b.toLowerCase() === "name");
|
|
1158
|
+
if (!m)
|
|
1066
1159
|
continue;
|
|
1067
|
-
const E = d[
|
|
1160
|
+
const E = d[m];
|
|
1068
1161
|
if (typeof E != "string")
|
|
1069
1162
|
continue;
|
|
1070
|
-
const
|
|
1071
|
-
if (!
|
|
1163
|
+
const R = E.trim();
|
|
1164
|
+
if (!R)
|
|
1072
1165
|
continue;
|
|
1073
1166
|
const O = Object.keys(d).find((b) => b.toLowerCase() === "javascript"), _ = O ? d[O] : void 0;
|
|
1074
|
-
typeof _ == "string" && i.set(
|
|
1167
|
+
typeof _ == "string" && i.set(R, _), a.has(R) || (s.push(R), a.add(R));
|
|
1075
1168
|
}
|
|
1076
1169
|
if (!s.length && i.size === 0)
|
|
1077
1170
|
return { modules: [] };
|
|
1078
|
-
const
|
|
1079
|
-
name:
|
|
1171
|
+
const c = Array.from(i.entries()).map(([l, d]) => ({
|
|
1172
|
+
name: l,
|
|
1080
1173
|
javascript: d
|
|
1081
1174
|
}));
|
|
1082
|
-
return
|
|
1175
|
+
return c.length > 0 ? { modules: s, inlineModules: c } : { modules: s };
|
|
1083
1176
|
}
|
|
1084
1177
|
export {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1178
|
+
He as IKON_UI_BASE_MODULE,
|
|
1179
|
+
H as IKON_UI_STREAM_CATEGORY,
|
|
1180
|
+
At as IkonUi,
|
|
1181
|
+
Ze as IkonUiRegistry,
|
|
1182
|
+
Ot as IkonUiSurface,
|
|
1183
|
+
De as UiComponentRegistry,
|
|
1184
|
+
$e as UiRenderer,
|
|
1185
|
+
Lt as UiStreamStore,
|
|
1186
|
+
jt as areIkonUiModuleListsEqual,
|
|
1187
|
+
Ge as createBaseResolvers,
|
|
1188
|
+
wt as createComponentLibrary,
|
|
1189
|
+
_t as createIkonUiRegistry,
|
|
1190
|
+
qe as isIkonUiCategoryMatch,
|
|
1191
|
+
Xe as loadBaseModule,
|
|
1192
|
+
Rt as normalizeIkonUiModuleList,
|
|
1193
|
+
Pt as parseIkonUiInitPayload,
|
|
1194
|
+
Tt as readIkonUiModules,
|
|
1195
|
+
It as readIkonUiModulesFromSources,
|
|
1196
|
+
Ke as registerBaseModule,
|
|
1197
|
+
Mt as useIkonStyles,
|
|
1198
|
+
Ue as useUiStore
|
|
1106
1199
|
};
|