@threadlabs/looma 0.39.5 → 0.40.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/docs/card.html CHANGED
@@ -32,7 +32,7 @@
32
32
  <p class="owner" $if="$packageName">{$packageName}</p>
33
33
  <p class="example-caption" $if="$exampleTitle">{$exampleTitle}</p>
34
34
 
35
- <footer><ui-button $if="$href" as="a" from:href="$href" variant="link" size="sm">View component</ui-button><ui-button $if="$removable" $ref="remove" variant="ghost" size="sm">Remove</ui-button><slot name="actions"></slot></footer>
35
+ <footer><ui-button $if="$href" from:href="$href" variant="link" size="sm">View component</ui-button><ui-button $if="$removable" $ref="remove" variant="ghost" size="sm">Remove</ui-button><slot name="actions"></slot></footer>
36
36
  </ui-stack></div>
37
37
  </article>
38
38
  <style>
package/docs/catalog.json CHANGED
@@ -458,7 +458,7 @@
458
458
  ],
459
459
  "schemaVersion": 1,
460
460
  "package": "@threadlabs/looma",
461
- "version": "0.39.5",
461
+ "version": "0.40.0",
462
462
  "groups": [
463
463
  {
464
464
  "id": "layout",
@@ -2484,28 +2484,17 @@
2484
2484
  "start"
2485
2485
  ]
2486
2486
  },
2487
- {
2488
- "name": "as",
2489
- "property": "as",
2490
- "description": "The native element the button renders: a button, or a link (a) that navigates to href.",
2491
- "type": "keyword",
2492
- "default": "button",
2493
- "options": [
2494
- "button",
2495
- "a"
2496
- ]
2497
- },
2498
2487
  {
2499
2488
  "name": "disabled",
2500
2489
  "property": "disabled",
2501
- "description": "Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (as=\"a\" with href) drops its href and states aria-disabled=\"true\" instead, because a link has no native disabled state.",
2490
+ "description": "Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (with href) drops its href and states aria-disabled=\"true\" instead, because a link has no native disabled state.",
2502
2491
  "type": "boolean",
2503
2492
  "default": false
2504
2493
  },
2505
2494
  {
2506
2495
  "name": "href",
2507
2496
  "property": "href",
2508
- "description": "The link's destination. Pair it with as=\"a\" so the button renders as a real link that navigates. A disabled link drops its href and states aria-disabled=\"true\", so it cannot be followed.",
2497
+ "description": "The link's destination. Supplying href automatically renders a native link instead of a button, including an empty href for the current document. A disabled link drops its href and states aria-disabled=\"true\", so it cannot be followed.",
2509
2498
  "type": "string"
2510
2499
  },
