slexkit 0.3.0 → 0.3.1
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/CHANGELOG.md +18 -0
- package/README.md +4 -3
- package/README.zh-CN.md +4 -3
- package/dist/ai/llms-components.txt +2 -1
- package/dist/ai/llms-full.txt +73 -42
- package/dist/ai/llms-runtime.txt +11 -12
- package/dist/ai/llms.txt +1 -1
- package/dist/ai/slexkit-ai-manifest.json +77 -73
- package/dist/components/checkbox.js +1 -0
- package/dist/components/choice.css +2 -2
- package/dist/components/display.css +1 -1
- package/dist/components/index.js +56 -153
- package/dist/components/input.css +53 -119
- package/dist/components/input.js +33 -143
- package/dist/components/radio-group.js +1 -0
- package/dist/components/select.css +0 -6
- package/dist/components/slider.css +27 -18
- package/dist/components/specs.js +2 -1
- package/dist/components/switch.css +3 -3
- package/dist/components/switch.js +1 -0
- package/dist/components/text-input.css +21 -90
- package/dist/components/text.js +12 -0
- package/dist/components/tooling.css +0 -1
- package/dist/runtime.cjs +22 -5
- package/dist/runtime.js +22 -5
- package/dist/slexkit.cjs +78 -158
- package/dist/slexkit.css +54 -121
- package/dist/slexkit.js +78 -158
- package/dist/types/version.d.ts +2 -2
- package/dist/umd/slexkit.tooling.umd.js +77 -158
- package/dist/umd/slexkit.umd.js +78 -158
- package/package.json +3 -2
- package/skills/slexkit-host-integration/SKILL.md +1 -1
- package/src/components/svelte/display/Text.svelte +14 -1
- package/src/components/svelte/input/Checkbox.svelte +1 -1
- package/src/components/svelte/input/Input.svelte +0 -110
- package/src/components/svelte/input/RadioGroup.svelte +1 -1
- package/src/components/svelte/input/Switch.svelte +1 -1
- package/src/styles/components/choice.css +2 -2
- package/src/styles/components/select.css +0 -6
- package/src/styles/components/slider.css +27 -18
- package/src/styles/components/switch.css +3 -3
- package/src/styles/components/text-input.css +21 -90
- package/src/styles/display.css +1 -1
- package/src/styles/tooling.css +0 -1
|
@@ -786,6 +786,9 @@
|
|
|
786
786
|
const mode = getComponentStateMode(type);
|
|
787
787
|
return mode === "value" || mode === "checked" || mode === "enabled";
|
|
788
788
|
}
|
|
789
|
+
function isReadableComponent(type) {
|
|
790
|
+
return getComponentStateMode(type) === "readable";
|
|
791
|
+
}
|
|
789
792
|
function isStatefulComponent(type) {
|
|
790
793
|
return getComponentStateMode(type) !== "none";
|
|
791
794
|
}
|
|
@@ -902,7 +905,10 @@
|
|
|
902
905
|
function ensureComponentState(name, type, components, componentTypes) {
|
|
903
906
|
if (!components[name])
|
|
904
907
|
components[name] = {};
|
|
905
|
-
componentTypes[name]
|
|
908
|
+
const previousType = componentTypes[name] ?? "";
|
|
909
|
+
if (!(isWritableComponent(previousType) && isReadableComponent(type))) {
|
|
910
|
+
componentTypes[name] = type;
|
|
911
|
+
}
|
|
906
912
|
return components[name];
|
|
907
913
|
}
|
|
908
914
|
function syncReadableComponentProp(type, state, propName, value) {
|
|
@@ -930,6 +936,9 @@
|
|
|
930
936
|
function syncComponentProps(type, name, props, components, componentTypes) {
|
|
931
937
|
if (!name || !isStatefulComponent(type))
|
|
932
938
|
return;
|
|
939
|
+
const previousType = componentTypes[name] ?? "";
|
|
940
|
+
if (isWritableComponent(previousType) && isReadableComponent(type))
|
|
941
|
+
return;
|
|
933
942
|
const state = ensureComponentState(name, type, components, componentTypes);
|
|
934
943
|
if (type === "input" && typeof props.type === "string") {
|
|
935
944
|
assignInputType(state, props.type);
|
|
@@ -994,7 +1003,7 @@
|
|
|
994
1003
|
function warnDuplicateState(ns, name, currentType, currentPath, previous) {
|
|
995
1004
|
console.warn(`[SlexKit][${ns}] Component state '${name}' is declared more than once at ${previous.path} and ${currentPath}; state is shared by namespace and component name.`);
|
|
996
1005
|
if (previous.type !== currentType) {
|
|
997
|
-
console.warn(`[SlexKit][${ns}] Component state '${name}' is used by multiple component types (${previous.type}, ${currentType});
|
|
1006
|
+
console.warn(`[SlexKit][${ns}] Component state '${name}' is used by multiple component types (${previous.type}, ${currentType}); use distinct names when components should not share state.`);
|
|
998
1007
|
}
|
|
999
1008
|
}
|
|
1000
1009
|
function dynamicStateBinding(type, props) {
|
|
@@ -1006,6 +1015,9 @@
|
|
|
1006
1015
|
return previousType === "input" && currentType === "slider" || previousType === "slider" && currentType === "input";
|
|
1007
1016
|
}
|
|
1008
1017
|
function shouldWarnDuplicateState(currentType, currentBinding, previous) {
|
|
1018
|
+
if (isReadableComponent(previous.type) && isReadableComponent(currentType)) {
|
|
1019
|
+
return false;
|
|
1020
|
+
}
|
|
1009
1021
|
if (currentBinding && previous.stateBinding === currentBinding && isMirroredValueControlPair(previous.type, currentType)) {
|
|
1010
1022
|
return false;
|
|
1011
1023
|
}
|
|
@@ -2425,7 +2437,11 @@ ${parseSource}
|
|
|
2425
2437
|
return Object.keys(value).some((key) => key.includes(":"));
|
|
2426
2438
|
}
|
|
2427
2439
|
function bareLayoutFromSource(value) {
|
|
2428
|
-
const
|
|
2440
|
+
const layout = { ...value };
|
|
2441
|
+
delete layout.slex;
|
|
2442
|
+
delete layout.namespace;
|
|
2443
|
+
delete layout.g;
|
|
2444
|
+
delete layout.layout;
|
|
2429
2445
|
return layout;
|
|
2430
2446
|
}
|
|
2431
2447
|
function isStateOnlySource(value) {
|
|
@@ -11493,6 +11509,7 @@ ${pad}}`;
|
|
|
11493
11509
|
reset(label2);
|
|
11494
11510
|
reset(span);
|
|
11495
11511
|
template_effect(($0, $1) => {
|
|
11512
|
+
set_attribute2(label2, "data-disabled", get2(p).disabled ? "true" : undefined);
|
|
11496
11513
|
input.disabled = !!get2(p).disabled;
|
|
11497
11514
|
set_attribute2(input, "data-state", get2(checked) ? "checked" : "unchecked");
|
|
11498
11515
|
set_attribute2(input, "aria-label", $0);
|
|
@@ -11568,6 +11585,7 @@ ${pad}}`;
|
|
|
11568
11585
|
reset(span);
|
|
11569
11586
|
template_effect(($0, $1) => {
|
|
11570
11587
|
set_attribute2(label2, "data-state", get2(enabled) ? "on" : "off");
|
|
11588
|
+
set_attribute2(label2, "data-disabled", get2(p).disabled ? "true" : undefined);
|
|
11571
11589
|
input.disabled = !!get2(p).disabled;
|
|
11572
11590
|
set_attribute2(input, "aria-label", $0);
|
|
11573
11591
|
set_text(text_1, $1);
|
|
@@ -11588,26 +11606,11 @@ ${pad}}`;
|
|
|
11588
11606
|
var nextInputId = 0;
|
|
11589
11607
|
var root_14 = from_html(`<label class="slex-input-label"> </label>`);
|
|
11590
11608
|
var root_2 = from_html(`<span class="slex-input-unit" aria-hidden="true"> </span>`);
|
|
11591
|
-
var root_33 = from_html(`<
|
|
11592
|
-
var root_4 = from_html(`<div class="slex-input-
|
|
11593
|
-
var
|
|
11594
|
-
var root8 = from_html(`<div class="slex-input-field"><!> <div class="slex-input-control"><input class="slex-input"/> <!> <!></div> <!> <!></div>`);
|
|
11609
|
+
var root_33 = from_html(`<div class="slex-input-description"> </div>`);
|
|
11610
|
+
var root_4 = from_html(`<div class="slex-input-error" role="alert"> </div>`);
|
|
11611
|
+
var root8 = from_html(`<div class="slex-input-field"><!> <div class="slex-input-control"><input class="slex-input"/> <!></div> <!> <!></div>`);
|
|
11595
11612
|
function Input($$anchor, $$props) {
|
|
11596
11613
|
push($$props, true);
|
|
11597
|
-
const engineeringPrefixFactors = {
|
|
11598
|
-
p: 0.000000000001,
|
|
11599
|
-
n: 0.000000001,
|
|
11600
|
-
u: 0.000001,
|
|
11601
|
-
"µ": 0.000001,
|
|
11602
|
-
"碌": 0.000001,
|
|
11603
|
-
m: 0.001,
|
|
11604
|
-
k: 1000,
|
|
11605
|
-
K: 1000,
|
|
11606
|
-
M: 1e6,
|
|
11607
|
-
meg: 1e6,
|
|
11608
|
-
G: 1e9,
|
|
11609
|
-
T: 1000000000000
|
|
11610
|
-
};
|
|
11611
11614
|
let p = state(proxy({}));
|
|
11612
11615
|
let value = state("");
|
|
11613
11616
|
const fallbackId = `slex-input-${++nextInputId}`;
|
|
@@ -11619,8 +11622,6 @@ ${pad}}`;
|
|
|
11619
11622
|
const readonly = user_derived(() => bool(get2(p).readonly) || bool(get2(p).readOnly));
|
|
11620
11623
|
const required = user_derived(() => bool(get2(p).required));
|
|
11621
11624
|
const invalid2 = user_derived(() => bool(get2(p).invalid) || !!get2(errorText));
|
|
11622
|
-
const steppable = user_derived(isSteppableInput);
|
|
11623
|
-
const controls = user_derived(() => get2(steppable) && get2(p).controls !== false && get2(p).controls !== "false");
|
|
11624
11625
|
const componentId = user_derived(() => safeId($$props.componentName));
|
|
11625
11626
|
const inputId = user_derived(() => text2(get2(p).id) || (get2(componentId) ? `slex-input-${get2(componentId)}` : fallbackId));
|
|
11626
11627
|
const descriptionId = user_derived(() => `${get2(inputId)}-description`);
|
|
@@ -11631,10 +11632,6 @@ ${pad}}`;
|
|
|
11631
11632
|
get2(descriptionText) ? get2(descriptionId) : "",
|
|
11632
11633
|
get2(errorText) ? get2(errorId) : ""
|
|
11633
11634
|
].filter(Boolean).join(" "));
|
|
11634
|
-
const numericValue = user_derived(readNumericValue);
|
|
11635
|
-
const controlLabel = user_derived(() => get2(labelText) || text2(get2(p).placeholder) || $$props.componentName || "input");
|
|
11636
|
-
const decrementDisabled = user_derived(() => !canStep(-1));
|
|
11637
|
-
const incrementDisabled = user_derived(() => !canStep(1));
|
|
11638
11635
|
user_effect(() => bindPropStore($$props.props, (next2) => {
|
|
11639
11636
|
set(p, next2, true);
|
|
11640
11637
|
set(value, text2(next2.value), true);
|
|
@@ -11645,72 +11642,6 @@ ${pad}}`;
|
|
|
11645
11642
|
function inputType() {
|
|
11646
11643
|
return text2(get2(p).type, "text") === "engineering" ? "text" : text2(get2(p).type, "text");
|
|
11647
11644
|
}
|
|
11648
|
-
function isSteppableInput() {
|
|
11649
|
-
const kind = text2(get2(p).type, "text");
|
|
11650
|
-
return kind === "number" || kind === "engineering" || get2(p).min !== undefined || get2(p).max !== undefined || get2(p).step !== undefined;
|
|
11651
|
-
}
|
|
11652
|
-
function numericProp(input) {
|
|
11653
|
-
if (input === undefined || input === null || input === "")
|
|
11654
|
-
return;
|
|
11655
|
-
const next2 = Number(input);
|
|
11656
|
-
return Number.isFinite(next2) ? next2 : undefined;
|
|
11657
|
-
}
|
|
11658
|
-
function stepSize() {
|
|
11659
|
-
const next2 = numericProp(get2(p).step);
|
|
11660
|
-
if (next2 !== undefined && next2 > 0)
|
|
11661
|
-
return next2;
|
|
11662
|
-
if (text2(get2(p).type, "text") !== "engineering")
|
|
11663
|
-
return 1;
|
|
11664
|
-
const parsed = parseEngineeringNumber(get2(value));
|
|
11665
|
-
if (!parsed.valid || !parsed.prefix)
|
|
11666
|
-
return 1;
|
|
11667
|
-
return engineeringPrefixFactors[parsed.prefix] ?? 1;
|
|
11668
|
-
}
|
|
11669
|
-
function readNumericValue() {
|
|
11670
|
-
if (text2(get2(p).type, "text") === "engineering") {
|
|
11671
|
-
const parsed = parseEngineeringNumber(get2(value));
|
|
11672
|
-
return parsed.valid && parsed.number !== null ? parsed.number : null;
|
|
11673
|
-
}
|
|
11674
|
-
const next2 = Number(get2(value));
|
|
11675
|
-
return Number.isFinite(next2) ? next2 : null;
|
|
11676
|
-
}
|
|
11677
|
-
function clamp(next2) {
|
|
11678
|
-
const min = numericProp(get2(p).min);
|
|
11679
|
-
const max = numericProp(get2(p).max);
|
|
11680
|
-
let clamped = next2;
|
|
11681
|
-
if (min !== undefined)
|
|
11682
|
-
clamped = Math.max(min, clamped);
|
|
11683
|
-
if (max !== undefined)
|
|
11684
|
-
clamped = Math.min(max, clamped);
|
|
11685
|
-
return clamped;
|
|
11686
|
-
}
|
|
11687
|
-
function canStep(direction) {
|
|
11688
|
-
if (!get2(controls) || get2(disabled) || get2(readonly) || get2(numericValue) === null)
|
|
11689
|
-
return false;
|
|
11690
|
-
return clamp(get2(numericValue) + direction * stepSize()) !== get2(numericValue);
|
|
11691
|
-
}
|
|
11692
|
-
function formatSteppedValue(next2) {
|
|
11693
|
-
if (text2(get2(p).type, "text") !== "engineering")
|
|
11694
|
-
return text2(next2);
|
|
11695
|
-
const parsed = parseEngineeringNumber(get2(value));
|
|
11696
|
-
if (!parsed.valid)
|
|
11697
|
-
return text2(next2);
|
|
11698
|
-
const factor = parsed.prefix ? engineeringPrefixFactors[parsed.prefix] : undefined;
|
|
11699
|
-
const visibleNumber = factor ? next2 / factor : next2;
|
|
11700
|
-
return `${formatNumber2(visibleNumber)}${parsed.prefix}${parsed.unit}`;
|
|
11701
|
-
}
|
|
11702
|
-
function formatNumber2(next2) {
|
|
11703
|
-
return text2(Number(next2.toPrecision(12)));
|
|
11704
|
-
}
|
|
11705
|
-
function emitValue(nextValue) {
|
|
11706
|
-
set(value, nextValue, true);
|
|
11707
|
-
emit($$props.ctx, "change", text2(get2(p).type, "text") === "engineering" ? parseEngineeringNumber(get2(value)) : get2(value));
|
|
11708
|
-
}
|
|
11709
|
-
function stepBy(direction) {
|
|
11710
|
-
if (!canStep(direction) || get2(numericValue) === null)
|
|
11711
|
-
return;
|
|
11712
|
-
emitValue(formatSteppedValue(clamp(get2(numericValue) + direction * stepSize())));
|
|
11713
|
-
}
|
|
11714
11645
|
function update2(event2) {
|
|
11715
11646
|
if (get2(disabled) || get2(readonly))
|
|
11716
11647
|
return;
|
|
@@ -11736,9 +11667,9 @@ ${pad}}`;
|
|
|
11736
11667
|
});
|
|
11737
11668
|
}
|
|
11738
11669
|
var div_1 = sibling(node, 2);
|
|
11739
|
-
var
|
|
11740
|
-
remove_input_defaults(
|
|
11741
|
-
var node_1 = sibling(
|
|
11670
|
+
var input = child(div_1);
|
|
11671
|
+
remove_input_defaults(input);
|
|
11672
|
+
var node_1 = sibling(input, 2);
|
|
11742
11673
|
{
|
|
11743
11674
|
var consequent_1 = ($$anchor2) => {
|
|
11744
11675
|
var span = root_2();
|
|
@@ -11752,33 +11683,11 @@ ${pad}}`;
|
|
|
11752
11683
|
$$render(consequent_1);
|
|
11753
11684
|
});
|
|
11754
11685
|
}
|
|
11755
|
-
var node_2 = sibling(node_1, 2);
|
|
11756
|
-
{
|
|
11757
|
-
var consequent_2 = ($$anchor2) => {
|
|
11758
|
-
var span_1 = root_33();
|
|
11759
|
-
var button = child(span_1);
|
|
11760
|
-
var button_1 = sibling(button, 2);
|
|
11761
|
-
reset(span_1);
|
|
11762
|
-
template_effect(() => {
|
|
11763
|
-
set_attribute2(button, "aria-label", `Increase ${get2(controlLabel)}`);
|
|
11764
|
-
button.disabled = get2(incrementDisabled);
|
|
11765
|
-
set_attribute2(button_1, "aria-label", `Decrease ${get2(controlLabel)}`);
|
|
11766
|
-
button_1.disabled = get2(decrementDisabled);
|
|
11767
|
-
});
|
|
11768
|
-
delegated("click", button, () => stepBy(1));
|
|
11769
|
-
delegated("click", button_1, () => stepBy(-1));
|
|
11770
|
-
append($$anchor2, span_1);
|
|
11771
|
-
};
|
|
11772
|
-
if_block(node_2, ($$render) => {
|
|
11773
|
-
if (get2(controls))
|
|
11774
|
-
$$render(consequent_2);
|
|
11775
|
-
});
|
|
11776
|
-
}
|
|
11777
11686
|
reset(div_1);
|
|
11778
|
-
var
|
|
11687
|
+
var node_2 = sibling(div_1, 2);
|
|
11779
11688
|
{
|
|
11780
|
-
var
|
|
11781
|
-
var div_2 =
|
|
11689
|
+
var consequent_2 = ($$anchor2) => {
|
|
11690
|
+
var div_2 = root_33();
|
|
11782
11691
|
var text_3 = child(div_2, true);
|
|
11783
11692
|
reset(div_2);
|
|
11784
11693
|
template_effect(() => {
|
|
@@ -11787,15 +11696,15 @@ ${pad}}`;
|
|
|
11787
11696
|
});
|
|
11788
11697
|
append($$anchor2, div_2);
|
|
11789
11698
|
};
|
|
11790
|
-
if_block(
|
|
11699
|
+
if_block(node_2, ($$render) => {
|
|
11791
11700
|
if (get2(descriptionText))
|
|
11792
|
-
$$render(
|
|
11701
|
+
$$render(consequent_2);
|
|
11793
11702
|
});
|
|
11794
11703
|
}
|
|
11795
|
-
var
|
|
11704
|
+
var node_3 = sibling(node_2, 2);
|
|
11796
11705
|
{
|
|
11797
|
-
var
|
|
11798
|
-
var div_3 =
|
|
11706
|
+
var consequent_3 = ($$anchor2) => {
|
|
11707
|
+
var div_3 = root_4();
|
|
11799
11708
|
var text_4 = child(div_3, true);
|
|
11800
11709
|
reset(div_3);
|
|
11801
11710
|
template_effect(() => {
|
|
@@ -11804,9 +11713,9 @@ ${pad}}`;
|
|
|
11804
11713
|
});
|
|
11805
11714
|
append($$anchor2, div_3);
|
|
11806
11715
|
};
|
|
11807
|
-
if_block(
|
|
11716
|
+
if_block(node_3, ($$render) => {
|
|
11808
11717
|
if (get2(errorText))
|
|
11809
|
-
$$render(
|
|
11718
|
+
$$render(consequent_3);
|
|
11810
11719
|
});
|
|
11811
11720
|
}
|
|
11812
11721
|
reset(div);
|
|
@@ -11815,21 +11724,20 @@ ${pad}}`;
|
|
|
11815
11724
|
set_attribute2(div, "data-required", get2(required) ? "true" : undefined);
|
|
11816
11725
|
set_attribute2(div, "data-readonly", get2(readonly) ? "true" : undefined);
|
|
11817
11726
|
set_attribute2(div_1, "data-has-unit", get2(unitText) ? "true" : undefined);
|
|
11818
|
-
set_attribute2(
|
|
11819
|
-
set_attribute2(
|
|
11820
|
-
set_attribute2(
|
|
11821
|
-
set_attribute2(
|
|
11822
|
-
set_attribute2(
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
set_attribute2(
|
|
11828
|
-
set_attribute2(
|
|
11829
|
-
set_attribute2(
|
|
11830
|
-
set_attribute2(
|
|
11831
|
-
set_attribute2(
|
|
11832
|
-
set_attribute2(input_1, "aria-invalid", get2(invalid2) ? "true" : undefined);
|
|
11727
|
+
set_attribute2(input, "id", get2(inputId));
|
|
11728
|
+
set_attribute2(input, "type", $0);
|
|
11729
|
+
set_attribute2(input, "inputmode", $1);
|
|
11730
|
+
set_attribute2(input, "name", $2);
|
|
11731
|
+
set_attribute2(input, "placeholder", $3);
|
|
11732
|
+
input.disabled = get2(disabled);
|
|
11733
|
+
input.readOnly = get2(readonly);
|
|
11734
|
+
input.required = get2(required);
|
|
11735
|
+
set_attribute2(input, "min", $4);
|
|
11736
|
+
set_attribute2(input, "max", $5);
|
|
11737
|
+
set_attribute2(input, "step", $6);
|
|
11738
|
+
set_attribute2(input, "aria-label", get2(computedAriaLabel) || undefined);
|
|
11739
|
+
set_attribute2(input, "aria-describedby", get2(describedBy) || undefined);
|
|
11740
|
+
set_attribute2(input, "aria-invalid", get2(invalid2) ? "true" : undefined);
|
|
11833
11741
|
}, [
|
|
11834
11742
|
() => inputType(),
|
|
11835
11743
|
() => text2(get2(p).type, "text") === "engineering" ? "decimal" : undefined,
|
|
@@ -11839,12 +11747,12 @@ ${pad}}`;
|
|
|
11839
11747
|
() => get2(p).max === undefined ? undefined : text2(get2(p).max),
|
|
11840
11748
|
() => get2(p).step === undefined ? undefined : text2(get2(p).step)
|
|
11841
11749
|
]);
|
|
11842
|
-
delegated("input",
|
|
11843
|
-
bind_value(
|
|
11750
|
+
delegated("input", input, update2);
|
|
11751
|
+
bind_value(input, () => get2(value), ($$value) => set(value, $$value));
|
|
11844
11752
|
append($$anchor, div);
|
|
11845
11753
|
pop();
|
|
11846
11754
|
}
|
|
11847
|
-
delegate(["input"
|
|
11755
|
+
delegate(["input"]);
|
|
11848
11756
|
|
|
11849
11757
|
// src/components/svelte/input/RadioGroup.svelte
|
|
11850
11758
|
var root_34 = from_html(`<span> </span>`);
|
|
@@ -11960,6 +11868,7 @@ ${pad}}`;
|
|
|
11960
11868
|
reset(label2);
|
|
11961
11869
|
reset(span_1);
|
|
11962
11870
|
template_effect(($0, $1, $2) => {
|
|
11871
|
+
set_attribute2(label2, "data-disabled", get2(disabled) ? "true" : undefined);
|
|
11963
11872
|
set_attribute2(input, "name", $0);
|
|
11964
11873
|
set_value(input, $1);
|
|
11965
11874
|
set_checked(input, get2(itemValue) === get2(value));
|
|
@@ -11995,7 +11904,7 @@ ${pad}}`;
|
|
|
11995
11904
|
var root_16 = from_html(`<label class="slex-select-label"><!> <!></label>`);
|
|
11996
11905
|
var root_8 = from_html(`<span class="slex-select-check" aria-hidden="true"></span>`);
|
|
11997
11906
|
var root_6 = from_html(`<li role="option"><span class="slex-select-option-label"><!> <span> </span></span> <!></li>`);
|
|
11998
|
-
var
|
|
11907
|
+
var root_52 = from_html(`<ul class="slex-select-menu" role="listbox"></ul>`);
|
|
11999
11908
|
var root_9 = from_html(`<option> </option>`);
|
|
12000
11909
|
var root10 = from_html(`<div class="slex-select"><!> <button type="button" class="slex-select-trigger" aria-haspopup="listbox"><span class="slex-select-value"><!> <span> </span></span> <span class="slex-select-icon" aria-hidden="true"></span></button> <!> <select class="slex-select-native" tabindex="-1" aria-hidden="true"><option> </option><!></select></div>`);
|
|
12001
11910
|
function Select($$anchor, $$props) {
|
|
@@ -12199,7 +12108,7 @@ ${pad}}`;
|
|
|
12199
12108
|
var node_4 = sibling(button, 2);
|
|
12200
12109
|
{
|
|
12201
12110
|
var consequent_6 = ($$anchor2) => {
|
|
12202
|
-
var ul =
|
|
12111
|
+
var ul = root_52();
|
|
12203
12112
|
each(ul, 21, () => get2(options), index, ($$anchor3, item, index2) => {
|
|
12204
12113
|
const isSelected = user_derived(() => get2(item).value === text2(get2(value)));
|
|
12205
12114
|
const isActive = user_derived(() => index2 === get2(activeIndex));
|
|
@@ -15050,7 +14959,7 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
15050
14959
|
delegate(["click"]);
|
|
15051
14960
|
|
|
15052
14961
|
// src/components/svelte/input/Tabs.svelte
|
|
15053
|
-
var
|
|
14962
|
+
var root_53 = from_html(`<span class="slex-sr-only"> </span>`);
|
|
15054
14963
|
var root_36 = from_html(`<!> <!>`, 1);
|
|
15055
14964
|
var root_82 = from_html(`<div></div>`);
|
|
15056
14965
|
var root_18 = from_html(`<!> <span class="slex-tabs-selected-indicator" aria-hidden="true"></span>`, 1);
|
|
@@ -15228,7 +15137,7 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
15228
15137
|
var node_4 = sibling(node_3, 2);
|
|
15229
15138
|
{
|
|
15230
15139
|
var consequent_1 = ($$anchor5) => {
|
|
15231
|
-
var span =
|
|
15140
|
+
var span = root_53();
|
|
15232
15141
|
var text_1 = child(span, true);
|
|
15233
15142
|
reset(span);
|
|
15234
15143
|
template_effect(() => set_text(text_1, get2(label2)));
|
|
@@ -15668,7 +15577,7 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
15668
15577
|
var root_111 = from_html(`<button><!> <!></button>`);
|
|
15669
15578
|
var root_62 = from_html(`<span class="sr-only"> </span>`);
|
|
15670
15579
|
var root_83 = from_svg(`<svg fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>`);
|
|
15671
|
-
var
|
|
15580
|
+
var root_54 = from_html(`<a><!> <!></a>`);
|
|
15672
15581
|
function CloseButton($$anchor, $$props) {
|
|
15673
15582
|
push($$props, true);
|
|
15674
15583
|
let color = prop($$props, "color", 3, "gray"), name = prop($$props, "name", 3, "Close"), size = prop($$props, "size", 3, "md"), restProps = rest_props($$props, [
|
|
@@ -15742,7 +15651,7 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
15742
15651
|
append($$anchor2, button);
|
|
15743
15652
|
};
|
|
15744
15653
|
var alternate_2 = ($$anchor2) => {
|
|
15745
|
-
var a =
|
|
15654
|
+
var a = root_54();
|
|
15746
15655
|
attribute_effect(a, ($0) => ({
|
|
15747
15656
|
...restProps,
|
|
15748
15657
|
onclick,
|
|
@@ -16375,11 +16284,21 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
16375
16284
|
push($$props, true);
|
|
16376
16285
|
let p = state(proxy({}));
|
|
16377
16286
|
user_effect(() => bindPropStore($$props.props, (next2) => set(p, next2, true)));
|
|
16287
|
+
const color = user_derived(() => get2(p).color == null || get2(p).color === "" ? undefined : text2(get2(p).color));
|
|
16288
|
+
const size = user_derived(() => cssLength(get2(p).size));
|
|
16289
|
+
function cssLength(value) {
|
|
16290
|
+
if (value == null || value === "")
|
|
16291
|
+
return;
|
|
16292
|
+
const rendered = text2(value);
|
|
16293
|
+
return /^-?\d+(\.\d+)?$/.test(rendered) ? `${rendered}px` : rendered;
|
|
16294
|
+
}
|
|
16378
16295
|
var div = root20();
|
|
16296
|
+
let styles;
|
|
16379
16297
|
var text_1 = child(div, true);
|
|
16380
16298
|
reset(div);
|
|
16381
16299
|
template_effect(($0, $1) => {
|
|
16382
16300
|
set_class(div, 1, $0);
|
|
16301
|
+
styles = set_style(div, "", styles, { color: get2(color), "font-size": get2(size) });
|
|
16383
16302
|
set_text(text_1, $1);
|
|
16384
16303
|
}, [
|
|
16385
16304
|
() => `slex-text${get2(p).variant ? ` slex-text--${text2(get2(p).variant)}` : ""}${get2(p).class ? ` ${text2(get2(p).class)}` : ""}`,
|
|
@@ -16551,7 +16470,7 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
16551
16470
|
var root_45 = from_html(`<span class="slex-code-block-language"> </span>`);
|
|
16552
16471
|
var root_114 = from_html(`<figcaption class="slex-code-block-header"><span class="slex-code-block-title"><!> <!></span> <!></figcaption>`);
|
|
16553
16472
|
var root_72 = from_html(`<span> </span>`);
|
|
16554
|
-
var
|
|
16473
|
+
var root_55 = from_html(`<span class="slex-code-line"><span class="slex-code-line-content"></span></span>`);
|
|
16555
16474
|
var root22 = from_html(`<figure class="slex-code-block"><!> <pre class="slex-code-block-pre"><code></code></pre></figure>`);
|
|
16556
16475
|
function CodeBlock($$anchor, $$props) {
|
|
16557
16476
|
push($$props, true);
|
|
@@ -16720,7 +16639,7 @@ Migration example: ${hintLines.join(" ")}`;
|
|
|
16720
16639
|
var pre = sibling(node, 2);
|
|
16721
16640
|
var code_1 = child(pre);
|
|
16722
16641
|
each(code_1, 21, () => get2(lines), index, ($$anchor2, line) => {
|
|
16723
|
-
var span_3 =
|
|
16642
|
+
var span_3 = root_55();
|
|
16724
16643
|
var span_4 = child(span_3);
|
|
16725
16644
|
each(span_4, 21, () => get2(line), index, ($$anchor3, token) => {
|
|
16726
16645
|
var fragment_1 = comment();
|
|
@@ -30860,7 +30779,7 @@ l0,-` + (midHeight + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949
|
|
|
30860
30779
|
|
|
30861
30780
|
// src/components/svelte/content/Section.svelte
|
|
30862
30781
|
var root_28 = from_html(`<div class="slex-section-eyebrow"> </div>`);
|
|
30863
|
-
var
|
|
30782
|
+
var root_56 = from_html(`<span> </span>`);
|
|
30864
30783
|
var root_313 = from_html(`<h2 class="slex-section-title"><!><!></h2>`);
|
|
30865
30784
|
var root_65 = from_html(`<p class="slex-section-subtitle"> </p>`);
|
|
30866
30785
|
var root_73 = from_html(`<a class="slex-section-action"> </a>`);
|
|
@@ -30911,7 +30830,7 @@ l0,-` + (midHeight + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949
|
|
|
30911
30830
|
var node_4 = sibling(node_3);
|
|
30912
30831
|
{
|
|
30913
30832
|
var consequent_2 = ($$anchor4) => {
|
|
30914
|
-
var span =
|
|
30833
|
+
var span = root_56();
|
|
30915
30834
|
var text_2 = child(span, true);
|
|
30916
30835
|
reset(span);
|
|
30917
30836
|
template_effect(($0) => set_text(text_2, $0), [() => text2(get2(p).title)]);
|
|
@@ -61020,7 +60939,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61020
60939
|
var root_29 = from_html(`<h2><!></h2>`);
|
|
61021
60940
|
var root_314 = from_html(`<h3><!></h3>`);
|
|
61022
60941
|
var root_48 = from_html(`<h4><!></h4>`);
|
|
61023
|
-
var
|
|
60942
|
+
var root_57 = from_html(`<h5><!></h5>`);
|
|
61024
60943
|
var root_66 = from_html(`<h6><!></h6>`);
|
|
61025
60944
|
function Heading($$anchor, $$props) {
|
|
61026
60945
|
push($$props, true);
|
|
@@ -61061,7 +60980,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61061
60980
|
append($$anchor2, h4);
|
|
61062
60981
|
};
|
|
61063
60982
|
var consequent_4 = ($$anchor2) => {
|
|
61064
|
-
var h5 =
|
|
60983
|
+
var h5 = root_57();
|
|
61065
60984
|
var node_5 = child(h5);
|
|
61066
60985
|
snippet(node_5, () => $$props.children ?? noop);
|
|
61067
60986
|
reset(h5);
|