@bysages/svelte 0.2.3 → 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/README.md +16 -2
- package/dist/{ai-BOUoSSjw.mjs → AiLoader-BEiPYOfW.mjs} +13 -40
- package/dist/{FileUploadRoot-IVcTAZp-.mjs → FileUploadTrigger-BgAcpLXx.mjs} +39 -3
- package/dist/Input-CZhcEeFU.mjs +75 -0
- package/dist/JsonTreeViewTree-CqRP_PwV.mjs +71 -0
- package/dist/{spinner-EpUWE3Hu.mjs → Spinner-DGAzGJ_8.mjs} +7 -9
- package/dist/{StepsRoot-Dg_3-lRb.mjs → StepsRoot-C_FYfShw.mjs} +27 -1
- package/dist/{TabsRoot-BMMO3B77.mjs → TabsRoot-DXd41HqW.mjs} +5 -1
- package/dist/TocIndicator-DPnZxTJ2.mjs +30 -0
- package/dist/TreeViewRoot-RBynRAly.mjs +108 -0
- package/dist/{ai-attachments-Y0Tf6UFL.mjs → ai-attachments-C0YVIKUc.mjs} +6 -2
- package/dist/{ai-prompt-input-BmyKyadu.mjs → ai-prompt-input-vh89e9EX.mjs} +67 -50
- package/dist/{ai-response-D5IkRFMN.mjs → ai-response-BPQPjMlC.mjs} +7 -3
- package/dist/{autocomplete-D7ZZ7Xpb.mjs → autocomplete-Dhuhqp-6.mjs} +10 -7
- package/dist/{avatar-BHYqgq4d.mjs → avatar-LR0CZ1Iz.mjs} +5 -1
- package/dist/{banner-LEPWtGlY.mjs → banner-Bj3FFB-O.mjs} +7 -4
- package/dist/bento-BTvt7gsB.mjs +73 -0
- package/dist/block-ui-CxsMoEoa.mjs +50 -0
- package/dist/{breadcrumb-C01pAq93.mjs → breadcrumb-CtBjVdxv.mjs} +6 -3
- package/dist/browser-gmPTH6mJ.mjs +146 -0
- package/dist/{calendar-0tSnHuLj.mjs → calendar-BMXmRdwJ.mjs} +1 -1
- package/dist/{cascade-select-C-eBcN_4.mjs → cascade-select-CfvWchiN.mjs} +32 -18
- package/dist/{command-fZuTfbz4.mjs → command-CZRC1T-6.mjs} +14 -8
- 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-attachments/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 +2 -2
- 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 +2 -2
- 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/autocomplete/index.mjs +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/banner/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/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.d.mts +9 -0
- package/dist/components/browser/index.mjs +2 -0
- package/dist/components/calendar/index.mjs +1 -1
- package/dist/components/cascade-select/index.mjs +1 -1
- package/dist/components/command/index.mjs +1 -1
- package/dist/components/config-provider/index.d.mts +1 -1
- package/dist/components/config-provider/index.mjs +2 -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/dynamic-input/index.mjs +1 -1
- package/dist/components/file-upload/index.d.mts +3 -2
- package/dist/components/file-upload/index.mjs +3 -2
- package/dist/components/float-button/index.mjs +1 -1
- 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/image/index.d.mts +1 -1
- package/dist/components/image/index.mjs +1 -1
- package/dist/components/image-viewer/index.d.mts +1 -1
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +4 -4
- package/dist/components/json-tree-view/index.mjs +5 -1
- package/dist/components/layout/index.mjs +1 -1
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/menubar/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/split-button/index.mjs +1 -1
- package/dist/components/spotlight/index.d.mts +2 -0
- package/dist/components/spotlight/index.mjs +2 -0
- package/dist/components/steps/index.d.mts +3 -2
- package/dist/components/steps/index.mjs +3 -2
- 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/toc/index.d.mts +4 -1
- package/dist/components/toc/index.mjs +5 -1
- package/dist/components/toolbar/index.d.mts +2 -0
- package/dist/components/toolbar/index.mjs +2 -0
- package/dist/components/transfer/index.mjs +1 -1
- package/dist/components/tree-select/index.mjs +1 -1
- package/dist/components/tree-view/index.d.mts +1 -1
- package/dist/components/tree-view/index.mjs +4 -2
- 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/{config-provider-DW5wVzFr.mjs → config-provider-CZJyd3MX.mjs} +6 -14
- package/dist/context-Da-QMQRq.mjs +14 -0
- package/dist/data-view-BORK23XZ.mjs +179 -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/{dynamic-input-B3IBAoLs.mjs → dynamic-input-D1a-5vy-.mjs} +6 -1
- package/dist/{float-button-CZAda2SI.mjs → float-button-BLIHnw2u.mjs} +3 -1
- package/dist/{form-De-ZwM1P.mjs → form-BTL9S1gn.mjs} +4 -4
- package/dist/{icon-B6_cYYzO.mjs → icon-D7AeDq0M.mjs} +7 -6
- package/dist/{image-1Lgj8xhS.mjs → image-u_H4LtAC.mjs} +4 -0
- package/dist/{image-viewer-Dv3_Iyu8.mjs → image-viewer-DzoEcVSn.mjs} +20 -4
- package/dist/index-0k-VxNRm.d.mts +15 -0
- package/dist/{index-NJ21Q4f4.d.mts → index-BEfqqxjl.d.mts} +11 -1
- package/dist/{index-D6PrX-hf.d.mts → index-BJvo4qep.d.mts} +4 -2
- package/dist/{index-DTAcdUAd.d.mts → index-BkGvErBJ.d.mts} +5 -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-DAesWvpj.d.mts → index-D1tQgtT0.d.mts} +4 -0
- 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-CiHanb4T.d.mts → index-DG4OAuIf.d.mts} +4 -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 +28 -14
- package/dist/index.mjs +45 -30
- package/dist/{layout-WRo4P9-_.mjs → layout-GfxGYYhg.mjs} +7 -4
- package/dist/{list-B23lA_sc.mjs → list-BgEM9H3z.mjs} +2 -1
- package/dist/{menubar-Crrkg2tZ.mjs → menubar-2MPo9w5z.mjs} +1 -0
- package/dist/messages-DNzA55pH.mjs +17 -0
- package/dist/order-list-D3EhH7EX.mjs +129 -0
- package/dist/result-4Oee2ndu.mjs +159 -0
- package/dist/select-8ume4i2e.mjs +99 -0
- package/dist/{split-button-CGjPB9DQ.mjs → split-button-DnmVc_J0.mjs} +5 -3
- package/dist/spotlight-DMC5E1eS.mjs +51 -0
- package/dist/{table-C0AcH5Dw.mjs → table-BsdqRuvj.mjs} +63 -44
- package/dist/terminal-Dgw5JEz4.mjs +80 -0
- package/dist/{timeline-BV4eahUx.mjs → timeline-1yPOTbtY.mjs} +4 -2
- package/dist/toolbar-SNwuRrJr.mjs +68 -0
- package/dist/{transfer-0IAuhFCe.mjs → transfer-C0FLA8W1.mjs} +16 -5
- package/dist/{tree-select-aHymj8Zu.mjs → tree-select-CSYSYZDN.mjs} +72 -71
- package/dist/user-BjJSjDYV.mjs +100 -0
- package/dist/virtual-list-_10ypBUP.mjs +60 -0
- package/package.json +28 -7
- package/dist/Input-Biz4J1B6.mjs +0 -39
- package/dist/TreeViewRoot-ConQj9TX.mjs +0 -37
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
import * as $ from "svelte/internal/client";
|
|
5
|
+
//#region src/components/order-list/OrderList.svelte
|
|
6
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
7
|
+
"$$slots",
|
|
8
|
+
"$$events",
|
|
9
|
+
"$$legacy",
|
|
10
|
+
"value",
|
|
11
|
+
"options",
|
|
12
|
+
"label"
|
|
13
|
+
]);
|
|
14
|
+
var root = $.from_html(`<li draggable="" aria-roledescription="Sortable item" data-scope="order-list" data-part="item"><span data-scope="order-list" data-part="grip" aria-hidden="true">⋮⋮</span> <span data-scope="order-list" data-part="label"> </span> <span data-scope="order-list" data-part="controls"><button type="button" data-scope="order-list" data-part="move"><svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 15-6-6-6 6"></path><path d="M5 4h14"></path></svg></button> <button type="button" data-scope="order-list" data-part="move"><svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 15-6-6-6 6"></path></svg></button> <button type="button" data-scope="order-list" data-part="move"><svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button> <button type="button" data-scope="order-list" data-part="move"><svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path><path d="M5 20h14"></path></svg></button></span></li>`);
|
|
15
|
+
var root_1 = $.from_html(`<div><ol data-scope="order-list" data-part="list"></ol></div>`);
|
|
16
|
+
function OrderList$1($$anchor, $$props) {
|
|
17
|
+
$.push($$props, true);
|
|
18
|
+
injectComponentStyle("order-list");
|
|
19
|
+
let value = $.prop($$props, "value", 31, () => $.proxy([])), rest = $.rest_props($$props, rest_excludes);
|
|
20
|
+
const messages = useComponentMessages();
|
|
21
|
+
let dragging = $.state(null);
|
|
22
|
+
let dropLine = $.state(null);
|
|
23
|
+
const rows = $.derived(() => value().map((entry) => $$props.options.find((option) => option.value === entry)).filter((option) => option != null));
|
|
24
|
+
function move(entry, offset) {
|
|
25
|
+
const next = [...value()];
|
|
26
|
+
const from = next.indexOf(entry);
|
|
27
|
+
const to = Math.max(0, Math.min(next.length - 1, from + offset));
|
|
28
|
+
if (from === to) return;
|
|
29
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
30
|
+
value(next);
|
|
31
|
+
}
|
|
32
|
+
function reset() {
|
|
33
|
+
$.set(dragging, null);
|
|
34
|
+
$.set(dropLine, null);
|
|
35
|
+
}
|
|
36
|
+
function drop() {
|
|
37
|
+
const entry = $.get(dragging);
|
|
38
|
+
if (entry == null) return;
|
|
39
|
+
const seam = $.get(dropLine);
|
|
40
|
+
const from = value().indexOf(entry);
|
|
41
|
+
if (seam && seam.index === from) return reset();
|
|
42
|
+
const next = value().filter((candidate) => candidate !== entry);
|
|
43
|
+
let at = seam ? seam.before ? seam.index : seam.index + 1 : next.length;
|
|
44
|
+
if (from < at) at -= 1;
|
|
45
|
+
next.splice(Math.max(0, Math.min(next.length, at)), 0, entry);
|
|
46
|
+
value(next);
|
|
47
|
+
reset();
|
|
48
|
+
}
|
|
49
|
+
var div = root_1();
|
|
50
|
+
var event_handler = (event) => {
|
|
51
|
+
const host = event.currentTarget;
|
|
52
|
+
if (!event.relatedTarget || !host.contains(event.relatedTarget)) $.set(dropLine, null);
|
|
53
|
+
};
|
|
54
|
+
$.attribute_effect(div, () => ({
|
|
55
|
+
...rest,
|
|
56
|
+
"data-scope": "order-list",
|
|
57
|
+
"data-part": "root",
|
|
58
|
+
ondragleave: event_handler
|
|
59
|
+
}));
|
|
60
|
+
var ol = $.child(div);
|
|
61
|
+
$.each(ol, 23, () => $.get(rows), (option) => option.value, ($$anchor, option, index) => {
|
|
62
|
+
var li = root();
|
|
63
|
+
var span = $.sibling($.child(li), 2);
|
|
64
|
+
var text = $.only_child(span, true);
|
|
65
|
+
var span_1 = $.sibling(span, 2);
|
|
66
|
+
var button = $.child(span_1);
|
|
67
|
+
var button_1 = $.sibling(button, 2);
|
|
68
|
+
var button_2 = $.sibling(button_1, 2);
|
|
69
|
+
var button_3 = $.sibling(button_2, 2);
|
|
70
|
+
$.reset(span_1);
|
|
71
|
+
$.reset(li);
|
|
72
|
+
$.template_effect(($0, $1, $2, $3) => {
|
|
73
|
+
$.set_attribute(li, "data-dragging", $.get(dragging) === $.get(option).value ? "" : void 0);
|
|
74
|
+
$.set_attribute(li, "data-drop-line", $.get(dropLine) && $.get(dropLine).index === $.get(index) ? $.get(dropLine).before ? "top" : "bottom" : void 0);
|
|
75
|
+
$.set_text(text, $.get(option).label);
|
|
76
|
+
$.set_attribute(button, "aria-label", $0);
|
|
77
|
+
button.disabled = $.get(index) === 0;
|
|
78
|
+
$.set_attribute(button_1, "aria-label", $1);
|
|
79
|
+
button_1.disabled = $.get(index) === 0;
|
|
80
|
+
$.set_attribute(button_2, "aria-label", $2);
|
|
81
|
+
button_2.disabled = $.get(index) === $.get(rows).length - 1;
|
|
82
|
+
$.set_attribute(button_3, "aria-label", $3);
|
|
83
|
+
button_3.disabled = $.get(index) === $.get(rows).length - 1;
|
|
84
|
+
}, [
|
|
85
|
+
() => messages().orderList.toTop,
|
|
86
|
+
() => messages().orderList.moveUp,
|
|
87
|
+
() => messages().orderList.moveDown,
|
|
88
|
+
() => messages().orderList.toBottom
|
|
89
|
+
]);
|
|
90
|
+
$.event("dragstart", li, (event) => {
|
|
91
|
+
$.set(dragging, $.get(option).value, true);
|
|
92
|
+
event.dataTransfer?.setData("text/plain", $.get(option).value);
|
|
93
|
+
if (event.dataTransfer) event.dataTransfer.effectAllowed = "move";
|
|
94
|
+
});
|
|
95
|
+
$.event("dragend", li, reset);
|
|
96
|
+
$.event("dragover", li, (event) => {
|
|
97
|
+
event.preventDefault();
|
|
98
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
99
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
100
|
+
const before = event.clientY < rect.top + rect.height / 2;
|
|
101
|
+
$.set(dropLine, $.get(dragging) != null && !($.get(option).value === $.get(dragging) && before) ? {
|
|
102
|
+
index: $.get(index),
|
|
103
|
+
before
|
|
104
|
+
} : null, true);
|
|
105
|
+
});
|
|
106
|
+
$.event("drop", li, (event) => {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
drop();
|
|
109
|
+
});
|
|
110
|
+
$.delegated("click", button, () => move($.get(option).value, -$.get(index)));
|
|
111
|
+
$.delegated("click", button_1, () => move($.get(option).value, -1));
|
|
112
|
+
$.delegated("click", button_2, () => move($.get(option).value, 1));
|
|
113
|
+
$.delegated("click", button_3, () => move($.get(option).value, $.get(rows).length - 1 - $.get(index)));
|
|
114
|
+
$.append($$anchor, li);
|
|
115
|
+
});
|
|
116
|
+
$.reset(ol);
|
|
117
|
+
$.reset(div);
|
|
118
|
+
$.template_effect(() => $.set_attribute(ol, "aria-label", $$props.label));
|
|
119
|
+
$.append($$anchor, div);
|
|
120
|
+
$.pop();
|
|
121
|
+
}
|
|
122
|
+
$.delegate(["click"]);
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/components/order-list/index.ts
|
|
125
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
126
|
+
* arrows; the value is the order. */
|
|
127
|
+
const OrderList = OrderList$1;
|
|
128
|
+
//#endregion
|
|
129
|
+
export { OrderList as t };
|
|
@@ -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,99 @@
|
|
|
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
|
+
"aria-label",
|
|
19
|
+
"aria-labelledby"
|
|
20
|
+
]);
|
|
21
|
+
var root = $.from_html(`<option disabled=""> </option>`);
|
|
22
|
+
var root_1 = $.from_html(`<option> </option>`);
|
|
23
|
+
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>`);
|
|
24
|
+
function NativeSelect$1($$anchor, $$props) {
|
|
25
|
+
$.push($$props, true);
|
|
26
|
+
injectComponentStyle("select");
|
|
27
|
+
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);
|
|
28
|
+
const field = useFieldContext();
|
|
29
|
+
const fieldProps = $.derived(() => field?.()?.getInputProps() ?? {});
|
|
30
|
+
const isInvalid = $.derived(() => invalid() || field?.()?.invalid === true);
|
|
31
|
+
const isDisabled = $.derived(() => disabled() || field?.()?.disabled === true);
|
|
32
|
+
const isEmpty = $.derived(() => value() == null || value() === "");
|
|
33
|
+
var span = root_2();
|
|
34
|
+
$.attribute_effect(span, () => ({
|
|
35
|
+
...rest,
|
|
36
|
+
"data-scope": "select",
|
|
37
|
+
"data-part": "native-root",
|
|
38
|
+
"data-size": size(),
|
|
39
|
+
"data-invalid": $.get(isInvalid) ? "" : void 0,
|
|
40
|
+
"data-disabled": $.get(isDisabled) ? "" : void 0,
|
|
41
|
+
"data-placeholder-shown": $.get(isEmpty) ? "" : void 0
|
|
42
|
+
}));
|
|
43
|
+
var select = $.child(span);
|
|
44
|
+
$.attribute_effect(select, () => ({
|
|
45
|
+
...$.get(fieldProps),
|
|
46
|
+
"aria-label": $$props["aria-label"],
|
|
47
|
+
"aria-labelledby": $$props["aria-labelledby"],
|
|
48
|
+
"data-scope": "select",
|
|
49
|
+
"data-part": "native",
|
|
50
|
+
disabled: $.get(isDisabled) || void 0
|
|
51
|
+
}));
|
|
52
|
+
var node = $.child(select);
|
|
53
|
+
var consequent = ($$anchor) => {
|
|
54
|
+
var option_1 = root();
|
|
55
|
+
var text = $.only_child(option_1, true);
|
|
56
|
+
option_1.value = option_1.__value = "";
|
|
57
|
+
$.template_effect(() => {
|
|
58
|
+
$.set_attribute(option_1, "hidden", $.get(isEmpty) ? void 0 : true);
|
|
59
|
+
$.set_text(text, $$props.placeholder);
|
|
60
|
+
});
|
|
61
|
+
$.append($$anchor, option_1);
|
|
62
|
+
};
|
|
63
|
+
$.if(node, ($$render) => {
|
|
64
|
+
if ($$props.placeholder) $$render(consequent);
|
|
65
|
+
});
|
|
66
|
+
var node_1 = $.sibling(node);
|
|
67
|
+
$.each(node_1, 17, () => $$props.options, (option) => option.value, ($$anchor, option) => {
|
|
68
|
+
var option_2 = root_1();
|
|
69
|
+
var text_1 = $.only_child(option_2, true);
|
|
70
|
+
var option_2_value = {};
|
|
71
|
+
$.template_effect(() => {
|
|
72
|
+
option_2.disabled = $.get(option).disabled;
|
|
73
|
+
$.set_text(text_1, $.get(option).label);
|
|
74
|
+
if (option_2_value !== (option_2_value = $.get(option).value)) option_2.value = (option_2.__value = option_2_value) ?? "";
|
|
75
|
+
});
|
|
76
|
+
$.append($$anchor, option_2);
|
|
77
|
+
});
|
|
78
|
+
$.reset(select);
|
|
79
|
+
$.next(2);
|
|
80
|
+
$.reset(span);
|
|
81
|
+
$.bind_select_value(select, value);
|
|
82
|
+
$.append($$anchor, span);
|
|
83
|
+
$.pop();
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/select/index.ts
|
|
87
|
+
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
|
88
|
+
* whole control and its list dissolves open as a paper vessel, the checked
|
|
89
|
+
* row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
|
|
90
|
+
* Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner,
|
|
91
|
+
* Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
|
|
92
|
+
const Select$1 = {
|
|
93
|
+
...Select,
|
|
94
|
+
Root: SelectRoot
|
|
95
|
+
};
|
|
96
|
+
/** The platform's own list wearing the control recipe. */
|
|
97
|
+
const NativeSelect = NativeSelect$1;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { Select$1 as n, NativeSelect as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as Button } from "./button-BCcX7lHq.mjs";
|
|
2
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import "svelte/internal/disclose-version";
|
|
4
5
|
import * as $ from "svelte/internal/client";
|
|
@@ -25,6 +26,7 @@ function SplitButton$1($$anchor, $$props) {
|
|
|
25
26
|
$.push($$props, true);
|
|
26
27
|
injectComponentStyle("split-button");
|
|
27
28
|
let items = $.prop($$props, "items", 19, () => []), variant = $.prop($$props, "variant", 3, "solid"), tone = $.prop($$props, "tone", 3, "ink"), size = $.prop($$props, "size", 3, "md"), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes);
|
|
29
|
+
const messages = useComponentMessages();
|
|
28
30
|
var div = root_2();
|
|
29
31
|
$.attribute_effect(div, () => ({
|
|
30
32
|
...rest,
|
|
@@ -64,16 +66,16 @@ function SplitButton$1($$anchor, $$props) {
|
|
|
64
66
|
{
|
|
65
67
|
const asChild = ($$anchor, props = $.noop) => {
|
|
66
68
|
var button = root();
|
|
67
|
-
$.attribute_effect(button, ($0) => ({
|
|
69
|
+
$.attribute_effect(button, ($0, $1) => ({
|
|
68
70
|
...$0,
|
|
69
71
|
disabled: disabled(),
|
|
70
|
-
"aria-label":
|
|
72
|
+
"aria-label": $1,
|
|
71
73
|
"data-variant": variant(),
|
|
72
74
|
"data-tone": tone(),
|
|
73
75
|
"data-size": size(),
|
|
74
76
|
"data-square": "true",
|
|
75
77
|
"data-motion": "ink-ripple lit"
|
|
76
|
-
}), [() => props()()]);
|
|
78
|
+
}), [() => props()(), () => messages().more.actions]);
|
|
77
79
|
$.append($$anchor, button);
|
|
78
80
|
};
|
|
79
81
|
$.component(node_2, () => Menu.Trigger, ($$anchor, ArkMenu_Trigger) => {
|
|
@@ -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 };
|