@asanchez-sa/abby 0.1.2 → 0.1.3
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/agents/approvals.d.ts +4 -4
- package/dist/agents/changes.d.ts +4 -4
- package/dist/agents/hooks.d.ts +3 -3
- package/dist/agents/index.d.ts +2 -7
- package/dist/agents/index.js +2 -5
- package/dist/agents/run-tool.d.ts +2 -2
- package/dist/agents/ui-sdk.d.ts +3 -5
- package/dist/agents/ui-sdk.js +3 -3
- package/dist/behaviors/lists/index.d.ts +2 -3
- package/dist/behaviors/lists/index.js +1 -3
- package/dist/behaviors/lists/ui-sdk.d.ts +2 -2
- package/dist/behaviors/lists/ui-sdk.js +3 -3
- package/dist/behaviors/popups/index.d.ts +2 -3
- package/dist/behaviors/popups/index.js +1 -3
- package/dist/behaviors/popups/ui-sdk.d.ts +2 -2
- package/dist/behaviors/popups/ui-sdk.js +3 -3
- package/dist/behaviors/preferences/index.d.ts +2 -3
- package/dist/behaviors/preferences/index.js +1 -3
- package/dist/behaviors/preferences/ui-sdk.d.ts +2 -2
- package/dist/behaviors/preferences/ui-sdk.js +3 -3
- package/dist/behaviors/transitions/index.d.ts +2 -3
- package/dist/behaviors/transitions/index.js +1 -3
- package/dist/behaviors/transitions/ui-sdk.d.ts +2 -2
- package/dist/behaviors/transitions/ui-sdk.js +3 -3
- package/dist/components/alert/alert.d.ts +3 -2
- package/dist/components/alert/alert.js +3 -2
- package/dist/components/attachment/attachment.d.ts +3 -2
- package/dist/components/attachment/attachment.js +3 -2
- package/dist/components/badge/badge.d.ts +3 -2
- package/dist/components/badge/badge.js +3 -2
- package/dist/components/bubble/bubble.d.ts +3 -2
- package/dist/components/bubble/bubble.js +3 -2
- package/dist/components/button-group/button-group.d.ts +4 -3
- package/dist/components/button-group/button-group.js +4 -3
- package/dist/components/card/card.d.ts +3 -2
- package/dist/components/card/card.js +3 -2
- package/dist/components/choice-cards/choice-cards.d.ts +4 -3
- package/dist/components/choice-cards/choice-cards.js +4 -3
- package/dist/components/command-dock/command-dock.d.ts +4 -4
- package/dist/components/command-dock/command-dock.js +9 -9
- package/dist/components/empty/empty.d.ts +3 -2
- package/dist/components/empty/empty.js +3 -2
- package/dist/components/input-group/input-group.d.ts +5 -4
- package/dist/components/input-group/input-group.js +5 -4
- package/dist/components/item/item.d.ts +3 -2
- package/dist/components/item/item.js +3 -2
- package/dist/components/link/link.d.ts +3 -2
- package/dist/components/link/link.js +4 -4
- package/dist/components/marker/marker.d.ts +3 -2
- package/dist/components/marker/marker.js +3 -2
- package/dist/components/message-scroller/message-scroller.d.ts +7 -6
- package/dist/components/message-scroller/message-scroller.js +8 -8
- package/dist/components/model-selector/model-selector.js +9 -9
- package/dist/components/native-select/native-select.js +4 -4
- package/dist/components/note-editor/note-editor.js +5 -5
- package/dist/components/questionnaire/questionnaire.d.ts +11 -11
- package/dist/components/questionnaire/questionnaire.js +13 -13
- package/dist/components/sidebar/sidebar.d.ts +4 -4
- package/dist/components/sidebar/sidebar.js +10 -9
- package/dist/components/table-of-contents/table-of-contents.d.ts +4 -4
- package/dist/components/table-of-contents/table-of-contents.js +5 -5
- package/dist/components/toolbar/toolbar.d.ts +3 -2
- package/dist/components/toolbar/toolbar.js +7 -5
- package/dist/components/week-strip/week-strip.d.ts +7 -7
- package/dist/components/week-strip/week-strip.js +32 -31
- package/dist/core/index.d.ts +2 -6
- package/dist/core/index.js +2 -26
- package/dist/core/ui-sdk.d.ts +2 -2
- package/dist/core/ui-sdk.js +3 -3
- package/dist/tools/observe/index.d.ts +2 -2
- package/dist/tools/observe/index.js +1 -3
- package/dist/tools/observe/ui-sdk.d.ts +2 -1
- package/dist/tools/observe/ui-sdk.js +1 -2
- package/dist/tools/testing/check-agent.d.ts +4 -3
- package/dist/tools/testing/index.d.ts +2 -3
- package/dist/tools/testing/index.js +3 -4
- package/dist/tools/testing/ui-sdk.d.ts +2 -1
- package/dist/tools/testing/ui-sdk.js +1 -2
- package/dist/utilities/color/index.d.ts +2 -2
- package/dist/utilities/color/index.js +1 -3
- package/dist/utilities/color/ui-sdk.d.ts +2 -1
- package/dist/utilities/color/ui-sdk.js +1 -2
- package/dist/utilities/date/index.d.ts +2 -2
- package/dist/utilities/date/index.js +1 -6
- package/dist/utilities/date/ui-sdk.d.ts +2 -1
- package/dist/utilities/date/ui-sdk.js +1 -2
- package/dist/utilities/image/index.d.ts +2 -2
- package/dist/utilities/image/index.js +1 -3
- package/dist/utilities/image/ui-sdk.d.ts +2 -1
- package/dist/utilities/image/ui-sdk.js +1 -2
- package/dist/utilities/number/index.d.ts +2 -2
- package/dist/utilities/number/index.js +1 -3
- package/dist/utilities/number/ui-sdk.d.ts +2 -1
- package/dist/utilities/number/ui-sdk.js +1 -2
- package/dist/utilities/platform/index.d.ts +2 -3
- package/dist/utilities/platform/index.js +1 -14
- package/dist/utilities/platform/ui-sdk.d.ts +2 -2
- package/dist/utilities/platform/ui-sdk.js +3 -3
- package/dist/utilities/text/index.d.ts +2 -3
- package/dist/utilities/text/index.js +1 -3
- package/dist/utilities/text/ui-sdk.d.ts +2 -2
- package/dist/utilities/text/ui-sdk.js +3 -3
- package/package.json +1 -1
- package/skills/agent-ready-ui/SKILL.md +1 -1
- package/skills/blocks/SKILL.md +1 -1
- package/skills/compose-screens/SKILL.md +1 -1
- package/skills/note-editor/SKILL.md +1 -1
- package/skills/note-status/SKILL.md +1 -1
- package/skills/setup/SKILL.md +1 -1
- package/skills/theming/SKILL.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +0 -26
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { checkedAttrs, createChange, definePrimitive, elements, idPart } from "../../core/ui-sdk.js";
|
|
2
|
+
import { checkedAttrs, createChange, definePrimitive, elements, idPart, usePart, usePrimitive } from "../../core/ui-sdk.js";
|
|
3
3
|
import { usePrimitiveState } from "../../core/use-primitive-state.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../core/index.js";
|
|
5
5
|
import { cn, cnState } from "../../utilities/cn/index.js";
|
|
6
6
|
import "../../utilities/platform/index.js";
|
|
7
7
|
import { buttonVariants } from "../button/button.js";
|
|
@@ -755,7 +755,7 @@ function Questionnaire(t0) {
|
|
|
755
755
|
$[24] = values;
|
|
756
756
|
$[25] = t2;
|
|
757
757
|
} else t2 = $[25];
|
|
758
|
-
const handle =
|
|
758
|
+
const handle = usePrimitive(questionnaire, t2);
|
|
759
759
|
let t3;
|
|
760
760
|
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
761
761
|
t3 = {};
|
|
@@ -819,7 +819,7 @@ function Questionnaire(t0) {
|
|
|
819
819
|
$[44] = t9;
|
|
820
820
|
$[45] = t10;
|
|
821
821
|
} else t10 = $[45];
|
|
822
|
-
return
|
|
822
|
+
return usePart(handle, "root", t3, t10, "form");
|
|
823
823
|
}
|
|
824
824
|
/** "Question 1 of 3", counting the enabled items. Children replace the text. */
|
|
825
825
|
function QuestionnaireProgress(t0) {
|
|
@@ -881,7 +881,7 @@ function QuestionnaireProgress(t0) {
|
|
|
881
881
|
$[13] = t4;
|
|
882
882
|
$[14] = t5;
|
|
883
883
|
} else t5 = $[14];
|
|
884
|
-
return
|
|
884
|
+
return usePart(questionnaire, "progress", t2, t5, "div");
|
|
885
885
|
}
|
|
886
886
|
function QuestionnaireItem(t0) {
|
|
887
887
|
const $ = c(29);
|
|
@@ -976,7 +976,7 @@ function QuestionnaireItem(t0) {
|
|
|
976
976
|
$[27] = t7;
|
|
977
977
|
$[28] = t8;
|
|
978
978
|
} else t8 = $[28];
|
|
979
|
-
return
|
|
979
|
+
return usePart(questionnaire, "item", t5, t8, "fieldset");
|
|
980
980
|
}
|
|
981
981
|
/** The question, and the name of its answers. */
|
|
982
982
|
function QuestionnaireTitle(t0) {
|
|
@@ -1015,7 +1015,7 @@ function QuestionnaireTitle(t0) {
|
|
|
1015
1015
|
$[8] = t2;
|
|
1016
1016
|
$[9] = t3;
|
|
1017
1017
|
} else t3 = $[9];
|
|
1018
|
-
return
|
|
1018
|
+
return usePart(questionnaire, "title", t1, t3, "legend");
|
|
1019
1019
|
}
|
|
1020
1020
|
function QuestionnaireDescription(t0) {
|
|
1021
1021
|
const $ = c(10);
|
|
@@ -1053,7 +1053,7 @@ function QuestionnaireDescription(t0) {
|
|
|
1053
1053
|
$[8] = t2;
|
|
1054
1054
|
$[9] = t3;
|
|
1055
1055
|
} else t3 = $[9];
|
|
1056
|
-
return
|
|
1056
|
+
return usePart(questionnaire, "description", t1, t3, "p");
|
|
1057
1057
|
}
|
|
1058
1058
|
/** The item's choices: a radio group, or a group of checkboxes in an item with `multiple`. */
|
|
1059
1059
|
function QuestionnaireChoices(t0) {
|
|
@@ -1140,7 +1140,7 @@ function QuestionnaireChoices(t0) {
|
|
|
1140
1140
|
$[17] = t3;
|
|
1141
1141
|
$[18] = t4;
|
|
1142
1142
|
} else t4 = $[18];
|
|
1143
|
-
return
|
|
1143
|
+
return usePart(questionnaire, "choices", t1, t4, "div");
|
|
1144
1144
|
}
|
|
1145
1145
|
/**
|
|
1146
1146
|
* One answer: a radio, or a checkbox in an item with `multiple`, with its text.
|
|
@@ -1287,7 +1287,7 @@ function QuestionnaireChoice(t0) {
|
|
|
1287
1287
|
$[32] = t6;
|
|
1288
1288
|
$[33] = t7;
|
|
1289
1289
|
} else t7 = $[33];
|
|
1290
|
-
return
|
|
1290
|
+
return usePart(questionnaire, "choice", t4, t7, "label");
|
|
1291
1291
|
}
|
|
1292
1292
|
/** More about a choice, under its text. Put it directly inside `QuestionnaireChoice`. */
|
|
1293
1293
|
function _temp(child) {
|
|
@@ -1391,7 +1391,7 @@ function QuestionnaireInput(t0) {
|
|
|
1391
1391
|
$[14] = scope.name;
|
|
1392
1392
|
$[15] = t2;
|
|
1393
1393
|
} else t2 = $[15];
|
|
1394
|
-
return
|
|
1394
|
+
return usePart(questionnaire, "input", t1, t2, "div");
|
|
1395
1395
|
}
|
|
1396
1396
|
/**
|
|
1397
1397
|
* Shows once the item fails validation. Without children it says what the
|
|
@@ -1447,7 +1447,7 @@ function QuestionnaireError(t0) {
|
|
|
1447
1447
|
$[13] = t3;
|
|
1448
1448
|
$[14] = t4;
|
|
1449
1449
|
} else t4 = $[14];
|
|
1450
|
-
return
|
|
1450
|
+
return usePart(questionnaire, "error", t1, t4, "p");
|
|
1451
1451
|
}
|
|
1452
1452
|
/** The row of navigation buttons: Previous at the start, the rest at the end. */
|
|
1453
1453
|
function _temp2(state) {
|
|
@@ -1524,7 +1524,7 @@ function useAction(slot, text, defaults, place, t0) {
|
|
|
1524
1524
|
variant: t1,
|
|
1525
1525
|
size: t2
|
|
1526
1526
|
};
|
|
1527
|
-
t5 =
|
|
1527
|
+
t5 = usePart;
|
|
1528
1528
|
t6 = questionnaire;
|
|
1529
1529
|
t7 = slot;
|
|
1530
1530
|
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ChangeDetails } from "../../core/ui-sdk.js";
|
|
1
|
+
import "../../core/index.js";
|
|
2
|
+
import { ChangeDetails, PartProps } from "../../core/ui-sdk.js";
|
|
3
3
|
import { VariantProps } from "../../utilities/cn/index.js";
|
|
4
4
|
import { Input } from "../input/input.js";
|
|
5
5
|
import { Separator } from "../separator/separator.js";
|
|
@@ -30,7 +30,7 @@ declare function useSidebar(): {
|
|
|
30
30
|
setOpenMobile: (openMobile: boolean) => void;
|
|
31
31
|
toggleSidebar: (event?: Event) => void;
|
|
32
32
|
};
|
|
33
|
-
type SidebarProviderProps = SidebarOptions &
|
|
33
|
+
type SidebarProviderProps = SidebarOptions & PartProps<"div"> & {
|
|
34
34
|
/** The keys that expand and collapse the sidebar. Pass `null` for none. */
|
|
35
35
|
shortcut?: string | null;
|
|
36
36
|
/** Names the layout for screen readers and agents. Set it in the page's language. */
|
|
@@ -53,7 +53,7 @@ type SidebarProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
53
53
|
children?: ReactNode;
|
|
54
54
|
};
|
|
55
55
|
declare function Sidebar({ side, variant, collapsible, peek, label, className, children, ...props }: SidebarProps): import("react").JSX.Element | null;
|
|
56
|
-
type SidebarTriggerProps =
|
|
56
|
+
type SidebarTriggerProps = PartProps<"button"> & {
|
|
57
57
|
/** The button's accessible name. Set it in the page's language. */
|
|
58
58
|
label?: string;
|
|
59
59
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createChange, definePrimitive, openAttrs } from "../../core/ui-sdk.js";
|
|
2
|
+
import { createChange, definePrimitive, openAttrs, usePart, usePrimitive } from "../../core/ui-sdk.js";
|
|
3
3
|
import { usePrimitiveState } from "../../core/use-primitive-state.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../core/index.js";
|
|
5
5
|
import { cn, cnState, cva } from "../../utilities/cn/index.js";
|
|
6
|
-
import
|
|
6
|
+
import "../../utilities/platform/index.js";
|
|
7
7
|
import { buttonVariants } from "../button/button.js";
|
|
8
8
|
import { Icon } from "../icon/icon.js";
|
|
9
9
|
import { Input } from "../input/input.js";
|
|
10
10
|
import { LinkPart } from "../link/link.js";
|
|
11
11
|
import { Separator } from "../separator/separator.js";
|
|
12
|
+
import { useShortcut } from "../../utilities/platform/ui-sdk.js";
|
|
12
13
|
import { Sheet, SheetContent, SheetHeader, SheetTitle } from "../sheet/sheet.js";
|
|
13
14
|
import { Skeleton } from "../skeleton/skeleton.js";
|
|
14
15
|
import { TooltipContent as TooltipContent$1 } from "../tooltip/tooltip.js";
|
|
@@ -218,7 +219,7 @@ function SidebarProvider(t0) {
|
|
|
218
219
|
$[12] = open;
|
|
219
220
|
$[13] = t3;
|
|
220
221
|
} else t3 = $[13];
|
|
221
|
-
const handle =
|
|
222
|
+
const handle = usePrimitive(sidebar, t3);
|
|
222
223
|
let t4;
|
|
223
224
|
if ($[14] !== handle.api) {
|
|
224
225
|
t4 = () => handle.api.toggle();
|
|
@@ -230,7 +231,7 @@ function SidebarProvider(t0) {
|
|
|
230
231
|
t5 = { description: "Toggle sidebar" };
|
|
231
232
|
$[16] = t5;
|
|
232
233
|
} else t5 = $[16];
|
|
233
|
-
|
|
234
|
+
useShortcut(shortcut, t4, t5);
|
|
234
235
|
let t6;
|
|
235
236
|
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
236
237
|
t6 = {};
|
|
@@ -281,7 +282,7 @@ function SidebarProvider(t0) {
|
|
|
281
282
|
$[29] = t9;
|
|
282
283
|
$[30] = t10;
|
|
283
284
|
} else t10 = $[30];
|
|
284
|
-
return
|
|
285
|
+
return usePart(handle, "root", t6, t10, "div");
|
|
285
286
|
}
|
|
286
287
|
const surface = "[--accent:var(--sidebar-accent)] [--focus-ring:var(--sidebar-ring)]";
|
|
287
288
|
const peekPanel = cn("relative isolate w-[calc(var(--sidebar-width)-var(--sidebar-width-icon))] shrink-0 transition-[opacity,translate,visibility] ease-out motion-reduce:transition-none", "duration-popup delay-[calc(var(--transition-duration-expand)-var(--transition-duration-popup))] motion-reduce:delay-0", "md:group-data-closed:mb-2 md:group-data-closed:h-auto md:group-data-closed:w-[calc(var(--sidebar-width)-var(--sidebar-width-icon)-(--spacing(2)))] md:group-data-closed:bg-transparent", "before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-xl before:border before:border-border before:bg-background before:opacity-0 before:shadow-md before:transition-[opacity] before:[transition-duration:0s] md:group-data-closed:before:opacity-100 md:group-data-closed:before:delay-(--transition-duration-quick)", "md:group-[[data-closed]:not([data-peek])]:invisible md:group-[[data-closed]:not([data-peek])]:-translate-x-2 md:group-[[data-closed]:not([data-peek])]:opacity-0 md:group-[[data-closed]:not([data-peek])]:delay-0 md:group-[[data-closed]:not([data-peek])]:duration-quick rtl:md:group-[[data-closed]:not([data-peek])]:translate-x-2", "md:group-data-peek:delay-0 md:group-data-peek:duration-popup");
|
|
@@ -357,7 +358,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
357
358
|
}), children]
|
|
358
359
|
})
|
|
359
360
|
});
|
|
360
|
-
return
|
|
361
|
+
return usePart(sidebar, "panel", {
|
|
361
362
|
side,
|
|
362
363
|
variant,
|
|
363
364
|
collapsible
|
|
@@ -450,7 +451,7 @@ function useTriggerGlide(handle) {
|
|
|
450
451
|
}
|
|
451
452
|
function SidebarTrigger({ label = "Toggle Sidebar", className, children, ref, ...props }) {
|
|
452
453
|
const glide = useTriggerGlide(useSidebarHandle());
|
|
453
|
-
return
|
|
454
|
+
return usePart(sidebar, "trigger", {}, {
|
|
454
455
|
"aria-label": label,
|
|
455
456
|
className: cnState(buttonVariants({
|
|
456
457
|
variant: "ghost",
|
|
@@ -509,7 +510,7 @@ function SidebarRail(t0) {
|
|
|
509
510
|
$[9] = t3;
|
|
510
511
|
$[10] = t4;
|
|
511
512
|
} else t4 = $[10];
|
|
512
|
-
return
|
|
513
|
+
return usePart(sidebar, "rail", t2, t4, "button");
|
|
513
514
|
}
|
|
514
515
|
function SidebarInset(t0) {
|
|
515
516
|
const $ = c(8);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChangeDetails } from "../../core/ui-sdk.js";
|
|
2
|
-
import
|
|
1
|
+
import { ChangeDetails, PartProps } from "../../core/ui-sdk.js";
|
|
2
|
+
import "../../core/index.js";
|
|
3
3
|
import { LinkPartProps } from "../link/link.js";
|
|
4
4
|
import { ComponentProps, ReactNode, RefObject } from "react";
|
|
5
5
|
/** How the list marks where the reader is. */
|
|
@@ -27,7 +27,7 @@ type TableOfContentsOptions = {
|
|
|
27
27
|
/** The element that scrolls, when it isn't the page: a panel, or a scroll area's viewport. */
|
|
28
28
|
root?: TableOfContentsScroller;
|
|
29
29
|
};
|
|
30
|
-
type TableOfContentsProps = TableOfContentsOptions & Omit<
|
|
30
|
+
type TableOfContentsProps = TableOfContentsOptions & Omit<PartProps<"nav">, "children" | "defaultValue"> & {
|
|
31
31
|
/**
|
|
32
32
|
* Watches the page and keeps the active section at the reading line. On
|
|
33
33
|
* by default while uncontrolled. Pass `false` to leave the active section
|
|
@@ -54,7 +54,7 @@ declare function TableOfContents({ value, defaultValue, onValueChange, observe,
|
|
|
54
54
|
* has a name, so this is for the eye. A `p` by default: pass `render={<h2 />}`
|
|
55
55
|
* when the page's outline should list it.
|
|
56
56
|
*/
|
|
57
|
-
declare function TableOfContentsTitle({ className, render, ...props }:
|
|
57
|
+
declare function TableOfContentsTitle({ className, render, ...props }: PartProps<"p">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
58
58
|
/**
|
|
59
59
|
* The ordered list of sections. It draws the rail and the mark, placed from
|
|
60
60
|
* the rows as they measure, and hidden until then so the mark never slides
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createChange, definePrimitive } from "../../core/ui-sdk.js";
|
|
2
|
+
import { createChange, definePrimitive, renderElement, usePart, usePrimitive } from "../../core/ui-sdk.js";
|
|
3
3
|
import { usePrimitiveState } from "../../core/use-primitive-state.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../core/index.js";
|
|
5
5
|
import { cn, cnState } from "../../utilities/cn/index.js";
|
|
6
6
|
import { LinkPart } from "../link/link.js";
|
|
7
7
|
import { contourPath, contourWidth, hashTarget, sectionAt, sectionsInView } from "./spy.js";
|
|
@@ -276,7 +276,7 @@ function TableOfContents(t0) {
|
|
|
276
276
|
$[16] = value;
|
|
277
277
|
$[17] = t4;
|
|
278
278
|
} else t4 = $[17];
|
|
279
|
-
const handle =
|
|
279
|
+
const handle = usePrimitive(tableOfContents, t4);
|
|
280
280
|
const spying = observe ?? value === void 0;
|
|
281
281
|
let t5;
|
|
282
282
|
if ($[18] !== handle || $[19] !== spying) {
|
|
@@ -347,7 +347,7 @@ function TableOfContents(t0) {
|
|
|
347
347
|
$[39] = variant;
|
|
348
348
|
$[40] = t11;
|
|
349
349
|
} else t11 = $[40];
|
|
350
|
-
return
|
|
350
|
+
return usePart(handle, "root", t7, t11, "nav");
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
353
|
* The small heading above the list, like "On this page". The `nav` already
|
|
@@ -355,7 +355,7 @@ function TableOfContents(t0) {
|
|
|
355
355
|
* when the page's outline should list it.
|
|
356
356
|
*/
|
|
357
357
|
function TableOfContentsTitle({ className, render, ...props }) {
|
|
358
|
-
return
|
|
358
|
+
return renderElement("p", {
|
|
359
359
|
"data-slot": "table-of-contents-title",
|
|
360
360
|
...props,
|
|
361
361
|
className: cnState("text-xs font-medium tracking-wider text-muted-foreground uppercase", className)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../core/index.js";
|
|
2
2
|
import { VariantProps } from "../../utilities/cn/index.js";
|
|
3
|
+
import { PartProps } from "../../core/ui-sdk.js";
|
|
3
4
|
import { ButtonLook } from "../button/button.js";
|
|
4
5
|
import { TooltipContent } from "../tooltip/tooltip.js";
|
|
5
6
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
@@ -87,5 +88,5 @@ declare function ToolbarTool({ label, shortcut, className, ...props }: ToolbarTo
|
|
|
87
88
|
* A small chevron that says a control opens more choices: after a tool's
|
|
88
89
|
* icon, or alone in a `ToolbarButton` rendered as a menu's trigger.
|
|
89
90
|
*/
|
|
90
|
-
declare function ToolbarCaret({ className, render, children, ...props }:
|
|
91
|
+
declare function ToolbarCaret({ className, render, children, ...props }: PartProps<"span">): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
91
92
|
export { Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarCaret, type ToolbarController, ToolbarGroup, ToolbarInput, ToolbarLink, type ToolbarOrientation, type ToolbarProps, ToolbarSeparator, ToolbarTool, type ToolbarToolProps, ToolbarTools, type ToolbarToolsChangeDetails, type ToolbarToolsProps, createToolbarController, toolbarVariants };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { renderElement } from "../../core/ui-sdk.js";
|
|
3
|
+
import "../../core/index.js";
|
|
3
4
|
import { cnState, cva } from "../../utilities/cn/index.js";
|
|
4
|
-
import
|
|
5
|
+
import "../../utilities/platform/index.js";
|
|
5
6
|
import { buttonLook } from "../button/button.js";
|
|
6
7
|
import { Icon } from "../icon/icon.js";
|
|
7
8
|
import "../input/input.js";
|
|
8
9
|
import { Kbd } from "../kbd/kbd.js";
|
|
10
|
+
import { useShortcut } from "../../utilities/platform/ui-sdk.js";
|
|
9
11
|
import { Tooltip as Tooltip$1, TooltipContent as TooltipContent$1, TooltipTrigger as TooltipTrigger$1 } from "../tooltip/tooltip.js";
|
|
10
12
|
import { c } from "react/compiler-runtime";
|
|
11
13
|
import { createContext, isValidElement, use, useRef, useState } from "react";
|
|
@@ -198,7 +200,7 @@ function ToolbarButton(t0) {
|
|
|
198
200
|
t1 = () => self.current?.click();
|
|
199
201
|
$[0] = t1;
|
|
200
202
|
} else t1 = $[0];
|
|
201
|
-
|
|
203
|
+
useShortcut(shortcuts && !props.disabled ? singleKey(shortcut) : null, t1);
|
|
202
204
|
const own = !variant && !size && rendersComponent(props.render);
|
|
203
205
|
let t2;
|
|
204
206
|
if ($[1] !== ref) {
|
|
@@ -601,7 +603,7 @@ function ToolbarTool(t0) {
|
|
|
601
603
|
$[10] = tools?.group;
|
|
602
604
|
$[11] = t2;
|
|
603
605
|
} else t2 = $[11];
|
|
604
|
-
|
|
606
|
+
useShortcut(t1, t2);
|
|
605
607
|
let t3;
|
|
606
608
|
if ($[12] !== className) {
|
|
607
609
|
t3 = cnState([
|
|
@@ -644,7 +646,7 @@ function ToolbarTool(t0) {
|
|
|
644
646
|
* icon, or alone in a `ToolbarButton` rendered as a menu's trigger.
|
|
645
647
|
*/
|
|
646
648
|
function ToolbarCaret({ className, render, children = /* @__PURE__ */ jsx(Icon, { icon: ArrowDown01Icon }), ...props }) {
|
|
647
|
-
return
|
|
649
|
+
return renderElement("span", {
|
|
648
650
|
"aria-hidden": true,
|
|
649
651
|
"data-slot": "toolbar-caret",
|
|
650
652
|
...props,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ChangeDetails } from "../../core/ui-sdk.js";
|
|
1
|
+
import "../../core/index.js";
|
|
2
|
+
import { ChangeDetails, PartProps } from "../../core/ui-sdk.js";
|
|
3
3
|
import { ButtonLook } from "../button/button.js";
|
|
4
4
|
import { DateMatchers } from "../calendar/calendar.js";
|
|
5
5
|
import { ReactNode } from "react";
|
|
@@ -135,7 +135,7 @@ declare function useWeekStrip(): {
|
|
|
135
135
|
declare const weekStripLayout = "grid grid-cols-[auto_1fr_auto] items-center gap-y-2 [&>*:not([data-slot=week-strip-previous],[data-slot=week-strip-heading],[data-slot=week-strip-next])]:col-span-full";
|
|
136
136
|
/** What a strip with no children shows: Previous, the heading, Next and the days, or only the days in scroll mode. */
|
|
137
137
|
declare function weekStripParts(scroll: boolean): ReactNode;
|
|
138
|
-
type WeekStripProps = WeekStripOptions & Omit<
|
|
138
|
+
type WeekStripProps = WeekStripOptions & Omit<PartProps<"div", WeekStripRootState>, "defaultValue"> & {
|
|
139
139
|
/** Names the strip for screen readers and agents. Set it in the page's language. */
|
|
140
140
|
label?: string;
|
|
141
141
|
/** How tall the days are. */
|
|
@@ -144,8 +144,8 @@ type WeekStripProps = WeekStripOptions & Omit<index_d_exports.PartProps<"div", W
|
|
|
144
144
|
/** Without children it renders Previous, the heading, Next and the days; in scroll mode, only the days. */
|
|
145
145
|
declare function WeekStrip({ value, defaultValue, onValueChange, week, defaultWeek, onWeekChange, scroll, start, length, weekStartsOn, locale, timeZone, today, unavailable, faded, marks, disabled, controller, label, size, className, children, ...props }: WeekStripProps): import("react").JSX.Element | null;
|
|
146
146
|
/** The month or months shown, like "November 2026". Children replace the text. */
|
|
147
|
-
declare function WeekStripHeading({ className, children, ...props }:
|
|
148
|
-
type WeekStripStepProps =
|
|
147
|
+
declare function WeekStripHeading({ className, children, ...props }: PartProps<"h2", WeekStripHeadingState>): import("react").JSX.Element | null;
|
|
148
|
+
type WeekStripStepProps = PartProps<"button", WeekStripStepState> & ButtonLook & {
|
|
149
149
|
/** The button's accessible name. Set it in the page's language. */
|
|
150
150
|
label?: string;
|
|
151
151
|
};
|
|
@@ -154,8 +154,8 @@ declare function WeekStripPrevious({ variant, size, label, className, children,
|
|
|
154
154
|
/** A ghost icon button that shows the week after. Its arrow follows the reading direction. */
|
|
155
155
|
declare function WeekStripNext({ variant, size, label, className, children, ...props }: WeekStripStepProps): import("react").JSX.Element | null;
|
|
156
156
|
/** The listbox of days. Without children it renders a `WeekStripDay` for each day shown. */
|
|
157
|
-
declare function WeekStripDays({ className, children, ...props }:
|
|
158
|
-
type WeekStripDayProps = Omit<
|
|
157
|
+
declare function WeekStripDays({ className, children, ...props }: PartProps<"div", WeekStripDaysState>): import("react").JSX.Element | null;
|
|
158
|
+
type WeekStripDayProps = Omit<PartProps<"div", WeekStripDayState>, "value"> & {
|
|
159
159
|
/** Its ISO date. */
|
|
160
160
|
value: string;
|
|
161
161
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createChange, createController, definePrimitive } from "../../core/ui-sdk.js";
|
|
2
|
+
import { createChange, createController, definePrimitive, usePart, usePrimitive } from "../../core/ui-sdk.js";
|
|
3
3
|
import { usePrimitiveState } from "../../core/use-primitive-state.js";
|
|
4
4
|
import "../../behaviors/focus/index.js";
|
|
5
5
|
import { createRovingFocus } from "../../behaviors/focus/ui-sdk.js";
|
|
6
|
-
import
|
|
6
|
+
import "../../core/index.js";
|
|
7
7
|
import { cn, cnState, cva } from "../../utilities/cn/index.js";
|
|
8
|
-
import
|
|
8
|
+
import "../../utilities/date/index.js";
|
|
9
9
|
import "../../utilities/platform/index.js";
|
|
10
10
|
import { createTypeahead, isTypeaheadKey, pageLocale } from "../../utilities/text/ui-sdk.js";
|
|
11
11
|
import "../../utilities/text/index.js";
|
|
12
12
|
import { announce } from "../../utilities/platform/ui-sdk.js";
|
|
13
13
|
import { buttonLook } from "../button/button.js";
|
|
14
|
+
import { addDays, firstDayOfWeek, formatDate, formatDateRange, isISODate, startOfWeek, todayDate, weekday } from "../../utilities/date/ui-sdk.js";
|
|
14
15
|
import { Icon } from "../icon/icon.js";
|
|
15
16
|
import { c } from "react/compiler-runtime";
|
|
16
17
|
import { createContext, use } from "react";
|
|
@@ -23,20 +24,20 @@ function matches(date, matchers) {
|
|
|
23
24
|
return (Array.isArray(matchers) ? matchers : [matchers]).some((matcher) => {
|
|
24
25
|
if (typeof matcher === "string") return matcher === date;
|
|
25
26
|
if (typeof matcher === "function") return matcher(date);
|
|
26
|
-
if ("weekday" in matcher) return matcher.weekday.includes(
|
|
27
|
+
if ("weekday" in matcher) return matcher.weekday.includes(weekday(date));
|
|
27
28
|
if ("before" in matcher) return date < matcher.before;
|
|
28
29
|
if ("after" in matcher) return date > matcher.after;
|
|
29
30
|
return date >= matcher.from && date <= matcher.to;
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
33
|
const localeOf = (state) => state.locale ?? void 0;
|
|
33
|
-
const weekStartOf = (state) => state.weekStartsOn === "auto" ?
|
|
34
|
+
const weekStartOf = (state) => state.weekStartsOn === "auto" ? firstDayOfWeek(localeOf(state)) : state.weekStartsOn;
|
|
34
35
|
/** The first day shown: the week's first day, or `start` in scroll mode. */
|
|
35
|
-
const firstDayOf = (state) => state.scroll ? state.start :
|
|
36
|
+
const firstDayOf = (state) => state.scroll ? state.start : startOfWeek(state.week, weekStartOf(state));
|
|
36
37
|
function daysOf(state) {
|
|
37
38
|
const first = firstDayOf(state);
|
|
38
39
|
const length = state.scroll ? Math.max(1, Math.floor(state.length)) : 7;
|
|
39
|
-
return Array.from({ length }, (_, index) =>
|
|
40
|
+
return Array.from({ length }, (_, index) => addDays(first, index));
|
|
40
41
|
}
|
|
41
42
|
/** The day that takes the tab stop: the selected one, else today, else the first that can be picked. */
|
|
42
43
|
function stopOf(state) {
|
|
@@ -47,14 +48,14 @@ function stopOf(state) {
|
|
|
47
48
|
}
|
|
48
49
|
function nameOf(state, date, mark) {
|
|
49
50
|
return [
|
|
50
|
-
|
|
51
|
+
formatDate(date, localeOf(state)),
|
|
51
52
|
mark?.label,
|
|
52
53
|
mark?.description
|
|
53
54
|
].filter(Boolean).join(", ");
|
|
54
55
|
}
|
|
55
56
|
function rangeOf(state) {
|
|
56
57
|
const days = daysOf(state);
|
|
57
|
-
return
|
|
58
|
+
return formatDateRange(days[0], days.at(-1), localeOf(state), {
|
|
58
59
|
day: "numeric",
|
|
59
60
|
month: "long",
|
|
60
61
|
year: "numeric"
|
|
@@ -62,7 +63,7 @@ function rangeOf(state) {
|
|
|
62
63
|
}
|
|
63
64
|
function monthsOf(state) {
|
|
64
65
|
const days = daysOf(state);
|
|
65
|
-
return
|
|
66
|
+
return formatDateRange(days[0], days.at(-1), localeOf(state), {
|
|
66
67
|
month: "long",
|
|
67
68
|
year: "numeric"
|
|
68
69
|
});
|
|
@@ -97,7 +98,7 @@ const weekStrip = definePrimitive({
|
|
|
97
98
|
},
|
|
98
99
|
controlled: ["value", "week"],
|
|
99
100
|
state: (options) => {
|
|
100
|
-
const today = options.today ??
|
|
101
|
+
const today = options.today ?? todayDate(options.timeZone);
|
|
101
102
|
const value = options.value ?? options.defaultValue ?? null;
|
|
102
103
|
return {
|
|
103
104
|
value,
|
|
@@ -134,10 +135,10 @@ const weekStrip = definePrimitive({
|
|
|
134
135
|
const change = createChange(context);
|
|
135
136
|
const showWeek = (date, reason, event) => {
|
|
136
137
|
const state = store.get();
|
|
137
|
-
if (state.scroll || state.disabled || !
|
|
138
|
+
if (state.scroll || state.disabled || !isISODate(date)) return false;
|
|
138
139
|
const start = weekStartOf(state);
|
|
139
|
-
const week =
|
|
140
|
-
if (week ===
|
|
140
|
+
const week = startOfWeek(date, start);
|
|
141
|
+
if (week === startOfWeek(state.week, start)) return true;
|
|
141
142
|
return change("week", week, {
|
|
142
143
|
reason,
|
|
143
144
|
event
|
|
@@ -145,7 +146,7 @@ const weekStrip = definePrimitive({
|
|
|
145
146
|
};
|
|
146
147
|
const pickable = (date) => {
|
|
147
148
|
const state = store.get();
|
|
148
|
-
if (state.disabled || !
|
|
149
|
+
if (state.disabled || !isISODate(date) || matches(date, state.unavailable)) return false;
|
|
149
150
|
return !state.scroll || daysOf(state).includes(date);
|
|
150
151
|
};
|
|
151
152
|
const select = (date, reason, event) => {
|
|
@@ -158,7 +159,7 @@ const weekStrip = definePrimitive({
|
|
|
158
159
|
};
|
|
159
160
|
const step = (by, reason, event) => {
|
|
160
161
|
const state = store.get();
|
|
161
|
-
const target =
|
|
162
|
+
const target = addDays(firstDayOf(state), by);
|
|
162
163
|
const pressed = event instanceof Event;
|
|
163
164
|
const shown = showWeek(target, pressed ? reason : "imperative", pressed ? event : void 0);
|
|
164
165
|
if (shown && pressed) announce(rangeOf({
|
|
@@ -181,12 +182,12 @@ const weekStrip = definePrimitive({
|
|
|
181
182
|
const days = daysOf(state);
|
|
182
183
|
const forward = rtl ? -1 : 1;
|
|
183
184
|
const target = {
|
|
184
|
-
ArrowRight:
|
|
185
|
-
ArrowLeft:
|
|
185
|
+
ArrowRight: addDays(from.key, forward),
|
|
186
|
+
ArrowLeft: addDays(from.key, -forward),
|
|
186
187
|
Home: days[0],
|
|
187
188
|
End: days.at(-1),
|
|
188
|
-
PageDown:
|
|
189
|
-
PageUp:
|
|
189
|
+
PageDown: addDays(from.key, 7),
|
|
190
|
+
PageUp: addDays(from.key, -7)
|
|
190
191
|
}[event.key];
|
|
191
192
|
if (target === void 0) return void 0;
|
|
192
193
|
if (days.includes(target)) return target;
|
|
@@ -205,7 +206,7 @@ const weekStrip = definePrimitive({
|
|
|
205
206
|
if (state.disabled || !isTypeaheadKey(event)) return;
|
|
206
207
|
if (event.key === " ") event.preventDefault();
|
|
207
208
|
const items = roving.items();
|
|
208
|
-
const labels = items.map((item) => matches(item.key, state.unavailable) ? "" :
|
|
209
|
+
const labels = items.map((item) => matches(item.key, state.unavailable) ? "" : formatDate(item.key, localeOf(state), { weekday: "long" }));
|
|
209
210
|
const index = typeahead(event.key, labels, items.findIndex((item) => item.el === day));
|
|
210
211
|
if (index !== -1) roving.focus(items[index].key);
|
|
211
212
|
};
|
|
@@ -245,7 +246,7 @@ const weekStrip = definePrimitive({
|
|
|
245
246
|
const options = context.options();
|
|
246
247
|
store.set({
|
|
247
248
|
...options.locale === void 0 ? { locale: pageLocale(el) ?? null } : {},
|
|
248
|
-
...options.today === void 0 ? { today:
|
|
249
|
+
...options.today === void 0 ? { today: todayDate(options.timeZone) } : {}
|
|
249
250
|
});
|
|
250
251
|
}
|
|
251
252
|
}
|
|
@@ -339,8 +340,8 @@ const weekStrip = definePrimitive({
|
|
|
339
340
|
return {
|
|
340
341
|
date: key,
|
|
341
342
|
name: nameOf(state, key, marks),
|
|
342
|
-
weekday:
|
|
343
|
-
label:
|
|
343
|
+
weekday: formatDate(key, localeOf(state), { weekday: "short" }),
|
|
344
|
+
label: formatDate(key, localeOf(state), { day: "numeric" }),
|
|
344
345
|
selected: state.value === key,
|
|
345
346
|
today: state.today === key,
|
|
346
347
|
unavailable,
|
|
@@ -585,7 +586,7 @@ function WeekStrip(t0) {
|
|
|
585
586
|
$[41] = weekStartsOn;
|
|
586
587
|
$[42] = t3;
|
|
587
588
|
} else t3 = $[42];
|
|
588
|
-
const handle =
|
|
589
|
+
const handle = usePrimitive(weekStrip, t3);
|
|
589
590
|
let t4;
|
|
590
591
|
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
591
592
|
t4 = {};
|
|
@@ -626,7 +627,7 @@ function WeekStrip(t0) {
|
|
|
626
627
|
$[53] = t7;
|
|
627
628
|
$[54] = t8;
|
|
628
629
|
} else t8 = $[54];
|
|
629
|
-
return
|
|
630
|
+
return usePart(handle, "root", t4, t8, "div");
|
|
630
631
|
}
|
|
631
632
|
/** The month or months shown, like "November 2026". Children replace the text. */
|
|
632
633
|
function WeekStripHeading(t0) {
|
|
@@ -674,7 +675,7 @@ function WeekStripHeading(t0) {
|
|
|
674
675
|
$[11] = t3;
|
|
675
676
|
$[12] = t4;
|
|
676
677
|
} else t4 = $[12];
|
|
677
|
-
return
|
|
678
|
+
return usePart(weekStrip, "heading", t1, t4, "h2");
|
|
678
679
|
}
|
|
679
680
|
/** A ghost icon button that shows the week before. Its arrow follows the reading direction. */
|
|
680
681
|
function WeekStripPrevious(t0) {
|
|
@@ -744,7 +745,7 @@ function WeekStripPrevious(t0) {
|
|
|
744
745
|
$[17] = t6;
|
|
745
746
|
$[18] = t7;
|
|
746
747
|
} else t7 = $[18];
|
|
747
|
-
return
|
|
748
|
+
return usePart(weekStrip, "previous", t4, t7, "button");
|
|
748
749
|
}
|
|
749
750
|
/** A ghost icon button that shows the week after. Its arrow follows the reading direction. */
|
|
750
751
|
function WeekStripNext(t0) {
|
|
@@ -814,7 +815,7 @@ function WeekStripNext(t0) {
|
|
|
814
815
|
$[17] = t6;
|
|
815
816
|
$[18] = t7;
|
|
816
817
|
} else t7 = $[18];
|
|
817
|
-
return
|
|
818
|
+
return usePart(weekStrip, "next", t4, t7, "button");
|
|
818
819
|
}
|
|
819
820
|
const weekStripDaysVariants = cva("", { variants: { scroll: {
|
|
820
821
|
false: "grid grid-cols-7 gap-1",
|
|
@@ -866,7 +867,7 @@ function WeekStripDays(t0) {
|
|
|
866
867
|
$[11] = t3;
|
|
867
868
|
$[12] = t4;
|
|
868
869
|
} else t4 = $[12];
|
|
869
|
-
return
|
|
870
|
+
return usePart(weekStrip, "days", t1, t4, "div");
|
|
870
871
|
}
|
|
871
872
|
function _temp(day) {
|
|
872
873
|
return /* @__PURE__ */ jsx(WeekStripDay, { value: day }, day);
|
|
@@ -968,7 +969,7 @@ function WeekStripDay(t0) {
|
|
|
968
969
|
$[15] = t3;
|
|
969
970
|
$[16] = t4;
|
|
970
971
|
} else t4 = $[16];
|
|
971
|
-
return
|
|
972
|
+
return usePart(weekStrip, "day", t1, t4, "div");
|
|
972
973
|
}
|
|
973
974
|
function WeekStripDayFace(t0) {
|
|
974
975
|
const $ = c(13);
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { ActionDetails, Attrs, ChangeDetails, ChangeOptions, ChangeReason, ChangeSource, CommitDetails, DismissAttemptDetails, DismissAttemptReason, DismissReason, OptionsOf, Part, Primitive, PrimitiveContext, PrimitiveInstance, PrimitiveOptions, PropSchema, PropSpec, PropsOf, ReasonVocabulary, SlotDefinition, SlotFactory, SlotName, StateOf, Store, TypesOf, UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf } from "./ui-sdk.js";
|
|
1
|
+
import { ActionDetails, Attrs, ChangeDetails, ChangeOptions, ChangeReason, ChangeSource, CommitDetails, DismissAttemptDetails, DismissAttemptReason, DismissReason, GenericPartComponent, OptionsOf, Part, PartComponent, PartProps, Parts, Primitive, PrimitiveContext, PrimitiveHandle, PrimitiveInstance, PrimitiveOptions, PropSchema, PropSpec, PropsOf, ReasonVocabulary, RenderProp, SlotDefinition, SlotFactory, SlotName, StateOf, Store, TypesOf, UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createParts, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, mergeProps, openAttrs, renderElement, selects, settleDraft, sourceOf, usePart, usePrimitive } from "./ui-sdk.js";
|
|
2
2
|
import { usePrimitiveState } from "./use-primitive-state.js";
|
|
3
|
-
export
|
|
4
|
-
declare namespace index_d_exports {
|
|
5
|
-
export { ActionDetails, Attrs, ChangeDetails, ChangeOptions, ChangeReason, ChangeSource, CommitDetails, DismissAttemptDetails, DismissAttemptReason, DismissReason, OptionsOf, Part, Primitive, PrimitiveContext, PrimitiveInstance, PrimitiveOptions, PropSchema, PropSpec, PropsOf, ReasonVocabulary, SlotDefinition, SlotFactory, SlotName, StateOf, Store, TypesOf, UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf, usePrimitiveState };
|
|
6
|
-
}
|
|
7
|
-
export { type ActionDetails, type Attrs, type ChangeDetails, type ChangeOptions, type ChangeReason, type ChangeSource, type CommitDetails, type DismissAttemptDetails, type DismissAttemptReason, type DismissReason, type OptionsOf, type Part, type Primitive, type PrimitiveContext, type PrimitiveInstance, type PrimitiveOptions, type PropSchema, type PropSpec, type PropsOf, type ReasonVocabulary, type SlotDefinition, type SlotFactory, type SlotName, type StateOf, type Store, type TypesOf, type UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, index_d_exports, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf, usePrimitiveState };
|
|
3
|
+
export { type ActionDetails, type Attrs, type ChangeDetails, type ChangeOptions, type ChangeReason, type ChangeSource, type CommitDetails, type DismissAttemptDetails, type DismissAttemptReason, type DismissReason, type GenericPartComponent, type OptionsOf, type Part, type PartComponent, type PartProps, type Parts, type Primitive, type PrimitiveContext, type PrimitiveHandle, type PrimitiveInstance, type PrimitiveOptions, type PropSchema, type PropSpec, type PropsOf, type ReasonVocabulary, type RenderProp, type SlotDefinition, type SlotFactory, type SlotName, type StateOf, type Store, type TypesOf, type UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createParts, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, mergeProps, openAttrs, renderElement, selects, settleDraft, sourceOf, usePart, usePrimitive, usePrimitiveState };
|
package/dist/core/index.js
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { checkedAttrs, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf } from "./ui-sdk.js";
|
|
1
|
+
import { checkedAttrs, createChange, createCommit, createController, createParts, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, mergeProps, openAttrs, renderElement, selects, settleDraft, sourceOf, usePart, usePrimitive } from "./ui-sdk.js";
|
|
3
2
|
import { usePrimitiveState } from "./use-primitive-state.js";
|
|
4
|
-
export
|
|
5
|
-
// src/core/index.ts
|
|
6
|
-
var core_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
-
checkedAttrs: () => checkedAttrs,
|
|
8
|
-
createChange: () => createChange,
|
|
9
|
-
createCommit: () => createCommit,
|
|
10
|
-
createController: () => createController,
|
|
11
|
-
createUndoStack: () => createUndoStack,
|
|
12
|
-
css: () => css,
|
|
13
|
-
definePrimitive: () => definePrimitive,
|
|
14
|
-
direct: () => direct,
|
|
15
|
-
dispatch: () => dispatch,
|
|
16
|
-
elements: () => elements,
|
|
17
|
-
idPart: () => idPart,
|
|
18
|
-
isDismissal: () => isDismissal,
|
|
19
|
-
isFocusFromKeyboard: () => isFocusFromKeyboard,
|
|
20
|
-
live: () => live,
|
|
21
|
-
openAttrs: () => openAttrs,
|
|
22
|
-
selects: () => selects,
|
|
23
|
-
settleDraft: () => settleDraft,
|
|
24
|
-
sourceOf: () => sourceOf,
|
|
25
|
-
usePrimitiveState: () => usePrimitiveState
|
|
26
|
-
});
|
|
27
|
-
export { checkedAttrs, core_exports, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf, usePrimitiveState };
|
|
3
|
+
export { checkedAttrs, createChange, createCommit, createController, createParts, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, mergeProps, openAttrs, renderElement, selects, settleDraft, sourceOf, usePart, usePrimitive, usePrimitiveState };
|
package/dist/core/ui-sdk.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ActionDetails, Attrs, ChangeDetails, ChangeOptions, ChangeReason, ChangeSource, CommitDetails, DismissAttemptDetails, DismissAttemptReason, DismissReason, OptionsOf, Part, Primitive, PrimitiveContext, PrimitiveInstance, PrimitiveOptions, PropSchema, PropSpec, PropsOf, ReasonVocabulary, SlotDefinition, SlotFactory, SlotName, StateOf, Store, TypesOf, UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf } from "@ui-sdk/core";
|
|
2
|
-
|
|
3
|
-
export { type ActionDetails, type Attrs, type ChangeDetails, type ChangeOptions, type ChangeReason, type ChangeSource, type CommitDetails, type DismissAttemptDetails, type DismissAttemptReason, type DismissReason, type OptionsOf, type Part, type Primitive, type PrimitiveContext, type PrimitiveInstance, type PrimitiveOptions, type PropSchema, type PropSpec, type PropsOf, type ReasonVocabulary, type SlotDefinition, type SlotFactory, type SlotName, type StateOf, type Store, type TypesOf, type UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, openAttrs, selects, settleDraft, sourceOf };
|
|
2
|
+
import { GenericPartComponent, PartComponent, PartProps, Parts, PrimitiveHandle, RenderProp, createParts, mergeProps, renderElement, usePart, usePrimitive } from "@ui-sdk/react/primitive";
|
|
3
|
+
export { type ActionDetails, type Attrs, type ChangeDetails, type ChangeOptions, type ChangeReason, type ChangeSource, type CommitDetails, type DismissAttemptDetails, type DismissAttemptReason, type DismissReason, type GenericPartComponent, type OptionsOf, type Part, type PartComponent, type PartProps, type Parts, type Primitive, type PrimitiveContext, type PrimitiveHandle, type PrimitiveInstance, type PrimitiveOptions, type PropSchema, type PropSpec, type PropsOf, type ReasonVocabulary, type RenderProp, type SlotDefinition, type SlotFactory, type SlotName, type StateOf, type Store, type TypesOf, type UndoStackOptions, checkedAttrs, createChange, createCommit, createController, createParts, createUndoStack, css, definePrimitive, direct, dispatch, elements, idPart, isDismissal, isFocusFromKeyboard, live, mergeProps, openAttrs, renderElement, selects, settleDraft, sourceOf, usePart, usePrimitive };
|