@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
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
//#region src/components/select/index.d.ts
|
|
4
|
-
export declare const Select: Omit<typeof Select$1, "Root"> & {
|
|
5
|
-
Root: typeof SelectRoot;
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
1
|
+
import { i as NativeSelectProps, n as Select, r as NativeSelectOption, t as NativeSelect } from "../../index-D6eYSdmD.mjs";
|
|
2
|
+
export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select };
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
//#region src/components/select/index.ts
|
|
4
|
-
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
|
5
|
-
* whole control and its list dissolves open as a paper vessel, the checked
|
|
6
|
-
* row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
|
|
7
|
-
* Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner,
|
|
8
|
-
* Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
|
|
9
|
-
const Select = {
|
|
10
|
-
...Select$1,
|
|
11
|
-
Root: SelectRoot
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { Select };
|
|
1
|
+
import { n as Select, t as NativeSelect } from "../../select-8ume4i2e.mjs";
|
|
2
|
+
export { NativeSelect, Select };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import { t as Spinner } from "../../
|
|
1
|
+
import { t as Spinner$1 } from "../../Spinner-DGAzGJ_8.mjs";
|
|
2
|
+
//#region src/components/spinner/index.ts
|
|
3
|
+
/** A wheel of waiting: one arc of ink turning about its center. Quiet by
|
|
4
|
+
* default — it reports progress without claiming attention. */
|
|
5
|
+
const Spinner = Spinner$1;
|
|
6
|
+
//#endregion
|
|
2
7
|
export { Spinner };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SplitButton } from "../../split-button-
|
|
1
|
+
import { t as SplitButton } from "../../split-button-DnmVc_J0.mjs";
|
|
2
2
|
export { SplitButton };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as StepsRoot } from "../../StepsRoot-
|
|
1
|
+
import { n as StepsItem, t as StepsRoot } from "../../StepsRoot-C_FYfShw.mjs";
|
|
2
2
|
import { Steps as Steps$1 } from "@ark-ui/svelte/steps";
|
|
3
3
|
//#region src/components/steps/index.d.ts
|
|
4
|
-
export declare const Steps: Omit<typeof Steps$1, "Root"> & {
|
|
4
|
+
export declare const Steps: Omit<typeof Steps$1, "Root" | "Item"> & {
|
|
5
5
|
Root: typeof StepsRoot;
|
|
6
|
+
Item: typeof StepsItem;
|
|
6
7
|
};
|
|
7
8
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as StepsRoot } from "../../StepsRoot-
|
|
1
|
+
import { n as StepsItem, t as StepsRoot } from "../../StepsRoot-C_FYfShw.mjs";
|
|
2
2
|
import { Steps as Steps$1 } from "@ark-ui/svelte/steps";
|
|
3
3
|
//#region src/components/steps/index.ts
|
|
4
4
|
/**
|
|
@@ -10,7 +10,8 @@ import { Steps as Steps$1 } from "@ark-ui/svelte/steps";
|
|
|
10
10
|
*/
|
|
11
11
|
const Steps = {
|
|
12
12
|
...Steps$1,
|
|
13
|
-
Root: StepsRoot
|
|
13
|
+
Root: StepsRoot,
|
|
14
|
+
Item: StepsItem
|
|
14
15
|
};
|
|
15
16
|
//#endregion
|
|
16
17
|
export { Steps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FlexRender, r as createColumnHelper, t as DataTable } from "../../table-
|
|
1
|
+
import { n as FlexRender, r as createColumnHelper, t as DataTable } from "../../table-BsdqRuvj.mjs";
|
|
2
2
|
export { DataTable, FlexRender, createColumnHelper };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as TabsRoot } from "../../TabsRoot-
|
|
1
|
+
import { t as TabsRoot } from "../../TabsRoot-DXd41HqW.mjs";
|
|
2
2
|
import { Tabs as Tabs$1 } from "@ark-ui/svelte/tabs";
|
|
3
3
|
//#region src/components/tabs/index.d.ts
|
|
4
4
|
export declare const Tabs: Omit<typeof Tabs$1, "Root"> & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TimelineProps, i as TimelineMarkerProps, n as TimelineContentProps, r as TimelineItemProps, t as Timeline } from "../../index-
|
|
1
|
+
import { a as TimelineProps, i as TimelineMarkerProps, n as TimelineContentProps, r as TimelineItemProps, t as Timeline } from "../../index-BoR_54C_.mjs";
|
|
2
2
|
export { Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Timeline } from "../../timeline-
|
|
1
|
+
import { t as Timeline } from "../../timeline-1yPOTbtY.mjs";
|
|
2
2
|
export { Timeline };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { t as TocIndicator } from "../../TocIndicator-DPnZxTJ2.mjs";
|
|
1
2
|
import { Toc as Toc$1 } from "@ark-ui/svelte/toc";
|
|
2
3
|
//#region src/components/toc/index.d.ts
|
|
3
4
|
/** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
|
|
4
5
|
* beside the scroll, one stroke of primary ink marking where the reader
|
|
5
6
|
* stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
|
|
6
|
-
export declare const Toc: typeof Toc$1
|
|
7
|
+
export declare const Toc: Omit<typeof Toc$1, "Indicator"> & {
|
|
8
|
+
Indicator: typeof TocIndicator;
|
|
9
|
+
};
|
|
7
10
|
//#endregion
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { t as TocIndicator } from "../../TocIndicator-DPnZxTJ2.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { Toc as Toc$1 } from "@ark-ui/svelte/toc";
|
|
3
4
|
//#region src/components/toc/index.ts
|
|
4
5
|
/** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
|
|
5
6
|
* beside the scroll, one stroke of primary ink marking where the reader
|
|
6
7
|
* stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
|
|
7
|
-
const Toc =
|
|
8
|
+
const Toc = {
|
|
9
|
+
...Toc$1,
|
|
10
|
+
Indicator: TocIndicator
|
|
11
|
+
};
|
|
8
12
|
injectComponentStyle("toc");
|
|
9
13
|
//#endregion
|
|
10
14
|
export { Toc };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Transfer } from "../../transfer-
|
|
1
|
+
import { t as Transfer } from "../../transfer-C0FLA8W1.mjs";
|
|
2
2
|
export { Transfer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TreeSelect } from "../../tree-select-
|
|
1
|
+
import { t as TreeSelect } from "../../tree-select-CSYSYZDN.mjs";
|
|
2
2
|
export { TreeSelect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TreeViewRootProps, t as TreeView } from "../../index-
|
|
1
|
+
import { n as TreeViewRootProps, t as TreeView } from "../../index-BJvo4qep.mjs";
|
|
2
2
|
export { TreeView, type TreeViewRootProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as TreeViewRoot } from "../../TreeViewRoot-
|
|
1
|
+
import { n as TreeViewNodeCheckbox, r as TreeViewBranchIndicator, t as TreeViewRoot } from "../../TreeViewRoot-RBynRAly.mjs";
|
|
2
2
|
import { TreeView as TreeView$1 } from "@ark-ui/svelte/tree-view";
|
|
3
3
|
//#region src/components/tree-view/index.ts
|
|
4
4
|
/** Ark's TreeView, dressed in the paper-and-ink system: quiet rows where
|
|
@@ -10,7 +10,9 @@ import { TreeView as TreeView$1 } from "@ark-ui/svelte/tree-view";
|
|
|
10
10
|
* NodeRenameInput, plus createTreeCollection. */
|
|
11
11
|
const TreeView = {
|
|
12
12
|
...TreeView$1,
|
|
13
|
-
Root: TreeViewRoot
|
|
13
|
+
Root: TreeViewRoot,
|
|
14
|
+
NodeCheckbox: TreeViewNodeCheckbox,
|
|
15
|
+
BranchIndicator: TreeViewBranchIndicator
|
|
14
16
|
};
|
|
15
17
|
//#endregion
|
|
16
18
|
export { TreeView };
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
+
import { t as provideConfig } from "./context-Da-QMQRq.mjs";
|
|
1
2
|
import "svelte/internal/disclose-version";
|
|
2
3
|
import * as $ from "svelte/internal/client";
|
|
3
|
-
import { getContext, setContext } from "svelte";
|
|
4
|
-
//#region src/components/config-provider/context.ts
|
|
5
|
-
const CONFIG_KEY = Symbol("bysages-config");
|
|
6
|
-
function provideConfig(context) {
|
|
7
|
-
setContext(CONFIG_KEY, context);
|
|
8
|
-
return context;
|
|
9
|
-
}
|
|
10
|
-
/** The nearest provider's live snapshot, or an empty one when no
|
|
11
|
-
* provider wraps the caller. */
|
|
12
|
-
function useConfig() {
|
|
13
|
-
return getContext(CONFIG_KEY) ?? {};
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
4
|
//#region src/components/config-provider/ConfigProvider.svelte
|
|
17
5
|
var rest_excludes = /* @__PURE__ */ new Set([
|
|
18
6
|
"$$slots",
|
|
@@ -23,6 +11,7 @@ var rest_excludes = /* @__PURE__ */ new Set([
|
|
|
23
11
|
"accent",
|
|
24
12
|
"dir",
|
|
25
13
|
"locale",
|
|
14
|
+
"messages",
|
|
26
15
|
"lang",
|
|
27
16
|
"children"
|
|
28
17
|
]);
|
|
@@ -45,6 +34,9 @@ function ConfigProvider$1($$anchor, $$props) {
|
|
|
45
34
|
},
|
|
46
35
|
get locale() {
|
|
47
36
|
return $$props.locale;
|
|
37
|
+
},
|
|
38
|
+
get messages() {
|
|
39
|
+
return $$props.messages;
|
|
48
40
|
}
|
|
49
41
|
});
|
|
50
42
|
var div = root();
|
|
@@ -72,4 +64,4 @@ function ConfigProvider$1($$anchor, $$props) {
|
|
|
72
64
|
* descendants through `useConfig`. */
|
|
73
65
|
const ConfigProvider = ConfigProvider$1;
|
|
74
66
|
//#endregion
|
|
75
|
-
export {
|
|
67
|
+
export { ConfigProvider as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getContext, setContext } from "svelte";
|
|
2
|
+
//#region src/components/config-provider/context.ts
|
|
3
|
+
const CONFIG_KEY = Symbol("bysages-config");
|
|
4
|
+
function provideConfig(context) {
|
|
5
|
+
setContext(CONFIG_KEY, context);
|
|
6
|
+
return context;
|
|
7
|
+
}
|
|
8
|
+
/** The nearest provider's live snapshot, or an empty one when no
|
|
9
|
+
* provider wraps the caller. */
|
|
10
|
+
function useConfig() {
|
|
11
|
+
return getContext(CONFIG_KEY) ?? {};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useConfig as n, provideConfig as t };
|
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
import { Pagination } from "@ark-ui/svelte/pagination";
|
|
6
|
+
//#region src/components/data-view/DataView.svelte
|
|
7
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
8
|
+
"$$slots",
|
|
9
|
+
"$$events",
|
|
10
|
+
"$$legacy",
|
|
11
|
+
"items",
|
|
12
|
+
"layout",
|
|
13
|
+
"pageSize",
|
|
14
|
+
"renderItem",
|
|
15
|
+
"header"
|
|
16
|
+
]);
|
|
17
|
+
var root = $.from_html(`<div data-scope="data-view" data-part="cell"><!></div>`);
|
|
18
|
+
var root_1 = $.from_html(`<!> <!> <!>`, 1);
|
|
19
|
+
var root_2 = $.from_html(`<div data-scope="data-view" data-part="pager"><!></div>`);
|
|
20
|
+
var root_3 = $.from_html(`<div><!> <div data-scope="data-view" data-part="content"></div> <!></div>`);
|
|
21
|
+
function DataView$1($$anchor, $$props) {
|
|
22
|
+
$.push($$props, true);
|
|
23
|
+
injectComponentStyle("data-view");
|
|
24
|
+
let layout = $.prop($$props, "layout", 3, "list"), rest = $.rest_props($$props, rest_excludes);
|
|
25
|
+
const messages = useComponentMessages();
|
|
26
|
+
let page = $.state(1);
|
|
27
|
+
const pageCount = $.derived(() => $$props.pageSize ? Math.max(1, Math.ceil($$props.items.length / $$props.pageSize)) : 1);
|
|
28
|
+
const visible = $.derived(() => $$props.pageSize ? $$props.items.slice(($.get(page) - 1) * $$props.pageSize, $.get(page) * $$props.pageSize) : $$props.items);
|
|
29
|
+
var div = root_3();
|
|
30
|
+
$.attribute_effect(div, () => ({
|
|
31
|
+
...rest,
|
|
32
|
+
"data-scope": "data-view",
|
|
33
|
+
"data-part": "root"
|
|
34
|
+
}));
|
|
35
|
+
var node = $.child(div);
|
|
36
|
+
$.snippet(node, () => $$props.header ?? $.noop);
|
|
37
|
+
var div_1 = $.sibling(node, 2);
|
|
38
|
+
$.each(div_1, 21, () => $.get(visible), $.index, ($$anchor, item, index) => {
|
|
39
|
+
var div_2 = root();
|
|
40
|
+
var node_1 = $.child(div_2);
|
|
41
|
+
$.snippet(node_1, () => $$props.renderItem ?? $.noop, () => $.get(item), () => index);
|
|
42
|
+
$.reset(div_2);
|
|
43
|
+
$.append($$anchor, div_2);
|
|
44
|
+
});
|
|
45
|
+
$.reset(div_1);
|
|
46
|
+
var node_2 = $.sibling(div_1, 2);
|
|
47
|
+
var consequent_1 = ($$anchor) => {
|
|
48
|
+
var div_3 = root_2();
|
|
49
|
+
var node_3 = $.child(div_3);
|
|
50
|
+
$.component(node_3, () => Pagination.Root, ($$anchor, ArkPagination_Root) => {
|
|
51
|
+
ArkPagination_Root($$anchor, {
|
|
52
|
+
get count() {
|
|
53
|
+
return $$props.items.length;
|
|
54
|
+
},
|
|
55
|
+
get pageSize() {
|
|
56
|
+
return $$props.pageSize;
|
|
57
|
+
},
|
|
58
|
+
get page() {
|
|
59
|
+
return $.get(page);
|
|
60
|
+
},
|
|
61
|
+
siblingCount: 1,
|
|
62
|
+
onPageChange: (details) => $.set(page, details.page, true),
|
|
63
|
+
children: ($$anchor, $$slotProps) => {
|
|
64
|
+
var fragment = root_1();
|
|
65
|
+
var node_4 = $.first_child(fragment);
|
|
66
|
+
{
|
|
67
|
+
let $0 = $.derived(() => messages().pagination.previous);
|
|
68
|
+
$.component(node_4, () => Pagination.PrevTrigger, ($$anchor, ArkPagination_PrevTrigger) => {
|
|
69
|
+
ArkPagination_PrevTrigger($$anchor, {
|
|
70
|
+
get "aria-label"() {
|
|
71
|
+
return $.get($0);
|
|
72
|
+
},
|
|
73
|
+
children: ($$anchor, $$slotProps) => {
|
|
74
|
+
$.next();
|
|
75
|
+
var text = $.text("‹");
|
|
76
|
+
$.append($$anchor, text);
|
|
77
|
+
},
|
|
78
|
+
$$slots: { default: true }
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
var node_5 = $.sibling(node_4, 2);
|
|
83
|
+
{
|
|
84
|
+
const children = ($$anchor, pagination = $.noop) => {
|
|
85
|
+
var fragment_1 = $.comment();
|
|
86
|
+
var node_6 = $.first_child(fragment_1);
|
|
87
|
+
$.each(node_6, 17, () => pagination().pages, $.index, ($$anchor, entry, index) => {
|
|
88
|
+
var fragment_2 = $.comment();
|
|
89
|
+
var node_7 = $.first_child(fragment_2);
|
|
90
|
+
var consequent = ($$anchor) => {
|
|
91
|
+
var fragment_3 = $.comment();
|
|
92
|
+
var node_8 = $.first_child(fragment_3);
|
|
93
|
+
$.component(node_8, () => Pagination.Ellipsis, ($$anchor, ArkPagination_Ellipsis) => {
|
|
94
|
+
ArkPagination_Ellipsis($$anchor, {
|
|
95
|
+
index,
|
|
96
|
+
children: ($$anchor, $$slotProps) => {
|
|
97
|
+
$.next();
|
|
98
|
+
var text_1 = $.text("…");
|
|
99
|
+
$.append($$anchor, text_1);
|
|
100
|
+
},
|
|
101
|
+
$$slots: { default: true }
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
$.append($$anchor, fragment_3);
|
|
105
|
+
};
|
|
106
|
+
var alternate = ($$anchor) => {
|
|
107
|
+
var fragment_4 = $.comment();
|
|
108
|
+
var node_9 = $.first_child(fragment_4);
|
|
109
|
+
$.component(node_9, () => Pagination.Item, ($$anchor, ArkPagination_Item) => {
|
|
110
|
+
ArkPagination_Item($$anchor, {
|
|
111
|
+
get value() {
|
|
112
|
+
return $.get(entry).value;
|
|
113
|
+
},
|
|
114
|
+
children: ($$anchor, $$slotProps) => {
|
|
115
|
+
$.next();
|
|
116
|
+
var text_2 = $.text();
|
|
117
|
+
$.template_effect(() => $.set_text(text_2, $.get(entry).value));
|
|
118
|
+
$.append($$anchor, text_2);
|
|
119
|
+
},
|
|
120
|
+
$$slots: { default: true }
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
$.append($$anchor, fragment_4);
|
|
124
|
+
};
|
|
125
|
+
$.if(node_7, ($$render) => {
|
|
126
|
+
if ($.get(entry).type === "ellipsis") $$render(consequent);
|
|
127
|
+
else $$render(alternate, -1);
|
|
128
|
+
});
|
|
129
|
+
$.append($$anchor, fragment_2);
|
|
130
|
+
});
|
|
131
|
+
$.append($$anchor, fragment_1);
|
|
132
|
+
};
|
|
133
|
+
$.component(node_5, () => Pagination.Context, ($$anchor, ArkPagination_Context) => {
|
|
134
|
+
ArkPagination_Context($$anchor, {
|
|
135
|
+
children,
|
|
136
|
+
$$slots: { default: true }
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
var node_10 = $.sibling(node_5, 2);
|
|
141
|
+
{
|
|
142
|
+
let $0 = $.derived(() => messages().pagination.next);
|
|
143
|
+
$.component(node_10, () => Pagination.NextTrigger, ($$anchor, ArkPagination_NextTrigger) => {
|
|
144
|
+
ArkPagination_NextTrigger($$anchor, {
|
|
145
|
+
get "aria-label"() {
|
|
146
|
+
return $.get($0);
|
|
147
|
+
},
|
|
148
|
+
children: ($$anchor, $$slotProps) => {
|
|
149
|
+
$.next();
|
|
150
|
+
var text_3 = $.text("›");
|
|
151
|
+
$.append($$anchor, text_3);
|
|
152
|
+
},
|
|
153
|
+
$$slots: { default: true }
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
$.append($$anchor, fragment);
|
|
158
|
+
},
|
|
159
|
+
$$slots: { default: true }
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
$.reset(div_3);
|
|
163
|
+
$.append($$anchor, div_3);
|
|
164
|
+
};
|
|
165
|
+
$.if(node_2, ($$render) => {
|
|
166
|
+
if ($$props.pageSize && $.get(pageCount) > 1) $$render(consequent_1);
|
|
167
|
+
});
|
|
168
|
+
$.reset(div);
|
|
169
|
+
$.template_effect(() => $.set_attribute(div_1, "data-layout", layout()));
|
|
170
|
+
$.append($$anchor, div);
|
|
171
|
+
$.pop();
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/components/data-view/index.ts
|
|
175
|
+
/** One vessel, two layouts: a ledger or a lattice, paged with the
|
|
176
|
+
* pagination family's own parts. */
|
|
177
|
+
const DataView = DataView$1;
|
|
178
|
+
//#endregion
|
|
179
|
+
export { DataView as t };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
import { onMount } from "svelte";
|
|
5
|
+
//#region src/components/deferred-content/DeferredContent.svelte
|
|
6
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
7
|
+
"$$slots",
|
|
8
|
+
"$$events",
|
|
9
|
+
"$$legacy",
|
|
10
|
+
"threshold",
|
|
11
|
+
"placeholder",
|
|
12
|
+
"children"
|
|
13
|
+
]);
|
|
14
|
+
var root = $.from_html(`<div><!></div>`);
|
|
15
|
+
function DeferredContent$1($$anchor, $$props) {
|
|
16
|
+
$.push($$props, true);
|
|
17
|
+
injectComponentStyle("deferred-content");
|
|
18
|
+
let threshold = $.prop($$props, "threshold", 3, .2), rest = $.rest_props($$props, rest_excludes);
|
|
19
|
+
let host = $.state(void 0);
|
|
20
|
+
let active = $.state(false);
|
|
21
|
+
onMount(() => {
|
|
22
|
+
const observer = new IntersectionObserver((entries) => {
|
|
23
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
24
|
+
$.set(active, true);
|
|
25
|
+
observer.disconnect();
|
|
26
|
+
}
|
|
27
|
+
}, { threshold: threshold() });
|
|
28
|
+
if ($.get(host)) observer.observe($.get(host));
|
|
29
|
+
return () => observer.disconnect();
|
|
30
|
+
});
|
|
31
|
+
var div = root();
|
|
32
|
+
$.attribute_effect(div, () => ({
|
|
33
|
+
...rest,
|
|
34
|
+
"data-scope": "deferred-content",
|
|
35
|
+
"data-part": "root"
|
|
36
|
+
}));
|
|
37
|
+
var node = $.child(div);
|
|
38
|
+
var consequent = ($$anchor) => {
|
|
39
|
+
var fragment = $.comment();
|
|
40
|
+
var node_1 = $.first_child(fragment);
|
|
41
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
42
|
+
$.append($$anchor, fragment);
|
|
43
|
+
};
|
|
44
|
+
var alternate = ($$anchor) => {
|
|
45
|
+
var fragment_1 = $.comment();
|
|
46
|
+
var node_2 = $.first_child(fragment_1);
|
|
47
|
+
$.snippet(node_2, () => $$props.placeholder ?? $.noop);
|
|
48
|
+
$.append($$anchor, fragment_1);
|
|
49
|
+
};
|
|
50
|
+
$.if(node, ($$render) => {
|
|
51
|
+
if ($.get(active)) $$render(consequent);
|
|
52
|
+
else $$render(alternate, -1);
|
|
53
|
+
});
|
|
54
|
+
$.reset(div);
|
|
55
|
+
$.bind_this(div, ($$value) => $.set(host, $$value), () => $.get(host));
|
|
56
|
+
$.append($$anchor, div);
|
|
57
|
+
$.pop();
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/deferred-content/index.ts
|
|
61
|
+
/** Content that waits to be worth rendering: the slot mounts when the
|
|
62
|
+
* placeholder approaches the viewport. */
|
|
63
|
+
const DeferredContent = DeferredContent$1;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { DeferredContent as t };
|
|
@@ -7,20 +7,24 @@ var rest_excludes$3 = /* @__PURE__ */ new Set([
|
|
|
7
7
|
"$$events",
|
|
8
8
|
"$$legacy",
|
|
9
9
|
"layout",
|
|
10
|
+
"bordered",
|
|
11
|
+
"column",
|
|
10
12
|
"children"
|
|
11
13
|
]);
|
|
12
14
|
var root$3 = $.from_html(`<dl><!></dl>`);
|
|
13
15
|
function Descriptions$1($$anchor, $$props) {
|
|
14
16
|
$.push($$props, true);
|
|
15
17
|
injectComponentStyle("descriptions");
|
|
16
|
-
let layout = $.prop($$props, "layout", 3, "horizontal"), rest = $.rest_props($$props, rest_excludes$3);
|
|
18
|
+
let layout = $.prop($$props, "layout", 3, "horizontal"), bordered = $.prop($$props, "bordered", 3, false), column = $.prop($$props, "column", 3, 1), rest = $.rest_props($$props, rest_excludes$3);
|
|
17
19
|
var dl = root$3();
|
|
18
|
-
$.attribute_effect(dl, () => ({
|
|
20
|
+
$.attribute_effect(dl, ($0) => ({
|
|
19
21
|
...rest,
|
|
20
22
|
"data-scope": "descriptions",
|
|
21
23
|
"data-part": "root",
|
|
22
|
-
"data-layout": layout()
|
|
23
|
-
|
|
24
|
+
"data-layout": layout(),
|
|
25
|
+
"data-bordered": bordered() || void 0,
|
|
26
|
+
[$.STYLE]: { "--bs-desc-columns": $0 }
|
|
27
|
+
}), [() => String(column())]);
|
|
24
28
|
var node = $.child(dl);
|
|
25
29
|
$.snippet(node, () => $$props.children ?? $.noop);
|
|
26
30
|
$.reset(dl);
|
|
@@ -58,19 +62,21 @@ var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
|
58
62
|
"$$slots",
|
|
59
63
|
"$$events",
|
|
60
64
|
"$$legacy",
|
|
65
|
+
"span",
|
|
61
66
|
"children"
|
|
62
67
|
]);
|
|
63
68
|
var root$1 = $.from_html(`<div><!></div>`);
|
|
64
69
|
function DescriptionsItem($$anchor, $$props) {
|
|
65
70
|
$.push($$props, true);
|
|
66
71
|
injectComponentStyle("descriptions");
|
|
67
|
-
let rest = $.rest_props($$props, rest_excludes$1);
|
|
72
|
+
let span = $.prop($$props, "span", 3, 1), rest = $.rest_props($$props, rest_excludes$1);
|
|
68
73
|
var div = root$1();
|
|
69
|
-
$.attribute_effect(div, () => ({
|
|
74
|
+
$.attribute_effect(div, ($0) => ({
|
|
70
75
|
...rest,
|
|
71
76
|
"data-scope": "descriptions",
|
|
72
|
-
"data-part": "item"
|
|
73
|
-
|
|
77
|
+
"data-part": "item",
|
|
78
|
+
[$.STYLE]: { "--bs-desc-span": $0 }
|
|
79
|
+
}), [() => String(span() * 2)]);
|
|
74
80
|
var node = $.child(div);
|
|
75
81
|
$.snippet(node, () => $$props.children ?? $.noop);
|
|
76
82
|
$.reset(div);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
//#region src/components/dock/Dock.svelte
|
|
5
|
+
var rest_excludes$1 = /* @__PURE__ */ new Set([
|
|
6
|
+
"$$slots",
|
|
7
|
+
"$$events",
|
|
8
|
+
"$$legacy",
|
|
9
|
+
"maxScale",
|
|
10
|
+
"radius",
|
|
11
|
+
"children"
|
|
12
|
+
]);
|
|
13
|
+
var root$1 = $.from_html(`<div><!></div>`);
|
|
14
|
+
function Dock$1($$anchor, $$props) {
|
|
15
|
+
$.push($$props, true);
|
|
16
|
+
injectComponentStyle("dock");
|
|
17
|
+
/** The tallest an item swells under the hand — 1 stands still. */
|
|
18
|
+
/** How far the hand reaches, in px, before an item stops answering. */
|
|
19
|
+
let maxScale = $.prop($$props, "maxScale", 3, 1.5), radius = $.prop($$props, "radius", 3, 96), rest = $.rest_props($$props, rest_excludes$1);
|
|
20
|
+
const ITEM = "[data-scope=\"dock\"][data-part=\"item\"]";
|
|
21
|
+
function magnify(event) {
|
|
22
|
+
for (const item of event.currentTarget.querySelectorAll(ITEM)) {
|
|
23
|
+
const rect = item.getBoundingClientRect();
|
|
24
|
+
const dist = Math.abs(event.clientX - (rect.left + rect.width / 2));
|
|
25
|
+
const t = Math.max(0, 1 - dist / radius());
|
|
26
|
+
item.style.setProperty("--bs-dock-scale", (1 + (maxScale() - 1) * t * t).toFixed(4));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function reset(event) {
|
|
30
|
+
for (const item of event.currentTarget.querySelectorAll(ITEM)) item.style.removeProperty("--bs-dock-scale");
|
|
31
|
+
}
|
|
32
|
+
var div = root$1();
|
|
33
|
+
$.attribute_effect(div, ($0) => ({
|
|
34
|
+
...rest,
|
|
35
|
+
"data-scope": "dock",
|
|
36
|
+
"data-part": "root",
|
|
37
|
+
style: $0,
|
|
38
|
+
onpointermove: magnify,
|
|
39
|
+
onpointerleave: reset
|
|
40
|
+
}), [() => ({
|
|
41
|
+
...$$props.style,
|
|
42
|
+
"--bs-dock-max-scale": String(maxScale())
|
|
43
|
+
})]);
|
|
44
|
+
var node = $.child(div);
|
|
45
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
46
|
+
$.reset(div);
|
|
47
|
+
$.append($$anchor, div);
|
|
48
|
+
$.pop();
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/dock/DockItem.svelte
|
|
52
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
53
|
+
"$$slots",
|
|
54
|
+
"$$events",
|
|
55
|
+
"$$legacy",
|
|
56
|
+
"children"
|
|
57
|
+
]);
|
|
58
|
+
var root = $.from_html(`<div><!></div>`);
|
|
59
|
+
function DockItem($$anchor, $$props) {
|
|
60
|
+
$.push($$props, true);
|
|
61
|
+
injectComponentStyle("dock");
|
|
62
|
+
let rest = $.rest_props($$props, rest_excludes);
|
|
63
|
+
var div = root();
|
|
64
|
+
$.attribute_effect(div, () => ({
|
|
65
|
+
...rest,
|
|
66
|
+
"data-scope": "dock",
|
|
67
|
+
"data-part": "item"
|
|
68
|
+
}));
|
|
69
|
+
var node = $.child(div);
|
|
70
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
71
|
+
$.reset(div);
|
|
72
|
+
$.append($$anchor, div);
|
|
73
|
+
$.pop();
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/dock/index.ts
|
|
77
|
+
/** The magnifying dock: a floating rail whose icons swell toward the
|
|
78
|
+
* hand — Dock, Dock.Item. */
|
|
79
|
+
const Dock = Object.assign(Dock$1, {
|
|
80
|
+
Root: Dock$1,
|
|
81
|
+
Item: DockItem
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Dock as t };
|