2511
2500
  {
@@ -2539,7 +2528,7 @@
2539
2528
  {
2540
2529
  "name": "rel",
2541
2530
  "property": "rel",
2542
- "description": "The link's relationship to its destination, as on a native link. Only meaningful with as=\"a\".",
2531
+ "description": "The link's relationship to its destination, as on a native link. Only meaningful with href.",
2543
2532
  "type": "string"
2544
2533
  },
2545
2534
  {
@@ -2583,7 +2572,7 @@
2583
2572
  {
2584
2573
  "name": "target",
2585
2574
  "property": "target",
2586
- "description": "Where a link opens, as on a native link. Only meaningful with as=\"a\".",
2575
+ "description": "Where a link opens, as on a native link. Only meaningful with href.",
2587
2576
  "type": "string"
2588
2577
  },
2589
2578
  {
@@ -2641,25 +2630,15 @@
2641
2630
  "start"
2642
2631
  ]
2643
2632
  },
2644
- {
2645
- "name": "as",
2646
- "description": "The native element the button renders: a button, or a link (a) that navigates to href.",
2647
- "type": "\"button\" | \"a\"",
2648
- "default": "button",
2649
- "options": [
2650
- "button",
2651
- "a"
2652
- ]
2653
- },
2654
2633
  {
2655
2634
  "name": "disabled",
2656
- "description": "Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (as=\"a\" with href) drops its href and states aria-disabled=\"true\" instead, because a link has no native disabled state.",
2635
+ "description": "Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (with href) drops its href and states aria-disabled=\"true\" instead, because a link has no native disabled state.",
2657
2636
  "type": "boolean",
2658
2637
  "default": false
2659
2638
  },
2660
2639
  {
2661
2640
  "name": "href",
2662
- "description": "The link's destination. Pair it with as=\"a\" so the button renders as a real link that navigates. A disabled link drops its href and states aria-disabled=\"true\", so it cannot be followed.",
2641
+ "description": "The link's destination. Supplying href automatically renders a native link instead of a button, including an empty href for the current document. A disabled link drops its href and states aria-disabled=\"true\", so it cannot be followed.",
2663
2642
  "type": "string"
2664
2643
  },
2665
2644
  {
@@ -2689,7 +2668,7 @@
2689
2668
  },
2690
2669
  {
2691
2670
  "name": "rel",
2692
- "description": "The link's relationship to its destination, as on a native link. Only meaningful with as=\"a\".",
2671
+ "description": "The link's relationship to its destination, as on a native link. Only meaningful with href.",
2693
2672
  "type": "string"
2694
2673
  },
2695
2674
  {
@@ -2728,7 +2707,7 @@
2728
2707
  },
2729
2708
  {
2730
2709
  "name": "target",
2731
- "description": "Where a link opens, as on a native link. Only meaningful with as=\"a\".",
2710
+ "description": "Where a link opens, as on a native link. Only meaningful with href.",
2732
2711
  "type": "string"
2733
2712
  },
2734
2713
  {
@@ -2864,8 +2843,8 @@
2864
2843
  "id": "@threadlabs/looma/ui-button/07-as-link",
2865
2844
  "name": "07-as-link",
2866
2845
  "title": "as a link",
2867
- "description": "as=\"a\" with href renders a real link that looks and responds exactly like the button, in every variant. target and rel pass to the link. A disabled link drops its href and states aria-disabled, so it cannot be followed.",
2868
- "markup": "<ui-cluster gap=\"s\">\n <ui-button as=\"a\" href=\"#get-started\" variant=\"solid\">Get started</ui-button>\n <ui-button as=\"a\" href=\"https://example.com/\" target=\"_blank\" rel=\"noreferrer\">Read the guide</ui-button>\n <ui-button as=\"a\" href=\"#get-started\" disabled>Unavailable</ui-button>\n</ui-cluster>",
2846
+ "description": "Supplying href automatically renders a real link that looks and responds exactly like the button, in every variant. target and rel pass to the link. A disabled link drops its href and states aria-disabled, so it cannot be followed.",
2847
+ "markup": "<ui-cluster gap=\"s\">\n <ui-button href=\"#get-started\" variant=\"solid\">Get started</ui-button>\n <ui-button href=\"https://example.com/\" target=\"_blank\" rel=\"noreferrer\">Read the guide</ui-button>\n <ui-button href=\"#get-started\" disabled>Unavailable</ui-button>\n</ui-cluster>",
2869
2848
  "resizable": false,
2870
2849
  "bindings": "",
2871
2850
  "frameworks": {}
@@ -3020,7 +2999,7 @@
3020
2999
  {
3021
3000
  "name": "--ui-callout-surface",
3022
3001
  "declarations": [
3023
- "color-mix(in srgb, var(--_callout-border) 19%, var(--ui-surface-default))",
3002
+ "oklch(from var(--_callout-border) l c h / 10%)",
3024
3003
  "var(--ui-surface-muted)"
3025
3004
  ]
3026
3005
  },
@@ -3077,9 +3056,6 @@
3077
3056
  {
3078
3057
  "name": "--ui-success-solid"
3079
3058
  },
3080
- {
3081
- "name": "--ui-surface-default"
3082
- },
3083
3059
  {
3084
3060
  "name": "--ui-surface-muted"
3085
3061
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.39.5",
3
+ "version": "0.40.0",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -59,7 +59,7 @@
59
59
  --_ui-callout-icon: var(--ui-callout-icon);
60
60
  --_ui-callout-icon-size: var(--ui-callout-icon-size);
61
61
 
62
- --_callout-surface: color-mix(in srgb, var(--_callout-border) 19%, var(--ui-surface-default));
62
+ --_callout-surface: oklch(from var(--_callout-border) l c h / 10%);
63
63
  --_ui-selection-context-surface: light-dark(
64
64
  oklch(from var(--ui-callout-surface, var(--_callout-surface)) calc(l - 0.045) calc(max(c, min(0.045, c * 3))) h),
65
65
  oklch(from var(--ui-callout-surface, var(--_callout-surface)) calc(l + 0.045) calc(max(c, min(0.045, c * 3))) h)
@@ -11,7 +11,6 @@ export interface UiButtonElement extends HTMLElement {
11
11
  }
12
12
  export interface UiButtonProps {
13
13
  align?: "center" | "start" | null;
14
- as?: "button" | "a" | null;
15
14
  disabled?: boolean | null;
16
15
  href?: string | null;
17
16
  loading?: boolean | null;
@@ -25,20 +25,20 @@ const T18 = ["",[]];
25
25
  const T19 = ["",[]];
26
26
  let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19;
27
27
  const S = { n: ["appearance","colorTone"], t: ["?","?"], f: import.meta.url, g: "ui-button", k: 0, r: readonlyView, a: (host, I) => C(host, I), b: generatedInputs };
28
- const A = [["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]],["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]]];
28
+ const A = [["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]],["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]]];
29
29
  const Q = [[],[],[],[]];
30
- const D = { g: "ui-button", props: { "align": { "required":false,"values":["center","start"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "as": { "required":false,"values":["button","a"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "loading": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "pending": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "preset": { "required":false,"values":["none","primary","standard","quiet","destructive"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "shape": { "required":false,"values":["rounded","pill"],"default":"rounded", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "square": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "stretch": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["accent","neutral","danger","success","warning","info"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "type": { "required":false,"values":["button","submit","reset"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outline","solid","danger","ghost","link","card","field"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
30
+ const D = { g: "ui-button", props: { "align": { "required":false,"values":["center","start"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "loading": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "pending": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "preset": { "required":false,"values":["none","primary","standard","quiet","destructive"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "shape": { "required":false,"values":["rounded","pill"],"default":"rounded", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "square": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "stretch": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["accent","neutral","danger","success","warning","info"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "type": { "required":false,"values":["button","submit","reset"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outline","solid","danger","ghost","link","card","field"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
31
31
  const C = (host) => activateModule(controller, host);
32
32
 
33
33
  export function createUiButton(options = {}, html) {
34
34
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
35
- const v = [undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
35
+ const v = [undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
36
36
  let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
37
37
  const CS = [];
38
- const inputStatus = (j) => { if (j >= 0 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "align", true); if (j === 3) return awaitInput(B, "as", true); if (j === 4) return awaitInput(B, "disabled", true); if (j === 5) return awaitInput(B, "href", true); if (j === 6) return awaitInput(B, "loading", true); if (j === 7) return awaitInput(B, "pending", true); if (j === 8) return awaitInput(B, "preset", true); if (j === 9) return awaitInput(B, "rel", true); if (j === 10) return awaitInput(B, "shape", true); if (j === 11) return awaitInput(B, "size", true); if (j === 12) return awaitInput(B, "square", true); if (j === 13) return awaitInput(B, "stretch", true); if (j === 14) return awaitInput(B, "target", true); if (j === 15) return awaitInput(B, "tone", true); if (j === 16) return awaitInput(B, "type", true); if (j === 17) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
38
+ const inputStatus = (j) => { if (j >= 0 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "align", true); if (j === 3) return awaitInput(B, "disabled", true); if (j === 4) return awaitInput(B, "href", true); if (j === 5) return awaitInput(B, "loading", true); if (j === 6) return awaitInput(B, "pending", true); if (j === 7) return awaitInput(B, "preset", true); if (j === 8) return awaitInput(B, "rel", true); if (j === 9) return awaitInput(B, "shape", true); if (j === 10) return awaitInput(B, "size", true); if (j === 11) return awaitInput(B, "square", true); if (j === 12) return awaitInput(B, "stretch", true); if (j === 13) return awaitInput(B, "target", true); if (j === 14) return awaitInput(B, "tone", true); if (j === 15) return awaitInput(B, "type", true); if (j === 16) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
39
39
  const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
40
40
  const ke = [];
41
- const K = [() => readIndex({ "none": inputRead(v[17], inputStatus(17)), "primary": "solid", "standard": "solid", "quiet": "ghost", "destructive": "solid" }, inputRead(v[8], inputStatus(8))), () => readIndex(recordValue(["none","primary","standard","quiet","destructive"], [readIndex({ "true": "danger", "false": inputRead(v[15], inputStatus(15)) }, textCall("concat", [(inputRead(v[17], inputStatus(17)) === "danger")])), "accent", "neutral", "neutral", "danger"]), inputRead(v[8], inputStatus(8)))];
41
+ const K = [() => readIndex({ "none": inputRead(v[16], inputStatus(16)), "primary": "solid", "standard": "solid", "quiet": "ghost", "destructive": "solid" }, inputRead(v[7], inputStatus(7))), () => readIndex(recordValue(["none","primary","standard","quiet","destructive"], [readIndex({ "true": "danger", "false": inputRead(v[14], inputStatus(14)) }, textCall("concat", [(inputRead(v[16], inputStatus(16)) === "danger")])), "accent", "neutral", "neutral", "danger"]), inputRead(v[7], inputStatus(7)))];
42
42
  const g = (j) => {
43
43
  const i = j - 0;
44
44
  if (ke[i] === X.e) return v[j];
@@ -51,7 +51,7 @@ export function createUiButton(options = {}, html) {
51
51
  if (!Object.is(previous, next)) { v[j] = next; X.n?.(j, previous, next); }
52
52
  return next;
53
53
  };
54
- let a = (((g(0) === "card") && (v[3] === "a")) ? 0 : (g(0) === "card") ? 1 : (v[3] === "a") ? 2 : 3);
54
+ let a = (((g(0) === "card") && (v[4] !== null)) ? 0 : (g(0) === "card") ? 1 : (v[4] !== null) ? 2 : 3);
55
55
  let element;
56
56
  if (a === 0) {
57
57
  element = document.createElement("a");
@@ -233,64 +233,64 @@ export function createUiButton(options = {}, html) {
233
233
  return r;
234
234
  };
235
235
  const p0 = (r, c, d) => {
236
- if (c & 1073873152) {
236
+ if (c & 1073807488) {
237
237
  const x0 = g(0);
238
238
  const s0 = toAttribute(x0, "data-appearance");
239
239
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
240
240
  }
241
- if (c & 1073905920) {
241
+ if (c & 1073823872) {
242
242
  const x1 = g(1);
243
243
  if (x1 !== NONCONFORMING) {
244
244
  const s1 = toAttribute(x1, "data-tone");
245
245
  if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
246
246
  }
247
247
  }
248
- if (c & 1073742064) {
249
- const x2 = readIndex({ "true": null, "false": v[5] }, textCall("concat", [((truthy(v[4]) || truthy(v[6])) || truthy(v[7]))]));
248
+ if (c & 1073741944) {
249
+ const x2 = readIndex({ "true": null, "false": v[4] }, textCall("concat", [((truthy(v[3]) || truthy(v[5])) || truthy(v[6]))]));
250
250
  if (x2 !== NONCONFORMING) {
251
251
  const s2 = toAttribute(x2, "href");
252
252
  if (s2 !== r.v2) writeUrlAttribute(r.n, "href", r.v2 = s2);
253
253
  }
254
254
  }
255
- if (c & 16384) {
256
- const x3 = v[14];
255
+ if (c & 8192) {
256
+ const x3 = v[13];
257
257
  const s3 = toAttribute(x3, "target");
258
258
  if (s3 !== r.v3) writeAttribute(r.n, "target", r.v3 = s3);
259
259
  }
260
- if (c & 512) {
261
- const x4 = v[9];
260
+ if (c & 256) {
261
+ const x4 = v[8];
262
262
  const s4 = toAttribute(x4, "rel");
263
263
  if (s4 !== r.v4) writeAttribute(r.n, "rel", r.v4 = s4);
264
264
  }
265
- if (c & 1073742032) {
266
- const x5 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[4]) || truthy(v[6])) || truthy(v[7]))]));
265
+ if (c & 1073741928) {
266
+ const x5 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[3]) || truthy(v[5])) || truthy(v[6]))]));
267
267
  if (x5 !== NONCONFORMING) {
268
268
  const s5 = toAttribute(x5, "aria-disabled");
269
269
  if (s5 !== r.v5) writeAttribute(r.n, "aria-disabled", r.v5 = s5);
270
270
  }
271
271
  }
272
- if (c & 192) {
273
- const x6 = (truthy(v[6]) || truthy(v[7]));
272
+ if (c & 96) {
273
+ const x6 = (truthy(v[5]) || truthy(v[6]));
274
274
  const s6 = toAttribute(x6, "aria-busy");
275
275
  if (s6 !== r.v6) writeAttribute(r.n, "aria-busy", r.v6 = s6);
276
276
  }
277
- if (c & 1073742032) {
278
- const x7 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[6]) || truthy(v[7])) && !truthy(v[4]))]));
277
+ if (c & 1073741928) {
278
+ const x7 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[5]) || truthy(v[6])) && !truthy(v[3]))]));
279
279
  if (x7 !== NONCONFORMING) {
280
280
  const s7 = toAttribute(x7, "tabindex");
281
281
  if (s7 !== r.v7) writeAttribute(r.n, "tabindex", r.v7 = s7);
282
282
  }
283
283
  }
284
- if (c & 15556) {
285
- const x8 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
284
+ if (c & 7780) {
285
+ const x8 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[12], v[10], v[9], v[11], v[5], v[6]]);
286
286
  const s8 = x8;
287
287
  if (s8 !== r.v8) writeAttribute(r.n, "data-ui-button-state", (r.v8 = s8) === "" ? null : s8);
288
288
  }
289
- if (c & 192 && !((truthy(v[6]) || truthy(v[7]))) !== !r.b0) {
289
+ if (c & 96 && !((truthy(v[5]) || truthy(v[6]))) !== !r.b0) {
290
290
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
291
291
  else { r.b0 = m1(d); r.e0.before(r.b0.n); }
292
292
  } else if (r.b0 !== undefined) p1(r.b0, c, d);
293
- if (c & 192 && !(!(truthy(v[6]) || truthy(v[7]))) !== !r.b1) {
293
+ if (c & 96 && !(!(truthy(v[5]) || truthy(v[6]))) !== !r.b1) {
294
294
  if (r.b1) { dispose(r.b1); r.b1 = undefined; clearRegion(r.a2, r.e1); }
295
295
  else { r.b1 = m2(d); r.e1.before(r.b1.n); }
296
296
  } else if (r.b1 !== undefined) p2(r.b1, c, d);
@@ -315,50 +315,50 @@ export function createUiButton(options = {}, html) {
315
315
  return r;
316
316
  };
317
317
  const p6 = (r, c, d) => {
318
- if (c & 1073873152) {
318
+ if (c & 1073807488) {
319
319
  const x0 = g(0);
320
320
  const s0 = toAttribute(x0, "data-appearance");
321
321
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
322
322
  }
323
- if (c & 1073905920) {
323
+ if (c & 1073823872) {
324
324
  const x1 = g(1);
325
325
  if (x1 !== NONCONFORMING) {
326
326
  const s1 = toAttribute(x1, "data-tone");
327
327
  if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
328
328
  }
329
329
  }
330
- if (c & 1073807360) {
331
- const x2 = v[16];
330
+ if (c & 1073774592) {
331
+ const x2 = v[15];
332
332
  const s2 = toAttribute(x2, "type");
333
333
  if (s2 !== r.v2) writeAttribute(r.n, "type", r.v2 = s2);
334
334
  }
335
- if (c & 16) {
336
- const x3 = v[4];
335
+ if (c & 8) {
336
+ const x3 = v[3];
337
337
  const s3 = toAttribute(x3, "disabled");
338
338
  if (s3 !== r.v3) writeAttribute(r.n, "disabled", r.v3 = s3);
339
339
  }
340
- if (c & 1073742016) {
341
- const x4 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[6]) || truthy(v[7]))]));
340
+ if (c & 1073741920) {
341
+ const x4 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[5]) || truthy(v[6]))]));
342
342
  if (x4 !== NONCONFORMING) {
343
343
  const s4 = toAttribute(x4, "aria-disabled");
344
344
  if (s4 !== r.v4) writeAttribute(r.n, "aria-disabled", r.v4 = s4);
345
345
  }
346
346
  }
347
- if (c & 192) {
348
- const x5 = (truthy(v[6]) || truthy(v[7]));
347
+ if (c & 96) {
348
+ const x5 = (truthy(v[5]) || truthy(v[6]));
349
349
  const s5 = toAttribute(x5, "aria-busy");
350
350
  if (s5 !== r.v5) writeAttribute(r.n, "aria-busy", r.v5 = s5);
351
351
  }
352
- if (c & 15556) {
353
- const x6 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
352
+ if (c & 7780) {
353
+ const x6 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[12], v[10], v[9], v[11], v[5], v[6]]);
354
354
  const s6 = x6;
355
355
  if (s6 !== r.v6) writeAttribute(r.n, "data-ui-button-state", (r.v6 = s6) === "" ? null : s6);
356
356
  }
357
- if (c & 192 && !((truthy(v[6]) || truthy(v[7]))) !== !r.b0) {
357
+ if (c & 96 && !((truthy(v[5]) || truthy(v[6]))) !== !r.b0) {
358
358
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
359
359
  else { r.b0 = m7(d); r.e0.before(r.b0.n); }
360
360
  } else if (r.b0 !== undefined) p7(r.b0, c, d);
361
- if (c & 192 && !(!(truthy(v[6]) || truthy(v[7]))) !== !r.b1) {
361
+ if (c & 96 && !(!(truthy(v[5]) || truthy(v[6]))) !== !r.b1) {
362
362
  if (r.b1) { dispose(r.b1); r.b1 = undefined; clearRegion(r.a2, r.e1); }
363
363
  else { r.b1 = m8(d); r.e1.before(r.b1.n); }
364
364
  } else if (r.b1 !== undefined) p8(r.b1, c, d);
@@ -380,60 +380,60 @@ export function createUiButton(options = {}, html) {
380
380
  return r;
381
381
  };
382
382
  const p12 = (r, c, d) => {
383
- if (c & 1073873152) {
383
+ if (c & 1073807488) {
384
384
  const x0 = g(0);
385
385
  const s0 = toAttribute(x0, "data-appearance");
386
386
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
387
387
  }
388
- if (c & 1073905920) {
388
+ if (c & 1073823872) {
389
389
  const x1 = g(1);
390
390
  if (x1 !== NONCONFORMING) {
391
391
  const s1 = toAttribute(x1, "data-tone");
392
392
  if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
393
393
  }
394
394
  }
395
- if (c & 1073742064) {
396
- const x2 = readIndex({ "true": null, "false": v[5] }, textCall("concat", [((truthy(v[4]) || truthy(v[6])) || truthy(v[7]))]));
395
+ if (c & 1073741944) {
396
+ const x2 = readIndex({ "true": null, "false": v[4] }, textCall("concat", [((truthy(v[3]) || truthy(v[5])) || truthy(v[6]))]));
397
397
  if (x2 !== NONCONFORMING) {
398
398
  const s2 = toAttribute(x2, "href");
399
399
  if (s2 !== r.v2) writeUrlAttribute(r.n, "href", r.v2 = s2);
400
400
  }
401
401
  }
402
- if (c & 16384) {
403
- const x3 = v[14];
402
+ if (c & 8192) {
403
+ const x3 = v[13];
404
404
  const s3 = toAttribute(x3, "target");
405
405
  if (s3 !== r.v3) writeAttribute(r.n, "target", r.v3 = s3);
406
406
  }
407
- if (c & 512) {
408
- const x4 = v[9];
407
+ if (c & 256) {
408
+ const x4 = v[8];
409
409
  const s4 = toAttribute(x4, "rel");
410
410
  if (s4 !== r.v4) writeAttribute(r.n, "rel", r.v4 = s4);
411
411
  }
412
- if (c & 1073742032) {
413
- const x5 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[4]) || truthy(v[6])) || truthy(v[7]))]));
412
+ if (c & 1073741928) {
413
+ const x5 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[3]) || truthy(v[5])) || truthy(v[6]))]));
414
414
  if (x5 !== NONCONFORMING) {
415
415
  const s5 = toAttribute(x5, "aria-disabled");
416
416
  if (s5 !== r.v5) writeAttribute(r.n, "aria-disabled", r.v5 = s5);
417
417
  }
418
418
  }
419
- if (c & 192) {
420
- const x6 = (truthy(v[6]) || truthy(v[7]));
419
+ if (c & 96) {
420
+ const x6 = (truthy(v[5]) || truthy(v[6]));
421
421
  const s6 = toAttribute(x6, "aria-busy");
422
422
  if (s6 !== r.v6) writeAttribute(r.n, "aria-busy", r.v6 = s6);
423
423
  }
424
- if (c & 1073742032) {
425
- const x7 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[6]) || truthy(v[7])) && !truthy(v[4]))]));
424
+ if (c & 1073741928) {
425
+ const x7 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[5]) || truthy(v[6])) && !truthy(v[3]))]));
426
426
  if (x7 !== NONCONFORMING) {
427
427
  const s7 = toAttribute(x7, "tabindex");
428
428
  if (s7 !== r.v7) writeAttribute(r.n, "tabindex", r.v7 = s7);
429
429
  }
430
430
  }
431
- if (c & 15556) {
432
- const x8 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
431
+ if (c & 7780) {
432
+ const x8 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[12], v[10], v[9], v[11], v[5], v[6]]);
433
433
  const s8 = x8;
434
434
  if (s8 !== r.v8) writeAttribute(r.n, "data-ui-button-state", (r.v8 = s8) === "" ? null : s8);
435
435
  }
