@glimstone/solid 0.0.0-stage → 4.5.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.
Files changed (127) hide show
  1. package/README.md +50 -2
  2. package/dist/AboutCard.d.ts +154 -0
  3. package/dist/Accordion.d.ts +15 -0
  4. package/dist/Accordion.js +45 -0
  5. package/dist/AngleSlider.d.ts +10 -0
  6. package/dist/AngleSlider.js +47 -0
  7. package/dist/Avatar.d.ts +11 -0
  8. package/dist/Avatar.js +50 -0
  9. package/dist/Badge-CC2mjBLM.js +116 -0
  10. package/dist/Badge.d.ts +52 -0
  11. package/dist/BusyRing.d.ts +13 -0
  12. package/dist/Button-DNSkNN0r.js +219 -0
  13. package/dist/Button.d.ts +56 -0
  14. package/dist/Card.d.ts +33 -0
  15. package/dist/Carousel.d.ts +18 -0
  16. package/dist/Carousel.js +88 -0
  17. package/dist/Checkbox.d.ts +14 -0
  18. package/dist/CoffeeDialog.d.ts +16 -0
  19. package/dist/Collapsible.d.ts +12 -0
  20. package/dist/Collapsible.js +27 -0
  21. package/dist/ColorPicker.d.ts +21 -0
  22. package/dist/Combobox.d.ts +16 -0
  23. package/dist/Combobox.js +64 -0
  24. package/dist/ConfirmDialog.d.ts +29 -0
  25. package/dist/ContextMenu.d.ts +27 -0
  26. package/dist/CopyField.d.ts +17 -0
  27. package/dist/CryptoDonateDialog.d.ts +35 -0
  28. package/dist/DatePicker.d.ts +17 -0
  29. package/dist/DatePicker.js +132 -0
  30. package/dist/DropdownListbox.d.ts +22 -0
  31. package/dist/EmptyState.d.ts +19 -0
  32. package/dist/FieldError.d.ts +8 -0
  33. package/dist/FieldRow.d.ts +20 -0
  34. package/dist/FieldRowGroup.d.ts +10 -0
  35. package/dist/FileUpload.d.ts +15 -0
  36. package/dist/FileUpload.js +68 -0
  37. package/dist/FloatingPanel.d.ts +14 -0
  38. package/dist/FloatingPanel.js +80 -0
  39. package/dist/Fortress.d.ts +101 -0
  40. package/dist/FortressAppCard.d.ts +39 -0
  41. package/dist/FortressPermissions.d.ts +23 -0
  42. package/dist/FortressStatusWindow.d.ts +25 -0
  43. package/dist/GlyphField.d.ts +16 -0
  44. package/dist/GlyphTile.d.ts +12 -0
  45. package/dist/HoverCard.d.ts +12 -0
  46. package/dist/HoverCard.js +55 -0
  47. package/dist/IconButton-Lzbq5Cst.js +42 -0
  48. package/dist/IconButton.d.ts +16 -0
  49. package/dist/IconTipButton-BojUYQWU.js +73 -0
  50. package/dist/IconTipButton.d.ts +20 -0
  51. package/dist/InfoBubble.d.ts +4 -0
  52. package/dist/InstanceCard.d.ts +25 -0
  53. package/dist/Kbd.d.ts +5 -0
  54. package/dist/Lift-CsM0IU9t.js +13 -0
  55. package/dist/Lift.d.ts +12 -0
  56. package/dist/ListRow.d.ts +16 -0
  57. package/dist/ListTable.d.ts +21 -0
  58. package/dist/Marquee.d.ts +16 -0
  59. package/dist/Marquee.js +59 -0
  60. package/dist/MenuBar.d.ts +17 -0
  61. package/dist/Meter.d.ts +18 -0
  62. package/dist/NumberField.d.ts +20 -0
  63. package/dist/Pagination.d.ts +14 -0
  64. package/dist/Pagination.js +77 -0
  65. package/dist/PasswordField.d.ts +17 -0
  66. package/dist/PathField.d.ts +28 -0
  67. package/dist/PaypalDialog.d.ts +51 -0
  68. package/dist/Pill.d.ts +12 -0
  69. package/dist/PinInput.d.ts +21 -0
  70. package/dist/PinInput.js +50 -0
  71. package/dist/Popover.d.ts +14 -0
  72. package/dist/ProgressBar.d.ts +14 -0
  73. package/dist/Rating.d.ts +15 -0
  74. package/dist/Rating.js +45 -0
  75. package/dist/ReadmeButton.d.ts +29 -0
  76. package/dist/RowMark.d.ts +5 -0
  77. package/dist/ScrollArea.d.ts +9 -0
  78. package/dist/ScrollArea.js +31 -0
  79. package/dist/Select.d.ts +48 -0
  80. package/dist/Select.js +548 -0
  81. package/dist/Selector.d.ts +76 -0
  82. package/dist/Sheet.d.ts +21 -0
  83. package/dist/SidebarRow.d.ts +28 -0
  84. package/dist/SignInCard.d.ts +40 -0
  85. package/dist/SignaturePad.d.ts +11 -0
  86. package/dist/SignaturePad.js +65 -0
  87. package/dist/SkeletonRow.d.ts +10 -0
  88. package/dist/Slider.d.ts +12 -0
  89. package/dist/Slider.js +34 -0
  90. package/dist/Splitter.d.ts +14 -0
  91. package/dist/Splitter.js +54 -0
  92. package/dist/Steps.d.ts +17 -0
  93. package/dist/Steps.js +112 -0
  94. package/dist/SubCard.d.ts +17 -0
  95. package/dist/Table.d.ts +14 -0
  96. package/dist/TagsInput.d.ts +15 -0
  97. package/dist/TagsInput.js +57 -0
  98. package/dist/TextField.d.ts +25 -0
  99. package/dist/Timer.d.ts +15 -0
  100. package/dist/Timer.js +98 -0
  101. package/dist/TipWrap.d.ts +12 -0
  102. package/dist/Toast.d.ts +27 -0
  103. package/dist/Toggle.d.ts +23 -0
  104. package/dist/Tour.d.ts +10 -0
  105. package/dist/Tour.js +83 -0
  106. package/dist/Tree.d.ts +20 -0
  107. package/dist/UnavailableNotice.d.ts +15 -0
  108. package/dist/Window.d.ts +30 -0
  109. package/dist/WindowBar.d.ts +25 -0
  110. package/dist/WindowFootRow.d.ts +25 -0
  111. package/dist/engines.d.ts +17 -0
  112. package/dist/fieldName-Bb6qW0oS.js +8 -0
  113. package/dist/fieldName.d.ts +5 -0
  114. package/dist/glyphs-xP5bYKa1.js +127 -0
  115. package/dist/glyphs.d.ts +36 -0
  116. package/dist/index.d.ts +65 -0
  117. package/dist/index.js +5279 -0
  118. package/dist/portalHue-CLVEiNTo.js +14 -0
  119. package/dist/portalHue.d.ts +10 -0
  120. package/dist/style-ByE-hij7.js +8 -0
  121. package/dist/style.d.ts +7 -0
  122. package/dist/useConfirm.d.ts +26 -0
  123. package/dist/useDragArmed.d.ts +6 -0
  124. package/dist/usePaypalButtons.d.ts +17 -0
  125. package/dist/useTipBubble-BJIYZw03.js +65 -0
  126. package/dist/useTipBubble.d.ts +25 -0
  127. package/package.json +148 -4
