@sylwellsoftware/fray 0.1.0-alpha.1 → 0.2.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.
Files changed (44) hide show
  1. package/README.md +246 -11
  2. package/colors/README.md +15 -0
  3. package/colors/gray/colors.css +29 -0
  4. package/colors/green/colors.css +29 -0
  5. package/colors/iceblue/colors.css +29 -0
  6. package/colors/ocean/colors.css +29 -0
  7. package/colors/orange/colors.css +29 -0
  8. package/colors/purple/colors.css +29 -0
  9. package/colors/red/colors.css +29 -0
  10. package/colors/yellow/colors.css +29 -0
  11. package/dist/Components/data/table/DataTable.d.ts.map +1 -1
  12. package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
  13. package/dist/Components/dialog/dialog.d.ts.map +1 -1
  14. package/dist/Components/layout/panel.d.ts.map +1 -1
  15. package/dist/Components/layout/tabpanel/tabline.d.ts.map +1 -1
  16. package/dist/Components/lineinputs/checkbox/Checkbox.d.ts.map +1 -1
  17. package/dist/Components/lineinputs/toggle.d.ts.map +1 -1
  18. package/dist/Components/status/progressBar.d.ts.map +1 -1
  19. package/dist/Components/theme/stylesheetPicker.d.ts +40 -0
  20. package/dist/Components/theme/stylesheetPicker.d.ts.map +1 -0
  21. package/dist/{button-BRDkmR1C.js → button-CqDGmkBt.js} +87 -78
  22. package/dist/{button-BRDkmR1C.js.map → button-CqDGmkBt.js.map} +1 -1
  23. package/dist/experimental.js +104 -66
  24. package/dist/experimental.js.map +1 -1
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +801 -503
  28. package/dist/index.js.map +1 -1
  29. package/dist/{jsx-dev-runtime-CarwHDyL.js → jsx-dev-runtime-DukiDpV9.js} +202 -214
  30. package/dist/jsx-dev-runtime-DukiDpV9.js.map +1 -0
  31. package/dist/jsx-dev-runtime.js +1 -1
  32. package/dist/jsx-runtime.js +1 -1
  33. package/dist/styling/baseStyleDefinitions.d.ts +3 -0
  34. package/dist/styling/baseStyleDefinitions.d.ts.map +1 -1
  35. package/dist/styling/styleRegistry.d.ts.map +1 -1
  36. package/dist/styling/theme.d.ts +27 -0
  37. package/dist/styling/theme.d.ts.map +1 -0
  38. package/package.json +13 -5
  39. package/styles/structural.css +916 -0
  40. package/themes/README.md +84 -30
  41. package/themes/java/theme.css +140 -0
  42. package/themes/minimal/theme.css +128 -0
  43. package/themes/shiny/theme.css +314 -0
  44. package/dist/jsx-dev-runtime-CarwHDyL.js.map +0 -1
@@ -16,46 +16,48 @@ const I = {
16
16
  display: "flex",
17
17
  "flex-flow": "row nowrap",
18
18
  position: "relative",
19
- "line-height": "1.25",
20
- "font-size": "var(--ui-font-size)",
21
- "min-height": "calc(var(--ui-font-size) + var(--ui-padding) + var(--ui-padding))",
22
- color: "var(--ui-text-color)",
23
- "border-radius": "var(--ui-border-radius)",
19
+ "line-height": "var(--fray-line-height, 1.25)",
20
+ "font-size": "var(--fray-font-size, var(--ui-font-size))",
21
+ "min-height": "var(--fray-control-min-height, 2rem)",
22
+ color: "var(--fray-ui-color, var(--ui-text-color))",
23
+ "border-radius": "var(--fray-radius-md, var(--ui-border-radius))",
24
24
  "box-sizing": "border-box"
25
25
  },
26
26
  input: {
27
- background: "var(--ui-input-bg)",
28
- padding: "var(--ui-padding-v) var(--ui-padding-h)",
27
+ background: "var(--fray-input-background, var(--ui-input-bg))",
28
+ color: "var(--fray-input-color, var(--fray-ui-color, var(--ui-text-color)))",
29
+ padding: "var(--ui-padding-v, 0.25rem) var(--ui-padding-h, 0.5rem)",
29
30
  "pointer-events": "all",
30
- border: "var(--ui-input-border)",
31
- width: "var(--input-width)",
32
- "box-shadow": "var(--input-shadow)",
31
+ border: "var(--fray-input-border, var(--ui-input-border))",
32
+ width: "var(--input-width, 15rem)",
33
+ "box-shadow": "var(--fray-input-shadow, var(--input-shadow, none))",
33
34
  "box-sizing": "border-box",
34
35
  "white-space": "nowrap",
35
36
  variants: {
36
37
  ":focus-visible": {
37
38
  outline: "2px solid transparent",
38
39
  "outline-offset": "1px",
39
- "border-color": "var(--ui-accent-color)",
40
- "box-shadow": "0 0 0 1px var(--ui-accent-color-highlight)"
40
+ "border-color": "var(--fray-color-focus, var(--ui-accent-color))",
41
+ "box-shadow": "var(--fray-focus-ring, 0 0 0 2px var(--ui-accent-color-highlight))"
41
42
  },
42
43
  ":disabled": {
43
- background: "var(--ui-input-bg-disabled)",
44
- "border-color": "var(--ui-input-border-disabled)",
45
- color: "var(--ui-input-text-color-disabled)",
44
+ background: "var(--fray-input-background-disabled, var(--ui-input-bg-disabled))",
45
+ "border-color": "var(--fray-color-border, var(--ui-input-border-disabled))",
46
+ color: "var(--fray-input-color-disabled, var(--ui-input-text-color-disabled))",
46
47
  cursor: "not-allowed"
47
48
  }
48
49
  }
49
50
  },
