@bysages/svelte 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/{ai-BOUoSSjw.mjs → AiLoader-0jlig3fe.mjs} +2 -34
- package/dist/Input-CZhcEeFU.mjs +75 -0
- package/dist/{spinner-EpUWE3Hu.mjs → Spinner-sd__23WT.mjs} +1 -6
- package/dist/{TabsRoot-BMMO3B77.mjs → TabsRoot-DXd41HqW.mjs} +5 -1
- package/dist/{avatar-BHYqgq4d.mjs → avatar-LR0CZ1Iz.mjs} +5 -1
- package/dist/bento-BTvt7gsB.mjs +73 -0
- package/dist/block-ui-CpiV9qza.mjs +50 -0
- package/dist/browser-gmPTH6mJ.mjs +146 -0
- package/dist/{cascade-select-C-eBcN_4.mjs → cascade-select-B-4Z6oWe.mjs} +6 -6
- package/dist/components/ai/index.d.mts +3 -2
- package/dist/components/ai/index.mjs +27 -2
- package/dist/components/ai-action/index.d.mts +1 -1
- package/dist/components/ai-action/index.mjs +1 -1
- package/dist/components/ai-message/index.d.mts +1 -1
- package/dist/components/ai-message/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.d.mts +1 -1
- package/dist/components/ai-prompt-input/index.mjs +1 -1
- package/dist/components/ai-reasoning/index.d.mts +1 -1
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.d.mts +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +1 -1
- package/dist/components/ai-source/index.mjs +1 -1
- package/dist/components/ai-suggestion/index.d.mts +1 -1
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.d.mts +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/bento/index.d.mts +2 -0
- package/dist/components/bento/index.mjs +2 -0
- package/dist/components/block-ui/index.d.mts +2 -0
- package/dist/components/block-ui/index.mjs +2 -0
- package/dist/components/browser/index.d.mts +9 -0
- package/dist/components/browser/index.mjs +2 -0
- package/dist/components/cascade-select/index.mjs +1 -1
- package/dist/components/data-view/index.d.mts +2 -0
- package/dist/components/data-view/index.mjs +2 -0
- package/dist/components/deferred-content/index.d.mts +2 -0
- package/dist/components/deferred-content/index.mjs +2 -0
- package/dist/components/descriptions/index.d.mts +1 -1
- package/dist/components/descriptions/index.mjs +1 -1
- package/dist/components/dock/index.d.mts +2 -0
- package/dist/components/dock/index.mjs +2 -0
- package/dist/components/form/index.d.mts +2 -2
- package/dist/components/form/index.mjs +2 -2
- package/dist/components/icon/index.d.mts +1 -1
- package/dist/components/icon/index.mjs +1 -1
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/order-list/index.d.mts +2 -0
- package/dist/components/order-list/index.mjs +2 -0
- package/dist/components/result/index.d.mts +12 -0
- package/dist/components/result/index.mjs +2 -0
- package/dist/components/select/index.d.mts +2 -7
- package/dist/components/select/index.mjs +2 -14
- package/dist/components/spinner/index.mjs +6 -1
- package/dist/components/spotlight/index.d.mts +2 -0
- package/dist/components/spotlight/index.mjs +2 -0
- package/dist/components/table/index.mjs +1 -1
- package/dist/components/tabs/index.d.mts +1 -1
- package/dist/components/tabs/index.mjs +1 -1
- package/dist/components/terminal/index.d.mts +2 -0
- package/dist/components/terminal/index.mjs +2 -0
- package/dist/components/timeline/index.d.mts +1 -1
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/toolbar/index.d.mts +2 -0
- package/dist/components/toolbar/index.mjs +2 -0
- package/dist/components/tree-select/index.mjs +1 -1
- package/dist/components/user/index.d.mts +2 -0
- package/dist/components/user/index.mjs +2 -0
- package/dist/components/virtual-list/index.d.mts +2 -0
- package/dist/components/virtual-list/index.mjs +2 -0
- package/dist/data-view-B3TY3rYl.mjs +167 -0
- package/dist/deferred-content-CO9YsKMQ.mjs +65 -0
- package/dist/{descriptions-Cv3x5qLW.mjs → descriptions-DgkA_9B-.mjs} +14 -8
- package/dist/dock-CKGRnXWu.mjs +84 -0
- package/dist/{form-De-ZwM1P.mjs → form-BTL9S1gn.mjs} +4 -4
- package/dist/{icon-B6_cYYzO.mjs → icon-D7AeDq0M.mjs} +7 -6
- package/dist/index-0k-VxNRm.d.mts +15 -0
- package/dist/{index-NJ21Q4f4.d.mts → index-BEfqqxjl.d.mts} +11 -1
- package/dist/index-BmFfkztS.d.mts +14 -0
- package/dist/{index-BgLAlGbg.d.mts → index-BoR_54C_.d.mts} +3 -0
- package/dist/index-BolxaoaW.d.mts +18 -0
- package/dist/index-CAb_-2Bn.d.mts +21 -0
- package/dist/{index-Cd5VU1DI.d.mts → index-CV1LSzq5.d.mts} +3 -0
- package/dist/index-CmskeLd_.d.mts +23 -0
- package/dist/index-CnrohEXe.d.mts +24 -0
- package/dist/{index-BjVEomHj.d.mts → index-CtbGSRNw.d.mts} +719 -3781
- package/dist/{index-Nt0a2iYy.d.mts → index-D1U7Svy2.d.mts} +2 -2
- package/dist/index-D6eYSdmD.d.mts +28 -0
- package/dist/index-D9UBDdoA.d.mts +17 -0
- package/dist/index-DBbjFiDd.d.mts +20 -0
- package/dist/index-DGOBhwXN.d.mts +18 -0
- package/dist/{index-DrXCIscJ.d.mts → index-DjaHpB21.d.mts} +3 -0
- package/dist/index-KoqiUxmN.d.mts +20 -0
- package/dist/{index-BnvnT-GQ.d.mts → index-_kQsvJKo.d.mts} +6 -2
- package/dist/index-mshFOd-j.d.mts +20 -0
- package/dist/index.d.mts +24 -10
- package/dist/index.mjs +26 -12
- package/dist/order-list-q7VlsbmU.mjs +120 -0
- package/dist/result-4Oee2ndu.mjs +159 -0
- package/dist/select-rkY0qJKI.mjs +95 -0
- package/dist/spotlight-DMC5E1eS.mjs +51 -0
- package/dist/{table-C0AcH5Dw.mjs → table-BnNK4_su.mjs} +1 -1
- package/dist/terminal-B3b4KzoN.mjs +78 -0
- package/dist/{timeline-BV4eahUx.mjs → timeline-1yPOTbtY.mjs} +4 -2
- package/dist/toolbar-SNwuRrJr.mjs +68 -0
- package/dist/{tree-select-aHymj8Zu.mjs → tree-select-BSf4a_En.mjs} +1 -1
- package/dist/user-BjJSjDYV.mjs +100 -0
- package/dist/virtual-list-psKQ_NVr.mjs +59 -0
- package/package.json +28 -7
- package/dist/Input-Biz4J1B6.mjs +0 -39
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { t as AiSuggestion } from "../../ai-suggestion-zGAQ1kkf.mjs";
|
|
2
|
-
export { AiSuggestion };
|
|
2
|
+
export { AiSuggestion, AiSuggestion as Suggestion };
|
|
@@ -5,4 +5,4 @@ import { n as ToolStatus, t as ToolProps } from "../../props-B9YcQX8X.mjs";
|
|
|
5
5
|
* input and output folded inside. */
|
|
6
6
|
export declare const AiTool: import("svelte").Component<ToolProps, {}, "">;
|
|
7
7
|
//#endregion
|
|
8
|
-
export type
|
|
8
|
+
export { AiTool as Tool, type ToolProps, type ToolStatus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { t as AiTool } from "../../ai-tool-DY_iNbMk.mjs";
|
|
2
|
-
export { AiTool };
|
|
2
|
+
export { AiTool, AiTool as Tool };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Avatar } from "../../index-
|
|
1
|
+
import { t as Avatar } from "../../index-CV1LSzq5.mjs";
|
|
2
2
|
export { Avatar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Avatar } from "../../avatar-
|
|
1
|
+
import { t as Avatar } from "../../avatar-LR0CZ1Iz.mjs";
|
|
2
2
|
export { Avatar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/components/browser/index.d.ts
|
|
2
|
+
/** A browser window as a vessel: Root, TitleBar, Dots, UrlBar, Body. */
|
|
3
|
+
export declare const Browser: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, ""> & {
|
|
4
|
+
TitleBar: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
|
|
5
|
+
Dots: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
|
|
6
|
+
UrlBar: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
|
|
7
|
+
Body: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CascadeSelect } from "../../cascade-select-
|
|
1
|
+
import { t as CascadeSelect } from "../../cascade-select-B-4Z6oWe.mjs";
|
|
2
2
|
export { CascadeSelect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DescriptionsPartProps, r as DescriptionsRootProps, t as Descriptions } from "../../index-
|
|
1
|
+
import { n as DescriptionsPartProps, r as DescriptionsRootProps, t as Descriptions } from "../../index-BEfqqxjl.mjs";
|
|
2
2
|
export { Descriptions, type DescriptionsPartProps, type DescriptionsRootProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Descriptions } from "../../descriptions-
|
|
1
|
+
import { t as Descriptions } from "../../descriptions-DgkA_9B-.mjs";
|
|
2
2
|
export { Descriptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createForm, c as
|
|
2
|
-
export { type AnyFormApi, type FieldApi, Form, type FormApi, FormField, type FormFieldProps, type FormProps, type SvelteFormApi, createField, createForm };
|
|
1
|
+
import { a as createForm, c as FormApi, d as FormProps, f as AnyFormApi, i as createField, l as FieldApi, n as FormField, o as useField, r as SvelteFormApi, s as useForm, t as Form, u as FormFieldProps } from "../../index-D1U7Svy2.mjs";
|
|
2
|
+
export { type AnyFormApi, type FieldApi, Form, type FormApi, FormField, type FormFieldProps, type FormProps, type SvelteFormApi, createField, createForm, useField, useForm };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createForm, n as FormField, r as createField, t as Form } from "../../form-
|
|
2
|
-
export { Form, FormField, createField, createForm };
|
|
1
|
+
import { a as useField, i as createForm, n as FormField, o as useForm, r as createField, t as Form } from "../../form-BTL9S1gn.mjs";
|
|
2
|
+
export { Form, FormField, createField, createForm, useField, useForm };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as IconProps, t as Icon } from "../../index-
|
|
1
|
+
import { n as IconProps, t as Icon } from "../../index-_kQsvJKo.mjs";
|
|
2
2
|
export { Icon, type IconProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Icon } from "../../icon-
|
|
1
|
+
import { t as Icon } from "../../icon-D7AeDq0M.mjs";
|
|
2
2
|
export { Icon };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as InputProps, t as Input } from "../../index-
|
|
1
|
+
import { n as InputProps, t as Input } from "../../index-DjaHpB21.mjs";
|
|
2
2
|
export { Input, type InputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Input$1 } from "../../Input-
|
|
1
|
+
import { t as Input$1 } from "../../Input-CZhcEeFU.mjs";
|
|
2
2
|
//#region src/components/input/index.ts
|
|
3
3
|
/** The bare text input, dressed in the field recipe: border, surface,
|
|
4
4
|
* focus halo — no shadow. Inside a Field.Root it picks up the label
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/components/result/index.d.ts
|
|
2
|
+
/** A verdict drawn after the deed — Result, Result.Icon, Result.Title,
|
|
3
|
+
* Result.Description, Result.Extra. */
|
|
4
|
+
export declare const Result: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
status?: "success" | "warning" | "danger" | "info";
|
|
6
|
+
}, {}, ""> & {
|
|
7
|
+
Icon: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
|
|
8
|
+
Title: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLHeadingElement>, {}, "">;
|
|
9
|
+
Description: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLParagraphElement>, {}, "">;
|
|
10
|
+
Extra: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
@@ -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-rkY0qJKI.mjs";
|
|
2
|
+
export { NativeSelect, Select };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import { t as Spinner } from "../../
|
|
1
|
+
import { t as Spinner$1 } from "../../Spinner-sd__23WT.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 { n as FlexRender, r as createColumnHelper, t as DataTable } from "../../table-
|
|
1
|
+
import { n as FlexRender, r as createColumnHelper, t as DataTable } from "../../table-BnNK4_su.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,2 +1,2 @@
|
|
|
1
|
-
import { t as TreeSelect } from "../../tree-select-
|
|
1
|
+
import { t as TreeSelect } from "../../tree-select-BSf4a_En.mjs";
|
|
2
2
|
export { TreeSelect };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as $ from "svelte/internal/client";
|
|
4
|
+
import { Pagination } from "@ark-ui/svelte/pagination";
|
|
5
|
+
//#region src/components/data-view/DataView.svelte
|
|
6
|
+
var rest_excludes = /* @__PURE__ */ new Set([
|
|
7
|
+
"$$slots",
|
|
8
|
+
"$$events",
|
|
9
|
+
"$$legacy",
|
|
10
|
+
"items",
|
|
11
|
+
"layout",
|
|
12
|
+
"pageSize",
|
|
13
|
+
"renderItem",
|
|
14
|
+
"header"
|
|
15
|
+
]);
|
|
16
|
+
var root = $.from_html(`<div data-scope="data-view" data-part="cell"><!></div>`);
|
|
17
|
+
var root_1 = $.from_html(`<!> <!> <!>`, 1);
|
|
18
|
+
var root_2 = $.from_html(`<div data-scope="data-view" data-part="pager"><!></div>`);
|
|
19
|
+
var root_3 = $.from_html(`<div><!> <div data-scope="data-view" data-part="content"></div> <!></div>`);
|
|
20
|
+
function DataView$1($$anchor, $$props) {
|
|
21
|
+
$.push($$props, true);
|
|
22
|
+
injectComponentStyle("data-view");
|
|
23
|
+
let layout = $.prop($$props, "layout", 3, "list"), rest = $.rest_props($$props, rest_excludes);
|
|
24
|
+
let page = $.state(1);
|
|
25
|
+
const pageCount = $.derived(() => $$props.pageSize ? Math.max(1, Math.ceil($$props.items.length / $$props.pageSize)) : 1);
|
|
26
|
+
const visible = $.derived(() => $$props.pageSize ? $$props.items.slice(($.get(page) - 1) * $$props.pageSize, $.get(page) * $$props.pageSize) : $$props.items);
|
|
27
|
+
var div = root_3();
|
|
28
|
+
$.attribute_effect(div, () => ({
|
|
29
|
+
...rest,
|
|
30
|
+
"data-scope": "data-view",
|
|
31
|
+
"data-part": "root"
|
|
32
|
+
}));
|
|
33
|
+
var node = $.child(div);
|
|
34
|
+
$.snippet(node, () => $$props.header ?? $.noop);
|
|
35
|
+
var div_1 = $.sibling(node, 2);
|
|
36
|
+
$.each(div_1, 21, () => $.get(visible), $.index, ($$anchor, item, index) => {
|
|
37
|
+
var div_2 = root();
|
|
38
|
+
var node_1 = $.child(div_2);
|
|
39
|
+
$.snippet(node_1, () => $$props.renderItem ?? $.noop, () => $.get(item), () => index);
|
|
40
|
+
$.reset(div_2);
|
|
41
|
+
$.append($$anchor, div_2);
|
|
42
|
+
});
|
|
43
|
+
$.reset(div_1);
|
|
44
|
+
var node_2 = $.sibling(div_1, 2);
|
|
45
|
+
var consequent_1 = ($$anchor) => {
|
|
46
|
+
var div_3 = root_2();
|
|
47
|
+
var node_3 = $.child(div_3);
|
|
48
|
+
$.component(node_3, () => Pagination.Root, ($$anchor, ArkPagination_Root) => {
|
|
49
|
+
ArkPagination_Root($$anchor, {
|
|
50
|
+
get count() {
|
|
51
|
+
return $$props.items.length;
|
|
52
|
+
},
|
|
53
|
+
get pageSize() {
|
|
54
|
+
return $$props.pageSize;
|
|
55
|
+
},
|
|
56
|
+
get page() {
|
|
57
|
+
return $.get(page);
|
|
58
|
+
},
|
|
59
|
+
siblingCount: 1,
|
|
60
|
+
onPageChange: (details) => $.set(page, details.page, true),
|
|
61
|
+
children: ($$anchor, $$slotProps) => {
|
|
62
|
+
var fragment = root_1();
|
|
63
|
+
var node_4 = $.first_child(fragment);
|
|
64
|
+
$.component(node_4, () => Pagination.PrevTrigger, ($$anchor, ArkPagination_PrevTrigger) => {
|
|
65
|
+
ArkPagination_PrevTrigger($$anchor, {
|
|
66
|
+
"aria-label": "Previous page",
|
|
67
|
+
children: ($$anchor, $$slotProps) => {
|
|
68
|
+
$.next();
|
|
69
|
+
var text = $.text("‹");
|
|
70
|
+
$.append($$anchor, text);
|
|
71
|
+
},
|
|
72
|
+
$$slots: { default: true }
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
var node_5 = $.sibling(node_4, 2);
|
|
76
|
+
{
|
|
77
|
+
const children = ($$anchor, pagination = $.noop) => {
|
|
78
|
+
var fragment_1 = $.comment();
|
|
79
|
+
var node_6 = $.first_child(fragment_1);
|
|
80
|
+
$.each(node_6, 17, () => pagination().pages, $.index, ($$anchor, entry, index) => {
|
|
81
|
+
var fragment_2 = $.comment();
|
|
82
|
+
var node_7 = $.first_child(fragment_2);
|
|
83
|
+
var consequent = ($$anchor) => {
|
|
84
|
+
var fragment_3 = $.comment();
|
|
85
|
+
var node_8 = $.first_child(fragment_3);
|
|
86
|
+
$.component(node_8, () => Pagination.Ellipsis, ($$anchor, ArkPagination_Ellipsis) => {
|
|
87
|
+
ArkPagination_Ellipsis($$anchor, {
|
|
88
|
+
index,
|
|
89
|
+
children: ($$anchor, $$slotProps) => {
|
|
90
|
+
$.next();
|
|
91
|
+
var text_1 = $.text("…");
|
|
92
|
+
$.append($$anchor, text_1);
|
|
93
|
+
},
|
|
94
|
+
$$slots: { default: true }
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
$.append($$anchor, fragment_3);
|
|
98
|
+
};
|
|
99
|
+
var alternate = ($$anchor) => {
|
|
100
|
+
var fragment_4 = $.comment();
|
|
101
|
+
var node_9 = $.first_child(fragment_4);
|
|
102
|
+
$.component(node_9, () => Pagination.Item, ($$anchor, ArkPagination_Item) => {
|
|
103
|
+
ArkPagination_Item($$anchor, {
|
|
104
|
+
get value() {
|
|
105
|
+
return $.get(entry).value;
|
|
106
|
+
},
|
|
107
|
+
children: ($$anchor, $$slotProps) => {
|
|
108
|
+
$.next();
|
|
109
|
+
var text_2 = $.text();
|
|
110
|
+
$.template_effect(() => $.set_text(text_2, $.get(entry).value));
|
|
111
|
+
$.append($$anchor, text_2);
|
|
112
|
+
},
|
|
113
|
+
$$slots: { default: true }
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
$.append($$anchor, fragment_4);
|
|
117
|
+
};
|
|
118
|
+
$.if(node_7, ($$render) => {
|
|
119
|
+
if ($.get(entry).type === "ellipsis") $$render(consequent);
|
|
120
|
+
else $$render(alternate, -1);
|
|
121
|
+
});
|
|
122
|
+
$.append($$anchor, fragment_2);
|
|
123
|
+
});
|
|
124
|
+
$.append($$anchor, fragment_1);
|
|
125
|
+
};
|
|
126
|
+
$.component(node_5, () => Pagination.Context, ($$anchor, ArkPagination_Context) => {
|
|
127
|
+
ArkPagination_Context($$anchor, {
|
|
128
|
+
children,
|
|
129
|
+
$$slots: { default: true }
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
var node_10 = $.sibling(node_5, 2);
|
|
134
|
+
$.component(node_10, () => Pagination.NextTrigger, ($$anchor, ArkPagination_NextTrigger) => {
|
|
135
|
+
ArkPagination_NextTrigger($$anchor, {
|
|
136
|
+
"aria-label": "Next page",
|
|
137
|
+
children: ($$anchor, $$slotProps) => {
|
|
138
|
+
$.next();
|
|
139
|
+
var text_3 = $.text("›");
|
|
140
|
+
$.append($$anchor, text_3);
|
|
141
|
+
},
|
|
142
|
+
$$slots: { default: true }
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
$.append($$anchor, fragment);
|
|
146
|
+
},
|
|
147
|
+
$$slots: { default: true }
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
$.reset(div_3);
|
|
151
|
+
$.append($$anchor, div_3);
|
|
152
|
+
};
|
|
153
|
+
$.if(node_2, ($$render) => {
|
|
154
|
+
if ($$props.pageSize && $.get(pageCount) > 1) $$render(consequent_1);
|
|
155
|
+
});
|
|
156
|
+
$.reset(div);
|
|
157
|
+
$.template_effect(() => $.set_attribute(div_1, "data-layout", layout()));
|
|
158
|
+
$.append($$anchor, div);
|
|
159
|
+
$.pop();
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/components/data-view/index.ts
|
|
163
|
+
/** One vessel, two layouts: a ledger or a lattice, paged with the
|
|
164
|
+
* pagination family's own parts. */
|
|
165
|
+
const DataView = DataView$1;
|
|
166
|
+
//#endregion
|
|
167
|
+
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);
|