@@ -0,0 +1,16 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type FieldWidth } from "@glimstone/core";
3
+ export interface GlyphFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "width" | "class"> {
4
+ glyph: JSX.Element;
5
+ /** The accessible name. Inside a FieldRow the row gives it. */
6
+ label?: string;
7
+ /** Controls inside the box, after the field, such as a clear button. */
8
+ after?: JSX.Element;
9
+ /** Sets a path or a token in monospace. */
10
+ mono?: boolean;
11
+ width?: FieldWidth;
12
+ /** Classes for the box, which carries the width. */
13
+ class?: string;
14
+ ref?: HTMLInputElement | ((el: HTMLInputElement) => void);
15
+ }
16
+ export declare function GlyphField(props: GlyphFieldProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { JSX } from "solid-js";
2
+ export interface GlyphTileProps {
3
+ glyph: JSX.Element;
4
+ /** Takes the accent off the glyph, such as for a file among folders. */
5
+ quiet?: boolean;
6
+ /** Sets it on the third surface, for a place where a bare glyph gets lost. */
7
+ ground?: boolean;
8
+ /** Fills it with the accent, as a row around it being reached does. */
9
+ active?: boolean;
10
+ class?: string;
11
+ }
12
+ export declare function GlyphTile(props: GlyphTileProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface HoverCardProps {
3
+ /** The link's words. */
4
+ label: string;
5
+ href: string;
6
+ /** How long the pointer rests before the card opens, and after it leaves before it closes, in ms. */
7
+ openDelay?: number;
8
+ closeDelay?: number;
9
+ /** Draws the card. */
10
+ content: () => JSX.Element;
11
+ }
12
+ export declare function HoverCard(raw: HoverCardProps): JSX.Element;
@@ -0,0 +1,55 @@
1
+ import { t as e } from "./Lift-CsM0IU9t.js";
2
+ import { t } from "./portalHue-CLVEiNTo.js";
3
+ import { t as n } from "./style-ByE-hij7.js";
4
+ import { createComponent as r, insert as i, mergeProps as a, spread as o, template as s, use as c } from "solid-js/web";
5
+ import { Show as l, createMemo as u, createSignal as d, createUniqueId as f, mergeProps as p } from "solid-js";
6
+ import { pageDir as m } from "@glimstone/core";
7
+ import { normalizeProps as h, useMachine as g } from "@zag-js/solid";
8
+ import * as _ from "@zag-js/hover-card";
9
+ // src/HoverCard.tsx
10
+ var v = /*#__PURE__*/ s("<a data-glim=HoverCard>"), y = /*#__PURE__*/ s("<div><div>");
11
+ function b(s) {
12
+ let b = p({
13
+ openDelay: 600,
14
+ closeDelay: 300
15
+ }, s), x = f(), S = g(_.machine, () => ({
16
+ id: x,
17
+ dir: m(),
18
+ openDelay: b.openDelay,
19
+ closeDelay: b.closeDelay,
20
+ positioning: {
21
+ placement: "bottom",
22
+ gutter: 8
23
+ }
24
+ })), C = u(() => _.connect(S, h)), [w, T] = d(), E = t(() => C().open, w), D = () => C().getPositionerProps();
25
+ return [(() => {
26
+ var e = v();
27
+ return c(T, e), o(e, a(() => C().getTriggerProps(), {
28
+ get href() {
29
+ return b.href;
30
+ },
31
+ class: "glim-hovercard-link"
32
+ }), !1, !0), i(e, () => b.label), e;
33
+ })(), r(l, {
34
+ get when() {
35
+ return C().open;
36
+ },
37
+ get children() {
38
+ return r(e, { get children() {
39
+ var e = y(), t = e.firstChild;
40
+ return o(e, a(D, {
41
+ get style() {
42
+ return {
43
+ ...D().style,
44
+ ...n(E.style())
45
+ };
46
+ },
47
+ get class() {
48
+ return `glim-hovercard-positioner ${E.className()}`.trim();
49
+ }
50
+ }), !1, !0), o(t, a(() => C().getContentProps(), { class: "glim-hovercard" }), !1, !0), i(t, () => b.content()), e;
51
+ } });
52
+ }
53
+ })];
54
+ }
55
+ export { b as HoverCard };
@@ -0,0 +1,42 @@
1
+ import { t as e } from "./IconTipButton-BojUYQWU.js";
2
+ import { createComponent as t, mergeProps as n, template as r } from "solid-js/web";
3
+ import { Show as i, splitProps as a } from "solid-js";
4
+ import { takePageHue as o } from "@glimstone/core";
5
+ // src/IconButton.tsx
6
+ var s = /*#__PURE__*/ r("<span data-glim=IconButton class=glim-icon-btn-gap aria-hidden=true>"), c = (e) => o(e.currentTarget);
7
+ function l(r) {
8
+ let [o, l] = a(r, [
9
+ "tip",
10
+ "glyph",
11
+ "pressed",
12
+ "absent",
13
+ "class"
14
+ ]);
15
+ return t(i, {
16
+ get when() {
17
+ return !o.absent;
18
+ },
19
+ get fallback() {
20
+ return s();
21
+ },
22
+ get children() {
23
+ return t(e, n({ "data-glim": "IconButton" }, l, {
24
+ get tip() {
25
+ return o.tip;
26
+ },
27
+ get ariaPressed() {
28
+ return o.pressed;
29
+ },
30
+ get class() {
31
+ return `glim-btn-bare glim-icon-btn ${o.class ?? ""}`.trim();
32
+ },
33
+ onPointerEnter: c,
34
+ onFocusIn: c,
35
+ get children() {
36
+ return o.glyph;
37
+ }
38
+ }));
39
+ }
40
+ });
41
+ }
42
+ export { l as t };
@@ -0,0 +1,16 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface IconButtonProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "type" | "class" | "disabled"> {
3
+ /** The hover and focus explanation, and the button's accessible name. */
4
+ tip: string;
5
+ glyph: JSX.Element;
6
+ /** Makes it a link in the same square. */
7
+ href?: string;
8
+ /** Set for a button that stays on or off: it says so, and the accent washes it while it is on. */
9
+ pressed?: boolean;
10
+ /** Draws no button and keeps its square, so the others of a row stay where they are. */
11
+ absent?: boolean;
12
+ disabled?: boolean;
13
+ type?: "button" | "submit";
14
+ class?: string;
15
+ }
16
+ export declare function IconButton(props: IconButtonProps): JSX.Element;
@@ -0,0 +1,73 @@
1
+ import { n as e, t } from "./useTipBubble-BJIYZw03.js";
2
+ import { Dynamic as n, createComponent as r, memo as i, mergeProps as a } from "solid-js/web";
3
+ import { mergeProps as o, splitProps as s } from "solid-js";
4
+ // src/IconTipButton.tsx
5
+ function c(c) {
6
+ let l = o({ type: "button" }, c), [u, d] = s(l, [
7
+ "tip",
8
+ "disabled",
9
+ "class",
10
+ "style",
11
+ "children",
12
+ "href",
13
+ "type",
14
+ "ariaPressed",
15
+ "ariaExpanded",
16
+ "ref"
17
+ ]), f = t(() => u.tip, () => !!u.disabled), p = () => !!u.href && !u.disabled, m = (e) => {
18
+ f.ref(e), typeof u.ref == "function" && u.ref(e);
19
+ };
20
+ return [r(e, {
21
+ get on() {
22
+ return i(() => !!u.disabled)() && !!u.tip;
23
+ },
24
+ get show() {
25
+ return f.show;
26
+ },
27
+ get hide() {
28
+ return f.hide;
29
+ },
30
+ get children() {
31
+ return r(n, a({
32
+ get component() {
33
+ return p() ? "a" : "button";
34
+ },
35
+ "data-glim": "IconTipButton"
36
+ }, d, {
37
+ get href() {
38
+ return i(() => !!p())() ? u.href : void 0;
39
+ },
40
+ get type() {
41
+ return i(() => !!p())() ? void 0 : u.type;
42
+ },
43
+ get disabled() {
44
+ return i(() => !!p())() ? void 0 : u.disabled;
45
+ },
46
+ ref: m,
47
+ get "aria-label"() {
48
+ return u.tip;
49
+ },
50
+ get "aria-pressed"() {
51
+ return u.ariaPressed;
52
+ },
53
+ get "aria-expanded"() {
54
+ return u.ariaExpanded;
55
+ },
56
+ get "aria-describedby"() {
57
+ return f.describedBy();
58
+ }
59
+ }, () => f.handlers, {
60
+ get class() {
61
+ return u.class;
62
+ },
63
+ get style() {
64
+ return u.style;
65
+ },
66
+ get children() {
67
+ return u.children;
68
+ }
69
+ }));
70
+ }
71
+ }), i(() => f.bubble)];
72
+ }
73
+ export { c as t };
@@ -0,0 +1,20 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface IconTipButtonProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "type" | "class" | "disabled" | "style"> {
3
+ /** The hover and focus explanation, and the button's `aria-label`. */
4
+ tip: string;
5
+ disabled?: boolean;
6
+ class?: string;
7
+ /** `aria-pressed` for a trigger that toggles rather than acts once. Omitted,
8
+ * no attribute is rendered. */
9
+ ariaPressed?: boolean;
10
+ /** `aria-expanded` for a trigger that opens a disclosure panel. Omitted, no
11
+ * attribute is rendered. */
12
+ ariaExpanded?: boolean;
13
+ /** Inline style, so a hued Badge can set its `--item-hue*` properties. */
14
+ style?: JSX.CSSProperties | string;
15
+ children: JSX.Element;
16
+ /** Makes it a link. A disabled one stays a disabled button. */
17
+ href?: string;
18
+ type?: "button" | "submit";
19
+ }
20
+ export declare function IconTipButton(props: IconTipButtonProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function InfoBubble(props: {
2
+ tip: string;
3
+ onAccent?: boolean;
4
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type InstanceFigure } from "@glimstone/core";
3
+ export type { InstanceFigure } from "@glimstone/core";
4
+ export interface InstanceCardProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "class" | "style"> {
5
+ /** The app's mark, as an address or as an inline `<svg>`. */
6
+ logo?: string | JSX.Element;
7
+ /** The device's name for an instance of this app, the app's name for another app. */
8
+ name: string;
9
+ eyebrow?: string;
10
+ /** Badges after the name, such as the state. */
11
+ badges?: JSX.Element;
12
+ /** One quiet line of facts, joined with a dot. Empty ones are left out. */
13
+ facts?: (string | undefined)[];
14
+ /** A few numbers under the facts, each with its small label. */
15
+ figures?: InstanceFigure[];
16
+ /** What the card holds under the head, such as a row per instance. */
17
+ children?: JSX.Element;
18
+ /** The card's buttons. Without a body they stand beside the mark. */
19
+ actions?: JSX.Element;
20
+ /** The card's position in the rainbow, counted over the cards on the page. */
21
+ hueIndex?: number;
22
+ class?: string;
23
+ style?: JSX.CSSProperties;
24
+ }
25
+ export declare function InstanceCard(props: InstanceCardProps): JSX.Element;
package/dist/Kbd.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { JSX } from "solid-js";
2
+ export declare function Kbd(props: {
3
+ children: JSX.Element;
4
+ class?: string;
5
+ }): JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { children as e, createRenderEffect as t, onCleanup as n } from "solid-js";
2
+ import { portalTarget as r } from "@glimstone/core";
3
+ // src/Lift.tsx
4
+ function i(i) {
5
+ let a = e(() => i.children);
6
+ return t(() => {
7
+ let e = a.toArray().filter((e) => e instanceof Node);
8
+ r().append(...e), n(() => {
9
+ i.onLeave?.(), e.forEach((e) => e.remove());
10
+ });
11
+ }), null;
12
+ }
13
+ export { i as t };
package/dist/Lift.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { type JSX } from "solid-js";
2
+ /**
3
+ * Puts its children straight into the portal target, the body or an open
4
+ * sheet, so no card's `overflow: hidden` clips them. Solid's Portal would
5
+ * wrap them in a div of its own, and the markup would differ from the other
6
+ * frameworks'. They arrive while rendering, so an effect can measure them.
7
+ * `onLeave` runs while they still stand in the page, just before they go.
8
+ */
9
+ export declare function Lift(props: {
10
+ children: JSX.Element;
11
+ onLeave?: () => void;
12
+ }): null;
@@ -0,0 +1,16 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface ListRowProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "class"> {
3
+ name: string;
4
+ /** More about the row, drawn as an "(i)" beside the name. */
5
+ tip?: string | null;
6
+ /** Sets the name in monospace, for a path. */
7
+ mono?: boolean;
8
+ /** The glyph at the row's start, which fills with the accent while the row is reached. */
9
+ tile?: JSX.Element;
10
+ /** What stands at the row's end at rest. */
11
+ badges?: JSX.Element;
12
+ /** The buttons that come in on hover and focus. A press on one does not open the row. */
13
+ actions?: JSX.Element;
14
+ class?: string;
15
+ }
16
+ export declare function ListRow(props: ListRowProps): JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type ListColumn, type ListTableText } from "@glimstone/core";
3
+ export type { ListColumn, ListTableText } from "@glimstone/core";
4
+ export interface ListTableProps<T extends object> {
5
+ /** The list's accessible name. */
6
+ label: string;
7
+ columns: readonly ListColumn[];
8
+ rows: readonly T[];
9
+ /** A key that stays with a row through sorting and filtering. */
10
+ rowKey: (row: T) => string;
11
+ /** The columns the search looks in; the first column by default. */
12
+ search?: readonly string[];
13
+ text: ListTableText;
14
+ /** Draws a cell of its own. Nothing returned shows the value. */
15
+ cell?: (row: T, column: ListColumn) => JSX.Element;
16
+ /** Enter or a double click on a row: open its object. */
17
+ onOpen?: (row: T) => void;
18
+ /** The picked rows, in the list's order, after every change. */
19
+ onSelect?: (rows: T[]) => void;
20
+ }
21
+ export declare function ListTable<T extends object>(props: ListTableProps<T>): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type MarqueeText } from "@glimstone/core";
3
+ export type { MarqueeText } from "@glimstone/core";
4
+ export interface MarqueeProps<T> {
5
+ /** The row's accessible name. */
6
+ label: string;
7
+ items: readonly T[];
8
+ /** How fast it runs, in pixels a second. */
9
+ speed?: number;
10
+ /** Runs the other way. */
11
+ reverse?: boolean;
12
+ /** Draws one item. */
13
+ item: (item: T) => JSX.Element;
14
+ text?: Partial<MarqueeText>;
15
+ }
16
+ export declare function Marquee<T>(raw: MarqueeProps<T>): JSX.Element;
@@ -0,0 +1,59 @@
1
+ import { t as e } from "./IconButton-Lzbq5Cst.js";
2
+ import { f as t, m as n } from "./glyphs-xP5bYKa1.js";
3
+ import { createComponent as r, insert as i, memo as a, mergeProps as o, spread as s, template as c } from "solid-js/web";
4
+ import { For as l, Index as u, createMemo as d, createSignal as f, createUniqueId as p, mergeProps as m } from "solid-js";
5
+ import { MARQUEE_TEXT as h, pageDir as g } from "@glimstone/core";
6
+ import { normalizeProps as _, useMachine as v } from "@zag-js/solid";
7
+ import * as y from "@zag-js/marquee";
8
+ // src/Marquee.tsx
9
+ var b = /*#__PURE__*/ c("<div data-glim=Marquee class=glim-marquee-frame><div><div>"), x = /*#__PURE__*/ c("<div>");
10
+ function S(c) {
11
+ let S = m({
12
+ speed: 40,
13
+ reverse: !1
14
+ }, c), C = () => ({
15
+ ...h,
16
+ ...S.text
17
+ }), w = p(), [T, E] = f(!1), D = v(y.machine, () => ({
18
+ id: w,
19
+ dir: g(),
20
+ speed: S.speed,
21
+ reverse: S.reverse,
22
+ autoFill: !0,
23
+ paused: T(),
24
+ spacing: "var(--space-10)",
25
+ translations: { root: S.label }
26
+ })), O = d(() => y.connect(D, _));
27
+ return (() => {
28
+ var c = b(), d = c.firstChild, f = d.firstChild;
29
+ return s(d, o(() => O().getRootProps(), { class: "glim-marquee" }), !1, !0), s(f, o(() => O().getViewportProps(), { class: "glim-marquee-viewport" }), !1, !0), i(f, r(u, {
30
+ get each() {
31
+ return Array.from({ length: O().contentCount });
32
+ },
33
+ children: (e, t) => (() => {
34
+ var e = x();
35
+ return s(e, o(() => O().getContentProps({ index: t }), { class: "glim-marquee-content" }), !1, !0), i(e, r(l, {
36
+ get each() {
37
+ return S.items;
38
+ },
39
+ children: (e) => (() => {
40
+ var t = x();
41
+ return s(t, o(() => O().getItemProps(), { class: "glim-marquee-item" }), !1, !0), i(t, () => S.item(e)), t;
42
+ })()
43
+ })), e;
44
+ })()
45
+ })), i(c, r(e, {
46
+ get tip() {
47
+ return a(() => !!T())() ? C().resume : C().pause;
48
+ },
49
+ get glyph() {
50
+ return a(() => !!T())() ? r(n, {}) : r(t, {});
51
+ },
52
+ get pressed() {
53
+ return T();
54
+ },
55
+ onClick: () => E(!T())
56
+ }), null), c;
57
+ })();
58
+ }
59
+ export { S as Marquee };
@@ -0,0 +1,17 @@
1
+ import type { MenuBarHandle } from "@glimstone/core";
2
+ import { type MenuEntry } from "./ContextMenu.tsx";
3
+ export type { MenuBarHandle } from "@glimstone/core";
4
+ export interface MenuBarMenu {
5
+ label: string;
6
+ items: MenuEntry[];
7
+ /** The id of the open menu, for a caller or a script that looks for it. */
8
+ id?: string;
9
+ }
10
+ export interface MenuBarProps {
11
+ /** The bar's accessible name, such as "Menu". */
12
+ label: string;
13
+ menus: MenuBarMenu[];
14
+ ref?: MenuBarHandle | ((handle: MenuBarHandle) => void);
15
+ class?: string;
16
+ }
17
+ export declare function MenuBar(props: MenuBarProps): import("solid-js").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type MeterSize } from "@glimstone/core";
2
+ export type { MeterSize } from "@glimstone/core";
3
+ export interface MeterProps {
4
+ /** From 0 to 1. Without it the meter shows stripes while the level is still being read. */
5
+ value?: number | null;
6
+ /** The accessible name, such as the disk's. */
7
+ label: string;
8
+ /** `small` sits beside a row's name, `medium` is as wide as its column. */
9
+ size?: MeterSize;
10
+ /** From here on the fill is the fault colour. */
11
+ threshold?: number;
12
+ /** Slim and grey, for a footer line or a dense list. Inside a button it takes the accent when the button is reached. */
13
+ quiet?: boolean;
14
+ /** The level in words, such as "120 GB free of 4 TB": read out, and shown in the bubble. */
15
+ valueText?: string;
16
+ class?: string;
17
+ }
18
+ export declare function Meter(props: MeterProps): import("solid-js").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface NumberFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | "class" | "ref"> {
3
+ /** The bounds and the step. The steppers, the arrow keys and the wheel all
4
+ * go through the input's own stepUp(), so the range lives here alone. */
5
+ min?: number | string;
6
+ max?: number | string;
7
+ step?: number | string;
8
+ /** Called alike for typing, the arrow keys, the steppers and the wheel,
9
+ * which steps the value only while the field has focus. */
10
+ onChange?: (e: Event & {
11
+ currentTarget: HTMLInputElement;
12
+ }) => void;
13
+ /** Why the value cannot stand, as a line under the field until it is fixed. */
14
+ error?: string;
15
+ /** Classes for the input. A width set here has to be definite, since the
16
+ * arrows sit against the input's end. */
17
+ class?: string;
18
+ ref?: HTMLInputElement | ((el: HTMLInputElement) => void);
19
+ }
20
+ export declare function NumberField(props: NumberFieldProps): JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { type PaginationText } from "@glimstone/core";
2
+ export type { PaginationText } from "@glimstone/core";
3
+ export interface PaginationProps {
4
+ /** How many items the pages hold between them. */
5
+ count: number;
6
+ pageSize?: number;
7
+ /** The page in force, counted from 1. Left out, it keeps its own. */
8
+ page?: number;
9
+ onPageChange?: (page: number) => void;
10
+ /** How many pages stand on each side of the one in force before a gap. */
11
+ siblingCount?: number;
12
+ text?: Partial<PaginationText>;
13
+ }
14
+ export declare function Pagination(raw: PaginationProps): import("solid-js").JSX.Element;
@@ -0,0 +1,77 @@
1
+ import { t as e } from "./Button-DNSkNN0r.js";
2
+ import { d as t, t as n } from "./glyphs-xP5bYKa1.js";
3
+ import { createComponent as r, insert as i, mergeProps as a, spread as o, template as s } from "solid-js/web";
4
+ import { For as c, createMemo as l, createSignal as u, createUniqueId as d, mergeProps as f } from "solid-js";
5
+ import { PAGINATION_TEXT as p, pageDir as m } from "@glimstone/core";
6
+ import { normalizeProps as h, useMachine as g } from "@zag-js/solid";
7
+ import * as _ from "@zag-js/pagination";
8
+ // src/Pagination.tsx
9
+ var v = /*#__PURE__*/ s("<nav data-glim=Pagination>"), y = /*#__PURE__*/ s("<button>"), b = /*#__PURE__*/ s("<span>…");
10
+ function x(s) {
11
+ let x = f({
12
+ pageSize: 10,
13
+ siblingCount: 1
14
+ }, s), S = () => ({
15
+ ...p,
16
+ ...x.text
17
+ }), C = d(), [w, T] = u(1), E = g(_.machine, () => ({
18
+ id: C,
19
+ dir: m(),
20
+ count: x.count,
21
+ pageSize: x.pageSize,
22
+ siblingCount: x.siblingCount,
23
+ page: x.page ?? w(),
24
+ onPageChange: (e) => {
25
+ T(e.page), x.onPageChange?.(e.page);
26
+ },
27
+ translations: {
28
+ rootLabel: S().label,
29
+ itemLabel: (e) => S().page(e.page, e.totalPages)
30
+ }
31
+ })), D = l(() => _.connect(E, h)), O = l(() => D().pages.map((e, t) => e.type === "page" ? e.value : `gap-${t}`));
32
+ return (() => {
33
+ var s = v();
34
+ return o(s, a(() => D().getRootProps(), { class: "glim-pagination" }), !1, !0), i(s, r(e, {
35
+ get label() {
36
+ return S().previous;
37
+ },
38
+ labelKey: null,
39
+ get glyph() {
40
+ return r(n, {});
41
+ },
42
+ variant: "icon",
43
+ get disabled() {
44
+ return D().previousPage === null;
45
+ },
46
+ onClick: () => D().goToPrevPage()
47
+ }), null), i(s, r(c, {
48
+ get each() {
49
+ return O();
50
+ },
51
+ children: (e) => typeof e == "number" ? (() => {
52
+ var t = y();
53
+ return o(t, a(() => D().getItemProps({
54
+ type: "page",
55
+ value: e
56
+ }), { class: "glim-page glim-num" }), !1, !0), i(t, e), t;
57
+ })() : (() => {
58
+ var t = b();
59
+ return o(t, a(() => D().getEllipsisProps({ index: Number(e.slice(4)) }), { class: "glim-page-gap" }), !1, !0), t;
60
+ })()
61
+ }), null), i(s, r(e, {
62
+ get label() {
63
+ return S().next;
64
+ },
65
+ labelKey: null,
66
+ get glyph() {
67
+ return r(t, {});
68
+ },
69
+ variant: "icon",
70
+ get disabled() {
71
+ return D().nextPage === null;
72
+ },
73
+ onClick: () => D().goToNextPage()
74
+ }), null), s;
75
+ })();
76
+ }
77
+ export { x as Pagination };
@@ -0,0 +1,17 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type FieldWidth } from "@glimstone/core";
3
+ export interface PasswordFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "class"> {
4
+ width?: FieldWidth;
5
+ /** Attributes for the eye, such as a data hook. */
6
+ eyeAttrs?: Record<string, string>;
7
+ /** The eye's name and bubble while the secret is hidden, and once it shows. */
8
+ text?: {
9
+ show: string;
10
+ hide: string;
11
+ };
12
+ /** Why the value cannot stand, as a line under the field until it is fixed. */
13
+ error?: string;
14
+ /** Classes for the wrapper, which carries the field's width. */
15
+ class?: string;
16
+ }
17
+ export declare function PasswordField(props: PasswordFieldProps): JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type FieldWidth } from "@glimstone/core";
3
+ export interface PathFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "type" | "width" | "class" | "ref"> {
4
+ value: string;
5
+ /** Called with the path as it is typed and as the picker answers. */
6
+ onChange: (path: string) => void;
7
+ /** Handed the path in the field. Answers with a path, or with nothing when the person left. */
8
+ pick: (current: string) => string | null | undefined | Promise<string | null | undefined>;
9
+ /** Called with a path the picker answered with, after onChange. */
10
+ onPicked?: (path: string) => void;
11
+ /** The accessible name. Inside a FieldRow the row gives it. */
12
+ label?: string;
13
+ width?: FieldWidth;
14
+ /** The button's words. */
15
+ text?: {
16
+ pick: string;
17
+ };
18
+ /** The button's glyph, an open folder unless set, such as a file for a picker of files. */
19
+ glyph?: JSX.Element;
20
+ /** Shows the button's glyph alone, as it does by itself with less than 20rem of room. */
21
+ compact?: boolean;
22
+ /** Attributes for the button, such as a data hook. */
23
+ buttonAttrs?: Record<string, string>;
24
+ /** Classes for the wrapper, which carries the width. */
25
+ class?: string;
26
+ ref?: HTMLInputElement | ((el: HTMLInputElement) => void);
27
+ }
28
+ export declare function PathField(props: PathFieldProps): JSX.Element;