436
- if (c & 192 && !((truthy(v[6]) || truthy(v[7]))) !== !r.b0) {
436
+ if (c & 96 && !((truthy(v[5]) || truthy(v[6]))) !== !r.b0) {
437
437
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
438
438
  else { r.b0 = m13(d); r.e0.before(r.b0.n); }
439
439
  } else if (r.b0 !== undefined) p13(r.b0, c, d);
@@ -455,46 +455,46 @@ export function createUiButton(options = {}, html) {
455
455
  return r;
456
456
  };
457
457
  const p16 = (r, c, d) => {
458
- if (c & 1073873152) {
458
+ if (c & 1073807488) {
459
459
  const x0 = g(0);
460
460
  const s0 = toAttribute(x0, "data-appearance");
461
461
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
462
462
  }
463
- if (c & 1073905920) {
463
+ if (c & 1073823872) {
464
464
  const x1 = g(1);
465
465
  if (x1 !== NONCONFORMING) {
466
466
  const s1 = toAttribute(x1, "data-tone");
467
467
  if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
468
468
  }
469
469
  }
470
- if (c & 1073807360) {
471
- const x2 = v[16];
470
+ if (c & 1073774592) {
471
+ const x2 = v[15];
472
472
  const s2 = toAttribute(x2, "type");
473
473
  if (s2 !== r.v2) writeAttribute(r.n, "type", r.v2 = s2);
474
474
  }
475
- if (c & 16) {
476
- const x3 = v[4];
475
+ if (c & 8) {
476
+ const x3 = v[3];
477
477
  const s3 = toAttribute(x3, "disabled");
478
478
  if (s3 !== r.v3) writeAttribute(r.n, "disabled", r.v3 = s3);
479
479
  }
480
- if (c & 1073742016) {
481
- const x4 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[6]) || truthy(v[7]))]));
480
+ if (c & 1073741920) {
481
+ const x4 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[5]) || truthy(v[6]))]));
482
482
  if (x4 !== NONCONFORMING) {
483
483
  const s4 = toAttribute(x4, "aria-disabled");
484
484
  if (s4 !== r.v4) writeAttribute(r.n, "aria-disabled", r.v4 = s4);
485
485
  }
