praxis-kit 4.0.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_shared/diagnostics.d.ts +14 -17
- package/dist/{chunk-DRGZ4ZI2.js → chunk-LA6WGQA6.js} +963 -633
- package/dist/contract/index.d.ts +39 -27
- package/dist/lit/index.d.ts +42 -30
- package/dist/lit/index.js +649 -413
- package/dist/preact/index.d.ts +45 -31
- package/dist/preact/index.js +1004 -684
- package/dist/react/index.d.ts +24 -11
- package/dist/react/index.js +21 -143
- package/dist/react/legacy.d.ts +3 -3
- package/dist/react/legacy.js +28 -147
- package/dist/{merge-refs-B0YcfdtP.d.ts → react-options-XrRof248.d.ts} +156 -100
- package/dist/solid/index.d.ts +45 -31
- package/dist/solid/index.js +517 -296
- package/dist/svelte/index.d.ts +55 -34
- package/dist/svelte/index.js +500 -296
- package/dist/tailwind/index.d.ts +29 -22
- package/dist/vite-plugin/index.d.ts +10 -12
- package/dist/vue/index.d.ts +45 -31
- package/dist/vue/index.js +893 -692
- package/dist/web/index.d.ts +43 -31
- package/dist/web/index.js +648 -406
- package/package.json +4 -4
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
// ../../lib/adapter-utils/src/define-component.ts
|
|
1
|
+
// ../../lib/adapter-utils/src/runtime/define-component.ts
|
|
2
2
|
function defineContractComponent(options) {
|
|
3
3
|
return (factory) => factory(options);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
// ../../lib/
|
|
7
|
-
function
|
|
8
|
-
|
|
6
|
+
// ../../lib/primitive/src/guards/foundational/is-defined.ts
|
|
7
|
+
function isUndefined(value) {
|
|
8
|
+
return value === void 0;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
|
|
11
|
+
// ../../lib/primitive/src/guards/foundational/is-null.ts
|
|
12
|
+
function isNull(value) {
|
|
13
|
+
return value === null;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
// ../../lib/primitive/src/utils/is-object.ts
|
|
@@ -36,197 +38,6 @@ function isPlainObject(value) {
|
|
|
36
38
|
return proto === Object.prototype || proto === null;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
// ../../lib/primitive/src/utils/assert-never.ts
|
|
40
|
-
function assertNever(value) {
|
|
41
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// ../../lib/primitive/src/utils/iterate.ts
|
|
45
|
-
function find(iterable, callback) {
|
|
46
|
-
for (const value of iterable) {
|
|
47
|
-
const result = callback(value);
|
|
48
|
-
if (result != null) {
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
function some(iterable, predicate) {
|
|
55
|
-
for (const value of iterable) {
|
|
56
|
-
if (predicate(value)) return true;
|
|
57
|
-
}
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
function every(iterable, predicate) {
|
|
61
|
-
let index = 0;
|
|
62
|
-
for (const value of iterable) {
|
|
63
|
-
if (!predicate(value, index++)) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
function* filter(iterable, predicate) {
|
|
70
|
-
let index = 0;
|
|
71
|
-
for (const value of iterable) {
|
|
72
|
-
if (predicate(value, index++)) {
|
|
73
|
-
yield value;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function* map(iterable, callback) {
|
|
78
|
-
let index = 0;
|
|
79
|
-
for (const value of iterable) {
|
|
80
|
-
yield callback(value, index++);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function forEach(iterable, callback) {
|
|
84
|
-
let index = 0;
|
|
85
|
-
for (const value of iterable) {
|
|
86
|
-
callback(value, index++);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function reduce(iterable, initial, callback) {
|
|
90
|
-
let accumulator = initial;
|
|
91
|
-
let index = 0;
|
|
92
|
-
for (const value of iterable) {
|
|
93
|
-
accumulator = callback(accumulator, value, index++);
|
|
94
|
-
}
|
|
95
|
-
return accumulator;
|
|
96
|
-
}
|
|
97
|
-
function collect(iterable, callback) {
|
|
98
|
-
const result = {};
|
|
99
|
-
let index = 0;
|
|
100
|
-
for (const value of iterable) {
|
|
101
|
-
const entry = callback(value, index++);
|
|
102
|
-
if (entry === null) {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
result[entry[0]] = entry[1];
|
|
106
|
-
}
|
|
107
|
-
return result;
|
|
108
|
-
}
|
|
109
|
-
function findLast(value, callback) {
|
|
110
|
-
for (let index = value.length - 1; index >= 0; index--) {
|
|
111
|
-
const result = callback(value[index], index);
|
|
112
|
-
if (result != null) {
|
|
113
|
-
return result;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
function* items(collection) {
|
|
119
|
-
for (let i = 0; i < collection.length; i++) {
|
|
120
|
-
const item = collection.item(i);
|
|
121
|
-
if (item !== null) {
|
|
122
|
-
yield item;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function nodeList(list) {
|
|
127
|
-
return {
|
|
128
|
-
*[Symbol.iterator]() {
|
|
129
|
-
for (let i = 0; i < list.length; i++) {
|
|
130
|
-
const node = list.item(i);
|
|
131
|
-
if (node !== null) {
|
|
132
|
-
yield node;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function mapEntries(m) {
|
|
139
|
-
return m.entries();
|
|
140
|
-
}
|
|
141
|
-
function set(s) {
|
|
142
|
-
return s.values();
|
|
143
|
-
}
|
|
144
|
-
function hasOwn(object, key) {
|
|
145
|
-
return Object.hasOwn(object, key);
|
|
146
|
-
}
|
|
147
|
-
function* entries(object) {
|
|
148
|
-
for (const key in object) {
|
|
149
|
-
if (!hasOwn(object, key)) continue;
|
|
150
|
-
yield [key, object[key]];
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function* keys(object) {
|
|
154
|
-
for (const [key] of entries(object)) {
|
|
155
|
-
yield key;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function* values(object) {
|
|
159
|
-
for (const [, value] of entries(object)) {
|
|
160
|
-
yield value;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
function mapValues(object, callback) {
|
|
164
|
-
const result = {};
|
|
165
|
-
for (const [key, value] of entries(object)) {
|
|
166
|
-
result[key] = callback(value, key);
|
|
167
|
-
}
|
|
168
|
-
return result;
|
|
169
|
-
}
|
|
170
|
-
function forEachEntry(object, callback) {
|
|
171
|
-
for (const [key, value] of entries(object)) {
|
|
172
|
-
callback(key, value);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
function forEachKey(object, callback) {
|
|
176
|
-
for (const key of keys(object)) {
|
|
177
|
-
callback(key);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function forEachValue(object, callback) {
|
|
181
|
-
for (const value of values(object)) {
|
|
182
|
-
callback(value);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
function forEachSet(s, callback) {
|
|
186
|
-
for (const value of s) {
|
|
187
|
-
callback(value);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
var iterate = Object.freeze({
|
|
191
|
-
entries,
|
|
192
|
-
filter,
|
|
193
|
-
find,
|
|
194
|
-
findLast,
|
|
195
|
-
forEach,
|
|
196
|
-
forEachEntry,
|
|
197
|
-
forEachKey,
|
|
198
|
-
forEachSet,
|
|
199
|
-
forEachValue,
|
|
200
|
-
items,
|
|
201
|
-
keys,
|
|
202
|
-
map,
|
|
203
|
-
mapEntries,
|
|
204
|
-
mapValues,
|
|
205
|
-
nodeList,
|
|
206
|
-
reduce,
|
|
207
|
-
collect,
|
|
208
|
-
set,
|
|
209
|
-
some,
|
|
210
|
-
every,
|
|
211
|
-
values
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
// ../../lib/primitive/src/utils/merge-refs.ts
|
|
215
|
-
function mergeRefsCore(...refs) {
|
|
216
|
-
const active = refs.filter((r) => r != null);
|
|
217
|
-
if (active.length === 0) return null;
|
|
218
|
-
if (active.length === 1) return active[0];
|
|
219
|
-
return (value) => {
|
|
220
|
-
iterate.forEach(active, (ref) => {
|
|
221
|
-
if (typeof ref === "function") {
|
|
222
|
-
ref(value);
|
|
223
|
-
} else {
|
|
224
|
-
ref.current = value;
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
41
|
// ../../lib/primitive/src/constants/aria/global-aria-attributes.ts
|
|
231
42
|
var GLOBAL_ARIA_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
232
43
|
"aria-atomic",
|
|
@@ -249,7 +60,7 @@ var GLOBAL_ARIA_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
|
249
60
|
]);
|
|
250
61
|
|
|
251
62
|
// ../../lib/primitive/src/constants/aria/implicit-role-record.ts
|
|
252
|
-
var IMPLICIT_ROLE_RECORD = {
|
|
63
|
+
var IMPLICIT_ROLE_RECORD = Object.freeze({
|
|
253
64
|
// Landmarks
|
|
254
65
|
article: "article",
|
|
255
66
|
aside: "complementary",
|
|
@@ -285,8 +96,8 @@ var IMPLICIT_ROLE_RECORD = {
|
|
|
285
96
|
meter: "meter",
|
|
286
97
|
output: "status",
|
|
287
98
|
progress: "progressbar"
|
|
288
|
-
};
|
|
289
|
-
var INPUT_TYPE_ROLE_MAP = {
|
|
99
|
+
});
|
|
100
|
+
var INPUT_TYPE_ROLE_MAP = Object.freeze({
|
|
290
101
|
checkbox: "checkbox",
|
|
291
102
|
radio: "radio",
|
|
292
103
|
range: "slider",
|
|
@@ -300,18 +111,106 @@ var INPUT_TYPE_ROLE_MAP = {
|
|
|
300
111
|
submit: "button",
|
|
301
112
|
reset: "button",
|
|
302
113
|
image: "button"
|
|
303
|
-
};
|
|
304
|
-
var STRONG_ROLES = [
|
|
114
|
+
});
|
|
115
|
+
var STRONG_ROLES = Object.freeze([
|
|
305
116
|
"main",
|
|
306
117
|
"navigation",
|
|
307
118
|
"complementary",
|
|
308
119
|
"contentinfo",
|
|
309
120
|
"banner"
|
|
310
|
-
];
|
|
311
|
-
var STANDALONE_ROLES = [
|
|
121
|
+
]);
|
|
122
|
+
var STANDALONE_ROLES = Object.freeze([
|
|
123
|
+
"article"
|
|
124
|
+
]);
|
|
312
125
|
var STRONG_ROLES_SET = new Set(STRONG_ROLES);
|
|
313
126
|
var STANDALONE_ROLES_SET = new Set(STANDALONE_ROLES);
|
|
314
127
|
|
|
128
|
+
// ../../lib/primitive/src/constants/aria/known-aria-roles.ts
|
|
129
|
+
var KNOWN_ARIA_ROLES = Object.freeze([
|
|
130
|
+
"alert",
|
|
131
|
+
"alertdialog",
|
|
132
|
+
"application",
|
|
133
|
+
"article",
|
|
134
|
+
"banner",
|
|
135
|
+
"blockquote",
|
|
136
|
+
"button",
|
|
137
|
+
"caption",
|
|
138
|
+
"cell",
|
|
139
|
+
"checkbox",
|
|
140
|
+
"code",
|
|
141
|
+
"columnheader",
|
|
142
|
+
"combobox",
|
|
143
|
+
"complementary",
|
|
144
|
+
"contentinfo",
|
|
145
|
+
"definition",
|
|
146
|
+
"deletion",
|
|
147
|
+
"dialog",
|
|
148
|
+
"document",
|
|
149
|
+
"emphasis",
|
|
150
|
+
"feed",
|
|
151
|
+
"figure",
|
|
152
|
+
"form",
|
|
153
|
+
"generic",
|
|
154
|
+
"grid",
|
|
155
|
+
"gridcell",
|
|
156
|
+
"group",
|
|
157
|
+
"heading",
|
|
158
|
+
"img",
|
|
159
|
+
"insertion",
|
|
160
|
+
"link",
|
|
161
|
+
"list",
|
|
162
|
+
"listbox",
|
|
163
|
+
"listitem",
|
|
164
|
+
"log",
|
|
165
|
+
"main",
|
|
166
|
+
"marquee",
|
|
167
|
+
"math",
|
|
168
|
+
"menu",
|
|
169
|
+
"menubar",
|
|
170
|
+
"menuitem",
|
|
171
|
+
"menuitemcheckbox",
|
|
172
|
+
"menuitemradio",
|
|
173
|
+
"meter",
|
|
174
|
+
"navigation",
|
|
175
|
+
"none",
|
|
176
|
+
"note",
|
|
177
|
+
"option",
|
|
178
|
+
"paragraph",
|
|
179
|
+
"presentation",
|
|
180
|
+
"progressbar",
|
|
181
|
+
"radio",
|
|
182
|
+
"radiogroup",
|
|
183
|
+
"region",
|
|
184
|
+
"row",
|
|
185
|
+
"rowgroup",
|
|
186
|
+
"rowheader",
|
|
187
|
+
"scrollbar",
|
|
188
|
+
"search",
|
|
189
|
+
"searchbox",
|
|
190
|
+
"separator",
|
|
191
|
+
"slider",
|
|
192
|
+
"spinbutton",
|
|
193
|
+
"status",
|
|
194
|
+
"strong",
|
|
195
|
+
"subscript",
|
|
196
|
+
"superscript",
|
|
197
|
+
"switch",
|
|
198
|
+
"tab",
|
|
199
|
+
"table",
|
|
200
|
+
"tablist",
|
|
201
|
+
"tabpanel",
|
|
202
|
+
"term",
|
|
203
|
+
"textbox",
|
|
204
|
+
"time",
|
|
205
|
+
"timer",
|
|
206
|
+
"toolbar",
|
|
207
|
+
"tooltip",
|
|
208
|
+
"tree",
|
|
209
|
+
"treegrid",
|
|
210
|
+
"treeitem"
|
|
211
|
+
]);
|
|
212
|
+
var KNOWN_ARIA_ROLES_SET = new Set(KNOWN_ARIA_ROLES);
|
|
213
|
+
|
|
315
214
|
// ../../lib/primitive/src/constants/aria/role-restricted-attributes.ts
|
|
316
215
|
var ROLE_RESTRICTED_ATTRIBUTES = /* @__PURE__ */ new Map([
|
|
317
216
|
[
|
|
@@ -463,19 +362,6 @@ var ROLE_RESTRICTED_ATTRIBUTES = /* @__PURE__ */ new Map([
|
|
|
463
362
|
]
|
|
464
363
|
]);
|
|
465
364
|
|
|
466
|
-
// ../../lib/primitive/src/constants/primitive/slot-name.ts
|
|
467
|
-
var SLOT_NAME = "Slot";
|
|
468
|
-
|
|
469
|
-
// ../../lib/primitive/src/guards/foundational/is-defined.ts
|
|
470
|
-
function isUndefined(value) {
|
|
471
|
-
return value === void 0;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
// ../../lib/primitive/src/guards/foundational/is-null.ts
|
|
475
|
-
function isNull(value) {
|
|
476
|
-
return value === null;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
365
|
// ../../lib/primitive/src/guards/aria/is-aria-attribute.ts
|
|
480
366
|
function isGlobalAriaAttribute(attr) {
|
|
481
367
|
return GLOBAL_ARIA_ATTRIBUTES.has(attr);
|
|
@@ -487,25 +373,256 @@ function isAriaAttributeValidForRole(attr, role) {
|
|
|
487
373
|
return allowedRoles.has(role);
|
|
488
374
|
}
|
|
489
375
|
|
|
490
|
-
// ../../lib/primitive/src/
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return void 0;
|
|
376
|
+
// ../../lib/primitive/src/constants/primitive/slot-name.ts
|
|
377
|
+
var SLOT_NAME = "Slot";
|
|
378
|
+
|
|
379
|
+
// ../../lib/primitive/src/guards/aria/is-aria-role.ts
|
|
380
|
+
function isStrongImplicitRole(tag) {
|
|
381
|
+
if (!(tag in IMPLICIT_ROLE_RECORD)) return false;
|
|
382
|
+
return STRONG_ROLES_SET.has(IMPLICIT_ROLE_RECORD[tag]);
|
|
383
|
+
}
|
|
384
|
+
function isStandaloneTag(tag) {
|
|
385
|
+
if (!(tag in IMPLICIT_ROLE_RECORD)) return false;
|
|
386
|
+
return STANDALONE_ROLES_SET.has(IMPLICIT_ROLE_RECORD[tag]);
|
|
387
|
+
}
|
|
388
|
+
function getInputImplicitRole(type) {
|
|
389
|
+
if (!isString(type) || !(type in INPUT_TYPE_ROLE_MAP)) return void 0;
|
|
390
|
+
return INPUT_TYPE_ROLE_MAP[type];
|
|
391
|
+
}
|
|
392
|
+
function getConditionalImplicitRole(tag, ariaLabel, ariaLabelledBy) {
|
|
393
|
+
const isNamed = isString(ariaLabel) || isString(ariaLabelledBy);
|
|
394
|
+
if (!isNamed) return void 0;
|
|
395
|
+
if (tag === "section") return "region";
|
|
396
|
+
if (tag === "form") return "form";
|
|
397
|
+
return void 0;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// ../../lib/primitive/src/guards/aria/is-known-aria-role.ts
|
|
401
|
+
function isKnownAriaRole(value) {
|
|
402
|
+
return isString(value) && KNOWN_ARIA_ROLES_SET.has(value);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// ../../lib/contract/src/aria/aria-role-policy.ts
|
|
406
|
+
function getImplicitRole(tag, props) {
|
|
407
|
+
if (tag in IMPLICIT_ROLE_RECORD) return IMPLICIT_ROLE_RECORD[tag];
|
|
408
|
+
if (tag === "input") return getInputImplicitRole(props?.type);
|
|
409
|
+
if (tag === "img") return props?.alt === "" ? "none" : "img";
|
|
410
|
+
if (tag === "section" || tag === "form") {
|
|
411
|
+
return getConditionalImplicitRole(tag, props?.["aria-label"], props?.["aria-labelledby"]);
|
|
412
|
+
}
|
|
413
|
+
return void 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// ../../lib/primitive/src/tag/resolve-tag.ts
|
|
417
|
+
function makeResolveTag(defaultTag) {
|
|
418
|
+
return function tag(as) {
|
|
419
|
+
return as ?? defaultTag;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// ../../lib/primitive/src/utils/assert-never.ts
|
|
424
|
+
function assertNever(value) {
|
|
425
|
+
throw new Error(`Unexpected value: ${String(value)}`);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// ../../lib/primitive/src/utils/cn.ts
|
|
429
|
+
import { clsx } from "clsx";
|
|
430
|
+
function cn(...inputs) {
|
|
431
|
+
return clsx(...inputs);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// ../../lib/primitive/src/utils/iterate.ts
|
|
435
|
+
function find(iterable, callback) {
|
|
436
|
+
for (const value of iterable) {
|
|
437
|
+
const result = callback(value);
|
|
438
|
+
if (result != null) {
|
|
439
|
+
return result;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return null;
|
|
443
|
+
}
|
|
444
|
+
function some(iterable, predicate) {
|
|
445
|
+
for (const value of iterable) {
|
|
446
|
+
if (predicate(value)) return true;
|
|
447
|
+
}
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
function every(iterable, predicate) {
|
|
451
|
+
let index = 0;
|
|
452
|
+
for (const value of iterable) {
|
|
453
|
+
if (!predicate(value, index++)) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
function* filter(iterable, predicate) {
|
|
460
|
+
let index = 0;
|
|
461
|
+
for (const value of iterable) {
|
|
462
|
+
if (predicate(value, index++)) {
|
|
463
|
+
yield value;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
function* map(iterable, callback) {
|
|
468
|
+
let index = 0;
|
|
469
|
+
for (const value of iterable) {
|
|
470
|
+
yield callback(value, index++);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
function forEach(iterable, callback) {
|
|
474
|
+
let index = 0;
|
|
475
|
+
for (const value of iterable) {
|
|
476
|
+
callback(value, index++);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
function reduce(iterable, initial, callback) {
|
|
480
|
+
let accumulator = initial;
|
|
481
|
+
let index = 0;
|
|
482
|
+
for (const value of iterable) {
|
|
483
|
+
accumulator = callback(accumulator, value, index++);
|
|
484
|
+
}
|
|
485
|
+
return accumulator;
|
|
486
|
+
}
|
|
487
|
+
function collect(iterable, callback) {
|
|
488
|
+
const result = {};
|
|
489
|
+
let index = 0;
|
|
490
|
+
for (const value of iterable) {
|
|
491
|
+
const entry = callback(value, index++);
|
|
492
|
+
if (entry === null) {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
result[entry[0]] = entry[1];
|
|
496
|
+
}
|
|
497
|
+
return result;
|
|
498
|
+
}
|
|
499
|
+
function findLast(value, callback) {
|
|
500
|
+
for (let index = value.length - 1; index >= 0; index--) {
|
|
501
|
+
const result = callback(value[index], index);
|
|
502
|
+
if (result != null) {
|
|
503
|
+
return result;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
function* items(collection) {
|
|
509
|
+
for (let i = 0; i < collection.length; i++) {
|
|
510
|
+
const item = collection.item(i);
|
|
511
|
+
if (item !== null) {
|
|
512
|
+
yield item;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
function nodeList(list) {
|
|
517
|
+
return {
|
|
518
|
+
*[Symbol.iterator]() {
|
|
519
|
+
for (let i = 0; i < list.length; i++) {
|
|
520
|
+
const node = list.item(i);
|
|
521
|
+
if (node !== null) {
|
|
522
|
+
yield node;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
function mapEntries(m) {
|
|
529
|
+
return m.entries();
|
|
530
|
+
}
|
|
531
|
+
function set(s) {
|
|
532
|
+
return s.values();
|
|
533
|
+
}
|
|
534
|
+
function hasOwn(object, key) {
|
|
535
|
+
return Object.hasOwn(object, key);
|
|
536
|
+
}
|
|
537
|
+
function* entries(object) {
|
|
538
|
+
for (const key in object) {
|
|
539
|
+
if (!hasOwn(object, key)) continue;
|
|
540
|
+
yield [key, object[key]];
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function* keys(object) {
|
|
544
|
+
for (const [key] of entries(object)) {
|
|
545
|
+
yield key;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
function* values(object) {
|
|
549
|
+
for (const [, value] of entries(object)) {
|
|
550
|
+
yield value;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
function mapValues(object, callback) {
|
|
554
|
+
const result = {};
|
|
555
|
+
for (const [key, value] of entries(object)) {
|
|
556
|
+
result[key] = callback(value, key);
|
|
557
|
+
}
|
|
558
|
+
return result;
|
|
559
|
+
}
|
|
560
|
+
function forEachEntry(object, callback) {
|
|
561
|
+
for (const [key, value] of entries(object)) {
|
|
562
|
+
callback(key, value);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
function forEachKey(object, callback) {
|
|
566
|
+
for (const key of keys(object)) {
|
|
567
|
+
callback(key);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
function forEachValue(object, callback) {
|
|
571
|
+
for (const value of values(object)) {
|
|
572
|
+
callback(value);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
function forEachSet(s, callback) {
|
|
576
|
+
for (const value of s) {
|
|
577
|
+
callback(value);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
var iterate = Object.freeze({
|
|
581
|
+
entries,
|
|
582
|
+
filter,
|
|
583
|
+
find,
|
|
584
|
+
findLast,
|
|
585
|
+
forEach,
|
|
586
|
+
forEachEntry,
|
|
587
|
+
forEachKey,
|
|
588
|
+
forEachSet,
|
|
589
|
+
forEachValue,
|
|
590
|
+
items,
|
|
591
|
+
keys,
|
|
592
|
+
map,
|
|
593
|
+
mapEntries,
|
|
594
|
+
mapValues,
|
|
595
|
+
nodeList,
|
|
596
|
+
reduce,
|
|
597
|
+
collect,
|
|
598
|
+
set,
|
|
599
|
+
some,
|
|
600
|
+
every,
|
|
601
|
+
values
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
// ../../lib/primitive/src/utils/merge-refs.ts
|
|
605
|
+
function mergeRefsCore(...refs) {
|
|
606
|
+
const active = refs.filter((r) => r != null);
|
|
607
|
+
if (active.length === 0) return null;
|
|
608
|
+
if (active.length === 1) return active[0];
|
|
609
|
+
return (value) => {
|
|
610
|
+
iterate.forEach(active, (ref) => {
|
|
611
|
+
if (typeof ref === "function") {
|
|
612
|
+
ref(value);
|
|
613
|
+
} else {
|
|
614
|
+
ref.current = value;
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// ../../lib/primitive/src/utils/merge-props.ts
|
|
621
|
+
function mergeProps(defaultProps, props) {
|
|
622
|
+
return {
|
|
623
|
+
...defaultProps ?? {},
|
|
624
|
+
...props
|
|
625
|
+
};
|
|
509
626
|
}
|
|
510
627
|
|
|
511
628
|
// ../../lib/primitive/src/guards/children/component-id.ts
|
|
@@ -545,17 +662,6 @@ function isTag(...args) {
|
|
|
545
662
|
return tag !== void 0 && set2.has(tag);
|
|
546
663
|
}
|
|
547
664
|
|
|
548
|
-
// ../../lib/contract/src/aria/aria-role-policy.ts
|
|
549
|
-
function getImplicitRole(tag, props) {
|
|
550
|
-
if (tag in IMPLICIT_ROLE_RECORD) return IMPLICIT_ROLE_RECORD[tag];
|
|
551
|
-
if (tag === "input") return getInputImplicitRole(props?.type);
|
|
552
|
-
if (tag === "img") return props?.alt === "" ? "none" : "img";
|
|
553
|
-
if (tag === "section" || tag === "form") {
|
|
554
|
-
return getConditionalImplicitRole(tag, props?.["aria-label"], props?.["aria-labelledby"]);
|
|
555
|
-
}
|
|
556
|
-
return void 0;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
665
|
// ../../lib/contract/src/strict/invariant-base.ts
|
|
560
666
|
var InvariantBase = class {
|
|
561
667
|
diagnostics;
|
|
@@ -802,18 +908,18 @@ var ContractDiagnostics = {
|
|
|
802
908
|
message: `${context}: "${ruleName}" must be ${position}, got index ${index}`
|
|
803
909
|
};
|
|
804
910
|
},
|
|
805
|
-
unknownVariantDim(component,
|
|
911
|
+
unknownVariantDim(component, label2, dim) {
|
|
806
912
|
return {
|
|
807
913
|
code: DiagnosticCode2.ContractUnknownVariantDim,
|
|
808
914
|
category: DiagnosticCategory2.Contract,
|
|
809
|
-
message: `${component}: ${
|
|
915
|
+
message: `${component}: ${label2} references unknown variant "${dim}".`
|
|
810
916
|
};
|
|
811
917
|
},
|
|
812
|
-
unknownVariantValue(component,
|
|
918
|
+
unknownVariantValue(component, label2, dim, value, valid) {
|
|
813
919
|
return {
|
|
814
920
|
code: DiagnosticCode2.ContractUnknownVariantValue,
|
|
815
921
|
category: DiagnosticCategory2.Contract,
|
|
816
|
-
message: `${component}: ${
|
|
922
|
+
message: `${component}: ${label2} sets "${dim}" to unknown value "${value}" (valid: ${valid.join(", ")}).`
|
|
817
923
|
};
|
|
818
924
|
},
|
|
819
925
|
unknownRecipeKey(component, key) {
|
|
@@ -1611,7 +1717,7 @@ function getTypeName(value) {
|
|
|
1611
1717
|
return primitive;
|
|
1612
1718
|
}
|
|
1613
1719
|
const name = value.constructor?.name;
|
|
1614
|
-
return
|
|
1720
|
+
return isString(name) && name !== "Object" ? name : "object";
|
|
1615
1721
|
}
|
|
1616
1722
|
|
|
1617
1723
|
// ../../lib/contract/src/children/normalize-child-rule.ts
|
|
@@ -1905,6 +2011,7 @@ function landmarkNameAdvisory(ctx) {
|
|
|
1905
2011
|
if (!ctx.implicitRole || !NAMED_LANDMARK_TAGS.has(ctx.tag)) return [];
|
|
1906
2012
|
return requireAccessibleName(ctx);
|
|
1907
2013
|
}
|
|
2014
|
+
var HTML_ARIA_RULES = [landmarkRoleRule, landmarkNameAdvisory];
|
|
1908
2015
|
|
|
1909
2016
|
// ../core/src/html/contracts.ts
|
|
1910
2017
|
import { warnDiagnostics } from "./_shared/diagnostics.js";
|
|
@@ -2080,38 +2187,396 @@ function getHtmlPropNormalizers(tag) {
|
|
|
2080
2187
|
return typeof tag === "string" ? HTML_FORM_NORMALIZERS.get(tag) : void 0;
|
|
2081
2188
|
}
|
|
2082
2189
|
|
|
2083
|
-
// ../../
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2190
|
+
// ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
2191
|
+
import { clsx as clsx2 } from "clsx";
|
|
2192
|
+
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
2193
|
+
var cx = clsx2;
|
|
2194
|
+
var cva = (base, config) => (props) => {
|
|
2195
|
+
var _config_compoundVariants;
|
|
2196
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2197
|
+
const { variants, defaultVariants } = config;
|
|
2198
|
+
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
2199
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2200
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2201
|
+
if (variantProp === null) return null;
|
|
2202
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2203
|
+
return variants[variant][variantKey];
|
|
2204
|
+
});
|
|
2205
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
2206
|
+
let [key, value] = param;
|
|
2207
|
+
if (value === void 0) {
|
|
2208
|
+
return acc;
|
|
2209
|
+
}
|
|
2210
|
+
acc[key] = value;
|
|
2211
|
+
return acc;
|
|
2212
|
+
}, {});
|
|
2213
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
2214
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
2215
|
+
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
2216
|
+
let [key, value] = param2;
|
|
2217
|
+
return Array.isArray(value) ? value.includes({
|
|
2218
|
+
...defaultVariants,
|
|
2219
|
+
...propsWithoutUndefined
|
|
2220
|
+
}[key]) : {
|
|
2221
|
+
...defaultVariants,
|
|
2222
|
+
...propsWithoutUndefined
|
|
2223
|
+
}[key] === value;
|
|
2224
|
+
}) ? [
|
|
2225
|
+
...acc,
|
|
2226
|
+
cvClass,
|
|
2227
|
+
cvClassName
|
|
2228
|
+
] : acc;
|
|
2229
|
+
}, []);
|
|
2230
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2231
|
+
};
|
|
2087
2232
|
|
|
2088
|
-
// ../../lib/styling/src/
|
|
2089
|
-
function
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2233
|
+
// ../../lib/styling/src/cva.ts
|
|
2234
|
+
function cva2(base, config) {
|
|
2235
|
+
const fn = cva(base, config);
|
|
2236
|
+
return (props) => cn(fn(props));
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
// ../../lib/styling/src/static-class-resolver.ts
|
|
2240
|
+
var StaticClassResolver = class {
|
|
2241
|
+
#baseClass;
|
|
2242
|
+
#cache = /* @__PURE__ */ new Map();
|
|
2243
|
+
#resolveTag;
|
|
2244
|
+
constructor(baseClass, tagMap) {
|
|
2245
|
+
this.#baseClass = Array.isArray(baseClass) ? baseClass.join(" ") : baseClass;
|
|
2246
|
+
this.#resolveTag = tagMap ? (tag) => {
|
|
2247
|
+
const extra = tagMap[tag];
|
|
2248
|
+
if (!extra) return this.#baseClass;
|
|
2249
|
+
const extraStr = Array.isArray(extra) ? extra.join(" ") : extra;
|
|
2250
|
+
return `${this.#baseClass} ${extraStr}`;
|
|
2251
|
+
} : () => this.#baseClass;
|
|
2252
|
+
}
|
|
2253
|
+
resolve(tag, skipTagMap = false) {
|
|
2254
|
+
if (typeof tag !== "string" || skipTagMap) return this.#baseClass;
|
|
2255
|
+
const cached = this.#cache.get(tag);
|
|
2256
|
+
if (cached !== void 0) {
|
|
2257
|
+
this.#cache.delete(tag);
|
|
2258
|
+
this.#cache.set(tag, cached);
|
|
2259
|
+
return cached;
|
|
2260
|
+
}
|
|
2261
|
+
const result = this.#resolveTag(tag);
|
|
2262
|
+
this.#cache.set(tag, result);
|
|
2263
|
+
if (this.#cache.size > 200) {
|
|
2264
|
+
const lru = this.#cache.keys().next().value;
|
|
2265
|
+
if (lru !== void 0) this.#cache.delete(lru);
|
|
2266
|
+
}
|
|
2267
|
+
return result;
|
|
2268
|
+
}
|
|
2269
|
+
};
|
|
2270
|
+
|
|
2271
|
+
// ../../lib/styling/src/variant-class-resolver.ts
|
|
2272
|
+
var VariantClassResolver = class _VariantClassResolver {
|
|
2273
|
+
#cvaFn;
|
|
2274
|
+
#recipeMap;
|
|
2275
|
+
#variantKeys;
|
|
2276
|
+
#precomputedClasses;
|
|
2277
|
+
#cache = /* @__PURE__ */ new Map();
|
|
2278
|
+
constructor(cvaFn, recipeMap, variantKeys, precomputedClasses) {
|
|
2279
|
+
this.#cvaFn = cvaFn ?? null;
|
|
2280
|
+
this.#recipeMap = Object.freeze(recipeMap ?? {});
|
|
2281
|
+
this.#variantKeys = variantKeys ?? null;
|
|
2282
|
+
this.#precomputedClasses = precomputedClasses ?? null;
|
|
2283
|
+
}
|
|
2284
|
+
resolve({ props, recipe }) {
|
|
2285
|
+
const normalizedKey = recipe ?? "__none__";
|
|
2286
|
+
const cacheKey = this.#createCacheKey(props, normalizedKey);
|
|
2287
|
+
if (this.#precomputedClasses !== null) {
|
|
2288
|
+
const precomputed = this.#precomputedClasses[cacheKey];
|
|
2289
|
+
if (precomputed !== void 0) return precomputed;
|
|
2290
|
+
}
|
|
2291
|
+
const cached = this.#cache.get(cacheKey);
|
|
2292
|
+
if (cached !== void 0) {
|
|
2293
|
+
this.#cache.delete(cacheKey);
|
|
2294
|
+
this.#cache.set(cacheKey, cached);
|
|
2295
|
+
return cached;
|
|
2296
|
+
}
|
|
2297
|
+
const result = this.#compute(props, recipe);
|
|
2298
|
+
this.#cache.set(cacheKey, result);
|
|
2299
|
+
if (this.#cache.size > 1e3) {
|
|
2300
|
+
const lru = this.#cache.keys().next().value;
|
|
2301
|
+
if (lru !== void 0) this.#cache.delete(lru);
|
|
2302
|
+
}
|
|
2303
|
+
return result;
|
|
2304
|
+
}
|
|
2305
|
+
#compute(props, recipe) {
|
|
2306
|
+
if (!this.#cvaFn) return "";
|
|
2307
|
+
if (!recipe) return this.#cvaFn(props);
|
|
2308
|
+
const preset = this.#recipeMap[recipe];
|
|
2309
|
+
if (!preset) return this.#cvaFn(props);
|
|
2310
|
+
return this.#cvaFn({ ...preset, ...props });
|
|
2311
|
+
}
|
|
2312
|
+
// When variantKeys is provided, only those keys are included in the cache key — non-variant
|
|
2313
|
+
// props (className, id, etc.) produce identical CVA output and must not fragment the cache.
|
|
2314
|
+
// Iterating #variantKeys directly (fixed Set insertion order) avoids Object.keys + filter + sort.
|
|
2315
|
+
// String is built incrementally to avoid a parts[] array allocation on every render.
|
|
2316
|
+
#createCacheKey(props, recipe) {
|
|
2317
|
+
if (this.#variantKeys !== null) {
|
|
2318
|
+
let key2 = recipe;
|
|
2319
|
+
iterate.forEachSet(this.#variantKeys, (k) => {
|
|
2320
|
+
if (k in props) key2 += `|${k}:${_VariantClassResolver.#serializeValue(props[k])}`;
|
|
2107
2321
|
});
|
|
2108
|
-
return
|
|
2322
|
+
return key2;
|
|
2323
|
+
}
|
|
2324
|
+
let key = recipe;
|
|
2325
|
+
iterate.forEach(Object.keys(props).sort(), (k) => {
|
|
2326
|
+
key += `|${k}:${_VariantClassResolver.#serializeValue(props[k])}`;
|
|
2327
|
+
});
|
|
2328
|
+
return key;
|
|
2329
|
+
}
|
|
2330
|
+
static #serializeValue(value) {
|
|
2331
|
+
if (value === void 0) return "u";
|
|
2332
|
+
if (value === null) return "n";
|
|
2333
|
+
if (typeof value === "boolean") return `b:${value}`;
|
|
2334
|
+
if (typeof value === "string") return `s:${value}`;
|
|
2335
|
+
return `x:${String(value)}`;
|
|
2336
|
+
}
|
|
2337
|
+
};
|
|
2338
|
+
|
|
2339
|
+
// ../../lib/styling/src/create-class-pipeline.ts
|
|
2340
|
+
function createClassPipeline(resolved) {
|
|
2341
|
+
const baseClass = resolved.baseClassName ?? "";
|
|
2342
|
+
const cvaFn = resolved.variants ? cva2("", {
|
|
2343
|
+
variants: resolved.variants,
|
|
2344
|
+
defaultVariants: resolved.defaultVariants,
|
|
2345
|
+
compoundVariants: resolved.compoundVariants
|
|
2346
|
+
}) : null;
|
|
2347
|
+
const variantKeys = resolved.variants ? new Set(Object.keys(resolved.variants)) : void 0;
|
|
2348
|
+
const staticResolver = new StaticClassResolver(baseClass, resolved.tagMap);
|
|
2349
|
+
const variantResolver = new VariantClassResolver(
|
|
2350
|
+
cvaFn,
|
|
2351
|
+
resolved.recipeMap,
|
|
2352
|
+
variantKeys,
|
|
2353
|
+
resolved.precomputedClasses
|
|
2354
|
+
);
|
|
2355
|
+
return function resolveClasses(tag, props, className, recipe) {
|
|
2356
|
+
const staticClasses = staticResolver.resolve(tag, recipe !== void 0);
|
|
2357
|
+
const variantClasses = variantResolver.resolve({ props, recipe });
|
|
2358
|
+
if (!className)
|
|
2359
|
+
return staticClasses && variantClasses ? `${staticClasses} ${variantClasses}` : staticClasses || variantClasses;
|
|
2360
|
+
return cn(staticClasses, variantClasses, className);
|
|
2361
|
+
};
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
// ../../lib/pipeline-kit/src/factory/define-pipeline.ts
|
|
2365
|
+
function definePipeline(factory) {
|
|
2366
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
2367
|
+
return (resolved) => {
|
|
2368
|
+
let pipeline = cache.get(resolved);
|
|
2369
|
+
if (!pipeline) {
|
|
2370
|
+
pipeline = factory(resolved);
|
|
2371
|
+
cache.set(resolved, pipeline);
|
|
2109
2372
|
}
|
|
2373
|
+
return pipeline;
|
|
2110
2374
|
};
|
|
2111
2375
|
}
|
|
2112
2376
|
|
|
2113
|
-
// ../core/src/
|
|
2377
|
+
// ../core/src/options/resolve-factory-options.ts
|
|
2114
2378
|
import { silentDiagnostics } from "./_shared/diagnostics.js";
|
|
2379
|
+
var EMPTY_VARIANT_KEYS = /* @__PURE__ */ new Set();
|
|
2380
|
+
function composeNormalizers(normalizers, fn) {
|
|
2381
|
+
if (!normalizers?.length) return fn;
|
|
2382
|
+
return ((props) => {
|
|
2383
|
+
const patched = normalizers.reduce(
|
|
2384
|
+
(acc, normalizer) => ({ ...acc, ...normalizer(acc) }),
|
|
2385
|
+
props
|
|
2386
|
+
);
|
|
2387
|
+
return fn ? fn(patched) : patched;
|
|
2388
|
+
});
|
|
2389
|
+
}
|
|
2390
|
+
function whenDefined(key, value) {
|
|
2391
|
+
return value === void 0 ? {} : { [key]: value };
|
|
2392
|
+
}
|
|
2393
|
+
function resolveFactoryOptions(options = {}) {
|
|
2394
|
+
const { styling, enforcement } = options;
|
|
2395
|
+
const composedNormalizeFn = composeNormalizers(enforcement?.props, options.normalize);
|
|
2396
|
+
const variantKeys = styling?.variants === void 0 ? EMPTY_VARIANT_KEYS : new Set(Object.keys(styling.variants));
|
|
2397
|
+
return Object.freeze({
|
|
2398
|
+
defaultTag: options.tag ?? "div",
|
|
2399
|
+
diagnostics: enforcement?.diagnostics ?? silentDiagnostics,
|
|
2400
|
+
variantKeys,
|
|
2401
|
+
...whenDefined("displayName", options.name),
|
|
2402
|
+
...whenDefined("defaultProps", options.defaults),
|
|
2403
|
+
...whenDefined("baseClassName", styling?.base),
|
|
2404
|
+
...whenDefined("tagMap", styling?.tags),
|
|
2405
|
+
...whenDefined("recipeMap", styling?.presets),
|
|
2406
|
+
...whenDefined("variants", styling?.variants),
|
|
2407
|
+
...whenDefined("defaultVariants", styling?.defaults),
|
|
2408
|
+
...whenDefined("compoundVariants", styling?.compounds),
|
|
2409
|
+
...whenDefined("normalizeFn", composedNormalizeFn),
|
|
2410
|
+
...whenDefined("ariaRules", enforcement?.aria),
|
|
2411
|
+
...whenDefined("childRules", enforcement?.children),
|
|
2412
|
+
...whenDefined("allowedAs", enforcement?.allowedAs),
|
|
2413
|
+
...whenDefined("precomputedClasses", styling?.precomputedClasses)
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
// ../core/src/options/validate-factory-options.ts
|
|
2418
|
+
function validateFactoryOptions(resolved, diagnostics) {
|
|
2419
|
+
if (!diagnostics.active) return;
|
|
2420
|
+
const name = resolved.displayName ?? "Component";
|
|
2421
|
+
const { variants } = resolved;
|
|
2422
|
+
const checkSelection = (label2, selection) => {
|
|
2423
|
+
iterate.forEachEntry(selection, (dim, value) => {
|
|
2424
|
+
if (value === void 0 || value === null) return;
|
|
2425
|
+
if (!variants || !Object.hasOwn(variants, dim)) {
|
|
2426
|
+
diagnostics.error(ContractDiagnostics.unknownVariantDim(name, label2, dim));
|
|
2427
|
+
return;
|
|
2428
|
+
}
|
|
2429
|
+
const states = variants[dim];
|
|
2430
|
+
const stateKey = String(value);
|
|
2431
|
+
if (!Object.hasOwn(states, stateKey)) {
|
|
2432
|
+
diagnostics.error(
|
|
2433
|
+
ContractDiagnostics.unknownVariantValue(name, label2, dim, stateKey, Object.keys(states))
|
|
2434
|
+
);
|
|
2435
|
+
}
|
|
2436
|
+
});
|
|
2437
|
+
};
|
|
2438
|
+
const { recipeMap } = resolved;
|
|
2439
|
+
if (recipeMap) {
|
|
2440
|
+
iterate.forEachEntry(recipeMap, (recipeKey, selection) => {
|
|
2441
|
+
checkSelection(`preset "${recipeKey}"`, selection);
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
if (resolved.defaultVariants) checkSelection("defaults", resolved.defaultVariants);
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
// ../core/src/options/validate-render-props.ts
|
|
2448
|
+
function label(name) {
|
|
2449
|
+
return name ? `[${name}]` : "[createContractComponent]";
|
|
2450
|
+
}
|
|
2451
|
+
function validateRenderProps(diagnostics, options, props, recipeKey) {
|
|
2452
|
+
const { recipeMap, variants, displayName } = options;
|
|
2453
|
+
const tag = label(displayName);
|
|
2454
|
+
if (recipeKey !== void 0 && (!recipeMap || !Object.hasOwn(recipeMap, recipeKey))) {
|
|
2455
|
+
diagnostics.error(ContractDiagnostics.unknownRecipeKey(tag, recipeKey));
|
|
2456
|
+
}
|
|
2457
|
+
if (variants) {
|
|
2458
|
+
iterate.forEachKey(variants, (key) => {
|
|
2459
|
+
if (!Object.hasOwn(props, key)) return;
|
|
2460
|
+
const value = props[key];
|
|
2461
|
+
if (value === void 0 || value === null) return;
|
|
2462
|
+
const dim = variants[key];
|
|
2463
|
+
if (dim && !Object.hasOwn(dim, String(value))) {
|
|
2464
|
+
diagnostics.error(ContractDiagnostics.invalidVariantValue(tag, key, String(value)));
|
|
2465
|
+
}
|
|
2466
|
+
});
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
// ../core/src/factory/plugin-invariants.ts
|
|
2471
|
+
import { throwDiagnostics } from "./_shared/diagnostics.js";
|
|
2472
|
+
|
|
2473
|
+
// ../core/src/factory/plugin-diagnostics.ts
|
|
2474
|
+
import { DiagnosticCategory as DiagnosticCategory5, DiagnosticCode as DiagnosticCode5 } from "./_shared/diagnostics.js";
|
|
2475
|
+
var PluginDiagnostics = {
|
|
2476
|
+
invalidShape(received) {
|
|
2477
|
+
const got = received === null ? "null" : typeof received;
|
|
2478
|
+
return {
|
|
2479
|
+
code: DiagnosticCode5.PluginInvalidShape,
|
|
2480
|
+
category: DiagnosticCategory5.Internal,
|
|
2481
|
+
message: `[praxis-kit] Plugin factory must return an object with a 'pipeline' function. Got: ${got}.`
|
|
2482
|
+
};
|
|
2483
|
+
},
|
|
2484
|
+
pipelineReturnType(received) {
|
|
2485
|
+
const got = received === null ? "null" : Array.isArray(received) ? "array" : typeof received;
|
|
2486
|
+
return {
|
|
2487
|
+
code: DiagnosticCode5.PluginPipelineReturnType,
|
|
2488
|
+
category: DiagnosticCategory5.Internal,
|
|
2489
|
+
message: `[praxis-kit] Plugin pipeline must return a string. Got: ${got}.`
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2494
|
+
// ../core/src/factory/plugin-invariants.ts
|
|
2495
|
+
function assertPluginShape(result) {
|
|
2496
|
+
if (result === null || typeof result !== "object")
|
|
2497
|
+
throwDiagnostics.error(PluginDiagnostics.invalidShape(result));
|
|
2498
|
+
const plugin = result;
|
|
2499
|
+
if (typeof plugin.pipeline !== "function")
|
|
2500
|
+
throwDiagnostics.error(PluginDiagnostics.invalidShape(result));
|
|
2501
|
+
}
|
|
2502
|
+
function guardPipeline(pipeline) {
|
|
2503
|
+
if (process.env.NODE_ENV === "production") return pipeline;
|
|
2504
|
+
return function guardedPipeline(tag, props, className, recipe) {
|
|
2505
|
+
const result = pipeline(tag, props, className, recipe);
|
|
2506
|
+
if (typeof result !== "string")
|
|
2507
|
+
throwDiagnostics.error(PluginDiagnostics.pipelineReturnType(result));
|
|
2508
|
+
return result;
|
|
2509
|
+
};
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
// ../core/src/factory/create-polymorphic2.ts
|
|
2513
|
+
var createTagPipeline = (resolved) => makeResolveTag(resolved.defaultTag);
|
|
2514
|
+
var createPropsPipeline = (resolved) => (props) => mergeProps(resolved.defaultProps, props);
|
|
2515
|
+
var createHtmlPropNormalizersPipeline = () => getHtmlPropNormalizers;
|
|
2516
|
+
var createHtmlChildrenEvaluatorPipeline = () => getHtmlChildrenEvaluator;
|
|
2517
|
+
var createStylingClassPipeline = (resolved) => createClassPipeline(resolved);
|
|
2518
|
+
function resolveAriaRules(resolved) {
|
|
2519
|
+
return [.../* @__PURE__ */ new Set([...HTML_ARIA_RULES, ...resolved.ariaRules ?? []])];
|
|
2520
|
+
}
|
|
2521
|
+
var createAriaPipeline = (resolved) => {
|
|
2522
|
+
const rules = resolveAriaRules(resolved);
|
|
2523
|
+
const engine = new AriaPolicyEngine(resolved.diagnostics, rules.length ? { rules } : void 0);
|
|
2524
|
+
return (tag, props) => engine.validate(tag, props);
|
|
2525
|
+
};
|
|
2526
|
+
var memoizedTagPipeline = definePipeline(createTagPipeline);
|
|
2527
|
+
var memoizedPropsPipeline = definePipeline(createPropsPipeline);
|
|
2528
|
+
var memoizedHtmlPropNormalizersPipeline = definePipeline(createHtmlPropNormalizersPipeline);
|
|
2529
|
+
var memoizedHtmlChildrenEvaluatorPipeline = definePipeline(createHtmlChildrenEvaluatorPipeline);
|
|
2530
|
+
var memoizedClassPipeline = definePipeline(createStylingClassPipeline);
|
|
2531
|
+
var memoizedAriaPipeline = definePipeline(createAriaPipeline);
|
|
2532
|
+
function resolveAriaPassthrough(_tag, props) {
|
|
2533
|
+
return { props };
|
|
2534
|
+
}
|
|
2535
|
+
function resolveClassPlugin(factory, resolved, diagnostics) {
|
|
2536
|
+
if (!factory) return { pluginResult: void 0, classPipeline: memoizedClassPipeline(resolved) };
|
|
2537
|
+
const pluginResult = factory(resolved, diagnostics);
|
|
2538
|
+
assertPluginShape(pluginResult);
|
|
2539
|
+
return { pluginResult, classPipeline: guardPipeline(pluginResult.pipeline) };
|
|
2540
|
+
}
|
|
2541
|
+
function createPolymorphic2(options = {}) {
|
|
2542
|
+
const baseResolved = resolveFactoryOptions(options);
|
|
2543
|
+
const anyBaseResolved = baseResolved;
|
|
2544
|
+
const resolved = Object.freeze({
|
|
2545
|
+
...baseResolved,
|
|
2546
|
+
htmlPropNormalizersFn: memoizedHtmlPropNormalizersPipeline(anyBaseResolved),
|
|
2547
|
+
htmlChildrenEvaluatorFn: memoizedHtmlChildrenEvaluatorPipeline(anyBaseResolved)
|
|
2548
|
+
});
|
|
2549
|
+
const anyResolved = resolved;
|
|
2550
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2551
|
+
validateFactoryOptions(resolved, resolved.diagnostics);
|
|
2552
|
+
}
|
|
2553
|
+
const { pluginResult, classPipeline } = resolveClassPlugin(
|
|
2554
|
+
options.styling?.plugin,
|
|
2555
|
+
anyResolved,
|
|
2556
|
+
resolved.diagnostics
|
|
2557
|
+
);
|
|
2558
|
+
const resolveTag2 = memoizedTagPipeline(anyResolved);
|
|
2559
|
+
const resolveProps = memoizedPropsPipeline(anyResolved);
|
|
2560
|
+
const resolveAriaFn = options.enforcement !== void 0 ? memoizedAriaPipeline(anyResolved) : resolveAriaPassthrough;
|
|
2561
|
+
const methods = {
|
|
2562
|
+
resolveTag: resolveTag2,
|
|
2563
|
+
resolveProps,
|
|
2564
|
+
resolveClasses(tag, props, className, recipe) {
|
|
2565
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2566
|
+
validateRenderProps(resolved.diagnostics, resolved, props, recipe);
|
|
2567
|
+
}
|
|
2568
|
+
return classPipeline(tag, props, className, recipe);
|
|
2569
|
+
},
|
|
2570
|
+
resolveAria(tag, props) {
|
|
2571
|
+
return resolveAriaFn(tag, props);
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
const runtimeObject = pluginResult ? { ...methods, options: resolved, hasStyling: true, classPlugin: pluginResult } : { ...methods, options: resolved };
|
|
2575
|
+
return runtimeObject;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
// ../core/src/resolver/resolver.ts
|
|
2579
|
+
import { silentDiagnostics as silentDiagnostics2 } from "./_shared/diagnostics.js";
|
|
2115
2580
|
function enforceAllowedAs(tag, allowedAs, diagnostics, displayName) {
|
|
2116
2581
|
if (allowedAs.includes(tag)) return;
|
|
2117
2582
|
if (!diagnostics) return;
|
|
@@ -2119,28 +2584,57 @@ function enforceAllowedAs(tag, allowedAs, diagnostics, displayName) {
|
|
|
2119
2584
|
diagnostics.error(ContractDiagnostics.allowedAsViolation(String(tag), allowedAs, component));
|
|
2120
2585
|
}
|
|
2121
2586
|
|
|
2122
|
-
// ../../lib/adapter-utils/src/
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2587
|
+
// ../../lib/adapter-utils/src/runtime/build-core-runtime.ts
|
|
2588
|
+
var EMPTY_SET = /* @__PURE__ */ new Set();
|
|
2589
|
+
function buildCoreRuntime(normalized) {
|
|
2590
|
+
const runtime = createPolymorphic2(normalized);
|
|
2591
|
+
const ownedKeys = "classPlugin" in runtime ? runtime.classPlugin.ownedKeys ?? EMPTY_SET : EMPTY_SET;
|
|
2592
|
+
return { runtime, ownedKeys };
|
|
2127
2593
|
}
|
|
2128
2594
|
|
|
2129
|
-
// ../../lib/adapter-utils/src/build-engines.ts
|
|
2595
|
+
// ../../lib/adapter-utils/src/runtime/build-engines.ts
|
|
2130
2596
|
function buildEngines(diagnostics, childRules, context) {
|
|
2131
2597
|
return childRules?.length ? { childrenEvaluator: new ChildrenEvaluator(childRules, diagnostics, context) } : {};
|
|
2132
2598
|
}
|
|
2133
2599
|
|
|
2134
|
-
// ../../lib/adapter-utils/src/resolve-adapter-common-options.ts
|
|
2135
|
-
import { throwDiagnostics, silentDiagnostics as
|
|
2136
|
-
function resolveAdapterCommonOptions(options, defaultName = "PolymorphicComponent", defaultDiagnostics =
|
|
2600
|
+
// ../../lib/adapter-utils/src/runtime/resolve-adapter-common-options.ts
|
|
2601
|
+
import { throwDiagnostics as throwDiagnostics2, silentDiagnostics as silentDiagnostics3 } from "./_shared/diagnostics.js";
|
|
2602
|
+
function resolveAdapterCommonOptions(options, defaultName = "PolymorphicComponent", defaultDiagnostics = throwDiagnostics2) {
|
|
2137
2603
|
return {
|
|
2138
2604
|
name: options.name ?? defaultName,
|
|
2139
2605
|
diagnostics: options.enforcement?.diagnostics ?? defaultDiagnostics
|
|
2140
2606
|
};
|
|
2141
2607
|
}
|
|
2142
2608
|
|
|
2143
|
-
// ../../lib/adapter-utils/src/
|
|
2609
|
+
// ../../lib/adapter-utils/src/invariant.ts
|
|
2610
|
+
function panic(message) {
|
|
2611
|
+
throw new Error(message);
|
|
2612
|
+
}
|
|
2613
|
+
function invariant(condition, message) {
|
|
2614
|
+
if (!condition) panic(message);
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
// ../../lib/adapter-utils/src/props/apply-filter.ts
|
|
2618
|
+
function applyFilter(props, filterProps, variantKeys) {
|
|
2619
|
+
const out = {};
|
|
2620
|
+
iterate.forEachEntry(props, (k) => {
|
|
2621
|
+
if (!Object.hasOwn(props, k)) return;
|
|
2622
|
+
if (filterProps(k, variantKeys)) return;
|
|
2623
|
+
out[k] = props[k];
|
|
2624
|
+
});
|
|
2625
|
+
return out;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
// ../../lib/adapter-utils/src/props/compose-filter.ts
|
|
2629
|
+
function composeFilter(ownedKeys, filterProps) {
|
|
2630
|
+
const defaultFilter = (key, variantKeys) => variantKeys.has(key) || ownedKeys.has(key);
|
|
2631
|
+
if (!filterProps) {
|
|
2632
|
+
return defaultFilter;
|
|
2633
|
+
}
|
|
2634
|
+
return (key, variantKeys) => defaultFilter(key, variantKeys) || filterProps(key, variantKeys);
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
// ../../lib/adapter-utils/src/slot/slot-validator.ts
|
|
2144
2638
|
var SlotValidator = class extends InvariantBase {
|
|
2145
2639
|
#name;
|
|
2146
2640
|
#elementTerm;
|
|
@@ -2163,18 +2657,18 @@ var SlotValidator = class extends InvariantBase {
|
|
|
2163
2657
|
};
|
|
2164
2658
|
|
|
2165
2659
|
// ../../lib/adapter-utils/src/slot/policies.ts
|
|
2166
|
-
import { clsx } from "clsx";
|
|
2660
|
+
import { clsx as clsx3 } from "clsx";
|
|
2167
2661
|
function chainHandlers(childHandler, slotHandler) {
|
|
2168
2662
|
return (...args) => {
|
|
2169
2663
|
childHandler(...args);
|
|
2170
2664
|
const event = args[0];
|
|
2171
|
-
if (!(
|
|
2665
|
+
if (!(isObject(event) && "defaultPrevented" in event && event.defaultPrevented)) {
|
|
2172
2666
|
slotHandler(...args);
|
|
2173
2667
|
}
|
|
2174
2668
|
};
|
|
2175
2669
|
}
|
|
2176
2670
|
function mergeClassNames(slot, child) {
|
|
2177
|
-
return
|
|
2671
|
+
return clsx3(slot, child);
|
|
2178
2672
|
}
|
|
2179
2673
|
function mergeStyles(slot, child) {
|
|
2180
2674
|
if (!isPlainObject(slot) || !isPlainObject(child)) return child;
|
|
@@ -2206,209 +2700,6 @@ function applyMergePolicy(key, slotVal, childVal) {
|
|
|
2206
2700
|
return policyHandlers[classifyProp(key, slotVal, childVal)](slotVal, childVal);
|
|
2207
2701
|
}
|
|
2208
2702
|
|
|
2209
|
-
// ../../lib/adapter-utils/src/build-definition.ts
|
|
2210
|
-
function buildDefinition(name, tag) {
|
|
2211
|
-
return {
|
|
2212
|
-
identity: {
|
|
2213
|
-
id: name,
|
|
2214
|
-
name,
|
|
2215
|
-
tag
|
|
2216
|
-
},
|
|
2217
|
-
capabilities: {},
|
|
2218
|
-
metadata: {},
|
|
2219
|
-
diagnostics: []
|
|
2220
|
-
};
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
// ../../lib/adapter-utils/src/build-variant-config.ts
|
|
2224
|
-
function flattenClassName(cls) {
|
|
2225
|
-
return Array.isArray(cls) ? cls.join(" ") : cls;
|
|
2226
|
-
}
|
|
2227
|
-
function mapVariantRecord(source, mapper) {
|
|
2228
|
-
return iterate.mapValues(
|
|
2229
|
-
source,
|
|
2230
|
-
(inner) => iterate.mapValues(inner, mapper)
|
|
2231
|
-
);
|
|
2232
|
-
}
|
|
2233
|
-
function buildVariantConfig(variants, presets, defaults, compounds) {
|
|
2234
|
-
return {
|
|
2235
|
-
variants: mapVariantRecord(variants ?? {}, flattenClassName),
|
|
2236
|
-
...presets !== void 0 && Object.keys(presets).length > 0 && { presets },
|
|
2237
|
-
...defaults !== void 0 && Object.keys(defaults).length > 0 && { defaults },
|
|
2238
|
-
...compounds !== void 0 && compounds.length > 0 && {
|
|
2239
|
-
compounds
|
|
2240
|
-
}
|
|
2241
|
-
};
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
// ../../runtime/core/src/apply-attributes.ts
|
|
2245
|
-
function applyAttributes(nodeId, incoming, decoration, removedKeys) {
|
|
2246
|
-
const existing = decoration[nodeId] ?? {};
|
|
2247
|
-
const next = { ...existing.attributes };
|
|
2248
|
-
if (removedKeys !== void 0) {
|
|
2249
|
-
iterate.forEachSet(removedKeys, (key) => {
|
|
2250
|
-
delete next[key];
|
|
2251
|
-
});
|
|
2252
|
-
}
|
|
2253
|
-
Object.assign(next, incoming);
|
|
2254
|
-
const { attributes: _dropped, ...rest } = existing;
|
|
2255
|
-
const nextDecoration = Object.keys(next).length > 0 ? { ...rest, attributes: next } : rest;
|
|
2256
|
-
return { ...decoration, [nodeId]: nextDecoration };
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
// ../../runtime/core/src/get-active-props.ts
|
|
2260
|
-
function getActiveProps(nodeId, decoration) {
|
|
2261
|
-
const dec = decoration[nodeId];
|
|
2262
|
-
return { ...dec?.attributes ?? {}, ...dec?.variants ?? {} };
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
// ../../runtime/core/src/render-component.ts
|
|
2266
|
-
function renderComponent(definition, tree, render, backend) {
|
|
2267
|
-
return backend.render({ definition, tree, render });
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
// ../../runtime/core/src/build-tree-context.ts
|
|
2271
|
-
function buildNode(input, slotAssignments, seenIds, diagnostics) {
|
|
2272
|
-
if (seenIds.has(input.id)) {
|
|
2273
|
-
diagnostics.push({
|
|
2274
|
-
code: "duplicate-node-id",
|
|
2275
|
-
message: `Duplicate node id "${input.id}"`,
|
|
2276
|
-
severity: "error"
|
|
2277
|
-
});
|
|
2278
|
-
} else {
|
|
2279
|
-
seenIds.add(input.id);
|
|
2280
|
-
}
|
|
2281
|
-
if (input.slot !== void 0) {
|
|
2282
|
-
slotAssignments.set(input.id, input.slot);
|
|
2283
|
-
}
|
|
2284
|
-
const children = Object.freeze(
|
|
2285
|
-
(input.children ?? []).map((child) => buildNode(child, slotAssignments, seenIds, diagnostics))
|
|
2286
|
-
);
|
|
2287
|
-
if (input.kind === "native") {
|
|
2288
|
-
return Object.freeze({ kind: "native", id: input.id, tag: input.tag, children });
|
|
2289
|
-
}
|
|
2290
|
-
return Object.freeze({ kind: "component", id: input.id, children });
|
|
2291
|
-
}
|
|
2292
|
-
function buildTreeContext(root) {
|
|
2293
|
-
const slotAssignments = /* @__PURE__ */ new Map();
|
|
2294
|
-
const diagnostics = [];
|
|
2295
|
-
const rootNode = buildNode(root, slotAssignments, /* @__PURE__ */ new Set(), diagnostics);
|
|
2296
|
-
return Object.freeze({ root: rootNode, slotAssignments, diagnostics });
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
// ../../runtime/core/src/build-render-context.ts
|
|
2300
|
-
function buildRenderContext(decoration = {}) {
|
|
2301
|
-
return { decoration: new Map(Object.entries(decoration)) };
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
// ../../lib/adapter-utils/src/resolve-compounds.ts
|
|
2305
|
-
function matchesCompound(active, compound) {
|
|
2306
|
-
const { class: _, ...conditions } = compound;
|
|
2307
|
-
return Object.entries(conditions).every(([key, expected]) => {
|
|
2308
|
-
const actual = active[key];
|
|
2309
|
-
return Array.isArray(expected) ? expected.includes(actual) : actual === expected;
|
|
2310
|
-
});
|
|
2311
|
-
}
|
|
2312
|
-
function resolveCompounds(active, compounds) {
|
|
2313
|
-
if (!compounds?.length) return [];
|
|
2314
|
-
const out = [];
|
|
2315
|
-
iterate.forEach(compounds, (compound) => {
|
|
2316
|
-
if (matchesCompound(active, compound)) {
|
|
2317
|
-
out.push(flattenClassName(compound.class));
|
|
2318
|
-
}
|
|
2319
|
-
});
|
|
2320
|
-
return out;
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
// ../../lib/adapter-utils/src/resolve-classes.ts
|
|
2324
|
-
function resolveClasses(decoration, variantConfig, variantDefaults, recipe, compounds, variantLookup) {
|
|
2325
|
-
const active = getActiveProps("root", decoration);
|
|
2326
|
-
if (variantLookup !== void 0 && recipe === void 0) {
|
|
2327
|
-
const activeVariants = {};
|
|
2328
|
-
iterate.forEachKey(variantConfig.variants, (key) => {
|
|
2329
|
-
const value = active[key];
|
|
2330
|
-
if (typeof value === "string") activeVariants[key] = value;
|
|
2331
|
-
});
|
|
2332
|
-
const lookupKey = buildPrecomputedKey(activeVariants);
|
|
2333
|
-
const precomputedValue = variantLookup[lookupKey];
|
|
2334
|
-
if (precomputedValue !== void 0) {
|
|
2335
|
-
return {
|
|
2336
|
-
variantClasses: precomputedValue !== "" ? [precomputedValue] : [],
|
|
2337
|
-
compoundClasses: []
|
|
2338
|
-
};
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
const passInput = recipe !== void 0 ? { ...active, preset: recipe } : active;
|
|
2342
|
-
const { context } = createVariantPass(passInput, variantConfig).execute({ classes: [] });
|
|
2343
|
-
const variantClasses = context.classes;
|
|
2344
|
-
const presetOverrides = recipe !== void 0 ? variantConfig.presets?.[recipe] ?? {} : {};
|
|
2345
|
-
const resolvedValues = {
|
|
2346
|
-
...variantDefaults,
|
|
2347
|
-
...presetOverrides,
|
|
2348
|
-
...active
|
|
2349
|
-
};
|
|
2350
|
-
const compoundClasses = resolveCompounds(resolvedValues, compounds);
|
|
2351
|
-
return { variantClasses, compoundClasses };
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
// ../../lib/adapter-utils/src/build-pipeline.ts
|
|
2355
|
-
function buildStylePipeline(variants, presets, defaults, compounds, variantLookup) {
|
|
2356
|
-
if (variants === void 0 && compounds === void 0 && presets === void 0 && variantLookup === void 0) {
|
|
2357
|
-
return void 0;
|
|
2358
|
-
}
|
|
2359
|
-
const variantConfig = buildVariantConfig(variants, presets, defaults, compounds);
|
|
2360
|
-
return {
|
|
2361
|
-
execute(decoration, recipe) {
|
|
2362
|
-
return resolveClasses(decoration, variantConfig, defaults, recipe, compounds, variantLookup);
|
|
2363
|
-
}
|
|
2364
|
-
};
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
|
-
// ../../lib/adapter-utils/src/join-classes.ts
|
|
2368
|
-
function joinClasses(...classes) {
|
|
2369
|
-
return classes.filter(Boolean).join(" ");
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
// ../../lib/adapter-utils/src/decoration-utils.ts
|
|
2373
|
-
function withAttributes(dec, attributes) {
|
|
2374
|
-
const { attributes: _a, ...rest } = dec;
|
|
2375
|
-
return attributes !== void 0 ? { ...rest, attributes } : rest;
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
// ../../lib/adapter-utils/src/apply-aria.ts
|
|
2379
|
-
function applyAria(decoration, tag, ariaEngine) {
|
|
2380
|
-
if (ariaEngine === void 0) return decoration;
|
|
2381
|
-
const dec = decoration["root"];
|
|
2382
|
-
if (dec?.attributes === void 0) return decoration;
|
|
2383
|
-
const result = ariaEngine.validate(tag, dec.attributes);
|
|
2384
|
-
const cleaned = result.props;
|
|
2385
|
-
return {
|
|
2386
|
-
...decoration,
|
|
2387
|
-
root: withAttributes(dec, Object.keys(cleaned).length > 0 ? cleaned : void 0)
|
|
2388
|
-
};
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
// ../../lib/adapter-utils/src/apply-filter-props.ts
|
|
2392
|
-
function applyFilterProps(decoration, filterFn, variantKeys) {
|
|
2393
|
-
if (filterFn === void 0) return decoration;
|
|
2394
|
-
const dec = decoration["root"];
|
|
2395
|
-
if (dec?.attributes === void 0) return decoration;
|
|
2396
|
-
const kept = Object.fromEntries(
|
|
2397
|
-
Object.entries(dec.attributes).filter(([k]) => !filterFn(k, variantKeys))
|
|
2398
|
-
);
|
|
2399
|
-
return {
|
|
2400
|
-
...decoration,
|
|
2401
|
-
root: withAttributes(dec, Object.keys(kept).length > 0 ? kept : void 0)
|
|
2402
|
-
};
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
// ../../lib/adapter-utils/src/apply-ref.ts
|
|
2406
|
-
function applyRef(decoration, ref) {
|
|
2407
|
-
if (ref == null) return decoration;
|
|
2408
|
-
const existing = decoration["root"] ?? {};
|
|
2409
|
-
return { ...decoration, root: { ...existing, ref } };
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
2703
|
// ../../adapters/react/src/shared/merge-refs.ts
|
|
2413
2704
|
function mergeRefs(...refs) {
|
|
2414
2705
|
return mergeRefsCore(...refs);
|
|
@@ -2421,25 +2712,52 @@ function Slottable({ children }) {
|
|
|
2421
2712
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
2422
2713
|
}
|
|
2423
2714
|
|
|
2715
|
+
// ../../adapters/react/src/shared/slot/predicates.ts
|
|
2716
|
+
import { isValidElement } from "react";
|
|
2717
|
+
function isSlottableElement(value) {
|
|
2718
|
+
return isValidElement(value) && value.type === Slottable;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
// ../../adapters/react/src/shared/slot/compose-refs.ts
|
|
2722
|
+
function isReactWarningGetter(getter) {
|
|
2723
|
+
return isFunction(getter) && "isReactWarning" in getter;
|
|
2724
|
+
}
|
|
2725
|
+
function hasWarningGetter(obj, key) {
|
|
2726
|
+
return isPlainObject(obj) && isReactWarningGetter(Object.getOwnPropertyDescriptor(obj, key)?.get);
|
|
2727
|
+
}
|
|
2728
|
+
function getElementRef(element) {
|
|
2729
|
+
const el = element;
|
|
2730
|
+
return isPlainObject(el) ? el.ref ?? null : null;
|
|
2731
|
+
}
|
|
2732
|
+
function getPropsRef(element) {
|
|
2733
|
+
const props = element.props;
|
|
2734
|
+
return isPlainObject(props) ? props.ref ?? null : null;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2424
2737
|
// ../../adapters/react/src/shared/slot/clone.ts
|
|
2425
2738
|
import { cloneElement } from "react";
|
|
2426
2739
|
function cloneWithProps(child, props, ref) {
|
|
2427
2740
|
return cloneElement(child, ref !== null ? { ...props, ref } : props);
|
|
2428
2741
|
}
|
|
2429
2742
|
|
|
2743
|
+
// ../../adapters/react/src/shared/slot/make-clone-slot-child.ts
|
|
2744
|
+
import { Fragment as Fragment2 } from "react";
|
|
2745
|
+
function makeCloneSlotChild(getChildRef) {
|
|
2746
|
+
return function cloneSlotChild({ child, slotProps, ref }) {
|
|
2747
|
+
const childProps = child.props;
|
|
2748
|
+
const isFragment = child.type === Fragment2;
|
|
2749
|
+
const childRef = isFragment ? null : getChildRef(child);
|
|
2750
|
+
const mergedRef = isFragment ? null : mergeRefs(ref, childRef);
|
|
2751
|
+
const merged = mergeSlotProps(slotProps, childProps);
|
|
2752
|
+
return cloneWithProps(child, merged, mergedRef);
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2430
2756
|
// ../../adapters/react/src/shared/slot/applySlot.ts
|
|
2431
2757
|
import { isValidElement as isValidElement3 } from "react";
|
|
2432
2758
|
|
|
2433
2759
|
// ../../adapters/react/src/shared/slot/extractSlottable.ts
|
|
2434
|
-
import { createElement, Fragment as
|
|
2435
|
-
|
|
2436
|
-
// ../../adapters/react/src/shared/slot/predicates.ts
|
|
2437
|
-
import { isValidElement } from "react";
|
|
2438
|
-
function isSlottableElement(value) {
|
|
2439
|
-
return isValidElement(value) && value.type === Slottable;
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
// ../../adapters/react/src/shared/slot/extractSlottable.ts
|
|
2760
|
+
import { createElement, Fragment as Fragment3, isValidElement as isValidElement2 } from "react";
|
|
2443
2761
|
function extractSlottable(children) {
|
|
2444
2762
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
2445
2763
|
const slottables = childrenArray.filter(isSlottableElement);
|
|
@@ -2459,14 +2777,14 @@ function extractSlottable(children) {
|
|
|
2459
2777
|
"Slottable expects exactly one React element child, received text content"
|
|
2460
2778
|
);
|
|
2461
2779
|
invariant(isValidElement2(child), "Slottable expects exactly one React element child");
|
|
2462
|
-
invariant(child.type !==
|
|
2780
|
+
invariant(child.type !== Fragment3, "Slottable child cannot be a Fragment");
|
|
2463
2781
|
const index = childrenArray.indexOf(slottable);
|
|
2464
2782
|
return {
|
|
2465
2783
|
child,
|
|
2466
2784
|
// Fragment wrapper: Slot owns no DOM node; ref composition happens only on the merge target.
|
|
2467
2785
|
rebuild(merged) {
|
|
2468
2786
|
const out = childrenArray.map((node, i) => i === index ? merged : node);
|
|
2469
|
-
return createElement(
|
|
2787
|
+
return createElement(Fragment3, null, ...out);
|
|
2470
2788
|
}
|
|
2471
2789
|
};
|
|
2472
2790
|
}
|
|
@@ -2482,16 +2800,6 @@ function applySlot(children, slotProps, ref, cloneSlotChild) {
|
|
|
2482
2800
|
return cloneSlotChild({ child: children, slotProps, ref });
|
|
2483
2801
|
}
|
|
2484
2802
|
|
|
2485
|
-
// ../../adapters/react/src/shared/slot/make-render-as-child.ts
|
|
2486
|
-
import { isValidElement as isValidElement4 } from "react";
|
|
2487
|
-
function makeRenderAsChild(cloneSlotChild) {
|
|
2488
|
-
return function renderAsChild(children, className, ref) {
|
|
2489
|
-
if (!isValidElement4(children)) throw new Error("asChild requires a React element child");
|
|
2490
|
-
const slotProps = className ? { className } : {};
|
|
2491
|
-
return cloneSlotChild({ child: children, slotProps, ref: ref ?? null });
|
|
2492
|
-
};
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
2803
|
// ../../adapters/react/src/shared/apply-display-name.ts
|
|
2496
2804
|
function applyDisplayName(component, name) {
|
|
2497
2805
|
const displayName = name ?? "PolymorphicComponent";
|
|
@@ -2501,148 +2809,170 @@ function applyDisplayName(component, name) {
|
|
|
2501
2809
|
});
|
|
2502
2810
|
}
|
|
2503
2811
|
|
|
2504
|
-
// ../../adapters/react/src/
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2812
|
+
// ../../adapters/react/src/shared/render.ts
|
|
2813
|
+
import { createElement as createElement2 } from "react";
|
|
2814
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
2815
|
+
function buildRenderState(tag, directives, props, className, children) {
|
|
2816
|
+
const state = { tag, directives, props, className };
|
|
2817
|
+
if (children !== void 0) state.children = children;
|
|
2818
|
+
return state;
|
|
2510
2819
|
}
|
|
2511
|
-
function
|
|
2512
|
-
|
|
2513
|
-
|
|
2820
|
+
function prepareRenderState(runtime, props, filterProps) {
|
|
2821
|
+
const { as, asChild, render: _render, children, className, recipe, ...rest } = props;
|
|
2822
|
+
const tag = runtime.resolveTag(as);
|
|
2823
|
+
if (runtime.options.allowedAs !== void 0 && as !== void 0) {
|
|
2824
|
+
enforceAllowedAs(
|
|
2825
|
+
tag,
|
|
2826
|
+
runtime.options.allowedAs,
|
|
2827
|
+
runtime.options.diagnostics,
|
|
2828
|
+
runtime.options.displayName
|
|
2829
|
+
);
|
|
2514
2830
|
}
|
|
2831
|
+
const mergedProps = runtime.resolveProps(rest);
|
|
2832
|
+
const htmlNormalizers = runtime.options.htmlPropNormalizersFn?.(tag);
|
|
2833
|
+
const baseProps = htmlNormalizers?.length ? htmlNormalizers.reduce((acc, fn) => ({ ...acc, ...fn(acc) }), mergedProps) : mergedProps;
|
|
2834
|
+
const normalizedProps = runtime.options.normalizeFn ? runtime.options.normalizeFn(baseProps) : baseProps;
|
|
2835
|
+
const resolvedClass = runtime.resolveClasses(tag, normalizedProps, className, recipe);
|
|
2836
|
+
const filteredProps = applyFilter(normalizedProps, filterProps, runtime.options.variantKeys);
|
|
2837
|
+
const directives = {
|
|
2838
|
+
...as !== void 0 && { as },
|
|
2839
|
+
...asChild !== void 0 && { asChild }
|
|
2840
|
+
};
|
|
2841
|
+
return buildRenderState(tag, directives, filteredProps, resolvedClass, children);
|
|
2515
2842
|
}
|
|
2516
|
-
function
|
|
2517
|
-
if (!
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
return true;
|
|
2843
|
+
function warnDiscardedChildren(originalChildren, normalizedChildren, validator) {
|
|
2844
|
+
if (!Array.isArray(originalChildren)) return;
|
|
2845
|
+
const discarded = originalChildren.length - normalizedChildren.length;
|
|
2846
|
+
if (discarded > 0) validator.warnDiscardedChildren(discarded);
|
|
2847
|
+
}
|
|
2848
|
+
function isSingleElementArray(arr) {
|
|
2849
|
+
return arr.length === 1;
|
|
2524
2850
|
}
|
|
2525
|
-
function
|
|
2526
|
-
|
|
2851
|
+
function resolveSlotChildren(children, normalized, validator) {
|
|
2852
|
+
warnDiscardedChildren(children, normalized, validator);
|
|
2853
|
+
if (isSingleElementArray(normalized)) {
|
|
2854
|
+
return normalized[0];
|
|
2855
|
+
}
|
|
2856
|
+
if (normalized.length > 1 && normalized.some(isSlottableElement)) {
|
|
2857
|
+
return normalized;
|
|
2858
|
+
}
|
|
2859
|
+
validator.assertSingleChild(normalized.length);
|
|
2860
|
+
return null;
|
|
2861
|
+
}
|
|
2862
|
+
function validateSlotDirectives(directives, validator) {
|
|
2863
|
+
const { as, asChild } = directives;
|
|
2864
|
+
if (!asChild) return false;
|
|
2865
|
+
if (as !== void 0) {
|
|
2866
|
+
validator.assertExclusive();
|
|
2527
2867
|
return false;
|
|
2528
2868
|
}
|
|
2529
|
-
listeners[key] = value;
|
|
2530
2869
|
return true;
|
|
2531
2870
|
}
|
|
2532
|
-
function
|
|
2533
|
-
if (
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
const dec = {};
|
|
2545
|
-
iterate.forEachEntry(props, (key, value) => {
|
|
2546
|
-
if (key === "children" || key === "slot" || key === "ref") return;
|
|
2547
|
-
if (key === "style" && extractStyles(value, styles)) return;
|
|
2548
|
-
if (extractListener(key, value, listeners)) return;
|
|
2549
|
-
if (isAttributeValue(value)) {
|
|
2550
|
-
extractAttributeOrVariant(key, value, attributes, variants, variantKeys);
|
|
2551
|
-
}
|
|
2871
|
+
function resolveSlotRender(state, getNormalized, validator) {
|
|
2872
|
+
if (!validateSlotDirectives(state.directives, validator)) return null;
|
|
2873
|
+
const child = resolveSlotChildren(state.children, getNormalized(), validator);
|
|
2874
|
+
if (child === null) return null;
|
|
2875
|
+
return { child };
|
|
2876
|
+
}
|
|
2877
|
+
function renderResolvedSlot(slotComponent, state, resolved, ref) {
|
|
2878
|
+
return jsx2(slotComponent, {
|
|
2879
|
+
...state.props,
|
|
2880
|
+
className: state.className,
|
|
2881
|
+
ref,
|
|
2882
|
+
children: resolved.child
|
|
2552
2883
|
});
|
|
2553
|
-
assignIfNotEmpty(dec, "attributes", attributes);
|
|
2554
|
-
assignIfNotEmpty(dec, "styles", styles);
|
|
2555
|
-
assignIfNotEmpty(dec, "listeners", listeners);
|
|
2556
|
-
assignIfNotEmpty(dec, "variants", variants);
|
|
2557
|
-
const ref = props.ref;
|
|
2558
|
-
if (ref !== void 0) {
|
|
2559
|
-
dec.ref = ref;
|
|
2560
|
-
}
|
|
2561
|
-
return dec;
|
|
2562
2884
|
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
// ../../adapters/react/src/backend/build-props.ts
|
|
2571
|
-
function buildPropsFromDecoration(id, decoration) {
|
|
2885
|
+
function tryRenderAsChild(state, ref, slotComponent, getNormalized, validator) {
|
|
2886
|
+
const resolved = resolveSlotRender(state, getNormalized, validator);
|
|
2887
|
+
if (resolved === null) return null;
|
|
2888
|
+
return renderResolvedSlot(slotComponent, state, resolved, ref);
|
|
2889
|
+
}
|
|
2890
|
+
function buildElementProps(props, className, ref, children) {
|
|
2891
|
+
const { role, ...rest } = props;
|
|
2572
2892
|
return {
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
...
|
|
2577
|
-
...
|
|
2893
|
+
...rest,
|
|
2894
|
+
className,
|
|
2895
|
+
ref,
|
|
2896
|
+
...children !== void 0 && { children },
|
|
2897
|
+
...isKnownAriaRole(role) && { role }
|
|
2578
2898
|
};
|
|
2579
2899
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2900
|
+
function renderIntrinsic(state, ref, runtime) {
|
|
2901
|
+
const elementProps = buildElementProps(state.props, state.className, ref, state.children);
|
|
2902
|
+
const domProps = typeof state.tag === "string" ? runtime.resolveAria(state.tag, elementProps).props : elementProps;
|
|
2903
|
+
return createElement2(state.tag, domProps);
|
|
2904
|
+
}
|
|
2905
|
+
function render({
|
|
2906
|
+
runtime,
|
|
2907
|
+
props,
|
|
2908
|
+
ref,
|
|
2909
|
+
slotComponent,
|
|
2910
|
+
normalizeChildren,
|
|
2911
|
+
filterProps,
|
|
2912
|
+
slotValidator,
|
|
2913
|
+
childrenEvaluator
|
|
2914
|
+
}) {
|
|
2915
|
+
const state = prepareRenderState(runtime, props, filterProps);
|
|
2916
|
+
let cached;
|
|
2917
|
+
const getNormalizedChildren = () => cached ??= normalizeChildren(state.children);
|
|
2918
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2919
|
+
childrenEvaluator?.evaluate(getNormalizedChildren());
|
|
2920
|
+
runtime.options.htmlChildrenEvaluatorFn?.(state.tag)?.evaluate(getNormalizedChildren());
|
|
2921
|
+
}
|
|
2922
|
+
if (typeof props.render === "function") {
|
|
2923
|
+
return props.render({ ...state.props, className: state.className, ref });
|
|
2924
|
+
}
|
|
2925
|
+
const slotResult = tryRenderAsChild(
|
|
2926
|
+
state,
|
|
2927
|
+
ref,
|
|
2928
|
+
slotComponent,
|
|
2929
|
+
getNormalizedChildren,
|
|
2930
|
+
slotValidator
|
|
2605
2931
|
);
|
|
2606
|
-
return
|
|
2932
|
+
return slotResult ?? renderIntrinsic(state, ref, runtime);
|
|
2607
2933
|
}
|
|
2608
2934
|
|
|
2609
|
-
// ../../adapters/react/src/
|
|
2610
|
-
function
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2935
|
+
// ../../adapters/react/src/shared/build-runtime.ts
|
|
2936
|
+
function normalizeOptions(options, defaultSlotComponent) {
|
|
2937
|
+
return {
|
|
2938
|
+
...options,
|
|
2939
|
+
...resolveAdapterCommonOptions(options),
|
|
2940
|
+
slotComponent: options.slotComponent ?? defaultSlotComponent
|
|
2941
|
+
};
|
|
2942
|
+
}
|
|
2943
|
+
function buildRuntime(options, defaultSlotComponent, normalizeChildren) {
|
|
2944
|
+
const normalized = normalizeOptions(options, defaultSlotComponent);
|
|
2945
|
+
const { runtime, ownedKeys } = buildCoreRuntime(normalized);
|
|
2946
|
+
const { childrenEvaluator } = buildEngines(
|
|
2947
|
+
normalized.diagnostics,
|
|
2948
|
+
normalized.enforcement?.children,
|
|
2949
|
+
normalized.name
|
|
2950
|
+
);
|
|
2951
|
+
const filterProps = composeFilter(ownedKeys, normalized.filterProps);
|
|
2952
|
+
const slotValidator = new SlotValidator(normalized.name, normalized.diagnostics, "React element");
|
|
2953
|
+
return {
|
|
2954
|
+
runtime,
|
|
2955
|
+
filterProps,
|
|
2956
|
+
slotValidator,
|
|
2957
|
+
slotComponent: normalized.slotComponent,
|
|
2958
|
+
normalizeChildren,
|
|
2959
|
+
...childrenEvaluator !== void 0 && { childrenEvaluator }
|
|
2960
|
+
};
|
|
2615
2961
|
}
|
|
2616
2962
|
|
|
2617
2963
|
export {
|
|
2618
|
-
|
|
2619
|
-
|
|
2964
|
+
defineContractComponent,
|
|
2965
|
+
isString,
|
|
2620
2966
|
SLOT_NAME,
|
|
2621
2967
|
COMPONENT_DEFAULT_TAG,
|
|
2622
|
-
AriaPolicyEngine,
|
|
2623
|
-
getHtmlChildrenEvaluator,
|
|
2624
|
-
enforceAllowedAs,
|
|
2625
|
-
applyPropNormalizers,
|
|
2626
|
-
defineContractComponent,
|
|
2627
|
-
buildEngines,
|
|
2628
|
-
resolveAdapterCommonOptions,
|
|
2629
|
-
SlotValidator,
|
|
2630
|
-
mergeSlotProps,
|
|
2631
|
-
buildDefinition,
|
|
2632
|
-
flattenClassName,
|
|
2633
|
-
applyAttributes,
|
|
2634
|
-
buildStylePipeline,
|
|
2635
|
-
joinClasses,
|
|
2636
|
-
applyAria,
|
|
2637
|
-
applyFilterProps,
|
|
2638
|
-
applyRef,
|
|
2639
2968
|
mergeRefs,
|
|
2640
2969
|
applyDisplayName,
|
|
2641
|
-
cloneWithProps,
|
|
2642
2970
|
Slottable,
|
|
2971
|
+
hasWarningGetter,
|
|
2972
|
+
getElementRef,
|
|
2973
|
+
getPropsRef,
|
|
2974
|
+
makeCloneSlotChild,
|
|
2643
2975
|
applySlot,
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
renderNormally,
|
|
2647
|
-
renderWithCallback
|
|
2976
|
+
render,
|
|
2977
|
+
buildRuntime
|
|
2648
2978
|
};
|