@bysages/svelte 0.2.3 → 0.3.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/README.md +16 -2
- package/dist/{ai-BOUoSSjw.mjs → AiLoader-0jlig3fe.mjs} +2 -34
- package/dist/Input-CZhcEeFU.mjs +75 -0
- package/dist/{spinner-EpUWE3Hu.mjs → Spinner-sd__23WT.mjs} +1 -6
- package/dist/{TabsRoot-BMMO3B77.mjs → TabsRoot-DXd41HqW.mjs} +5 -1
- package/dist/{avatar-BHYqgq4d.mjs → avatar-LR0CZ1Iz.mjs} +5 -1
- package/dist/bento-BTvt7gsB.mjs +73 -0
- package/dist/block-ui-CpiV9qza.mjs +50 -0
- package/dist/browser-gmPTH6mJ.mjs +146 -0
- package/dist/{cascade-select-C-eBcN_4.mjs → cascade-select-B-4Z6oWe.mjs} +6 -6
- package/dist/components/ai/index.d.mts +3 -2
- package/dist/components/ai/index.mjs +27 -2
- package/dist/components/ai-action/index.d.mts +1 -1
- package/dist/components/ai-action/index.mjs +1 -1
- package/dist/components/ai-message/index.d.mts +1 -1
- package/dist/components/ai-message/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.d.mts +1 -1
- package/dist/components/ai-prompt-input/index.mjs +1 -1
- package/dist/components/ai-reasoning/index.d.mts +1 -1
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.d.mts +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +1 -1
- package/dist/components/ai-source/index.mjs +1 -1
- package/dist/components/ai-suggestion/index.d.mts +1 -1
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.d.mts +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/bento/index.d.mts +2 -0
- package/dist/components/bento/index.mjs +2 -0
- package/dist/components/block-ui/index.d.mts +2 -0
- package/dist/components/block-ui/index.mjs +2 -0
- package/dist/components/browser/index.d.mts +9 -0
- package/dist/components/browser/index.mjs +2 -0
- package/dist/components/cascade-select/index.mjs +1 -1
- package/dist/components/data-view/index.d.mts +2 -0
- package/dist/components/data-view/index.mjs +2 -0
- package/dist/components/deferred-content/index.d.mts +2 -0
- package/dist/components/deferred-content/index.mjs +2 -0
- package/dist/components/descriptions/index.d.mts +1 -1
- package/dist/components/descriptions/index.mjs +1 -1
- package/dist/components/dock/index.d.mts +2 -0
- package/dist/components/dock/index.mjs +2 -0
- package/dist/components/form/index.d.mts +2 -2
- package/dist/components/form/index.mjs +2 -2
- package/dist/components/icon/index.d.mts +1 -1
- package/dist/components/icon/index.mjs +1 -1
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/order-list/index.d.mts +2 -0
- package/dist/components/order-list/index.mjs +2 -0
- package/dist/components/result/index.d.mts +12 -0
- package/dist/components/result/index.mjs +2 -0
- package/dist/components/select/index.d.mts +2 -7
- package/dist/components/select/index.mjs +2 -14
- package/dist/components/spinner/index.mjs +6 -1
- package/dist/components/spotlight/index.d.mts +2 -0
- package/dist/components/spotlight/index.mjs +2 -0
- package/dist/components/table/index.mjs +1 -1
- package/dist/components/tabs/index.d.mts +1 -1
- package/dist/components/tabs/index.mjs +1 -1
- package/dist/components/terminal/index.d.mts +2 -0
- package/dist/components/terminal/index.mjs +2 -0
- package/dist/components/timeline/index.d.mts +1 -1
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/toolbar/index.d.mts +2 -0
- package/dist/components/toolbar/index.mjs +2 -0
- package/dist/components/tree-select/index.mjs +1 -1
- package/dist/components/user/index.d.mts +2 -0
- package/dist/components/user/index.mjs +2 -0
- package/dist/components/virtual-list/index.d.mts +2 -0
- package/dist/components/virtual-list/index.mjs +2 -0
- package/dist/data-view-B3TY3rYl.mjs +167 -0
- package/dist/deferred-content-CO9YsKMQ.mjs +65 -0
- package/dist/{descriptions-Cv3x5qLW.mjs → descriptions-DgkA_9B-.mjs} +14 -8
- package/dist/dock-CKGRnXWu.mjs +84 -0
- package/dist/{form-De-ZwM1P.mjs → form-BTL9S1gn.mjs} +4 -4
- package/dist/{icon-B6_cYYzO.mjs → icon-D7AeDq0M.mjs} +7 -6
- package/dist/index-0k-VxNRm.d.mts +15 -0
- package/dist/{index-NJ21Q4f4.d.mts → index-BEfqqxjl.d.mts} +11 -1
- package/dist/index-BmFfkztS.d.mts +14 -0
- package/dist/{index-BgLAlGbg.d.mts → index-BoR_54C_.d.mts} +3 -0
- package/dist/index-BolxaoaW.d.mts +18 -0
- package/dist/index-CAb_-2Bn.d.mts +21 -0
- package/dist/{index-Cd5VU1DI.d.mts → index-CV1LSzq5.d.mts} +3 -0
- package/dist/index-CmskeLd_.d.mts +23 -0
- package/dist/index-CnrohEXe.d.mts +24 -0
- package/dist/{index-BjVEomHj.d.mts → index-CtbGSRNw.d.mts} +719 -3781
- package/dist/{index-Nt0a2iYy.d.mts → index-D1U7Svy2.d.mts} +2 -2
- package/dist/index-D6eYSdmD.d.mts +28 -0
- package/dist/index-D9UBDdoA.d.mts +17 -0
- package/dist/index-DBbjFiDd.d.mts +20 -0
- package/dist/index-DGOBhwXN.d.mts +18 -0
- package/dist/{index-DrXCIscJ.d.mts → index-DjaHpB21.d.mts} +3 -0
- package/dist/index-KoqiUxmN.d.mts +20 -0
- package/dist/{index-BnvnT-GQ.d.mts → index-_kQsvJKo.d.mts} +6 -2
- package/dist/index-mshFOd-j.d.mts +20 -0
- package/dist/index.d.mts +24 -10
- package/dist/index.mjs +26 -12
- package/dist/order-list-q7VlsbmU.mjs +120 -0
- package/dist/result-4Oee2ndu.mjs +159 -0
- package/dist/select-rkY0qJKI.mjs +95 -0
- package/dist/spotlight-DMC5E1eS.mjs +51 -0
- package/dist/{table-C0AcH5Dw.mjs → table-BnNK4_su.mjs} +1 -1
- package/dist/terminal-B3b4KzoN.mjs +78 -0
- package/dist/{timeline-BV4eahUx.mjs → timeline-1yPOTbtY.mjs} +4 -2
- package/dist/toolbar-SNwuRrJr.mjs +68 -0
- package/dist/{tree-select-aHymj8Zu.mjs → tree-select-BSf4a_En.mjs} +1 -1
- package/dist/user-BjJSjDYV.mjs +100 -0
- package/dist/virtual-list-psKQ_NVr.mjs +59 -0
- package/package.json +28 -7
- package/dist/Input-Biz4J1B6.mjs +0 -39
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
//#region src/components/result/Description.svelte
|
|
5
|
+
var rest_excludes$4 = /* @__PURE__ */ new Set([
|
|
6
|
+
"$$slots",
|
|
7
|
+
"$$events",
|
|
8
|
+
"$$legacy",
|
|
9
|
+
"children"
|
|
10
|
+
]);
|
|
11
|
+
var root$4 = $.from_html(`<p><!></p>`);
|
|
12
|
+
function Description($$anchor, $$props) {
|
|
13
|
+
$.push($$props, true);
|
|
14
|
+
injectComponentStyle("result");
|
|
15
|
+
let rest = $.rest_props($$props, rest_excludes$4);
|
|
16
|
+
var p = root$4();
|
|
17
|
+
$.attribute_effect(p, () => ({
|
|
18
|
+
...rest,
|
|
19
|
+
"data-scope": "result",
|
|
20
|
+
"data-part": "description"
|
|
21
|
+
}));
|
|
22
|
+
var node = $.child(p);
|
|
23
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
24
|
+
$.reset(p);
|
|
25
|
+
$.append($$anchor, p);
|
|
26
|
+
$.pop();
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/result/Extra.svelte
|
|
30
|
+
var rest_excludes$3 = /* @__PURE__ */ new Set([
|
|
31
|
+
"$$slots",
|
|
32
|
+
"$$events",
|
|
33
|
+
"$$legacy",
|
|
34
|
+
"children"
|
|
35
|
+
]);
|
|
36
|
+
var root$3 = $.from_html(`<div><!></div>`);
|
|
37
|
+
function Extra($$anchor, $$props) {
|
|
38
|
+
$.push($$props, true);
|
|
39
|
+
injectComponentStyle("result");
|
|
40
|
+
let rest = $.rest_props($$props, rest_excludes$3);
|
|
41
|
+
var div = root$3();
|
|
42
|
+
$.attribute_effect(div, () => ({
|
|
43
|
+
...rest,
|
|
44
|
+
"data-scope": "result",
|
|
45
|
+
"data-part": "extra"
|
|
46
|
+
}));
|
|
47
|
+
var node = $.child(div);
|
|
48
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
49
|
+
$.reset(div);
|
|
50
|
+
$.append($$anchor, div);
|
|
51
|
+
$.pop();
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/components/result/Result.svelte
|
|
55
|
+
var rest_excludes$2 = /* @__PURE__ */ new Set([
|
|
56
|
+
"$$slots",
|
|
57
|
+
"$$events",
|
|
58
|
+
"$$legacy",
|
|
59
|
+
"status",
|
|
60
|
+
"children"
|
|
61
|
+
]);
|
|
62
|
+
var root$2 = $.from_html(`<div><!></div>`);
|
|
63
|
+
function Result$1($$anchor, $$props) {
|
|
64
|
+
$.push($$props, true);
|
|
65
|
+
injectComponentStyle("result");
|
|
66
|
+
/** The verdict the operation returned; the fixed pigments speak it. */
|
|
67
|
+
let status = $.prop($$props, "status", 3, "info"), rest = $.rest_props($$props, rest_excludes$2);
|
|
68
|
+
var div = root$2();
|
|
69
|
+
$.attribute_effect(div, () => ({
|
|
70
|
+
...rest,
|
|
71
|
+
"data-status": status(),
|
|
72
|
+
"data-scope": "result",
|
|
73
|
+
"data-part": "root"
|
|
74
|
+
}));
|
|
75
|
+
var node = $.child(div);
|
|
76
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
77
|
+
$.reset(div);
|
|
78
|
+
$.append($$anchor, div);
|
|
79
|
+
$.pop();
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/result/ResultIcon.svelte
|
|
83
|
+
var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
84
|
+
"$$slots",
|
|
85
|
+
"$$events",
|
|
86
|
+
"$$legacy",
|
|
87
|
+
"children"
|
|
88
|
+
]);
|
|
89
|
+
var root$1 = $.from_svg(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg>`);
|
|
90
|
+
var root_1 = $.from_html(`<div><!></div>`);
|
|
91
|
+
function ResultIcon($$anchor, $$props) {
|
|
92
|
+
$.push($$props, true);
|
|
93
|
+
injectComponentStyle("result");
|
|
94
|
+
let rest = $.rest_props($$props, rest_excludes$1);
|
|
95
|
+
const MARK = "<g data-for=\"success\"><path d=\"M20 6 9 17l-5-5\"/></g><g data-for=\"warning\"><path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></g><g data-for=\"danger\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></g><g data-for=\"info\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/></g>";
|
|
96
|
+
var div = root_1();
|
|
97
|
+
$.attribute_effect(div, () => ({
|
|
98
|
+
...rest,
|
|
99
|
+
"data-scope": "result",
|
|
100
|
+
"data-part": "icon"
|
|
101
|
+
}));
|
|
102
|
+
var node = $.child(div);
|
|
103
|
+
var consequent = ($$anchor) => {
|
|
104
|
+
var fragment = $.comment();
|
|
105
|
+
var node_1 = $.first_child(fragment);
|
|
106
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
107
|
+
$.append($$anchor, fragment);
|
|
108
|
+
};
|
|
109
|
+
var alternate = ($$anchor) => {
|
|
110
|
+
var svg = root$1();
|
|
111
|
+
$.html(svg, () => MARK, true);
|
|
112
|
+
$.reset(svg);
|
|
113
|
+
$.append($$anchor, svg);
|
|
114
|
+
};
|
|
115
|
+
$.if(node, ($$render) => {
|
|
116
|
+
if ($$props.children) $$render(consequent);
|
|
117
|
+
else $$render(alternate, -1);
|
|
118
|
+
});
|
|
119
|
+
$.reset(div);
|
|
120
|
+
$.append($$anchor, div);
|
|
121
|
+
$.pop();
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/components/result/Title.svelte
|
|
125
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
126
|
+
"$$slots",
|
|
127
|
+
"$$events",
|
|
128
|
+
"$$legacy",
|
|
129
|
+
"children"
|
|
130
|
+
]);
|
|
131
|
+
var root = $.from_html(`<h3><!></h3>`);
|
|
132
|
+
function Title($$anchor, $$props) {
|
|
133
|
+
$.push($$props, true);
|
|
134
|
+
injectComponentStyle("result");
|
|
135
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
136
|
+
var h3 = root();
|
|
137
|
+
$.attribute_effect(h3, () => ({
|
|
138
|
+
...rest,
|
|
139
|
+
"data-scope": "result",
|
|
140
|
+
"data-part": "title"
|
|
141
|
+
}));
|
|
142
|
+
var node = $.child(h3);
|
|
143
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
144
|
+
$.reset(h3);
|
|
145
|
+
$.append($$anchor, h3);
|
|
146
|
+
$.pop();
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/components/result/index.ts
|
|
150
|
+
/** A verdict drawn after the deed — Result, Result.Icon, Result.Title,
|
|
151
|
+
* Result.Description, Result.Extra. */
|
|
152
|
+
const Result = Object.assign(Result$1, {
|
|
153
|
+
Icon: ResultIcon,
|
|
154
|
+
Title,
|
|
155
|
+
Description,
|
|
156
|
+
Extra
|
|
157
|
+
});
|
|
158
|
+
//#endregion
|
|
159
|
+
export { Result as t };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { t as SelectRoot } from "./SelectRoot-l-rb18FH.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
import * as $ from "svelte/internal/client";
|
|
5
|
+
import { useFieldContext } from "@ark-ui/svelte/field";
|
|
6
|
+
import { Select } from "@ark-ui/svelte/select";
|
|
7
|
+
//#region src/components/select/NativeSelect.svelte
|
|
8
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
9
|
+
"$$slots",
|
|
10
|
+
"$$events",
|
|
11
|
+
"$$legacy",
|
|
12
|
+
"value",
|
|
13
|
+
"options",
|
|
14
|
+
"size",
|
|
15
|
+
"invalid",
|
|
16
|
+
"placeholder",
|
|
17
|
+
"disabled"
|
|
18
|
+
]);
|
|
19
|
+
var root = $.from_html(`<option disabled=""> </option>`);
|
|
20
|
+
var root_1 = $.from_html(`<option> </option>`);
|
|
21
|
+
var root_2 = $.from_html(`<span><select><!><!></select> <svg data-scope="select" data-part="native-icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></span>`);
|
|
22
|
+
function NativeSelect$1($$anchor, $$props) {
|
|
23
|
+
$.push($$props, true);
|
|
24
|
+
injectComponentStyle("select");
|
|
25
|
+
let value = $.prop($$props, "value", 15, ""), size = $.prop($$props, "size", 3, "md"), invalid = $.prop($$props, "invalid", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes);
|
|
26
|
+
const field = useFieldContext();
|
|
27
|
+
const fieldProps = $.derived(() => field?.()?.getInputProps() ?? {});
|
|
28
|
+
const isInvalid = $.derived(() => invalid() || field?.()?.invalid === true);
|
|
29
|
+
const isDisabled = $.derived(() => disabled() || field?.()?.disabled === true);
|
|
30
|
+
const isEmpty = $.derived(() => value() == null || value() === "");
|
|
31
|
+
var span = root_2();
|
|
32
|
+
$.attribute_effect(span, () => ({
|
|
33
|
+
...rest,
|
|
34
|
+
"data-scope": "select",
|
|
35
|
+
"data-part": "native-root",
|
|
36
|
+
"data-size": size(),
|
|
37
|
+
"data-invalid": $.get(isInvalid) ? "" : void 0,
|
|
38
|
+
"data-disabled": $.get(isDisabled) ? "" : void 0,
|
|
39
|
+
"data-placeholder-shown": $.get(isEmpty) ? "" : void 0
|
|
40
|
+
}));
|
|
41
|
+
var select = $.child(span);
|
|
42
|
+
$.attribute_effect(select, () => ({
|
|
43
|
+
...$.get(fieldProps),
|
|
44
|
+
"data-scope": "select",
|
|
45
|
+
"data-part": "native",
|
|
46
|
+
disabled: $.get(isDisabled) || void 0
|
|
47
|
+
}));
|
|
48
|
+
var node = $.child(select);
|
|
49
|
+
var consequent = ($$anchor) => {
|
|
50
|
+
var option_1 = root();
|
|
51
|
+
var text = $.only_child(option_1, true);
|
|
52
|
+
option_1.value = option_1.__value = "";
|
|
53
|
+
$.template_effect(() => {
|
|
54
|
+
$.set_attribute(option_1, "hidden", $.get(isEmpty) ? void 0 : true);
|
|
55
|
+
$.set_text(text, $$props.placeholder);
|
|
56
|
+
});
|
|
57
|
+
$.append($$anchor, option_1);
|
|
58
|
+
};
|
|
59
|
+
$.if(node, ($$render) => {
|
|
60
|
+
if ($$props.placeholder) $$render(consequent);
|
|
61
|
+
});
|
|
62
|
+
var node_1 = $.sibling(node);
|
|
63
|
+
$.each(node_1, 17, () => $$props.options, (option) => option.value, ($$anchor, option) => {
|
|
64
|
+
var option_2 = root_1();
|
|
65
|
+
var text_1 = $.only_child(option_2, true);
|
|
66
|
+
var option_2_value = {};
|
|
67
|
+
$.template_effect(() => {
|
|
68
|
+
option_2.disabled = $.get(option).disabled;
|
|
69
|
+
$.set_text(text_1, $.get(option).label);
|
|
70
|
+
if (option_2_value !== (option_2_value = $.get(option).value)) option_2.value = (option_2.__value = option_2_value) ?? "";
|
|
71
|
+
});
|
|
72
|
+
$.append($$anchor, option_2);
|
|
73
|
+
});
|
|
74
|
+
$.reset(select);
|
|
75
|
+
$.next(2);
|
|
76
|
+
$.reset(span);
|
|
77
|
+
$.bind_select_value(select, value);
|
|
78
|
+
$.append($$anchor, span);
|
|
79
|
+
$.pop();
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/select/index.ts
|
|
83
|
+
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
|
84
|
+
* whole control and its list dissolves open as a paper vessel, the checked
|
|
85
|
+
* row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
|
|
86
|
+
* Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner,
|
|
87
|
+
* Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
|
|
88
|
+
const Select$1 = {
|
|
89
|
+
...Select,
|
|
90
|
+
Root: SelectRoot
|
|
91
|
+
};
|
|
92
|
+
/** The platform's own list wearing the control recipe. */
|
|
93
|
+
const NativeSelect = NativeSelect$1;
|
|
94
|
+
//#endregion
|
|
95
|
+
export { Select$1 as n, NativeSelect as t };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
//#region src/components/spotlight/Spotlight.svelte
|
|
5
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
6
|
+
"$$slots",
|
|
7
|
+
"$$events",
|
|
8
|
+
"$$legacy",
|
|
9
|
+
"radius",
|
|
10
|
+
"children"
|
|
11
|
+
]);
|
|
12
|
+
var root = $.from_html(`<div><!></div>`);
|
|
13
|
+
function Spotlight$1($$anchor, $$props) {
|
|
14
|
+
$.push($$props, true);
|
|
15
|
+
injectComponentStyle("spotlight");
|
|
16
|
+
/** How far the lamp throws before the ink swallows it. */
|
|
17
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
18
|
+
function track(event) {
|
|
19
|
+
const host = event.currentTarget;
|
|
20
|
+
const rect = host.getBoundingClientRect();
|
|
21
|
+
host.style.setProperty("--bs-spot-x", `${event.clientX - rect.left}px`);
|
|
22
|
+
host.style.setProperty("--bs-spot-y", `${event.clientY - rect.top}px`);
|
|
23
|
+
}
|
|
24
|
+
var div = root();
|
|
25
|
+
var event_handler = (event) => {
|
|
26
|
+
track(event);
|
|
27
|
+
event.currentTarget.setAttribute("data-hovered", "");
|
|
28
|
+
};
|
|
29
|
+
var event_handler_1 = (event) => event.currentTarget.removeAttribute("data-hovered");
|
|
30
|
+
$.attribute_effect(div, () => ({
|
|
31
|
+
...rest,
|
|
32
|
+
"data-scope": "spotlight",
|
|
33
|
+
"data-part": "root",
|
|
34
|
+
onpointermove: track,
|
|
35
|
+
onpointerenter: event_handler,
|
|
36
|
+
onpointerleave: event_handler_1,
|
|
37
|
+
[$.STYLE]: { "--bs-spot-radius": $$props.radius }
|
|
38
|
+
}));
|
|
39
|
+
var node = $.child(div);
|
|
40
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
41
|
+
$.reset(div);
|
|
42
|
+
$.append($$anchor, div);
|
|
43
|
+
$.pop();
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/spotlight/index.ts
|
|
47
|
+
/** The ink-light card: a vessel whose rim and face take light from the
|
|
48
|
+
* reader's hand. */
|
|
49
|
+
const Spotlight = Spotlight$1;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Spotlight as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Pagination } from "./components/pagination/index.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { n as Select$1 } from "./select-rkY0qJKI.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
import * as $ from "svelte/internal/client";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
//#region src/components/terminal/Terminal.svelte
|
|
5
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
6
|
+
"$$slots",
|
|
7
|
+
"$$events",
|
|
8
|
+
"$$legacy",
|
|
9
|
+
"lines",
|
|
10
|
+
"prompt",
|
|
11
|
+
"placeholder",
|
|
12
|
+
"label",
|
|
13
|
+
"onCommand"
|
|
14
|
+
]);
|
|
15
|
+
var root = $.from_html(`<div data-scope="terminal" data-part="line"> </div>`);
|
|
16
|
+
var root_1 = $.from_html(`<div><div data-scope="terminal" data-part="scroll"></div> <div data-scope="terminal" data-part="entry"><span data-scope="terminal" data-part="sigil" aria-hidden="true"> </span> <input data-scope="terminal" data-part="input" spellcheck="false" autocomplete="off"/></div></div>`);
|
|
17
|
+
function Terminal$1($$anchor, $$props) {
|
|
18
|
+
$.push($$props, true);
|
|
19
|
+
injectComponentStyle("terminal");
|
|
20
|
+
let lines = $.prop($$props, "lines", 19, () => []), prompt = $.prop($$props, "prompt", 3, "$"), rest = $.rest_props($$props, rest_excludes);
|
|
21
|
+
let draft = $.state("");
|
|
22
|
+
let scroll = $.state(void 0);
|
|
23
|
+
$.user_effect(() => {
|
|
24
|
+
lines().length;
|
|
25
|
+
$.get(scroll)?.scrollTo({ top: $.get(scroll).scrollHeight });
|
|
26
|
+
});
|
|
27
|
+
function submit() {
|
|
28
|
+
const text = $.get(draft).trim();
|
|
29
|
+
if (!text) return;
|
|
30
|
+
$.set(draft, "");
|
|
31
|
+
$$props.onCommand?.(text);
|
|
32
|
+
}
|
|
33
|
+
var div = root_1();
|
|
34
|
+
$.attribute_effect(div, () => ({
|
|
35
|
+
...rest,
|
|
36
|
+
role: "log",
|
|
37
|
+
"aria-label": $$props.label,
|
|
38
|
+
"data-scope": "terminal",
|
|
39
|
+
"data-part": "root"
|
|
40
|
+
}));
|
|
41
|
+
var div_1 = $.child(div);
|
|
42
|
+
$.each(div_1, 21, lines, $.index, ($$anchor, line) => {
|
|
43
|
+
var div_2 = root();
|
|
44
|
+
var text_1 = $.only_child(div_2, true);
|
|
45
|
+
$.template_effect(() => $.set_text(text_1, $.get(line)));
|
|
46
|
+
$.append($$anchor, div_2);
|
|
47
|
+
});
|
|
48
|
+
$.reset(div_1);
|
|
49
|
+
$.bind_this(div_1, ($$value) => $.set(scroll, $$value), () => $.get(scroll));
|
|
50
|
+
var div_3 = $.sibling(div_1, 2);
|
|
51
|
+
var span = $.child(div_3);
|
|
52
|
+
var text_2 = $.only_child(span, true);
|
|
53
|
+
var input = $.sibling(span, 2);
|
|
54
|
+
$.remove_input_defaults(input);
|
|
55
|
+
$.reset(div_3);
|
|
56
|
+
$.reset(div);
|
|
57
|
+
$.template_effect(() => {
|
|
58
|
+
$.set_text(text_2, prompt());
|
|
59
|
+
$.set_attribute(input, "placeholder", $$props.placeholder);
|
|
60
|
+
$.set_attribute(input, "aria-label", $$props.label ? `${$$props.label} command line` : "Command line");
|
|
61
|
+
});
|
|
62
|
+
$.delegated("keydown", input, (event) => {
|
|
63
|
+
if (event.key === "Enter") {
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
submit();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
$.bind_value(input, () => $.get(draft), ($$value) => $.set(draft, $$value));
|
|
69
|
+
$.append($$anchor, div);
|
|
70
|
+
$.pop();
|
|
71
|
+
}
|
|
72
|
+
$.delegate(["keydown"]);
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/components/terminal/index.ts
|
|
75
|
+
/** A quiet console: the transcript above, the prompt line below. */
|
|
76
|
+
const Terminal = Terminal$1;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { Terminal as t };
|
|
@@ -6,18 +6,20 @@ var rest_excludes$3 = /* @__PURE__ */ new Set([
|
|
|
6
6
|
"$$slots",
|
|
7
7
|
"$$events",
|
|
8
8
|
"$$legacy",
|
|
9
|
+
"orientation",
|
|
9
10
|
"children"
|
|
10
11
|
]);
|
|
11
12
|
var root$3 = $.from_html(`<ol><!></ol>`);
|
|
12
13
|
function Timeline$1($$anchor, $$props) {
|
|
13
14
|
$.push($$props, true);
|
|
14
15
|
injectComponentStyle("timeline");
|
|
15
|
-
let rest = $.rest_props($$props, rest_excludes$3);
|
|
16
|
+
let orientation = $.prop($$props, "orientation", 3, "vertical"), rest = $.rest_props($$props, rest_excludes$3);
|
|
16
17
|
var ol = root$3();
|
|
17
18
|
$.attribute_effect(ol, () => ({
|
|
18
19
|
...rest,
|
|
19
20
|
"data-scope": "timeline",
|
|
20
|
-
"data-part": "root"
|
|
21
|
+
"data-part": "root",
|
|
22
|
+
"data-orientation": orientation()
|
|
21
23
|
}));
|
|
22
24
|
var node = $.child(ol);
|
|
23
25
|
$.snippet(node, () => $$props.children ?? $.noop);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
//#region src/components/toolbar/Toolbar.svelte
|
|
5
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
6
|
+
"$$slots",
|
|
7
|
+
"$$events",
|
|
8
|
+
"$$legacy",
|
|
9
|
+
"label",
|
|
10
|
+
"start",
|
|
11
|
+
"end",
|
|
12
|
+
"children"
|
|
13
|
+
]);
|
|
14
|
+
var root = $.from_html(`<div data-scope="toolbar" data-part="group" data-edge="end"><!></div>`);
|
|
15
|
+
var root_1 = $.from_html(`<div><div data-scope="toolbar" data-part="group" data-edge="start"><!></div> <!></div>`);
|
|
16
|
+
function Toolbar$1($$anchor, $$props) {
|
|
17
|
+
$.push($$props, true);
|
|
18
|
+
injectComponentStyle("toolbar");
|
|
19
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
20
|
+
var div = root_1();
|
|
21
|
+
$.attribute_effect(div, () => ({
|
|
22
|
+
...rest,
|
|
23
|
+
role: "toolbar",
|
|
24
|
+
"aria-label": $$props.label,
|
|
25
|
+
"data-scope": "toolbar",
|
|
26
|
+
"data-part": "root"
|
|
27
|
+
}));
|
|
28
|
+
var div_1 = $.child(div);
|
|
29
|
+
var node = $.child(div_1);
|
|
30
|
+
var consequent = ($$anchor) => {
|
|
31
|
+
var fragment = $.comment();
|
|
32
|
+
var node_1 = $.first_child(fragment);
|
|
33
|
+
$.snippet(node_1, () => $$props.start);
|
|
34
|
+
$.append($$anchor, fragment);
|
|
35
|
+
};
|
|
36
|
+
var alternate = ($$anchor) => {
|
|
37
|
+
var fragment_1 = $.comment();
|
|
38
|
+
var node_2 = $.first_child(fragment_1);
|
|
39
|
+
$.snippet(node_2, () => $$props.children ?? $.noop);
|
|
40
|
+
$.append($$anchor, fragment_1);
|
|
41
|
+
};
|
|
42
|
+
$.if(node, ($$render) => {
|
|
43
|
+
if ($$props.start) $$render(consequent);
|
|
44
|
+
else $$render(alternate, -1);
|
|
45
|
+
});
|
|
46
|
+
$.reset(div_1);
|
|
47
|
+
var node_3 = $.sibling(div_1, 2);
|
|
48
|
+
var consequent_1 = ($$anchor) => {
|
|
49
|
+
var div_2 = root();
|
|
50
|
+
var node_4 = $.child(div_2);
|
|
51
|
+
$.snippet(node_4, () => $$props.end);
|
|
52
|
+
$.reset(div_2);
|
|
53
|
+
$.append($$anchor, div_2);
|
|
54
|
+
};
|
|
55
|
+
$.if(node_3, ($$render) => {
|
|
56
|
+
if ($$props.end) $$render(consequent_1);
|
|
57
|
+
});
|
|
58
|
+
$.reset(div);
|
|
59
|
+
$.append($$anchor, div);
|
|
60
|
+
$.pop();
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/toolbar/index.ts
|
|
64
|
+
/** A workbench rail: the start tools at the leading edge, the end
|
|
65
|
+
* tools at the trailing. */
|
|
66
|
+
const Toolbar = Toolbar$1;
|
|
67
|
+
//#endregion
|
|
68
|
+
export { Toolbar as t };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
import { Avatar } from "@ark-ui/svelte/avatar";
|
|
5
|
+
//#region src/components/user/User.svelte
|
|
6
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
7
|
+
"$$slots",
|
|
8
|
+
"$$events",
|
|
9
|
+
"$$legacy",
|
|
10
|
+
"name",
|
|
11
|
+
"description",
|
|
12
|
+
"size",
|
|
13
|
+
"src",
|
|
14
|
+
"shape",
|
|
15
|
+
"children"
|
|
16
|
+
]);
|
|
17
|
+
var root = $.from_html(`<!> <!>`, 1);
|
|
18
|
+
var root_1 = $.from_html(`<span data-scope="user" data-part="description"> </span>`);
|
|
19
|
+
var root_2 = $.from_html(`<div><!> <div data-scope="user" data-part="meta"><span data-scope="user" data-part="name"> </span> <!> <!></div></div>`);
|
|
20
|
+
function User$1($$anchor, $$props) {
|
|
21
|
+
$.push($$props, true);
|
|
22
|
+
injectComponentStyle("user");
|
|
23
|
+
let shape = $.prop($$props, "shape", 3, "circle"), rest = $.rest_props($$props, rest_excludes);
|
|
24
|
+
const initials = $.derived(() => $$props.name.split(/\s+/).filter(Boolean).slice(0, 2).map((word) => (word[0] ?? "").toUpperCase()).join(""));
|
|
25
|
+
var div = root_2();
|
|
26
|
+
$.attribute_effect(div, () => ({
|
|
27
|
+
...rest,
|
|
28
|
+
"data-scope": "user",
|
|
29
|
+
"data-part": "root"
|
|
30
|
+
}));
|
|
31
|
+
var node = $.child(div);
|
|
32
|
+
$.component(node, () => Avatar.Root, ($$anchor, ArkAvatar_Root) => {
|
|
33
|
+
ArkAvatar_Root($$anchor, {
|
|
34
|
+
get "data-size"() {
|
|
35
|
+
return $$props.size;
|
|
36
|
+
},
|
|
37
|
+
get "data-shape"() {
|
|
38
|
+
return shape();
|
|
39
|
+
},
|
|
40
|
+
children: ($$anchor, $$slotProps) => {
|
|
41
|
+
var fragment = root();
|
|
42
|
+
var node_1 = $.first_child(fragment);
|
|
43
|
+
var consequent = ($$anchor) => {
|
|
44
|
+
var fragment_1 = $.comment();
|
|
45
|
+
var node_2 = $.first_child(fragment_1);
|
|
46
|
+
$.component(node_2, () => Avatar.Image, ($$anchor, ArkAvatar_Image) => {
|
|
47
|
+
ArkAvatar_Image($$anchor, { get src() {
|
|
48
|
+
return $$props.src;
|
|
49
|
+
} });
|
|
50
|
+
});
|
|
51
|
+
$.append($$anchor, fragment_1);
|
|
52
|
+
};
|
|
53
|
+
$.if(node_1, ($$render) => {
|
|
54
|
+
if ($$props.src) $$render(consequent);
|
|
55
|
+
});
|
|
56
|
+
var node_3 = $.sibling(node_1, 2);
|
|
57
|
+
$.component(node_3, () => Avatar.Fallback, ($$anchor, ArkAvatar_Fallback) => {
|
|
58
|
+
ArkAvatar_Fallback($$anchor, {
|
|
59
|
+
children: ($$anchor, $$slotProps) => {
|
|
60
|
+
$.next();
|
|
61
|
+
var text = $.text();
|
|
62
|
+
$.template_effect(() => $.set_text(text, $.get(initials)));
|
|
63
|
+
$.append($$anchor, text);
|
|
64
|
+
},
|
|
65
|
+
$$slots: { default: true }
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
$.append($$anchor, fragment);
|
|
69
|
+
},
|
|
70
|
+
$$slots: { default: true }
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
var div_1 = $.sibling(node, 2);
|
|
74
|
+
var span = $.child(div_1);
|
|
75
|
+
var text_1 = $.only_child(span, true);
|
|
76
|
+
var node_4 = $.sibling(span, 2);
|
|
77
|
+
var consequent_1 = ($$anchor) => {
|
|
78
|
+
var span_1 = root_1();
|
|
79
|
+
var text_2 = $.only_child(span_1, true);
|
|
80
|
+
$.template_effect(() => $.set_text(text_2, $$props.description));
|
|
81
|
+
$.append($$anchor, span_1);
|
|
82
|
+
};
|
|
83
|
+
$.if(node_4, ($$render) => {
|
|
84
|
+
if ($$props.description) $$render(consequent_1);
|
|
85
|
+
});
|
|
86
|
+
var node_5 = $.sibling(node_4, 2);
|
|
87
|
+
$.snippet(node_5, () => $$props.children ?? $.noop);
|
|
88
|
+
$.reset(div_1);
|
|
89
|
+
$.reset(div);
|
|
90
|
+
$.template_effect(() => $.set_text(text_1, $$props.name));
|
|
91
|
+
$.append($$anchor, div);
|
|
92
|
+
$.pop();
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/user/index.ts
|
|
96
|
+
/** A person on one line: the seal before the words, the name and its
|
|
97
|
+
* quiet echo beneath. */
|
|
98
|
+
const User = User$1;
|
|
99
|
+
//#endregion
|
|
100
|
+
export { User as t };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
import { createVirtualizer } from "@tanstack/svelte-virtual";
|
|
5
|
+
//#region src/components/virtual-list/VirtualList.svelte
|
|
6
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
7
|
+
"$$slots",
|
|
8
|
+
"$$events",
|
|
9
|
+
"$$legacy",
|
|
10
|
+
"items",
|
|
11
|
+
"itemHeight",
|
|
12
|
+
"height",
|
|
13
|
+
"renderItem"
|
|
14
|
+
]);
|
|
15
|
+
var root = $.from_html(`<div data-scope="virtual-list" data-part="row"><!></div>`);
|
|
16
|
+
var root_1 = $.from_html(`<div><div data-scope="virtual-list" data-part="inner"></div></div>`);
|
|
17
|
+
function VirtualList$1($$anchor, $$props) {
|
|
18
|
+
$.push($$props, true);
|
|
19
|
+
injectComponentStyle("virtual-list");
|
|
20
|
+
let itemHeight = $.prop($$props, "itemHeight", 3, 40), height = $.prop($$props, "height", 3, 320), rest = $.rest_props($$props, rest_excludes);
|
|
21
|
+
let viewport = $.state(void 0);
|
|
22
|
+
const virtualizer = createVirtualizer({
|
|
23
|
+
count: $$props.items.length,
|
|
24
|
+
getScrollElement: () => $.get(viewport) ?? null,
|
|
25
|
+
estimateSize: () => itemHeight(),
|
|
26
|
+
overscan: 6
|
|
27
|
+
});
|
|
28
|
+
const rows = $.derived(() => virtualizer.getVirtualItems());
|
|
29
|
+
const total = $.derived(() => virtualizer.getTotalSize());
|
|
30
|
+
const blockHeight = $.derived(() => typeof height() === "number" ? `${height()}px` : height());
|
|
31
|
+
var div = root_1();
|
|
32
|
+
$.attribute_effect(div, () => ({
|
|
33
|
+
...rest,
|
|
34
|
+
"data-scope": "virtual-list",
|
|
35
|
+
"data-part": "root",
|
|
36
|
+
style: `block-size: ${$.get(blockHeight) ?? ""}`
|
|
37
|
+
}));
|
|
38
|
+
var div_1 = $.child(div);
|
|
39
|
+
$.each(div_1, 21, () => $.get(rows), (row) => row.key, ($$anchor, row) => {
|
|
40
|
+
var div_2 = root();
|
|
41
|
+
var node = $.child(div_2);
|
|
42
|
+
$.snippet(node, () => $$props.renderItem ?? $.noop, () => $$props.items[$.get(row).index], () => $.get(row).index);
|
|
43
|
+
$.reset(div_2);
|
|
44
|
+
$.template_effect(() => $.set_style(div_2, `position: absolute; top: 0; inset-inline-start: 0; inline-size: 100%; transform: translateY(${$.get(row).start ?? ""}px); block-size: ${$.get(row).size ?? ""}px`));
|
|
45
|
+
$.append($$anchor, div_2);
|
|
46
|
+
});
|
|
47
|
+
$.reset(div_1);
|
|
48
|
+
$.reset(div);
|
|
49
|
+
$.bind_this(div, ($$value) => $.set(viewport, $$value), () => $.get(viewport));
|
|
50
|
+
$.template_effect(() => $.set_style(div_1, `block-size: ${$.get(total) ?? ""}px; position: relative`));
|
|
51
|
+
$.append($$anchor, div);
|
|
52
|
+
$.pop();
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/virtual-list/index.ts
|
|
56
|
+
/** A ledger that only mounts the rows on stage. */
|
|
57
|
+
const VirtualList = VirtualList$1;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { VirtualList as t };
|