50
51
  inputlike: {
51
- background: "var(--ui-input-bg)",
52
- padding: "var(--ui-padding-v) var(--ui-padding-h)",
52
+ background: "var(--fray-input-background, var(--ui-input-bg))",
53
+ color: "var(--fray-input-color, var(--fray-ui-color, var(--ui-text-color)))",
54
+ padding: "var(--ui-padding-v, 0.25rem) var(--ui-padding-h, 0.5rem)",
53
55
  "pointer-events": "all",
54
- border: "var(--ui-input-border)",
55
- "box-shadow": "var(--input-shadow)",
56
+ border: "var(--fray-input-border, var(--ui-input-border))",
57
+ "box-shadow": "var(--fray-input-shadow, var(--input-shadow, none))",
56
58
  "box-sizing": "border-box",
57
59
  "white-space": "nowrap",
58
- "border-radius": "var(--ui-border-radius)"
60
+ "border-radius": "var(--fray-radius-md, var(--ui-border-radius))"
59
61
  },
60
62
  labeledinput: {
61
63
  display: "flex",
@@ -64,15 +66,15 @@ const I = {
64
66
  gap: ".5em"
65
67
  },
66
68
  label: {
67
- color: "var(--ui-text-color)",
68
- "font-size": "var(--ui-font-size)"
69
+ color: "var(--fray-ui-color, var(--ui-text-color))",
70
+ "font-size": "var(--fray-font-size, var(--ui-font-size))"
69
71
  },
70
72
  disabled: {
71
- "border-color": "var(--ui-input-border-disabled)",
72
- color: "var(--ui-input-text-color-disabled)"
73
+ "border-color": "var(--fray-color-border, var(--ui-input-border-disabled))",
74
+ color: "var(--fray-input-color-disabled, var(--ui-input-text-color-disabled))"
73
75
  },
74
76
  error: {
75
- color: "var(--error-color)"
77
+ color: "var(--fray-color-error, var(--error-color))"
76
78
  },
77
79
  working: {
78
80
  display: "inline",
@@ -82,31 +84,32 @@ const I = {
82
84
  animation: "fray-placeholder-progress 0.8s linear infinite",
83
85
  "background-repeat": "repeat",
84
86
  "background-size": "2rem 2rem",
85
- "background-image": "linear-gradient(-45deg, #0001 25%, #fff1 25%, #fff1 50%, #0001 50%, #0001 75%, #fff1 75%, #fff1)",
87
+ "background-image": "var(--fray-working-background-image)",
86
88
  border: "0 solid transparent",
87
89
  "border-radius": "inherit",
88
90
  "box-sizing": "border-box"
89
91
  },
90
92
  panel: {
91
- background: "var(--panel-bg)",
92
- border: "var(--panel-border)",
93
- "border-radius": "var(--panel-radius)",
94
- "box-shadow": "var(--panel-shadow)",
95
- color: "var(--panel-color)"
93
+ background: "var(--fray-panel-background, var(--panel-bg))",
94
+ border: "var(--fray-panel-border, var(--panel-border))",
95
+ "border-radius": "var(--fray-panel-radius, var(--panel-radius))",
96
+ "box-shadow": "var(--fray-panel-shadow, var(--panel-shadow))",
97
+ color: "var(--fray-panel-color, var(--panel-color))"
96
98
  },
97
99
  sectionheader: {
98
- "box-shadow": "var(--sectionheader-shadow)",
99
- background: "var(--sectionheader-bg)",
100
- color: "var(--sectionheader-color)"
100
+ "box-shadow": "var(--fray-section-header-shadow, var(--fray-header-shadow, var(--sectionheader-shadow)))",
101
+ background: "var(--fray-section-header-background, var(--fray-header-background, var(--sectionheader-bg)))",
102
+ color: "var(--fray-section-header-color, var(--fray-header-color, var(--sectionheader-color)))",
103
+ border: "var(--fray-section-header-border, var(--fray-header-border, 0 solid transparent))"
101
104
  },
102
105
  uiline: {
103
106
  "box-sizing": "border-box",
104
- "line-height": "1.25",
105
- "font-size": "var(--ui-font-size)",
106
- "min-height": "calc(var(--ui-font-size) + var(--ui-padding) + var(--ui-padding))",
107
- color: "var(--ui-text-color)",
108
- padding: "var(--ui-padding-v) var(--ui-padding-h)",
109
- "border-radius": "var(--ui-border-radius)",
107
+ "line-height": "var(--fray-line-height, 1.25)",
108
+ "font-size": "var(--fray-font-size, var(--ui-font-size))",
109
+ "min-height": "var(--fray-control-min-height, 2rem)",
110
+ color: "var(--fray-ui-color, var(--ui-text-color))",
111
+ padding: "var(--ui-padding-v, 0.25rem) var(--ui-padding-h, 0.5rem)",
112
+ "border-radius": "var(--fray-radius-md, var(--ui-border-radius))",
110
113
  cursor: "pointer",
111
114
  "user-select": "none"
112
115
  },
@@ -116,38 +119,38 @@ const I = {
116
119
  },
117
120
  button: {
118
121
  "box-sizing": "border-box",
119
- background: "var(--button-background)",
120
- border: "var(--button-border)",
121
- "box-shadow": "var(--button-shadow)",
122
- color: "var(--button-color)",
122
+ background: "var(--fray-button-background, var(--button-background))",
123
+ border: "var(--fray-button-border, var(--button-border))",
124
+ "box-shadow": "var(--fray-button-shadow, var(--button-shadow))",
125
+ color: "var(--fray-button-color, var(--button-color))",
123
126
  cursor: "default",
124
127
  "user-select": "none",
125
128
  variants: {
126
129
  ":hover": {
127
- background: "var(--button-background-hover)",
128
- "box-shadow": "var(--button-shadow)"
130
+ background: "var(--fray-button-background-hover, var(--button-background-hover))",
131
+ "box-shadow": "var(--fray-button-shadow, var(--button-shadow))"
129
132
  },
130
133
  ":focus-visible": {
131
134
  outline: "2px solid transparent",
132
135
  "outline-offset": "1px",
133
- border: "1px solid var(--ui-accent-color)",
134
- "box-shadow": "0 0 0 1px var(--ui-accent-color-highlight)"
136
+ border: "1px solid var(--fray-color-focus, var(--ui-accent-color))",
137
+ "box-shadow": "var(--fray-focus-ring, 0 0 0 2px var(--ui-accent-color-highlight))"
135
138
  },
136
139
  ":disabled": {
137
- background: "var(--button-background-disabled)",
138
- border: "var(--button-border-disabled)",
139
- color: "var(--ui-input-text-color-disabled)",
140
+ background: "var(--fray-button-background-disabled, var(--button-background-disabled))",
141
+ border: "var(--button-border-disabled, var(--fray-button-border))",
142
+ color: "var(--fray-input-color-disabled, var(--ui-input-text-color-disabled))",
140
143
  cursor: "not-allowed",
141
144
  "pointer-events": "none"
142
145
  }
143
146
  }
144
147
  },
145
148
  toolbar: {
146
- background: "var(--toolbar-bg)",
147
- border: "var(--toolbar-border)",
148
- "border-radius": "var(--toolbar-radius)",
149
- "box-shadow": "var(--toolbar-shadow)",
150
- color: "var(--toolbar-color)"
149
+ background: "var(--fray-toolbar-background, var(--toolbar-bg))",
150
+ border: "var(--fray-toolbar-border, var(--toolbar-border))",
151
+ "border-radius": "var(--toolbar-radius, var(--fray-radius-md))",
152
+ "box-shadow": "var(--fray-toolbar-shadow, var(--toolbar-shadow))",
153
+ color: "var(--fray-toolbar-color, var(--toolbar-color))"
151
154
  }
152
155
  }, U = "data-fray-structural-styles";
153
156
  let fe = 1;
@@ -172,28 +175,13 @@ class J {
172
175
  for (const i of r) {
173
176
  if (!Object.hasOwn(I, i))
174
177
  throw new Error(`Unknown Fray base style: ${String(i)}`);
175
- const s = i, o = this.baseStyleMap.get(s) ?? /* @__PURE__ */ new Set();
176
- o.add(t.trim()), this.baseStyleMap.set(s, o);
178
+ const o = i, s = this.baseStyleMap.get(o) ?? /* @__PURE__ */ new Set();
179
+ s.add(t.trim()), this.baseStyleMap.set(o, s);
177
180
  }
178
181
  return this;
179
182
  }
180
183
  generateRootCSS() {
181
- return `:root {
182
- --base-font-size: 14px;
183
- --ui-font-size: var(--base-font-size);
184
- --ui-padding: 0.375rem;
185
- --ui-padding-h: 0.375rem;
186
- --ui-padding-v: 0;
187
- --ui-border-radius: 0.25rem;
188
- --input-width: 15rem;
189
- --spacing-small: 0.5rem;
190
- --spacing-medium: 1rem;
191
- --panel-padding: 0.75rem;
192
- --noselect-user-select: none;
193
- --noselect-cursor: default;
194
- }
195
-
196
- *, *::before, *::after {
184
+ return `*, *::before, *::after {
197
185
  box-sizing: border-box;
198
186
  }
199
187
 
@@ -216,12 +204,12 @@ class J {
216
204
  generateBaseStyleCSS() {
217
205
  let t = "";
218
206
  for (const [n, r] of this.baseStyleMap) {
219
- const { properties: i, variants: s } = he(I[n]), o = [...r];
220
- t += D(n, o, i);
221
- for (const [a, l] of Object.entries(s))
207
+ const { properties: i, variants: o } = he(I[n]), s = [...r];
208
+ t += D(n, s, i);
209
+ for (const [a, l] of Object.entries(o))
222
210
  t += D(
223
211
  `${n}${a}`,
224
- o.map((c) => be(c, a)),
212
+ s.map((c) => be(c, a)),
225
213
  l
226
214
  );
227
215
  }
@@ -241,7 +229,7 @@ class J {
241
229
  injectAll(t = globalThis.document) {
242
230
  if ((t == null ? void 0 : t.head) == null)
243
231
  throw new TypeError("StyleRegistry.injectAll requires a document with a head");
244
- const n = `style[${U}="${me(this.id)}"]`;
232
+ const n = `style[${U}="${ye(this.id)}"]`;
245
233
  let r = t.head.querySelector(n);
246
234
  r == null && (r = t.createElement("style"), r.setAttribute(U, this.id), t.head.prepend(r));
247
235
  const i = this.generateCSS();
@@ -271,7 +259,7 @@ function he(e) {
271
259
  }
272
260
  function D(e, t, n) {
273
261
  if (t.length === 0 || Object.keys(n).length === 0) return "";
274
- const r = Object.entries(n).map(([i, s]) => ` ${i}: ${s};`).join(`
262
+ const r = Object.entries(n).map(([i, o]) => ` ${i}: ${o};`).join(`
275
263
  `);
276
264
  return `/* ${e} */
277
265
  ${t.join(`,
@@ -285,10 +273,10 @@ function be(e, t) {
285
273
  const n = e.indexOf("::");
286
274
  return n < 0 ? `${e}${t}` : `${e.slice(0, n)}${t}${e.slice(n)}`;
287
275
  }
288
- function me(e) {
276
+ function ye(e) {
289
277
  return e.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
290
278
  }
291
- const ye = /* @__PURE__ */ new Set([
279
+ const me = /* @__PURE__ */ new Set([
292
280
  "annotation-xml",
293
281
  "color-profile",
294
282
  "font-face",
@@ -309,16 +297,16 @@ class L {
309
297
  if (r == null || typeof r != "object" || Array.isArray(r))
310
298
  throw new TypeError("Fray elementNames must be an object");
311
299
  const i = r.prefix === void 0 ? "fray" : r.prefix;
312
- i !== null && k(i, "Fray element prefix");
313
- const s = r.overrides ?? {};
314
- if (s == null || typeof s != "object" || Array.isArray(s))
300
+ i !== null && T(i, "Fray element prefix");
301
+ const o = r.overrides ?? {};
302
+ if (o == null || typeof o != "object" || Array.isArray(o))
315
303
  throw new TypeError("Fray element-name overrides must be an object");
316
- for (const [o, a] of Object.entries(s))
317
- k(o, "Fray component host name"), K(a);
318
- this.elementPrefix = i, this.elementNameOverrides = Object.freeze({ ...s }), this.styleRegistry = n;
304
+ for (const [s, a] of Object.entries(o))
305
+ T(s, "Fray component host name"), K(a);
306
+ this.elementPrefix = i, this.elementNameOverrides = Object.freeze({ ...o }), this.styleRegistry = n;
319
307
  }
320
308
  resolveElementName(t, n = null) {
321
- k(t, "Fray component host name");
309
+ T(t, "Fray component host name");
322
310
  const i = this.elementNameOverrides[t] ?? (this.elementPrefix == null ? n ?? t : `${this.elementPrefix}-${t}`);
323
311
  return K(i), i;
324
312
  }
@@ -350,12 +338,12 @@ function _e(e = {}) {
350
338
  return new L(e);
351
339
  }
352
340
  const Z = new L({}, pe);
353
- function k(e, t) {
341
+ function T(e, t) {
354
342
  if (typeof e != "string" || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))
355
343
  throw new TypeError(`${t} must be a lowercase kebab-case name`);
356
344
  }
357
345
  function K(e) {
358
- if (k(e, "Fray element name"), !e.includes("-") || ye.has(e))
346
+ if (T(e, "Fray element name"), !e.includes("-") || me.has(e))
359
347
  throw new TypeError(`Fray element name must be a non-reserved name containing a hyphen: ${e}`);
360
348
  }
361
349
  const P = Symbol.for("@sylwellsoftware/fray.Fragment"), Q = /* @__PURE__ */ new WeakSet(), ge = /* @__PURE__ */ new Set([
@@ -408,14 +396,14 @@ function A(e, t = null, ...n) {
408
396
  throw new TypeError("VNode props must be an object or null");
409
397
  const {
410
398
  children: i,
411
- key: s = null,
412
- ...o
399
+ key: o = null,
400
+ ...s
413
401
  } = r;
414
402
  return {
415
403
  type: e,
416
- key: s,
404
+ key: o,
417
405
  props: {
418
- ...o,
406
+ ...s,
419
407
  children: X([i, n])
420
408
  }
421
409
  };
@@ -465,11 +453,11 @@ const b = class b {
465
453
  n.add(this);
466
454
  const r = this.hostName ?? null, i = this.standaloneHostName ?? null;
467
455
  this.css && t.styleRegistry.registerCSS(r == null ? this.css : t.resolveHostCSS(this.css, r, i));
468
- const s = Be(this.baseStyles);
469
- for (const [o, a] of s)
470
- t.styleRegistry.registerBaseStyle(r == null ? o : t.resolveHostSelector(o, r, i), a);
471
- for (const o of this.dependencies ?? [])
472
- o.registerStyles(t, n);
456
+ const o = Be(this.baseStyles);
457
+ for (const [s, a] of o)
458
+ t.styleRegistry.registerBaseStyle(r == null ? s : t.resolveHostSelector(s, r, i), a);
459
+ for (const s of this.dependencies ?? [])
460
+ s.registerStyles(t, n);
473
461
  }
474
462
  /** One-time setup hook. Constructors must not subscribe or render. */
475
463
  initialize() {
@@ -583,8 +571,8 @@ const b = class b {
583
571
  listen(t, n, r, i) {
584
572
  if (t == null || typeof t.addEventListener != "function")
585
573
  throw new TypeError("listen target must be an EventTarget");
586
- const s = r;
587
- return t.addEventListener(n, s, i), this.onCleanup(() => t.removeEventListener(n, s, i)), this;
574
+ const o = r;
575
+ return t.addEventListener(n, o, i), this.onCleanup(() => t.removeEventListener(n, o, i)), this;
588
576
  }
589
577
  registerChild(t) {
590
578
  if (!(t instanceof b))
@@ -632,7 +620,7 @@ function X(e) {
632
620
  };
633
621
  return n(e), t;
634
622
  }
635
- function j(e, t) {
623
+ function k(e, t) {
636
624
  if (typeof e == "string" || typeof e == "number")
637
625
  return {
638
626
  kind: "text",
@@ -641,29 +629,29 @@ function j(e, t) {
641
629
  node: document.createTextNode(String(e)),
642
630
  owner: t
643
631
  };
644
- if (x(e)) {
645
- const s = document.createComment("fray-emitter-start"), o = document.createComment("fray-emitter-end"), a = e.get();
632
+ if (N(e)) {
633
+ const o = document.createComment("fray-emitter-start"), s = document.createComment("fray-emitter-end"), a = e.get();
646
634
  if (Object.is(a, e))
647
635
  throw new TypeError("A Fray emitter child cannot render itself");
648
636
  const l = document.createDocumentFragment();
649
- l.append(s, o);
650
- const c = j(R(a), t);
651
- q(l, c, o);
637
+ l.append(o, s);
638
+ const c = k(R(a), t);
639
+ q(l, c, s);
652
640
  const d = {
653
641
  kind: "emitter",
654
642
  key: null,
655
643
  source: e,
656
- start: s,
657
- end: o,
644
+ start: o,
645
+ end: s,
658
646
  child: c,
659
647
  unsubscribe: () => {
660
648
  },
661
649
  owner: t
662
650
  };
663
- return d.unsubscribe = e.subscribe(({ value: y }) => {
664
- if (Object.is(y, e))
651
+ return d.unsubscribe = e.subscribe(({ value: m }) => {
652
+ if (Object.is(m, e))
665
653
  throw new TypeError("A Fray emitter child cannot render itself");
666
- d.child = _(d.child, R(y), t);
654
+ d.child = _(d.child, R(m), t);
667
655
  }, { emitCurrent: !1 }), d;
668
656
  }
669
657
  if (e instanceof h)
@@ -677,34 +665,34 @@ function j(e, t) {
677
665
  liveProps: /* @__PURE__ */ new Map(),
678
666
  owner: t
679
667
  };
680
- if (!m(e))
668
+ if (!y(e))
681
669
  throw new TypeError(`Invalid Fray child: ${G(e)}`);
682
670
  const { type: n, key: r = null, props: i } = e;
683
671
  if (n === P) {
684
- const s = document.createComment("fray-fragment-start"), o = document.createComment("fray-fragment-end"), a = {
672
+ const o = document.createComment("fray-fragment-start"), s = document.createComment("fray-fragment-end"), a = {
685
673
  kind: "fragment",
686
674
  key: r,
687
675
  type: n,
688
- start: s,
689
- end: o,
676
+ start: o,
677
+ end: s,
690
678
  children: [],
691
679
  owner: t
692
680
  }, l = document.createDocumentFragment();
693
- return l.append(s, o), a.children = O(
681
+ return l.append(o, s), a.children = O(
694
682
  l,
695
683
  [],
696
684
  i.children,
697
685
  t,
698
- o,
699
- s
686
+ s,
687
+ o
700
688
  ), a;
701
689
  }
702
690
  if (typeof n == "string") {
703
- const s = document.createElement(n), o = {
691
+ const o = document.createElement(n), s = {
704
692
  kind: "element",
705
693
  key: r,
706
694
  type: n,
707
- node: s,
695
+ node: o,
708
696
  props: {},
709
697
  listeners: /* @__PURE__ */ new Map(),
710
698
  liveProps: /* @__PURE__ */ new Map(),
@@ -713,10 +701,10 @@ function j(e, t) {
713
701
  children: [],
714
702
  owner: t
715
703
  };
716
- return ne(o, i), o.children = O(s, [], i.children, t), o;
704
+ return ne(s, i), s.children = O(o, [], i.children, t), s;
717
705
  }
718
- if (oe(n)) {
719
- const s = i, o = W(s), a = new n(o);
706
+ if (se(n)) {
707
+ const o = i, s = W(o), a = new n(s);
720
708
  a._setRuntime(t._runtime);
721
709
  const l = {
722
710
  kind: "component",
@@ -724,21 +712,21 @@ function j(e, t) {
724
712
  type: n,
725
713
  instance: a,
726
714
  prebuilt: !1,
727
- props: o,
715
+ props: s,
728
716
  liveProps: /* @__PURE__ */ new Map(),
729
717
  owner: t
730
718
  };
731
- return te(l, s), a.mount(), t.registerChild(a), l;
719
+ return te(l, o), a.mount(), t.registerChild(a), l;
732
720
  }
733
721
  if (typeof n == "function") {
734
- const s = n, o = i, a = W(o), l = R(s(a)), c = {
722
+ const o = n, s = i, a = W(s), l = R(o(a)), c = {
735
723
  kind: "function",
736
724
  key: r,
737
- type: s,
725
+ type: o,
738
726
  props: a,
739
- sourceProps: o,
727
+ sourceProps: s,
740
728
  liveProps: /* @__PURE__ */ new Map(),
741
- child: j(l, t),
729
+ child: k(l, t),
742
730
  owner: t
743
731
  };
744
732
  return Se(c), c;
@@ -746,13 +734,13 @@ function j(e, t) {
746
734
  throw new TypeError(`Unsupported vnode type: ${G(n)}`);
747
735
  }
748
736
  function _(e, t, n) {
749
- if (e == null) return j(t, n);
750
- if (se(e, t)) return ee(e, t, n);
751
- const r = j(t, n), i = re(e), s = (i == null ? void 0 : i.parentNode) ?? null;
752
- return s && q(s, r, i), g(e, !0), r;
737
+ if (e == null) return k(t, n);
738
+ if (oe(e, t)) return ee(e, t, n);
739
+ const r = k(t, n), i = re(e), o = (i == null ? void 0 : i.parentNode) ?? null;
740
+ return o && q(o, r, i), g(e, !0), r;
753
741
  }
754
742
  function ee(e, t, n) {
755
- return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t)), e) : e.kind === "emitter" ? (!x(t) || e.source !== t, e) : e.kind === "component" ? (t instanceof h || m(t) && ve(e, t.props), e) : m(t) ? e.kind === "function" ? (Ee(e, t.props), e) : e.kind === "fragment" ? (e.children = O(
743
+ return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t)), e) : e.kind === "emitter" ? (!N(t) || e.source !== t, e) : e.kind === "component" ? (t instanceof h || y(t) && ve(e, t.props), e) : y(t) ? e.kind === "function" ? (Ee(e, t.props), e) : e.kind === "fragment" ? (e.children = O(
756
744
  e.start.parentNode,
757
745
  e.children,
758
746
  t.props.children,
@@ -769,7 +757,7 @@ function ee(e, t, n) {
769
757
  function W(e) {
770
758
  return Object.fromEntries(Object.entries(e).map(([t, n]) => [
771
759
  t,
772
- C(n) ? n.emitter.get() : n
760
+ j(n) ? n.emitter.get() : n
773
761
  ]));
774
762
  }
775
763
  function te(e, t) {
@@ -796,20 +784,20 @@ function z(e) {
796
784
  }
797
785
  function M(e, t, n) {
798
786
  for (const [r, i] of e) {
799
- const s = t[r];
800
- C(s) && s.emitter === i.source || (i.unsubscribe(), e.delete(r));
787
+ const o = t[r];
788
+ j(o) && o.emitter === i.source || (i.unsubscribe(), e.delete(r));
801
789
  }
802
790
  for (const [r, i] of Object.entries(t)) {
803
- if (!C(i) || e.has(r)) continue;
804
- const s = {
791
+ if (!j(i) || e.has(r)) continue;
792
+ const o = {
805
793
  source: i.emitter,
806
794
  value: i.emitter.get(),
807
795
  unsubscribe: () => {
808
796
  }
809
797
  };
810
- s.unsubscribe = i.emitter.subscribe(({ value: o }) => {
811
- e.get(r) === s && (s.value = o, n(r, o));
812
- }, { emitCurrent: !1 }), e.set(r, s);
798
+ o.unsubscribe = i.emitter.subscribe(({ value: s }) => {
799
+ e.get(r) === o && (o.value = s, n(r, s));
800
+ }, { emitCurrent: !1 }), e.set(r, o);
813
801
  }
814
802
  }
815
803
  function V(e, t) {
@@ -817,54 +805,54 @@ function V(e, t) {
817
805
  var i;
818
806
  return [
819
807
  n,
820
- C(r) ? ((i = e.get(n)) == null ? void 0 : i.value) ?? r.emitter.get() : r
808
+ j(r) ? ((i = e.get(n)) == null ? void 0 : i.value) ?? r.emitter.get() : r
821
809
  ];
822
810
  }));
823
811
  }
824
- function O(e, t, n, r, i = null, s = null) {
812
+ function O(e, t, n, r, i = null, o = null) {
825
813
  if (e == null) throw new Error("Cannot patch a detached fragment range");
826
- const o = X(n), a = /* @__PURE__ */ new Map(), l = [];
814
+ const s = X(n), a = /* @__PURE__ */ new Map(), l = [];
827
815
  for (const f of t)
828
816
  f.key == null ? l.push(f) : a.has(f.key) || a.set(f.key, f);
829
- const c = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), y = [];
817
+ const c = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), m = [];
830
818
  let le = 0;
831
- for (const f of o) {
819
+ for (const f of s) {
832
820
  const p = E(f);
833
821
  if (p != null) {
834
822
  if (c.has(p)) throw new Error(`Duplicate sibling key: ${String(p)}`);
835
823
  c.add(p);
836
824
  }
837
- const T = p == null ? l[le++] : a.get(p);
838
- T && se(T, f) ? (d.add(T), y.push(ee(T, f, r))) : y.push(j(f, r));
825
+ const C = p == null ? l[le++] : a.get(p);
826
+ C && oe(C, f) ? (d.add(C), m.push(ee(C, f, r))) : m.push(k(f, r));
839
827
  }
840
828
  for (const f of t)
841
829
  d.has(f) || g(f, !0);
842
- let S = s ? s.nextSibling : e.firstChild;
843
- for (const f of y)
830
+ let S = o ? o.nextSibling : e.firstChild;
831
+ for (const f of m)
844
832
  for (const p of w(f))
845
833
  p === S ? S = S.nextSibling : (e.insertBefore(p, S ?? i), S = p.nextSibling);
846
- return y;
834
+ return m;
847
835
  }
848
836
  function ne(e, t) {
849
- const { children: n, ...r } = t, i = e.props, s = /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(r)]);
850
- for (const o of ["value", "checked"])
851
- if (Object.hasOwn(r, o) && Object.hasOwn(r, `bind:${o}`))
852
- throw new Error(`${o} and bind:${o} cannot be used together`);
853
- for (const o of s) {
854
- const a = i[o], l = r[o];
855
- if (Ne(o))
856
- je(e, o, l);
857
- else if (o === "ref")
858
- a !== l && Te(e, l);
859
- else if (Oe(o))
860
- Ce(e, o, l);
861
- else if (C(l))
862
- Re(e, o, l);
837
+ const { children: n, ...r } = t, i = e.props, o = /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(r)]);
838
+ for (const s of ["value", "checked"])
839
+ if (Object.hasOwn(r, s) && Object.hasOwn(r, `bind:${s}`))
840
+ throw new Error(`${s} and bind:${s} cannot be used together`);
841
+ for (const s of o) {
842
+ const a = i[s], l = r[s];
843
+ if (xe(s))
844
+ ke(e, s, l);
845
+ else if (s === "ref")
846
+ a !== l && Ce(e, l);
847
+ else if (Oe(s))
848
+ je(e, s, l);
849
+ else if (j(l))
850
+ Re(e, s, l);
863
851
  else {
864
- const c = e.liveProps.get(o);
865
- c && (c.unsubscribe(), e.liveProps.delete(o));
852
+ const c = e.liveProps.get(s);
853
+ c && (c.unsubscribe(), e.liveProps.delete(s));
866
854
  const d = (c == null ? void 0 : c.value) ?? a;
867
- Object.is(d, l) || v(e.node, o, d, l);
855
+ Object.is(d, l) || v(e.node, s, d, l);
868
856
  }
869
857
  }
870
858
  e.props = { ...r };
@@ -875,33 +863,33 @@ function Re(e, t, n) {
875
863
  r == null || r.unsubscribe();
876
864
  const i = n.emitter.get();
877
865
  v(e.node, t, (r == null ? void 0 : r.value) ?? e.props[t], i);
878
- const s = {
866
+ const o = {
879
867
  source: n.emitter,
880
868
  value: i,
881
869
  unsubscribe: () => {
882
870
  }
883
871
  };
884
- s.unsubscribe = n.emitter.subscribe(({ value: o }) => {
885
- const a = s.value;
886
- s.value = o, Object.is(a, o) || v(e.node, t, a, o);
887
- }, { emitCurrent: !1 }), e.liveProps.set(t, s);
872
+ o.unsubscribe = n.emitter.subscribe(({ value: s }) => {
873
+ const a = o.value;
874
+ o.value = s, Object.is(a, s) || v(e.node, t, a, s);
875
+ }, { emitCurrent: !1 }), e.liveProps.set(t, o);
888
876
  }
889
- function je(e, t, n) {
877
+ function ke(e, t, n) {
890
878
  const r = t.slice(5), i = e.nativeBindings.get(t);
891
879
  if (n == null) {
892
880
  i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener), e.nativeBindings.delete(t), v(e.node, r, i.value, void 0));
893
881
  return;
894
882
  }
895
- if (xe(n, t), (i == null ? void 0 : i.source) === n) return;
883
+ if (Ne(n, t), (i == null ? void 0 : i.source) === n) return;
896
884
  i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener)), Fe(e.node, r);
897
- const s = $e(e.node, r), o = n.get();
898
- v(e.node, r, i == null ? void 0 : i.value, o);
885
+ const o = $e(e.node, r), s = n.get();
886
+ v(e.node, r, i == null ? void 0 : i.value, s);
899
887
  const a = () => {
900
888
  n.set(Reflect.get(e.node, r), `${t} changed`);
901
889
  }, l = {
902
890
  source: n,
903
- value: o,
904
- eventName: s,
891
+ value: s,
892
+ eventName: o,
905
893
  listener: a,
906
894
  unsubscribe: () => {
907
895
  }
@@ -909,18 +897,18 @@ function je(e, t, n) {
909
897
  l.unsubscribe = n.subscribe(({ value: c }) => {
910
898
  const d = l.value;
911
899
  l.value = c, Object.is(d, c) || v(e.node, r, d, c);
912
- }, { emitCurrent: !1 }), e.node.addEventListener(s, a), e.nativeBindings.set(t, l);
900
+ }, { emitCurrent: !1 }), e.node.addEventListener(o, a), e.nativeBindings.set(t, l);
913
901
  }
914
- function Ce(e, t, n) {
902
+ function je(e, t, n) {
915
903
  const r = t.slice(2).toLowerCase(), i = e.listeners.get(t);
916
904
  if (i && i !== n && (e.node.removeEventListener(r, i), e.listeners.delete(t)), n != null && typeof n != "function")
917
905
  throw new TypeError(`${t} must be a function or null`);
918
906
  if (typeof n == "function" && i !== n) {
919
- const s = n;
920
- e.node.addEventListener(r, s), e.listeners.set(t, s);
907
+ const o = n;
908
+ e.node.addEventListener(r, o), e.listeners.set(t, o);
921
909
  }
922
910
  }
923
- function Te(e, t) {
911
+ function Ce(e, t) {
924
912
  if (B(e.ref, null), t != null && typeof t != "function" && typeof t != "object")
925
913
  throw new TypeError("ref must be a function, object, or null");
926
914
  e.ref = t, B(e.ref, e.node);
@@ -935,7 +923,7 @@ function v(e, t, n, r) {
935
923
  return;
936
924
  }
937
925
  if (t === "dataset") {
938
- ke(e, n, r);
926
+ Te(e, n, r);
939
927
  return;
940
928
  }
941
929
  if (t === "style") {
@@ -946,22 +934,22 @@ function v(e, t, n, r) {
946
934
  throw new Error("dangerouslySetInnerHTML is not supported");
947
935
  const i = Ae(t);
948
936
  if (ge.has(i)) {
949
- const s = !!r;
950
- i in e && Reflect.set(e, i, s), e.toggleAttribute($(t), s);
937
+ const o = !!r;
938
+ i in e && Reflect.set(e, i, o), e.toggleAttribute($(t), o);
951
939
  return;
952
940
  }
953
941
  if (we.has(i) && i in e) {
954
- const s = r ?? (i === "value" ? "" : !1);
955
- Object.is(Reflect.get(e, i), s) || Reflect.set(e, i, s), r == null && e.removeAttribute($(t));
942
+ const o = r ?? (i === "value" ? "" : !1);
943
+ Object.is(Reflect.get(e, i), o) || Reflect.set(e, i, o), r == null && e.removeAttribute($(t));
956
944
  return;
957
945
  }
958
946
  F(e, $(t), r);
959
947
  }
960
- function ke(e, t, n) {
961
- const r = N(t, "dataset"), i = N(n, "dataset");
962
- for (const s of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
963
- const o = i[s];
964
- o == null ? delete e.dataset[s] : e.dataset[s] = String(o);
948
+ function Te(e, t, n) {
949
+ const r = x(t, "dataset"), i = x(n, "dataset");
950
+ for (const o of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
951
+ const s = i[o];
952
+ s == null ? delete e.dataset[o] : e.dataset[o] = String(s);
965
953
  }
966
954
  }
967
955
  function Pe(e, t, n) {
@@ -969,14 +957,14 @@ function Pe(e, t, n) {
969
957
  e.style.cssText = n;
970
958
  return;
971
959
  }
972
- const r = typeof t == "string" ? {} : N(t, "style"), i = N(n, "style");
960
+ const r = typeof t == "string" ? {} : x(t, "style"), i = x(n, "style");
973
961
  typeof t == "string" && (e.style.cssText = "");
974
- for (const s of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
975
- const o = i[s];
976
- s.startsWith("--") ? o == null ? e.style.removeProperty(s) : e.style.setProperty(s, String(o)) : Reflect.set(e.style, s, o == null ? "" : String(o));
962
+ for (const o of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
963
+ const s = i[o];
964
+ o.startsWith("--") ? s == null ? e.style.removeProperty(o) : e.style.setProperty(o, String(s)) : Reflect.set(e.style, o, s == null ? "" : String(s));
977
965
  }
978
966
  }
979
- function N(e, t) {
967
+ function x(e, t) {
980
968
  if (e == null) return {};
981
969
  if (typeof e != "object" || Array.isArray(e))
982
970
  throw new TypeError(`${t} must be an object or null`);
@@ -1054,37 +1042,37 @@ function re(e) {
1054
1042
  return w(e)[0] ?? null;
1055
1043
  }
1056
1044
  function E(e) {
1057
- return e instanceof h ? ie(e.props) : m(e) ? e.key : null;
1045
+ return e instanceof h ? ie(e.props) : y(e) ? e.key : null;
1058
1046
  }
1059
1047
  function ie(e) {
1060
1048
  const t = e.key;
1061
1049
  return typeof t == "string" || typeof t == "number" ? t : null;
1062
1050
  }
1063
- function se(e, t) {
1064
- return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ? x(t) && e.source === t : e.kind === "component" ? t instanceof h ? e.instance === t : m(t) && oe(t.type) && e.type === t.type && e.key === E(t) : e.kind === "function" ? m(t) && e.type === t.type && e.key === E(t) : e.kind === "fragment" ? m(t) && t.type === P && e.key === E(t) : m(t) && typeof t.type == "string" && e.type === t.type && e.key === E(t);
1051
+ function oe(e, t) {
1052
+ return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ? N(t) && e.source === t : e.kind === "component" ? t instanceof h ? e.instance === t : y(t) && se(t.type) && e.type === t.type && e.key === E(t) : e.kind === "function" ? y(t) && e.type === t.type && e.key === E(t) : e.kind === "fragment" ? y(t) && t.type === P && e.key === E(t) : y(t) && typeof t.type == "string" && e.type === t.type && e.key === E(t);
1065
1053
  }
1066
- function m(e) {
1054
+ function y(e) {
1067
1055
  return e != null && typeof e == "object" && Object.hasOwn(e, "type");
1068
1056
  }
1069
- function oe(e) {
1057
+ function se(e) {
1070
1058
  return typeof e == "function" && (e === h || e.prototype instanceof h);
1071
1059
  }
1072
1060
  function Oe(e) {
1073
1061
  return /^on[A-Z]/.test(e);
1074
1062
  }
1075
- function Ne(e) {
1063
+ function xe(e) {
1076
1064
  return e === "bind:value" || e === "bind:checked";
1077
1065
  }
1078
- function C(e) {
1066
+ function j(e) {
1079
1067
  return e != null && typeof e == "object" && Q.has(e);
1080
1068
  }
1081
- function x(e) {
1069
+ function N(e) {
1082
1070
  return (typeof e != "object" || e == null) && typeof e != "function" ? !1 : typeof Reflect.get(e, "get") == "function" && typeof Reflect.get(e, "getFetchState") == "function" && typeof Reflect.get(e, "getError") == "function" && typeof Reflect.get(e, "subscribe") == "function";
1083
1071
  }
1084
1072
  function H(e, t) {
1085
- if (!x(e)) throw new TypeError(`${t} requires a readable emitter`);
1073
+ if (!N(e)) throw new TypeError(`${t} requires a readable emitter`);
1086
1074
  }
1087
- function xe(e, t) {
1075
+ function Ne(e, t) {
1088
1076
  if (H(e, t), typeof Reflect.get(e, "set") != "function")
1089
1077
  throw new TypeError(`${t} requires a writable emitter`);
1090
1078
  }
@@ -1146,10 +1134,10 @@ export {
1146
1134
  Z as f,
1147
1135
  He as g,
1148
1136
  A as h,
1149
- m as i,
1137
+ y as i,
1150
1138
  ae as j,
1151
1139
  Ie as k,
1152
1140
  Me as l,
1153
1141
  pe as s
1154
1142
  };
1155
- //# sourceMappingURL=jsx-dev-runtime-CarwHDyL.js.map
1143
+ //# sourceMappingURL=jsx-dev-runtime-DukiDpV9.js.map