@bysages/svelte 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/dist/{AiLoader-0jlig3fe.mjs → AiLoader-BEiPYOfW.mjs} +11 -6
- package/dist/{FileUploadRoot-IVcTAZp-.mjs → FileUploadTrigger-BgAcpLXx.mjs} +39 -3
- package/dist/JsonTreeViewTree-CqRP_PwV.mjs +71 -0
- package/dist/{Spinner-sd__23WT.mjs → Spinner-DGAzGJ_8.mjs} +6 -3
- package/dist/{StepsRoot-Dg_3-lRb.mjs → StepsRoot-C_FYfShw.mjs} +27 -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/{banner-LEPWtGlY.mjs → banner-Bj3FFB-O.mjs} +7 -4
- package/dist/{block-ui-CpiV9qza.mjs → block-ui-CxsMoEoa.mjs} +1 -1
- package/dist/{breadcrumb-C01pAq93.mjs → breadcrumb-CtBjVdxv.mjs} +6 -3
- package/dist/{calendar-0tSnHuLj.mjs → calendar-BMXmRdwJ.mjs} +1 -1
- package/dist/{cascade-select-B-4Z6oWe.mjs → cascade-select-CfvWchiN.mjs} +26 -12
- package/dist/{command-fZuTfbz4.mjs → command-CZRC1T-6.mjs} +14 -8
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +3 -3
- package/dist/components/ai-attachments/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.mjs +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/autocomplete/index.mjs +1 -1
- package/dist/components/banner/index.mjs +1 -1
- package/dist/components/block-ui/index.mjs +1 -1
- package/dist/components/breadcrumb/index.mjs +1 -1
- 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.mjs +1 -1
- 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/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/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.mjs +1 -1
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/spinner/index.mjs +1 -1
- package/dist/components/split-button/index.mjs +1 -1
- 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/terminal/index.mjs +1 -1
- package/dist/components/toc/index.d.mts +4 -1
- package/dist/components/toc/index.mjs +5 -1
- 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/virtual-list/index.mjs +1 -1
- package/dist/{config-provider-DW5wVzFr.mjs → config-provider-CZJyd3MX.mjs} +6 -14
- package/dist/context-Da-QMQRq.mjs +14 -0
- package/dist/{data-view-B3TY3rYl.mjs → data-view-BORK23XZ.mjs} +32 -20
- 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/{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-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-DAesWvpj.d.mts → index-D1tQgtT0.d.mts} +4 -0
- package/dist/{index-CiHanb4T.d.mts → index-DG4OAuIf.d.mts} +4 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +29 -28
- 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-q7VlsbmU.mjs → order-list-D3EhH7EX.mjs} +15 -6
- package/dist/{select-rkY0qJKI.mjs → select-8ume4i2e.mjs} +5 -1
- package/dist/{split-button-CGjPB9DQ.mjs → split-button-DnmVc_J0.mjs} +5 -3
- package/dist/{table-BnNK4_su.mjs → table-BsdqRuvj.mjs} +63 -44
- package/dist/{terminal-B3b4KzoN.mjs → terminal-Dgw5JEz4.mjs} +5 -3
- package/dist/{transfer-0IAuhFCe.mjs → transfer-C0FLA8W1.mjs} +16 -5
- package/dist/{tree-select-BSf4a_En.mjs → tree-select-CSYSYZDN.mjs} +71 -70
- package/dist/{virtual-list-psKQ_NVr.mjs → virtual-list-_10ypBUP.mjs} +1 -0
- package/package.json +3 -3
- package/dist/TreeViewRoot-ConQj9TX.mjs +0 -37
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import "svelte/internal/disclose-version";
|
|
3
4
|
import * as $ from "svelte/internal/client";
|
|
@@ -6,6 +7,7 @@ var rest_excludes$3 = /* @__PURE__ */ new Set([
|
|
|
6
7
|
"$$slots",
|
|
7
8
|
"$$events",
|
|
8
9
|
"$$legacy",
|
|
10
|
+
"aria-label",
|
|
9
11
|
"children"
|
|
10
12
|
]);
|
|
11
13
|
var root$3 = $.from_html(`<div><!></div>`);
|
|
@@ -13,14 +15,15 @@ function Ai($$anchor, $$props) {
|
|
|
13
15
|
$.push($$props, true);
|
|
14
16
|
injectComponentStyle("ai");
|
|
15
17
|
let rest = $.rest_props($$props, rest_excludes$3);
|
|
18
|
+
const messages = useComponentMessages();
|
|
16
19
|
var div = root$3();
|
|
17
|
-
$.attribute_effect(div, () => ({
|
|
20
|
+
$.attribute_effect(div, ($0) => ({
|
|
18
21
|
...rest,
|
|
19
22
|
role: "log",
|
|
20
|
-
"aria-label":
|
|
23
|
+
"aria-label": $0,
|
|
21
24
|
"data-scope": "ai",
|
|
22
25
|
"data-part": "conversation"
|
|
23
|
-
}));
|
|
26
|
+
}), [() => $$props["aria-label"] ?? messages().ai.conversation]);
|
|
24
27
|
var node = $.child(div);
|
|
25
28
|
$.snippet(node, () => $$props.children ?? $.noop);
|
|
26
29
|
$.reset(div);
|
|
@@ -83,6 +86,7 @@ var rest_excludes = /* @__PURE__ */ new Set([
|
|
|
83
86
|
"$$slots",
|
|
84
87
|
"$$events",
|
|
85
88
|
"$$legacy",
|
|
89
|
+
"aria-label",
|
|
86
90
|
"children"
|
|
87
91
|
]);
|
|
88
92
|
var root = $.from_html(`<span><!></span>`);
|
|
@@ -90,14 +94,15 @@ function AiLoader($$anchor, $$props) {
|
|
|
90
94
|
$.push($$props, true);
|
|
91
95
|
injectComponentStyle("ai");
|
|
92
96
|
let rest = $.rest_props($$props, rest_excludes);
|
|
97
|
+
const messages = useComponentMessages();
|
|
93
98
|
var span = root();
|
|
94
|
-
$.attribute_effect(span, () => ({
|
|
99
|
+
$.attribute_effect(span, ($0) => ({
|
|
95
100
|
...rest,
|
|
96
101
|
role: "status",
|
|
97
|
-
"aria-label":
|
|
102
|
+
"aria-label": $0,
|
|
98
103
|
"data-scope": "ai",
|
|
99
104
|
"data-part": "loader"
|
|
100
|
-
}));
|
|
105
|
+
}), [() => $$props["aria-label"] ?? messages().ai.loading]);
|
|
101
106
|
var node = $.child(span);
|
|
102
107
|
$.snippet(node, () => $$props.children ?? $.noop);
|
|
103
108
|
$.reset(span);
|
|
@@ -3,7 +3,7 @@ import "svelte/internal/disclose-version";
|
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
import { FileUpload } from "@ark-ui/svelte/file-upload";
|
|
5
5
|
//#region src/components/file-upload/FileUploadRoot.svelte
|
|
6
|
-
var rest_excludes = /* @__PURE__ */ new Set([
|
|
6
|
+
var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
7
7
|
"$$slots",
|
|
8
8
|
"$$events",
|
|
9
9
|
"$$legacy",
|
|
@@ -13,7 +13,7 @@ var rest_excludes = /* @__PURE__ */ new Set([
|
|
|
13
13
|
function FileUploadRoot($$anchor, $$props) {
|
|
14
14
|
$.push($$props, true);
|
|
15
15
|
injectComponentStyle("file-upload");
|
|
16
|
-
let size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes);
|
|
16
|
+
let size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes$1);
|
|
17
17
|
var fragment = $.comment();
|
|
18
18
|
var node = $.first_child(fragment);
|
|
19
19
|
$.component(node, () => FileUpload.Root, ($$anchor, ArkFileUpload_Root) => {
|
|
@@ -34,4 +34,40 @@ function FileUploadRoot($$anchor, $$props) {
|
|
|
34
34
|
$.pop();
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
|
-
|
|
37
|
+
//#region src/components/file-upload/FileUploadTrigger.svelte
|
|
38
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
39
|
+
"$$slots",
|
|
40
|
+
"$$events",
|
|
41
|
+
"$$legacy",
|
|
42
|
+
"children"
|
|
43
|
+
]);
|
|
44
|
+
var root = $.from_html(`<span><!></span>`);
|
|
45
|
+
function FileUploadTrigger($$anchor, $$props) {
|
|
46
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
47
|
+
var fragment = $.comment();
|
|
48
|
+
var node = $.first_child(fragment);
|
|
49
|
+
{
|
|
50
|
+
const asChild = ($$anchor, triggerProps = $.noop) => {
|
|
51
|
+
var span = root();
|
|
52
|
+
$.attribute_effect(span, ($0) => ({
|
|
53
|
+
...$0,
|
|
54
|
+
"data-scope": "file-upload",
|
|
55
|
+
"data-part": "trigger",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}), [() => triggerProps()()]);
|
|
58
|
+
var node_1 = $.child(span);
|
|
59
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
60
|
+
$.reset(span);
|
|
61
|
+
$.append($$anchor, span);
|
|
62
|
+
};
|
|
63
|
+
$.component(node, () => FileUpload.Trigger, ($$anchor, ArkFileUpload_Trigger) => {
|
|
64
|
+
ArkFileUpload_Trigger($$anchor, $.spread_props(() => rest, {
|
|
65
|
+
asChild,
|
|
66
|
+
$$slots: { asChild: true }
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
$.append($$anchor, fragment);
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { FileUploadRoot as n, FileUploadTrigger as t };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import "svelte/internal/disclose-version";
|
|
2
|
+
import * as $ from "svelte/internal/client";
|
|
3
|
+
import { JsonTreeView } from "@ark-ui/svelte/json-tree-view";
|
|
4
|
+
import { chevron_right } from "@bysages/icons";
|
|
5
|
+
//#region src/components/json-tree-view/JsonTreeViewTree.svelte
|
|
6
|
+
const defaultArrow = ($$anchor) => {
|
|
7
|
+
var svg = root();
|
|
8
|
+
$.html(svg, () => chevron_right.body, true);
|
|
9
|
+
$.reset(svg);
|
|
10
|
+
$.template_effect(() => $.set_attribute(svg, "viewBox", `0 0 ${chevron_right.width ?? ""} ${chevron_right.height ?? ""}`));
|
|
11
|
+
$.append($$anchor, svg);
|
|
12
|
+
};
|
|
13
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
14
|
+
"$$slots",
|
|
15
|
+
"$$events",
|
|
16
|
+
"$$legacy",
|
|
17
|
+
"arrow",
|
|
18
|
+
"indentGuide",
|
|
19
|
+
"renderValue"
|
|
20
|
+
]);
|
|
21
|
+
var root = $.from_svg(`<svg aria-hidden="true"></svg>`);
|
|
22
|
+
function JsonTreeViewTree($$anchor, $$props) {
|
|
23
|
+
$.push($$props, true);
|
|
24
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
25
|
+
var fragment = $.comment();
|
|
26
|
+
var node = $.first_child(fragment);
|
|
27
|
+
var consequent = ($$anchor) => {
|
|
28
|
+
var fragment_1 = $.comment();
|
|
29
|
+
var node_1 = $.first_child(fragment_1);
|
|
30
|
+
$.component(node_1, () => JsonTreeView.Tree, ($$anchor, ArkJsonTreeView_Tree) => {
|
|
31
|
+
ArkJsonTreeView_Tree($$anchor, $.spread_props(() => rest, {
|
|
32
|
+
get arrow() {
|
|
33
|
+
return $$props.arrow;
|
|
34
|
+
},
|
|
35
|
+
get indentGuide() {
|
|
36
|
+
return $$props.indentGuide;
|
|
37
|
+
},
|
|
38
|
+
get renderValue() {
|
|
39
|
+
return $$props.renderValue;
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
});
|
|
43
|
+
$.append($$anchor, fragment_1);
|
|
44
|
+
};
|
|
45
|
+
var alternate = ($$anchor) => {
|
|
46
|
+
var fragment_2 = $.comment();
|
|
47
|
+
var node_2 = $.first_child(fragment_2);
|
|
48
|
+
$.component(node_2, () => JsonTreeView.Tree, ($$anchor, ArkJsonTreeView_Tree_1) => {
|
|
49
|
+
ArkJsonTreeView_Tree_1($$anchor, $.spread_props(() => rest, {
|
|
50
|
+
get indentGuide() {
|
|
51
|
+
return $$props.indentGuide;
|
|
52
|
+
},
|
|
53
|
+
get renderValue() {
|
|
54
|
+
return $$props.renderValue;
|
|
55
|
+
},
|
|
56
|
+
get arrow() {
|
|
57
|
+
return defaultArrow;
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
$.append($$anchor, fragment_2);
|
|
62
|
+
};
|
|
63
|
+
$.if(node, ($$render) => {
|
|
64
|
+
if ($$props.arrow) $$render(consequent);
|
|
65
|
+
else $$render(alternate, -1);
|
|
66
|
+
});
|
|
67
|
+
$.append($$anchor, fragment);
|
|
68
|
+
$.pop();
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { JsonTreeViewTree as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import "svelte/internal/disclose-version";
|
|
3
4
|
import * as $ from "svelte/internal/client";
|
|
@@ -7,6 +8,7 @@ var rest_excludes = /* @__PURE__ */ new Set([
|
|
|
7
8
|
"$$events",
|
|
8
9
|
"$$legacy",
|
|
9
10
|
"size",
|
|
11
|
+
"aria-label",
|
|
10
12
|
"children"
|
|
11
13
|
]);
|
|
12
14
|
var root = $.from_html(`<span><svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-opacity="0.2" stroke-width="2.5"></circle><path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"></path></svg> <!></span>`);
|
|
@@ -14,15 +16,16 @@ function Spinner($$anchor, $$props) {
|
|
|
14
16
|
$.push($$props, true);
|
|
15
17
|
injectComponentStyle("spinner");
|
|
16
18
|
let size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes);
|
|
19
|
+
const messages = useComponentMessages();
|
|
17
20
|
var span = root();
|
|
18
|
-
$.attribute_effect(span, () => ({
|
|
21
|
+
$.attribute_effect(span, ($0) => ({
|
|
19
22
|
...rest,
|
|
20
23
|
role: "status",
|
|
21
|
-
"aria-label":
|
|
24
|
+
"aria-label": $0,
|
|
22
25
|
"data-scope": "spinner",
|
|
23
26
|
"data-part": "root",
|
|
24
27
|
"data-size": size()
|
|
25
|
-
}));
|
|
28
|
+
}), [() => $$props["aria-label"] ?? messages().spinner.loading]);
|
|
26
29
|
var node = $.sibling($.child(span), 2);
|
|
27
30
|
$.snippet(node, () => $$props.children ?? $.noop);
|
|
28
31
|
$.reset(span);
|
|
@@ -2,6 +2,32 @@ import { injectComponentStyle } from "@bysages/core";
|
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
import { Steps } from "@ark-ui/svelte/steps";
|
|
5
|
+
//#region src/components/steps/StepsItem.svelte
|
|
6
|
+
var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
7
|
+
"$$slots",
|
|
8
|
+
"$$events",
|
|
9
|
+
"$$legacy",
|
|
10
|
+
"children"
|
|
11
|
+
]);
|
|
12
|
+
function StepsItem($$anchor, $$props) {
|
|
13
|
+
let rest = $.rest_props($$props, rest_excludes$1);
|
|
14
|
+
var fragment = $.comment();
|
|
15
|
+
var node = $.first_child(fragment);
|
|
16
|
+
$.component(node, () => Steps.Item, ($$anchor, ArkSteps_Item) => {
|
|
17
|
+
ArkSteps_Item($$anchor, $.spread_props(() => rest, {
|
|
18
|
+
role: "presentation",
|
|
19
|
+
children: ($$anchor, $$slotProps) => {
|
|
20
|
+
var fragment_1 = $.comment();
|
|
21
|
+
var node_1 = $.first_child(fragment_1);
|
|
22
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
23
|
+
$.append($$anchor, fragment_1);
|
|
24
|
+
},
|
|
25
|
+
$$slots: { default: true }
|
|
26
|
+
}));
|
|
27
|
+
});
|
|
28
|
+
$.append($$anchor, fragment);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
5
31
|
//#region src/components/steps/StepsRoot.svelte
|
|
6
32
|
var rest_excludes = /* @__PURE__ */ new Set([
|
|
7
33
|
"$$slots",
|
|
@@ -34,4 +60,4 @@ function StepsRoot($$anchor, $$props) {
|
|
|
34
60
|
$.pop();
|
|
35
61
|
}
|
|
36
62
|
//#endregion
|
|
37
|
-
export { StepsRoot as t };
|
|
63
|
+
export { StepsItem as n, StepsRoot as t };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "svelte/internal/disclose-version";
|
|
2
|
+
import * as $ from "svelte/internal/client";
|
|
3
|
+
import { Toc } from "@ark-ui/svelte/toc";
|
|
4
|
+
//#region src/components/toc/TocIndicator.svelte
|
|
5
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
6
|
+
"$$slots",
|
|
7
|
+
"$$events",
|
|
8
|
+
"$$legacy",
|
|
9
|
+
"children"
|
|
10
|
+
]);
|
|
11
|
+
function TocIndicator($$anchor, $$props) {
|
|
12
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
13
|
+
var fragment = $.comment();
|
|
14
|
+
var node = $.first_child(fragment);
|
|
15
|
+
$.component(node, () => Toc.Indicator, ($$anchor, ArkToc_Indicator) => {
|
|
16
|
+
ArkToc_Indicator($$anchor, $.spread_props(() => rest, {
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
children: ($$anchor, $$slotProps) => {
|
|
19
|
+
var fragment_1 = $.comment();
|
|
20
|
+
var node_1 = $.first_child(fragment_1);
|
|
21
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
22
|
+
$.append($$anchor, fragment_1);
|
|
23
|
+
},
|
|
24
|
+
$$slots: { default: true }
|
|
25
|
+
}));
|
|
26
|
+
});
|
|
27
|
+
$.append($$anchor, fragment);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { TocIndicator as t };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
import { chevron_right } from "@bysages/icons";
|
|
5
|
+
import { TreeView } from "@ark-ui/svelte/tree-view";
|
|
6
|
+
//#region src/components/tree-view/TreeViewBranchIndicator.svelte
|
|
7
|
+
var rest_excludes$2 = /* @__PURE__ */ new Set([
|
|
8
|
+
"$$slots",
|
|
9
|
+
"$$events",
|
|
10
|
+
"$$legacy",
|
|
11
|
+
"children"
|
|
12
|
+
]);
|
|
13
|
+
var root = $.from_svg(`<svg aria-hidden="true"></svg>`);
|
|
14
|
+
function TreeViewBranchIndicator($$anchor, $$props) {
|
|
15
|
+
$.push($$props, true);
|
|
16
|
+
let rest = $.rest_props($$props, rest_excludes$2);
|
|
17
|
+
var fragment = $.comment();
|
|
18
|
+
var node = $.first_child(fragment);
|
|
19
|
+
$.component(node, () => TreeView.BranchIndicator, ($$anchor, ArkTreeView_BranchIndicator) => {
|
|
20
|
+
ArkTreeView_BranchIndicator($$anchor, $.spread_props(() => rest, {
|
|
21
|
+
children: ($$anchor, $$slotProps) => {
|
|
22
|
+
var fragment_1 = $.comment();
|
|
23
|
+
var node_1 = $.first_child(fragment_1);
|
|
24
|
+
var consequent = ($$anchor) => {
|
|
25
|
+
var fragment_2 = $.comment();
|
|
26
|
+
var node_2 = $.first_child(fragment_2);
|
|
27
|
+
$.snippet(node_2, () => $$props.children);
|
|
28
|
+
$.append($$anchor, fragment_2);
|
|
29
|
+
};
|
|
30
|
+
var alternate = ($$anchor) => {
|
|
31
|
+
var svg = root();
|
|
32
|
+
$.html(svg, () => chevron_right.body, true);
|
|
33
|
+
$.reset(svg);
|
|
34
|
+
$.template_effect(() => $.set_attribute(svg, "viewBox", `0 0 ${chevron_right.width ?? ""} ${chevron_right.height ?? ""}`));
|
|
35
|
+
$.append($$anchor, svg);
|
|
36
|
+
};
|
|
37
|
+
$.if(node_1, ($$render) => {
|
|
38
|
+
if ($$props.children) $$render(consequent);
|
|
39
|
+
else $$render(alternate, -1);
|
|
40
|
+
});
|
|
41
|
+
$.append($$anchor, fragment_1);
|
|
42
|
+
},
|
|
43
|
+
$$slots: { default: true }
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
46
|
+
$.append($$anchor, fragment);
|
|
47
|
+
$.pop();
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/tree-view/TreeViewNodeCheckbox.svelte
|
|
51
|
+
var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
52
|
+
"$$slots",
|
|
53
|
+
"$$events",
|
|
54
|
+
"$$legacy",
|
|
55
|
+
"children"
|
|
56
|
+
]);
|
|
57
|
+
function TreeViewNodeCheckbox($$anchor, $$props) {
|
|
58
|
+
let rest = $.rest_props($$props, rest_excludes$1);
|
|
59
|
+
var fragment = $.comment();
|
|
60
|
+
var node = $.first_child(fragment);
|
|
61
|
+
$.component(node, () => TreeView.NodeCheckbox, ($$anchor, ArkTreeView_NodeCheckbox) => {
|
|
62
|
+
ArkTreeView_NodeCheckbox($$anchor, $.spread_props(() => rest, {
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
children: ($$anchor, $$slotProps) => {
|
|
65
|
+
var fragment_1 = $.comment();
|
|
66
|
+
var node_1 = $.first_child(fragment_1);
|
|
67
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
68
|
+
$.append($$anchor, fragment_1);
|
|
69
|
+
},
|
|
70
|
+
$$slots: { default: true }
|
|
71
|
+
}));
|
|
72
|
+
});
|
|
73
|
+
$.append($$anchor, fragment);
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/tree-view/TreeViewRoot.svelte
|
|
77
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
78
|
+
"$$slots",
|
|
79
|
+
"$$events",
|
|
80
|
+
"$$legacy",
|
|
81
|
+
"size",
|
|
82
|
+
"children"
|
|
83
|
+
]);
|
|
84
|
+
function TreeViewRoot($$anchor, $$props) {
|
|
85
|
+
$.push($$props, true);
|
|
86
|
+
injectComponentStyle("tree-view");
|
|
87
|
+
let size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes);
|
|
88
|
+
var fragment = $.comment();
|
|
89
|
+
var node = $.first_child(fragment);
|
|
90
|
+
$.component(node, () => TreeView.Root, ($$anchor, ArkTreeView_Root) => {
|
|
91
|
+
ArkTreeView_Root($$anchor, $.spread_props(() => rest, {
|
|
92
|
+
get "data-size"() {
|
|
93
|
+
return size();
|
|
94
|
+
},
|
|
95
|
+
children: ($$anchor, $$slotProps) => {
|
|
96
|
+
var fragment_1 = $.comment();
|
|
97
|
+
var node_1 = $.first_child(fragment_1);
|
|
98
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
99
|
+
$.append($$anchor, fragment_1);
|
|
100
|
+
},
|
|
101
|
+
$$slots: { default: true }
|
|
102
|
+
}));
|
|
103
|
+
});
|
|
104
|
+
$.append($$anchor, fragment);
|
|
105
|
+
$.pop();
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { TreeViewNodeCheckbox as n, TreeViewBranchIndicator as r, TreeViewRoot as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages, t as formatMessage } from "./messages-DNzA55pH.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import "svelte/internal/disclose-version";
|
|
3
4
|
import * as $ from "svelte/internal/client";
|
|
@@ -9,7 +10,8 @@ var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
|
9
10
|
"name",
|
|
10
11
|
"size",
|
|
11
12
|
"status",
|
|
12
|
-
"onRemove"
|
|
13
|
+
"onRemove",
|
|
14
|
+
"aria-label"
|
|
13
15
|
]);
|
|
14
16
|
var root$1 = $.from_svg(`<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><rect x="2.5" y="3.5" width="11" height="9"></rect><path d="M2.5 10.5 6 7l3 3 2-1.5 2.5 2"></path><circle cx="6" cy="6" r="0.75" fill="currentColor" stroke="none"></circle></svg>`);
|
|
15
17
|
var root_1 = $.from_svg(`<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><path d="M4 2.5h5l3 3V13.5H4z"></path><path d="M9 2.5v3h3"></path></svg>`);
|
|
@@ -46,6 +48,8 @@ function Attachment$1($$anchor, $$props) {
|
|
|
46
48
|
return `${value.toFixed(1)} ${units[unit]}`;
|
|
47
49
|
};
|
|
48
50
|
let status = $.prop($$props, "status", 3, "ready"), rest = $.rest_props($$props, rest_excludes$1);
|
|
51
|
+
const messages = useComponentMessages();
|
|
52
|
+
const removeLabel = $.derived(() => $$props["aria-label"] ?? formatMessage(messages().ai.removeAttachment, { name: $$props.name }));
|
|
49
53
|
var span = root_3();
|
|
50
54
|
$.attribute_effect(span, () => ({
|
|
51
55
|
...rest,
|
|
@@ -83,7 +87,7 @@ function Attachment$1($$anchor, $$props) {
|
|
|
83
87
|
$.reset(span);
|
|
84
88
|
$.template_effect(() => {
|
|
85
89
|
$.set_text(text, $$props.name);
|
|
86
|
-
$.set_attribute(button, "aria-label",
|
|
90
|
+
$.set_attribute(button, "aria-label", $.get(removeLabel));
|
|
87
91
|
});
|
|
88
92
|
$.delegated("click", button, () => $$props.onRemove?.());
|
|
89
93
|
$.append($$anchor, span);
|
|
@@ -2,6 +2,7 @@ import { t as Button } from "./button-BCcX7lHq.mjs";
|
|
|
2
2
|
import { Field } from "./components/field/index.mjs";
|
|
3
3
|
import { n as MentionsVessel } from "./mentions-DjhgNRmY.mjs";
|
|
4
4
|
import { t as useMentions } from "./use-mentions-DeF_38di.mjs";
|
|
5
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
5
6
|
import { injectComponentStyle } from "@bysages/core";
|
|
6
7
|
import "svelte/internal/disclose-version";
|
|
7
8
|
import * as $ from "svelte/internal/client";
|
|
@@ -37,35 +38,43 @@ function AiPromptInput$1($$anchor, $$props) {
|
|
|
37
38
|
var fragment = $.comment();
|
|
38
39
|
var node = $.first_child(fragment);
|
|
39
40
|
var consequent = ($$anchor) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
{
|
|
42
|
+
let $0 = $.derived(() => messages().ai.stop);
|
|
43
|
+
Button($$anchor, {
|
|
44
|
+
variant: "solid",
|
|
45
|
+
size: "sm",
|
|
46
|
+
square: true,
|
|
47
|
+
type: "button",
|
|
48
|
+
get "aria-label"() {
|
|
49
|
+
return $.get($0);
|
|
50
|
+
},
|
|
51
|
+
get disabled() {
|
|
52
|
+
return disabled();
|
|
53
|
+
},
|
|
54
|
+
onclick: () => $$props.onStop?.(),
|
|
55
|
+
children: ($$anchor, $$slotProps) => {
|
|
56
|
+
var svg = root();
|
|
57
|
+
$.append($$anchor, svg);
|
|
58
|
+
},
|
|
59
|
+
$$slots: { default: true }
|
|
60
|
+
});
|
|
61
|
+
}
|
|
56
62
|
};
|
|
57
63
|
var alternate = ($$anchor) => {
|
|
58
64
|
{
|
|
59
|
-
let $0 = $.derived(() =>
|
|
65
|
+
let $0 = $.derived(() => messages().ai.send);
|
|
66
|
+
let $1 = $.derived(() => disabled() || !value().trim());
|
|
60
67
|
Button($$anchor, {
|
|
61
68
|
variant: "solid",
|
|
62
69
|
size: "sm",
|
|
63
70
|
square: true,
|
|
64
71
|
type: "submit",
|
|
65
|
-
"aria-label"
|
|
66
|
-
get disabled() {
|
|
72
|
+
get "aria-label"() {
|
|
67
73
|
return $.get($0);
|
|
68
74
|
},
|
|
75
|
+
get disabled() {
|
|
76
|
+
return $.get($1);
|
|
77
|
+
},
|
|
69
78
|
children: ($$anchor, $$slotProps) => {
|
|
70
79
|
var svg_1 = root_1();
|
|
71
80
|
$.append($$anchor, svg_1);
|
|
@@ -81,8 +90,10 @@ function AiPromptInput$1($$anchor, $$props) {
|
|
|
81
90
|
$.append($$anchor, fragment);
|
|
82
91
|
};
|
|
83
92
|
injectComponentStyle("ai");
|
|
84
|
-
let value = $.prop($$props, "value", 15, ""),
|
|
93
|
+
let value = $.prop($$props, "value", 15, ""), disabled = $.prop($$props, "disabled", 3, false), busy = $.prop($$props, "busy", 3, false), rest = $.rest_props($$props, rest_excludes);
|
|
85
94
|
let textareaEl = $.state(null);
|
|
95
|
+
const messages = useComponentMessages();
|
|
96
|
+
const placeholderText = $.derived(() => $$props.placeholder ?? messages().ai.send);
|
|
86
97
|
const mentionState = useMentions(() => ({
|
|
87
98
|
items: $$props.mentions?.items ?? [],
|
|
88
99
|
trigger: $$props.mentions?.trigger
|
|
@@ -142,38 +153,44 @@ function AiPromptInput$1($$anchor, $$props) {
|
|
|
142
153
|
children: ($$anchor, $$slotProps) => {
|
|
143
154
|
var fragment_3 = $.comment();
|
|
144
155
|
var node_6 = $.first_child(fragment_3);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
{
|
|
157
|
+
let $0 = $.derived(() => messages().ai.conversation);
|
|
158
|
+
$.component(node_6, () => Field.Textarea, ($$anchor, Field_Textarea) => {
|
|
159
|
+
Field_Textarea($$anchor, {
|
|
160
|
+
autoresize: true,
|
|
161
|
+
rows: 1,
|
|
162
|
+
get placeholderText() {
|
|
163
|
+
return $.get(placeholderText);
|
|
164
|
+
},
|
|
165
|
+
get "aria-label"() {
|
|
166
|
+
return $.get($0);
|
|
167
|
+
},
|
|
168
|
+
get disabled() {
|
|
169
|
+
return disabled();
|
|
170
|
+
},
|
|
171
|
+
oninput: () => mentionState.onInput(),
|
|
172
|
+
onkeydown: (event) => {
|
|
173
|
+
if (mentionState.onKeydown(event)) return;
|
|
174
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
send();
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
get ref() {
|
|
180
|
+
return $.get(textareaEl);
|
|
181
|
+
},
|
|
182
|
+
set ref($$value) {
|
|
183
|
+
$.set(textareaEl, $$value, true);
|
|
184
|
+
},
|
|
185
|
+
get value() {
|
|
186
|
+
return value();
|
|
187
|
+
},
|
|
188
|
+
set value($$value) {
|
|
189
|
+
value($$value);
|
|
161
190
|
}
|
|
162
|
-
}
|
|
163
|
-
get ref() {
|
|
164
|
-
return $.get(textareaEl);
|
|
165
|
-
},
|
|
166
|
-
set ref($$value) {
|
|
167
|
-
$.set(textareaEl, $$value, true);
|
|
168
|
-
},
|
|
169
|
-
get value() {
|
|
170
|
-
return value();
|
|
171
|
-
},
|
|
172
|
-
set value($$value) {
|
|
173
|
-
value($$value);
|
|
174
|
-
}
|
|
191
|
+
});
|
|
175
192
|
});
|
|
176
|
-
}
|
|
193
|
+
}
|
|
177
194
|
$.append($$anchor, fragment_3);
|
|
178
195
|
},
|
|
179
196
|
$$slots: { default: true }
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import "svelte/internal/disclose-version";
|
|
3
4
|
import * as $ from "svelte/internal/client";
|
|
@@ -113,16 +114,19 @@ var root_1 = $.from_html(`<div></div>`);
|
|
|
113
114
|
function AiResponse$1($$anchor, $$props) {
|
|
114
115
|
$.push($$props, true);
|
|
115
116
|
injectComponentStyle("ai");
|
|
116
|
-
let
|
|
117
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
118
|
+
const messages = useComponentMessages();
|
|
117
119
|
const html = $.derived(() => renderHtml($$props.content, $$props.highlighter ? { highlighter: $$props.highlighter } : void 0));
|
|
120
|
+
const copyText = $.derived(() => $$props.copyLabel ?? messages().ai.copyCode);
|
|
121
|
+
const copiedText = $.derived(() => $$props.copiedLabel ?? messages().ai.copied);
|
|
118
122
|
let root;
|
|
119
123
|
$.user_effect(() => {
|
|
120
124
|
$.get(html);
|
|
121
|
-
if (root) decorateCodeCopy(root,
|
|
125
|
+
if (root) decorateCodeCopy(root, $.get(copyText));
|
|
122
126
|
if (root) wrapResponseTables(root);
|
|
123
127
|
});
|
|
124
128
|
const handleClick = (event) => {
|
|
125
|
-
clickCodeCopy(event,
|
|
129
|
+
clickCodeCopy(event, $.get(copyText), $.get(copiedText));
|
|
126
130
|
$$props.onclick?.(event);
|
|
127
131
|
};
|
|
128
132
|
var div = root_1();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "./messages-DNzA55pH.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import "svelte/internal/disclose-version";
|
|
3
4
|
import * as $ from "svelte/internal/client";
|
|
@@ -20,6 +21,7 @@ function AutoComplete$1($$anchor, $$props) {
|
|
|
20
21
|
$.push($$props, true);
|
|
21
22
|
injectComponentStyle("combobox");
|
|
22
23
|
let value = $.prop($$props, "value", 15, ""), items = $.prop($$props, "items", 19, () => []), size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes);
|
|
24
|
+
const messages = useComponentMessages();
|
|
23
25
|
const { collection, filter: filterItems } = useListCollection({
|
|
24
26
|
initialItems: items(),
|
|
25
27
|
filter: (item, input) => $$props.filter ? $$props.filter(item, input) : item.toLowerCase().includes(input.toLowerCase())
|
|
@@ -85,7 +87,8 @@ function AutoComplete$1($$anchor, $$props) {
|
|
|
85
87
|
ArkCombobox_Empty($$anchor, {
|
|
86
88
|
children: ($$anchor, $$slotProps) => {
|
|
87
89
|
$.next();
|
|
88
|
-
var text = $.text(
|
|
90
|
+
var text = $.text();
|
|
91
|
+
$.template_effect(($0) => $.set_text(text, $0), [() => messages().command.noMatches]);
|
|
89
92
|
$.append($$anchor, text);
|
|
90
93
|
},
|
|
91
94
|
$$slots: { default: true }
|
|
@@ -93,16 +96,16 @@ function AutoComplete$1($$anchor, $$props) {
|
|
|
93
96
|
});
|
|
94
97
|
var node_7 = $.sibling(node_6, 2);
|
|
95
98
|
$.each(node_7, 16, () => collection().items, (item) => item, ($$anchor, item) => {
|
|
96
|
-
var
|
|
97
|
-
var node_8 = $.first_child(
|
|
99
|
+
var fragment_7 = $.comment();
|
|
100
|
+
var node_8 = $.first_child(fragment_7);
|
|
98
101
|
$.component(node_8, () => Combobox.Item, ($$anchor, ArkCombobox_Item) => {
|
|
99
102
|
ArkCombobox_Item($$anchor, {
|
|
100
103
|
get item() {
|
|
101
104
|
return item;
|
|
102
105
|
},
|
|
103
106
|
children: ($$anchor, $$slotProps) => {
|
|
104
|
-
var
|
|
105
|
-
var node_9 = $.first_child(
|
|
107
|
+
var fragment_8 = $.comment();
|
|
108
|
+
var node_9 = $.first_child(fragment_8);
|
|
106
109
|
$.component(node_9, () => Combobox.ItemText, ($$anchor, ArkCombobox_ItemText) => {
|
|
107
110
|
ArkCombobox_ItemText($$anchor, {
|
|
108
111
|
children: ($$anchor, $$slotProps) => {
|
|
@@ -114,12 +117,12 @@ function AutoComplete$1($$anchor, $$props) {
|
|
|
114
117
|
$$slots: { default: true }
|
|
115
118
|
});
|
|
116
119
|
});
|
|
117
|
-
$.append($$anchor,
|
|
120
|
+
$.append($$anchor, fragment_8);
|
|
118
121
|
},
|
|
119
122
|
$$slots: { default: true }
|
|
120
123
|
});
|
|
121
124
|
});
|
|
122
|
-
$.append($$anchor,
|
|
125
|
+
$.append($$anchor, fragment_7);
|
|
123
126
|
});
|
|
124
127
|
$.append($$anchor, fragment_5);
|
|
125
128
|
},
|