486
486
  }
487
- if (c & 192) {
488
- const x5 = (truthy(v[6]) || truthy(v[7]));
487
+ if (c & 96) {
488
+ const x5 = (truthy(v[5]) || truthy(v[6]));
489
489
  const s5 = toAttribute(x5, "aria-busy");
490
490
  if (s5 !== r.v5) writeAttribute(r.n, "aria-busy", r.v5 = s5);
491
491
  }
492
- if (c & 15556) {
493
- const x6 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
492
+ if (c & 7780) {
493
+ const x6 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[12], v[10], v[9], v[11], v[5], v[6]]);
494
494
  const s6 = x6;
495
495
  if (s6 !== r.v6) writeAttribute(r.n, "data-ui-button-state", (r.v6 = s6) === "" ? null : s6);
496
496
  }
497
- if (c & 192 && !((truthy(v[6]) || truthy(v[7]))) !== !r.b0) {
497
+ if (c & 96 && !((truthy(v[5]) || truthy(v[6]))) !== !r.b0) {
498
498
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
499
499
  else { r.b0 = m17(d); r.e0.before(r.b0.n); }
500
500
  } else if (r.b0 !== undefined) p17(r.b0, c, d);
@@ -510,8 +510,8 @@ export function createUiButton(options = {}, html) {
510
510
  const p = (c, d) => {
511
511
  if (R === null) return;
512
512
  if (R === undefined) { R = M[a](element, d); return; }
513
- if (c & 1073873160) {
514
- const t = (((g(0) === "card") && (v[3] === "a")) ? 0 : (g(0) === "card") ? 1 : (v[3] === "a") ? 2 : 3);
513
+ if (c & 1073807504) {
514
+ const t = (((g(0) === "card") && (v[4] !== null)) ? 0 : (g(0) === "card") ? 1 : (v[4] !== null) ? 2 : 3);
515
515
  if (t !== a) {
516
516
  dispose(R);
517
517
  for (const key in I.r) delete I.r[key];
@@ -532,4 +532,4 @@ export function createUiButton(options = {}, html) {
532
532
  manageProps(I);
533
533
  return element;
534
534
  }
535
- defineComponent("ui-button", createUiButton, ["align","as","disabled","href","loading","pending","preset","rel","shape","size","square","stretch","target","tone","type","variant"]);
535
+ defineComponent("ui-button", createUiButton, ["align","disabled","href","loading","pending","preset","rel","shape","size","square","stretch","target","tone","type","variant"]);
@@ -5,7 +5,7 @@ import "../styles/ui-editor-link-card.css";
5
5
 
6
6
  const T0 = ["",[],"\n ",["ui-card",["variant","elevated","padding","xs","size","sm"],["ui-cluster",["gap","xs","wrap","nowrap","role","group","aria-label","Link actions"],["ui-icon",[]],"\n ",["ui-stack",["gap","none","fill",""],["ui-text",["as","strong","size","sm","weight","medium","font","sans","truncate",""],0],"\n ",1],"\n ",1,"\n ",["ui-icon-button",["label","Edit link","variant","ghost","size","sm","data-link-action","edit"],["ui-icon",["name","pencil"]]],"\n ",["ui-tooltip",[],"Edit link"],"\n ",["ui-icon-button",["label","Remove link","variant","ghost","size","sm","data-link-action","remove"],["ui-icon",["name","unlink"]]],"\n ",["ui-tooltip",[],"Remove link"]]],"\n "];
7
7
  const T1 = ["ui-text",["as","small","size","xs","tone","secondary","font","sans","truncate",""],0];
8
- const T2 = ["",[],"\n ",["ui-button",["as","a","variant","ghost","tone","neutral","size","sm","target","_blank","rel","noopener noreferrer","aria-label","Open link"],["ui-icon",["name","external-link"]]],"\n ",["ui-tooltip",[],"Open link"],"\n "];
8
+ const T2 = ["",[],"\n ",["ui-button",["variant","ghost","tone","neutral","size","sm","target","_blank","rel","noopener noreferrer","aria-label","Open link"],["ui-icon",["name","external-link"]]],"\n ",["ui-tooltip",[],"Open link"],"\n "];
9
9
  let P0, P1, P2;
10
10
  const S = { n: ["base","resolved","shown"], t: ["s","?","?"], f: import.meta.url, g: "ui-editor-link-card", k: 1, d: { "edit": [detailCheck(checkRecord(checkUnknown)), true, true, false], "remove": [detailCheck(checkRecord(checkUnknown)), true, true, false] }, x: dispatchDeclared, r: readonlyView, a: (host, I) => C(host, I), b: generatedInputs, i: ["ui-editor-link-card"] };
11
11
  const D = { g: "ui-editor-link-card", props: { "detail": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "href": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "label": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "openHref": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "targetLabel": { "required":false,"default":"Item", c: checkString, t: "string", j: 0, m: "s" } } };