@glimstone/svelte 0.0.0-stage → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/README.md +53 -2
  2. package/dist/AboutCard.svelte +87 -0
  3. package/dist/AboutCard.svelte.d.ts +37 -0
  4. package/dist/Accordion.svelte +60 -0
  5. package/dist/Accordion.svelte.d.ts +38 -0
  6. package/dist/AngleSlider.svelte +56 -0
  7. package/dist/AngleSlider.svelte.d.ts +13 -0
  8. package/dist/Avatar.svelte +37 -0
  9. package/dist/Avatar.svelte.d.ts +13 -0
  10. package/dist/Badge.svelte +119 -0
  11. package/dist/Badge.svelte.d.ts +54 -0
  12. package/dist/BrandMark.svelte +12 -0
  13. package/dist/BrandMark.svelte.d.ts +6 -0
  14. package/dist/BusyRing.svelte +39 -0
  15. package/dist/BusyRing.svelte.d.ts +15 -0
  16. package/dist/Button.svelte +172 -0
  17. package/dist/Button.svelte.d.ts +57 -0
  18. package/dist/Card.svelte +61 -0
  19. package/dist/Card.svelte.d.ts +23 -0
  20. package/dist/Carousel.svelte +72 -0
  21. package/dist/Carousel.svelte.d.ts +41 -0
  22. package/dist/Checkbox.svelte +48 -0
  23. package/dist/Checkbox.svelte.d.ts +17 -0
  24. package/dist/CoffeeDialog.svelte +70 -0
  25. package/dist/CoffeeDialog.svelte.d.ts +18 -0
  26. package/dist/Collapsible.svelte +49 -0
  27. package/dist/Collapsible.svelte.d.ts +14 -0
  28. package/dist/ColorPicker.svelte +122 -0
  29. package/dist/ColorPicker.svelte.d.ts +23 -0
  30. package/dist/Combobox.svelte +87 -0
  31. package/dist/Combobox.svelte.d.ts +18 -0
  32. package/dist/ConfirmDialog.svelte +106 -0
  33. package/dist/ConfirmDialog.svelte.d.ts +31 -0
  34. package/dist/ConfirmHost.svelte +41 -0
  35. package/dist/ConfirmHost.svelte.d.ts +7 -0
  36. package/dist/ContextMenu.svelte +213 -0
  37. package/dist/ContextMenu.svelte.d.ts +29 -0
  38. package/dist/CopyField.svelte +60 -0
  39. package/dist/CopyField.svelte.d.ts +19 -0
  40. package/dist/CryptoDonateDialog.svelte +162 -0
  41. package/dist/CryptoDonateDialog.svelte.d.ts +37 -0
  42. package/dist/DatePicker.svelte +149 -0
  43. package/dist/DatePicker.svelte.d.ts +18 -0
  44. package/dist/DropdownListbox.svelte +178 -0
  45. package/dist/DropdownListbox.svelte.d.ts +23 -0
  46. package/dist/EmptyState.svelte +31 -0
  47. package/dist/EmptyState.svelte.d.ts +16 -0
  48. package/dist/FieldError.svelte +20 -0
  49. package/dist/FieldError.svelte.d.ts +8 -0
  50. package/dist/FieldRow.svelte +52 -0
  51. package/dist/FieldRow.svelte.d.ts +23 -0
  52. package/dist/FieldRowGroup.svelte +33 -0
  53. package/dist/FieldRowGroup.svelte.d.ts +13 -0
  54. package/dist/FileUpload.svelte +74 -0
  55. package/dist/FileUpload.svelte.d.ts +18 -0
  56. package/dist/FloatingPanel.svelte +89 -0
  57. package/dist/FloatingPanel.svelte.d.ts +17 -0
  58. package/dist/Fortress.svelte +222 -0
  59. package/dist/Fortress.svelte.d.ts +62 -0
  60. package/dist/FortressAppCard.svelte +115 -0
  61. package/dist/FortressAppCard.svelte.d.ts +18 -0
  62. package/dist/FortressDoubtWindow.svelte +37 -0
  63. package/dist/FortressDoubtWindow.svelte.d.ts +12 -0
  64. package/dist/FortressPairing.svelte +85 -0
  65. package/dist/FortressPairing.svelte.d.ts +32 -0
  66. package/dist/FortressPermissions.svelte +93 -0
  67. package/dist/FortressPermissions.svelte.d.ts +24 -0
  68. package/dist/FortressStatusWindow.svelte +128 -0
  69. package/dist/FortressStatusWindow.svelte.d.ts +20 -0
  70. package/dist/FortressWindow.svelte +271 -0
  71. package/dist/FortressWindow.svelte.d.ts +18 -0
  72. package/dist/GlyphField.svelte +52 -0
  73. package/dist/GlyphField.svelte.d.ts +20 -0
  74. package/dist/GlyphTile.svelte +25 -0
  75. package/dist/GlyphTile.svelte.d.ts +14 -0
  76. package/dist/HoverCard.svelte +47 -0
  77. package/dist/HoverCard.svelte.d.ts +14 -0
  78. package/dist/IconButton.svelte +49 -0
  79. package/dist/IconButton.svelte.d.ts +20 -0
  80. package/dist/IconTipButton.svelte +67 -0
  81. package/dist/IconTipButton.svelte.d.ts +23 -0
  82. package/dist/InfoAboutCard.svelte +65 -0
  83. package/dist/InfoAboutCard.svelte.d.ts +35 -0
  84. package/dist/InfoBubble.svelte +50 -0
  85. package/dist/InfoBubble.svelte.d.ts +7 -0
  86. package/dist/InfoHelpCard.svelte +93 -0
  87. package/dist/InfoHelpCard.svelte.d.ts +44 -0
  88. package/dist/InfoTile.svelte +31 -0
  89. package/dist/InfoTile.svelte.d.ts +15 -0
  90. package/dist/InfoVersionCard.svelte +99 -0
  91. package/dist/InfoVersionCard.svelte.d.ts +29 -0
  92. package/dist/InstanceCard.svelte +85 -0
  93. package/dist/InstanceCard.svelte.d.ts +27 -0
  94. package/dist/Kbd.svelte +16 -0
  95. package/dist/Kbd.svelte.d.ts +8 -0
  96. package/dist/ListRow.svelte +51 -0
  97. package/dist/ListRow.svelte.d.ts +19 -0
  98. package/dist/ListSelect.svelte +135 -0
  99. package/dist/ListSelect.svelte.d.ts +25 -0
  100. package/dist/ListTable.svelte +183 -0
  101. package/dist/ListTable.svelte.d.ts +44 -0
  102. package/dist/MarkSvg.svelte +9 -0
  103. package/dist/MarkSvg.svelte.d.ts +8 -0
  104. package/dist/Marquee.svelte +63 -0
  105. package/dist/Marquee.svelte.d.ts +39 -0
  106. package/dist/MenuBar.svelte +98 -0
  107. package/dist/MenuBar.svelte.d.ts +19 -0
  108. package/dist/MenuChoice.svelte +30 -0
  109. package/dist/MenuChoice.svelte.d.ts +33 -0
  110. package/dist/MenuHeadEdit.svelte +29 -0
  111. package/dist/MenuHeadEdit.svelte.d.ts +10 -0
  112. package/dist/MenuRows.svelte +57 -0
  113. package/dist/MenuRows.svelte.d.ts +9 -0
  114. package/dist/MenuSelect.svelte +145 -0
  115. package/dist/MenuSelect.svelte.d.ts +25 -0
  116. package/dist/MenuSubmenu.svelte +64 -0
  117. package/dist/MenuSubmenu.svelte.d.ts +37 -0
  118. package/dist/Meter.svelte +55 -0
  119. package/dist/Meter.svelte.d.ts +20 -0
  120. package/dist/NumberField.svelte +70 -0
  121. package/dist/NumberField.svelte.d.ts +23 -0
  122. package/dist/Pagination.svelte +62 -0
  123. package/dist/Pagination.svelte.d.ts +16 -0
  124. package/dist/PasswordField.svelte +69 -0
  125. package/dist/PasswordField.svelte.d.ts +21 -0
  126. package/dist/PathField.svelte +111 -0
  127. package/dist/PathField.svelte.d.ts +33 -0
  128. package/dist/PaypalDialog.svelte +174 -0
  129. package/dist/PaypalDialog.svelte.d.ts +54 -0
  130. package/dist/Pill.svelte +25 -0
  131. package/dist/Pill.svelte.d.ts +14 -0
  132. package/dist/PinInput.svelte +81 -0
  133. package/dist/PinInput.svelte.d.ts +23 -0
  134. package/dist/Popover.svelte +38 -0
  135. package/dist/Popover.svelte.d.ts +16 -0
  136. package/dist/PresenceBadges.svelte +22 -0
  137. package/dist/PresenceBadges.svelte.d.ts +8 -0
  138. package/dist/ProgressBar.svelte +37 -0
  139. package/dist/ProgressBar.svelte.d.ts +16 -0
  140. package/dist/Rating.svelte +65 -0
  141. package/dist/Rating.svelte.d.ts +18 -0
  142. package/dist/ReadmeButton.svelte +82 -0
  143. package/dist/ReadmeButton.svelte.d.ts +27 -0
  144. package/dist/RowMark.svelte +16 -0
  145. package/dist/RowMark.svelte.d.ts +7 -0
  146. package/dist/ScrollArea.svelte +46 -0
  147. package/dist/ScrollArea.svelte.d.ts +11 -0
  148. package/dist/Select.svelte +97 -0
  149. package/dist/Select.svelte.d.ts +67 -0
  150. package/dist/SelectFace.svelte +18 -0
  151. package/dist/SelectFace.svelte.d.ts +32 -0
  152. package/dist/Selector.svelte +264 -0
  153. package/dist/Selector.svelte.d.ts +77 -0
  154. package/dist/SelectorSegment.svelte +159 -0
  155. package/dist/SelectorSegment.svelte.d.ts +27 -0
  156. package/dist/Sheet.svelte +51 -0
  157. package/dist/Sheet.svelte.d.ts +23 -0
  158. package/dist/SidebarRow.svelte +91 -0
  159. package/dist/SidebarRow.svelte.d.ts +31 -0
  160. package/dist/SignInCard.svelte +251 -0
  161. package/dist/SignInCard.svelte.d.ts +34 -0
  162. package/dist/SignInField.svelte +32 -0
  163. package/dist/SignInField.svelte.d.ts +11 -0
  164. package/dist/SignaturePad.svelte +72 -0
  165. package/dist/SignaturePad.svelte.d.ts +13 -0
  166. package/dist/SkeletonRow.svelte +29 -0
  167. package/dist/SkeletonRow.svelte.d.ts +12 -0
  168. package/dist/Slider.svelte +60 -0
  169. package/dist/Slider.svelte.d.ts +15 -0
  170. package/dist/Splitter.svelte +59 -0
  171. package/dist/Splitter.svelte.d.ts +37 -0
  172. package/dist/Steps.svelte +90 -0
  173. package/dist/Steps.svelte.d.ts +40 -0
  174. package/dist/SubCard.svelte +45 -0
  175. package/dist/SubCard.svelte.d.ts +14 -0
  176. package/dist/Table.svelte +48 -0
  177. package/dist/Table.svelte.d.ts +37 -0
  178. package/dist/TagsInput.svelte +77 -0
  179. package/dist/TagsInput.svelte.d.ts +18 -0
  180. package/dist/TextArea.svelte +55 -0
  181. package/dist/TextArea.svelte.d.ts +17 -0
  182. package/dist/TextField.svelte +61 -0
  183. package/dist/TextField.svelte.d.ts +18 -0
  184. package/dist/Timer.svelte +62 -0
  185. package/dist/Timer.svelte.d.ts +17 -0
  186. package/dist/TipBubble.svelte +11 -0
  187. package/dist/TipBubble.svelte.d.ts +7 -0
  188. package/dist/TipWrap.svelte +15 -0
  189. package/dist/TipWrap.svelte.d.ts +10 -0
  190. package/dist/ToastCard.svelte +68 -0
  191. package/dist/ToastCard.svelte.d.ts +18 -0
  192. package/dist/ToastViewport.svelte +65 -0
  193. package/dist/ToastViewport.svelte.d.ts +14 -0
  194. package/dist/Toggle.svelte +84 -0
  195. package/dist/Toggle.svelte.d.ts +25 -0
  196. package/dist/Tour.svelte +75 -0
  197. package/dist/Tour.svelte.d.ts +12 -0
  198. package/dist/Tree.svelte +122 -0
  199. package/dist/Tree.svelte.d.ts +22 -0
  200. package/dist/UnavailableNotice.svelte +36 -0
  201. package/dist/UnavailableNotice.svelte.d.ts +18 -0
  202. package/dist/Window.svelte +108 -0
  203. package/dist/Window.svelte.d.ts +33 -0
  204. package/dist/WindowBar.svelte +76 -0
  205. package/dist/WindowBar.svelte.d.ts +26 -0
  206. package/dist/WindowFootRow.svelte +67 -0
  207. package/dist/WindowFootRow.svelte.d.ts +28 -0
  208. package/dist/bubble.svelte.d.ts +15 -0
  209. package/dist/bubble.svelte.js +66 -0
  210. package/dist/confirm.svelte.d.ts +37 -0
  211. package/dist/confirm.svelte.js +62 -0
  212. package/dist/engines.svelte.d.ts +18 -0
  213. package/dist/engines.svelte.js +57 -0
  214. package/dist/entries/accordion.d.ts +1 -0
  215. package/dist/entries/accordion.js +2 -0
  216. package/dist/entries/angleslider.d.ts +1 -0
  217. package/dist/entries/angleslider.js +2 -0
  218. package/dist/entries/avatar.d.ts +1 -0
  219. package/dist/entries/avatar.js +2 -0
  220. package/dist/entries/carousel.d.ts +1 -0
  221. package/dist/entries/carousel.js +2 -0
  222. package/dist/entries/collapsible.d.ts +1 -0
  223. package/dist/entries/collapsible.js +2 -0
  224. package/dist/entries/combobox.d.ts +1 -0
  225. package/dist/entries/combobox.js +2 -0
  226. package/dist/entries/datepicker.d.ts +1 -0
  227. package/dist/entries/datepicker.js +2 -0
  228. package/dist/entries/fileupload.d.ts +1 -0
  229. package/dist/entries/fileupload.js +2 -0
  230. package/dist/entries/floatingpanel.d.ts +1 -0
  231. package/dist/entries/floatingpanel.js +2 -0
  232. package/dist/entries/hovercard.d.ts +1 -0
  233. package/dist/entries/hovercard.js +2 -0
  234. package/dist/entries/marquee.d.ts +1 -0
  235. package/dist/entries/marquee.js +2 -0
  236. package/dist/entries/pagination.d.ts +1 -0
  237. package/dist/entries/pagination.js +2 -0
  238. package/dist/entries/pininput.d.ts +1 -0
  239. package/dist/entries/pininput.js +2 -0
  240. package/dist/entries/rating.d.ts +1 -0
  241. package/dist/entries/rating.js +2 -0
  242. package/dist/entries/scrollarea.d.ts +1 -0
  243. package/dist/entries/scrollarea.js +2 -0
  244. package/dist/entries/select.d.ts +1 -0
  245. package/dist/entries/select.js +2 -0
  246. package/dist/entries/signaturepad.d.ts +1 -0
  247. package/dist/entries/signaturepad.js +2 -0
  248. package/dist/entries/slider.d.ts +1 -0
  249. package/dist/entries/slider.js +2 -0
  250. package/dist/entries/splitter.d.ts +1 -0
  251. package/dist/entries/splitter.js +2 -0
  252. package/dist/entries/steps.d.ts +1 -0
  253. package/dist/entries/steps.js +2 -0
  254. package/dist/entries/tagsinput.d.ts +1 -0
  255. package/dist/entries/tagsinput.js +2 -0
  256. package/dist/entries/timer.d.ts +1 -0
  257. package/dist/entries/timer.js +2 -0
  258. package/dist/entries/tour.d.ts +1 -0
  259. package/dist/entries/tour.js +2 -0
  260. package/dist/fieldName.d.ts +4 -0
  261. package/dist/fieldName.js +9 -0
  262. package/dist/fortressParts.d.ts +5 -0
  263. package/dist/fortressParts.js +16 -0
  264. package/dist/glyphs.d.ts +32 -0
  265. package/dist/glyphs.js +47 -0
  266. package/dist/index.d.ts +78 -0
  267. package/dist/index.js +77 -0
  268. package/dist/lift.d.ts +5 -0
  269. package/dist/lift.js +9 -0
  270. package/dist/portalHue.svelte.d.ts +9 -0
  271. package/dist/portalHue.svelte.js +16 -0
  272. package/dist/selectParts.svelte.d.ts +39 -0
  273. package/dist/selectParts.svelte.js +28 -0
  274. package/dist/selectorItem.d.ts +22 -0
  275. package/dist/selectorItem.js +1 -0
  276. package/dist/style.d.ts +5 -0
  277. package/dist/style.js +12 -0
  278. package/dist/useDragArmed.svelte.d.ts +6 -0
  279. package/dist/useDragArmed.svelte.js +24 -0
  280. package/dist/usePaypalButtons.svelte.d.ts +18 -0
  281. package/dist/usePaypalButtons.svelte.js +41 -0
  282. package/package.json +173 -4
@@ -0,0 +1,62 @@
1
+ // useConfirm replaces window.confirm() with ConfirmDialog, keeping the
2
+ // one-question-in, boolean-out shape, only async:
3
+ //
4
+ // const ask = useConfirm({ title, cancel, confirm: "Confirm" });
5
+ // if (!(await ask.confirm("Delete the snapshot?", { confirmLabel: "Delete" }))) return;
6
+ // <ask.confirmDialog /> once in the template
7
+ //
8
+ // The hook owns everything that needs `document`, so ConfirmDialog stays a plain
9
+ // component: the portal, a document-level Escape listener, a Tab trap, and
10
+ // returning focus to the control that asked on every way out.
11
+ //
12
+ // One pending question per instance is enough: the dialog is modal, so a second
13
+ // confirm() cannot be triggered while one is open.
14
+ import { focusedAsker, returnFocus, trapDialogKeys } from "@glimstone/core";
15
+ import ConfirmHost from "./ConfirmHost.svelte";
16
+ export function useConfirm(text) {
17
+ let pending = $state.raw(null);
18
+ let resolve = null;
19
+ let dialog = null;
20
+ let asker = null;
21
+ function confirm(message, options) {
22
+ asker = focusedAsker();
23
+ return new Promise((r) => {
24
+ resolve = r;
25
+ pending = { message, ...options };
26
+ });
27
+ }
28
+ function settle(result) {
29
+ resolve?.(result);
30
+ resolve = null;
31
+ pending = null;
32
+ returnFocus(asker);
33
+ asker = null;
34
+ }
35
+ /** For a caller whose question stopped making sense while it was open. */
36
+ const dismiss = () => settle(false);
37
+ useDialogKeys(() => pending !== null, () => dialog, dismiss);
38
+ const host = {
39
+ text,
40
+ get pending() {
41
+ return pending;
42
+ },
43
+ get dialog() {
44
+ return dialog;
45
+ },
46
+ set dialog(el) {
47
+ dialog = el;
48
+ },
49
+ settle,
50
+ };
51
+ const confirmDialog = (internals) => ConfirmHost(internals, { host });
52
+ return { confirm, confirmDialog, dismiss };
53
+ }
54
+ /** Escape from anywhere and a Tab trap over the dialog's own controls while
55
+ * it is open, so focus never reaches the page it covers. For any other modal
56
+ * window too. */
57
+ export function useDialogKeys(open, dialog, onCancel) {
58
+ $effect(() => {
59
+ if (open())
60
+ return trapDialogKeys(dialog, onCancel);
61
+ });
62
+ }
@@ -0,0 +1,18 @@
1
+ import { type Density, type LabelAxis, type LabelMode, type Motion, type RainbowState, type Shape } from "@glimstone/core";
2
+ export interface Box<T> {
3
+ current: T;
4
+ }
5
+ /** One axis of the label engine. Writing it stores the mode and tells every control. */
6
+ export declare function useLabelMode(axis: LabelAxis): Box<LabelMode>;
7
+ /** The rainbow state. Writing it applies the new state to the document. */
8
+ export declare function useRainbow(): Box<RainbowState>;
9
+ /** The custom properties that put an element at a rainbow position. */
10
+ export declare function useHue(index: () => number | undefined): {
11
+ readonly current: Record<string, string> | undefined;
12
+ };
13
+ export declare function useShape(): Box<Shape>;
14
+ export declare function useMotion(): Box<Motion>;
15
+ /** The row density of lists and tables. */
16
+ export declare function useDensity(): Box<Density>;
17
+ /** The accent the user chose, or "" for the default. */
18
+ export declare function useAccent(): Box<string>;
@@ -0,0 +1,57 @@
1
+ import { applyAccent, applyDensity, applyMotion, applyRainbow, applyShape, DEFAULT_DENSITY, DEFAULT_MOTION, DEFAULT_SHAPE, getLabelMode, hueVars, labelModeChanged, rainbowState, setLabelMode, subscribeLabelMode, subscribeRainbow, } from "@glimstone/core";
2
+ function follow(read, subscribe, write) {
3
+ let value = $state(read());
4
+ $effect(() => subscribe(() => (value = read())));
5
+ return {
6
+ get current() {
7
+ return value;
8
+ },
9
+ set current(next) {
10
+ write(next);
11
+ },
12
+ };
13
+ }
14
+ /** One axis of the label engine. Writing it stores the mode and tells every control. */
15
+ export function useLabelMode(axis) {
16
+ return follow(() => getLabelMode(axis), subscribeLabelMode, (next) => {
17
+ setLabelMode(axis, next);
18
+ labelModeChanged();
19
+ });
20
+ }
21
+ /** The rainbow state. Writing it applies the new state to the document. */
22
+ export function useRainbow() {
23
+ return follow(rainbowState, subscribeRainbow, applyRainbow);
24
+ }
25
+ /** The custom properties that put an element at a rainbow position. */
26
+ export function useHue(index) {
27
+ const vars = $derived.by(() => {
28
+ const i = index();
29
+ return i === undefined ? undefined : hueVars(i);
30
+ });
31
+ return {
32
+ get current() {
33
+ return vars;
34
+ },
35
+ };
36
+ }
37
+ // Shape, motion, density and accent live on the root element only, so a reader watches
38
+ // the attribute rather than waiting for a call that told it.
39
+ const watchRoot = (attribute) => (changed) => {
40
+ const observer = new MutationObserver(changed);
41
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: [attribute] });
42
+ return () => observer.disconnect();
43
+ };
44
+ export function useShape() {
45
+ return follow(() => document.documentElement.getAttribute("data-shape") ?? DEFAULT_SHAPE, watchRoot("data-shape"), applyShape);
46
+ }
47
+ export function useMotion() {
48
+ return follow(() => document.documentElement.getAttribute("data-motion") ?? DEFAULT_MOTION, watchRoot("data-motion"), applyMotion);
49
+ }
50
+ /** The row density of lists and tables. */
51
+ export function useDensity() {
52
+ return follow(() => document.documentElement.getAttribute("data-density") ?? DEFAULT_DENSITY, watchRoot("data-density"), applyDensity);
53
+ }
54
+ /** The accent the user chose, or "" for the default. */
55
+ export function useAccent() {
56
+ return follow(() => document.documentElement.style.getPropertyValue("--accent"), watchRoot("style"), (hex) => applyAccent(hex || undefined));
57
+ }
@@ -0,0 +1 @@
1
+ export { default as Accordion, type AccordionItem, type AccordionProps, type HeadingLevel } from "../Accordion.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Accordion } from "../Accordion.svelte";
@@ -0,0 +1 @@
1
+ export { default as AngleSlider, type AngleSliderProps } from "../AngleSlider.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as AngleSlider } from "../AngleSlider.svelte";
@@ -0,0 +1 @@
1
+ export { default as Avatar, type AvatarProps, type AvatarSize } from "../Avatar.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Avatar } from "../Avatar.svelte";
@@ -0,0 +1 @@
1
+ export { default as Carousel, type CarouselProps, type CarouselText } from "../Carousel.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Carousel } from "../Carousel.svelte";
@@ -0,0 +1 @@
1
+ export { default as Collapsible, type CollapsibleProps } from "../Collapsible.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Collapsible } from "../Collapsible.svelte";
@@ -0,0 +1 @@
1
+ export { default as Combobox, type ComboboxProps } from "../Combobox.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Combobox } from "../Combobox.svelte";
@@ -0,0 +1 @@
1
+ export { default as DatePicker, type DatePickerProps, type DatePickerText, type DateView } from "../DatePicker.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as DatePicker } from "../DatePicker.svelte";
@@ -0,0 +1 @@
1
+ export { default as FileUpload, type FileRefusal, type FileUploadProps, type FileUploadText } from "../FileUpload.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as FileUpload } from "../FileUpload.svelte";
@@ -0,0 +1 @@
1
+ export { default as FloatingPanel, type FloatingPanelProps, type FloatingPanelText, type PanelSize } from "../FloatingPanel.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as FloatingPanel } from "../FloatingPanel.svelte";
@@ -0,0 +1 @@
1
+ export { default as HoverCard, type HoverCardProps } from "../HoverCard.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as HoverCard } from "../HoverCard.svelte";
@@ -0,0 +1 @@
1
+ export { default as Marquee, type MarqueeProps, type MarqueeText } from "../Marquee.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Marquee } from "../Marquee.svelte";
@@ -0,0 +1 @@
1
+ export { default as Pagination, type PaginationProps, type PaginationText } from "../Pagination.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Pagination } from "../Pagination.svelte";
@@ -0,0 +1 @@
1
+ export { default as PinInput, type PinInputProps, type PinInputText } from "../PinInput.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as PinInput } from "../PinInput.svelte";
@@ -0,0 +1 @@
1
+ export { default as Rating, type RatingProps, type RatingText } from "../Rating.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Rating } from "../Rating.svelte";
@@ -0,0 +1 @@
1
+ export { default as ScrollArea, type ScrollAreaProps } from "../ScrollArea.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as ScrollArea } from "../ScrollArea.svelte";
@@ -0,0 +1 @@
1
+ export { default as Select, type SelectEntry, type SelectGroup, type SelectOption, type SelectProps, type SelectRows, type SelectSize, type SelectSubmenu, type SelectWidth } from "../Select.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Select } from "../Select.svelte";
@@ -0,0 +1 @@
1
+ export { default as SignaturePad, type SignaturePadProps, type SignaturePadText } from "../SignaturePad.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as SignaturePad } from "../SignaturePad.svelte";
@@ -0,0 +1 @@
1
+ export { default as Slider, type SliderProps } from "../Slider.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Slider } from "../Slider.svelte";
@@ -0,0 +1 @@
1
+ export { default as Splitter, type SplitterPanel, type SplitterProps, type SplitterText } from "../Splitter.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Splitter } from "../Splitter.svelte";
@@ -0,0 +1 @@
1
+ export { default as Steps, type StepsItem, type StepsProps, type StepsText } from "../Steps.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Steps } from "../Steps.svelte";
@@ -0,0 +1 @@
1
+ export { default as TagsInput, type TagsInputProps, type TagsInputText } from "../TagsInput.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as TagsInput } from "../TagsInput.svelte";
@@ -0,0 +1 @@
1
+ export { default as Timer, type TimerProps, type TimerText } from "../Timer.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Timer } from "../Timer.svelte";
@@ -0,0 +1 @@
1
+ export { default as Tour, type TourProps, type TourStep, type TourText } from "../Tour.svelte";
@@ -0,0 +1,2 @@
1
+ // Its own entry, so an app that uses none of the Zag controls needs none of the Zag packages.
2
+ export { default as Tour } from "../Tour.svelte";
@@ -0,0 +1,4 @@
1
+ export declare const FIELD_ROW: unique symbol;
2
+ export declare const FIELD_ROW_GROUP: unique symbol;
3
+ /** A control's accessible name: its own, or the label of the row it stands in. */
4
+ export declare function useFieldName(own: () => string | undefined): () => string | undefined;
@@ -0,0 +1,9 @@
1
+ // How a FieldRow names the control inside it.
2
+ import { getContext } from "svelte";
3
+ export const FIELD_ROW = Symbol("glimstone.fieldRow");
4
+ export const FIELD_ROW_GROUP = Symbol("glimstone.fieldRowGroup");
5
+ /** A control's accessible name: its own, or the label of the row it stands in. */
6
+ export function useFieldName(own) {
7
+ const row = getContext(FIELD_ROW);
8
+ return () => own() ?? row?.();
9
+ }
@@ -0,0 +1,5 @@
1
+ import type { FortressInstance, FortressLabelKeys, FortressText } from "@glimstone/core";
2
+ export declare const LABEL_KEYS: FortressLabelKeys;
3
+ export declare const presenceText: (text: FortressText, i: FortressInstance) => string;
4
+ /** A device's glyph, asked for by its kind through the app's resolver (`deviceServer`, `devicePc`, `deviceLaptop`, `devicePhone`). */
5
+ export declare function deviceGlyph(kind: FortressInstance["deviceKind"]): import("svelte").Snippet<[]> | undefined;
@@ -0,0 +1,16 @@
1
+ import { glyphFor } from "./glyphs.js";
2
+ export const LABEL_KEYS = {
3
+ join: "fortressJoin",
4
+ leave: "fortressLeave",
5
+ showPhrase: "fortressShowPhrase",
6
+ changePhrase: "fortressChangePhrase",
7
+ remove: "delete",
8
+ later: "fortressLater",
9
+ unlock: "unlock",
10
+ copy: "copy",
11
+ };
12
+ export const presenceText = (text, i) => ({ connected: text.connected, checking: text.checking, away: text.away })[i.presence];
13
+ /** A device's glyph, asked for by its kind through the app's resolver (`deviceServer`, `devicePc`, `deviceLaptop`, `devicePhone`). */
14
+ export function deviceGlyph(kind) {
15
+ return kind ? glyphFor(`device${kind.charAt(0).toUpperCase()}${kind.slice(1)}`) : undefined;
16
+ }
@@ -0,0 +1,32 @@
1
+ import { type Snippet } from "svelte";
2
+ import { type Mark } from "@glimstone/core";
3
+ /**
4
+ * Register the app's label-key-to-glyph mapping, once, at boot. A button that is
5
+ * given no glyph cannot be shown in glyph mode, and one place to ask saves
6
+ * passing an icon at every call site.
7
+ */
8
+ export declare function setGlyphResolver(fn: (labelKey: string) => Snippet | undefined): void;
9
+ /** The mark for a label key, or nothing when no app resolver knows it. */
10
+ export declare function glyphFor(labelKey: string): Snippet | undefined;
11
+ /** The markup of a mark from the core, drawn in the current colour. */
12
+ export declare function markSvg(mark: Mark, className?: string): string;
13
+ export declare const IconClose: Snippet<[]>;
14
+ export declare const IconCancel: Snippet<[]>;
15
+ export declare const IconCheck: Snippet<[]>;
16
+ export declare const IconExpand: Snippet<[]>;
17
+ export declare const IconFolderOpen: Snippet<[]>;
18
+ export declare const IconPencil: Snippet<[]>;
19
+ export declare const IconWindowMinimise: Snippet<[]>;
20
+ export declare const IconWindowMaximise: Snippet<[]>;
21
+ export declare const IconWindowRestore: Snippet<[]>;
22
+ export declare const IconEye: Snippet<[]>;
23
+ export declare const IconEyeOff: Snippet<[]>;
24
+ export declare const IconCopy: Snippet<[]>;
25
+ export declare const IconBack: Snippet<[]>;
26
+ export declare const IconForward: Snippet<[]>;
27
+ export declare const IconUpload: Snippet<[]>;
28
+ export declare const IconCalendar: Snippet<[]>;
29
+ export declare const IconStar: Snippet<[]>;
30
+ export declare const IconPlay: Snippet<[]>;
31
+ export declare const IconPause: Snippet<[]>;
32
+ export declare const IconResetArrow: Snippet<[]>;
package/dist/glyphs.js ADDED
@@ -0,0 +1,47 @@
1
+ import { createRawSnippet } from "svelte";
2
+ import { MARKS } from "@glimstone/core";
3
+ // The icon on a "Save" button or a nav item is the app's vocabulary, so GlimStone
4
+ // ships the assortment as a specification (glyphs.md in the core) and lets the
5
+ // app register a resolver. Button then picks a glyph by meaning. Without a
6
+ // resolver a button falls back to the glyph it was handed, and with neither,
7
+ // to text alone. A glyph is a snippet, so a resolver can build one from an
8
+ // SVG string with createRawSnippet.
9
+ let resolver = null;
10
+ /**
11
+ * Register the app's label-key-to-glyph mapping, once, at boot. A button that is
12
+ * given no glyph cannot be shown in glyph mode, and one place to ask saves
13
+ * passing an icon at every call site.
14
+ */
15
+ export function setGlyphResolver(fn) {
16
+ resolver = fn;
17
+ }
18
+ /** The mark for a label key, or nothing when no app resolver knows it. */
19
+ export function glyphFor(labelKey) {
20
+ return resolver ? resolver(labelKey) : undefined;
21
+ }
22
+ /** The markup of a mark from the core, drawn in the current colour. */
23
+ export function markSvg(mark, className) {
24
+ const cls = className ? ` class="${className}"` : "";
25
+ return `<svg width="${mark.size}" height="${mark.size}" viewBox="${mark.viewBox}" fill="currentColor"${cls} aria-hidden="true">${mark.body}</svg>`;
26
+ }
27
+ const markSnippet = (mark) => createRawSnippet(() => ({ render: () => markSvg(mark, "glim-mark") }));
28
+ export const IconClose = markSnippet(MARKS.close);
29
+ export const IconCancel = markSnippet(MARKS.cancel);
30
+ export const IconCheck = markSnippet(MARKS.check);
31
+ export const IconExpand = markSnippet(MARKS.expand);
32
+ export const IconFolderOpen = markSnippet(MARKS.folderOpen);
33
+ export const IconPencil = markSnippet(MARKS.pencil);
34
+ export const IconWindowMinimise = markSnippet(MARKS.windowMinimise);
35
+ export const IconWindowMaximise = markSnippet(MARKS.windowMaximise);
36
+ export const IconWindowRestore = markSnippet(MARKS.windowRestore);
37
+ export const IconEye = markSnippet(MARKS.eye);
38
+ export const IconEyeOff = markSnippet(MARKS.eyeOff);
39
+ export const IconCopy = markSnippet(MARKS.copy);
40
+ export const IconBack = markSnippet(MARKS.back);
41
+ export const IconForward = markSnippet(MARKS.forward);
42
+ export const IconUpload = markSnippet(MARKS.upload);
43
+ export const IconCalendar = markSnippet(MARKS.calendar);
44
+ export const IconStar = markSnippet(MARKS.star);
45
+ export const IconPlay = markSnippet(MARKS.play);
46
+ export const IconPause = markSnippet(MARKS.pause);
47
+ export const IconResetArrow = markSnippet(MARKS.resetArrow);
@@ -0,0 +1,78 @@
1
+ export { default as AboutCard, type AboutCardProps } from "./AboutCard.svelte";
2
+ export { default as Badge, type BadgeForm, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeTone, type NotchInset } from "./Badge.svelte";
3
+ export { default as BrandMark, type BrandMarkProps } from "./BrandMark.svelte";
4
+ export { default as BusyRing, type BusyRingProps, type BusyRingSize } from "./BusyRing.svelte";
5
+ export { default as Button, type ButtonProps, type ButtonSize, type ButtonTone, type ButtonVariant } from "./Button.svelte";
6
+ export { default as Card, type CardProps } from "./Card.svelte";
7
+ export { default as Checkbox, type CheckboxProps } from "./Checkbox.svelte";
8
+ export { default as CoffeeDialog, type CoffeeDialogProps } from "./CoffeeDialog.svelte";
9
+ export { default as ColorPicker, type ColorName, type ColorPickerPanelText, type ColorPickerProps } from "./ColorPicker.svelte";
10
+ export { default as ConfirmDialog, type ConfirmDialogProps } from "./ConfirmDialog.svelte";
11
+ export { default as ContextMenu, type ContextMenuProps, type MenuEntry, type MenuHead, type MenuItem } from "./ContextMenu.svelte";
12
+ export { default as CopyField, type CopyFieldProps } from "./CopyField.svelte";
13
+ export { default as CryptoDonateDialog, type CryptoCoin, type CryptoDonateDialogProps, type CryptoNetwork } from "./CryptoDonateDialog.svelte";
14
+ export { default as DropdownListbox, type DropdownListboxProps } from "./DropdownListbox.svelte";
15
+ export { default as EmptyState, type EmptyStateProps } from "./EmptyState.svelte";
16
+ export { default as FieldError, type FieldErrorProps } from "./FieldError.svelte";
17
+ export { default as FieldRow, type FieldRowProps } from "./FieldRow.svelte";
18
+ export { default as FieldRowGroup, type FieldRowGroupProps } from "./FieldRowGroup.svelte";
19
+ export { default as Fortress, type ChangeAnswer, type FortressAnswer, type FortressLabelKeys, type FortressProps, type FortressText, type PhraseAnswer } from "./Fortress.svelte";
20
+ export { default as FortressAppCard, type FortressApp, type FortressAppCardProps, type FortressInstance } from "./FortressAppCard.svelte";
21
+ export { default as FortressDoubtWindow, type FortressDoubtWindowProps } from "./FortressDoubtWindow.svelte";
22
+ export { default as FortressPairing, type FortressPairingProps } from "./FortressPairing.svelte";
23
+ export { default as FortressPermissions, type FortressPermission, type FortressPermissionsProps } from "./FortressPermissions.svelte";
24
+ export { default as FortressStatusWindow, type FortressLogLine, type FortressStatusReport, type FortressStatusWindowProps } from "./FortressStatusWindow.svelte";
25
+ export { default as GlyphField, type GlyphFieldProps } from "./GlyphField.svelte";
26
+ export { default as GlyphTile, type GlyphTileProps } from "./GlyphTile.svelte";
27
+ export { default as IconButton, type IconButtonProps } from "./IconButton.svelte";
28
+ export { default as IconTipButton, type IconTipButtonProps } from "./IconTipButton.svelte";
29
+ export { default as InfoAboutCard, type InfoAboutCardProps } from "./InfoAboutCard.svelte";
30
+ export { default as InfoBubble, type InfoBubbleProps } from "./InfoBubble.svelte";
31
+ export { default as InfoHelpCard, type InfoHelpCardProps } from "./InfoHelpCard.svelte";
32
+ export { default as InfoTile, type InfoTileProps } from "./InfoTile.svelte";
33
+ export { default as InfoVersionCard, type InfoVersionCardProps, type UpdateCheck, type VersionRow } from "./InfoVersionCard.svelte";
34
+ export { default as InstanceCard, type InstanceCardProps, type InstanceFigure } from "./InstanceCard.svelte";
35
+ export { default as Kbd, type KbdProps } from "./Kbd.svelte";
36
+ export { default as ListRow, type ListRowProps } from "./ListRow.svelte";
37
+ export { default as ListTable, type ListColumn, type ListTableProps, type ListTableText } from "./ListTable.svelte";
38
+ export { default as MarkSvg } from "./MarkSvg.svelte";
39
+ export { default as MenuBar, type MenuBarHandle, type MenuBarMenu, type MenuBarProps } from "./MenuBar.svelte";
40
+ export { default as Meter, type MeterProps, type MeterSize } from "./Meter.svelte";
41
+ export { default as NumberField, type NumberFieldProps } from "./NumberField.svelte";
42
+ export { default as PasswordField, type PasswordFieldProps } from "./PasswordField.svelte";
43
+ export { default as PathField, type PathFieldProps } from "./PathField.svelte";
44
+ export { default as PaypalDialog, type PaypalDialogProps, type PaypalSelectorProps } from "./PaypalDialog.svelte";
45
+ export { default as Pill, type PillProps, type PillTone } from "./Pill.svelte";
46
+ export { default as Popover, type PopoverProps } from "./Popover.svelte";
47
+ export { default as PresenceBadges, type PresenceBadgesProps } from "./PresenceBadges.svelte";
48
+ export { default as ProgressBar, type ProgressBarProps } from "./ProgressBar.svelte";
49
+ export { default as ReadmeButton, type ReadmeBrand, type ReadmeButtonProps, type ReadmePart } from "./ReadmeButton.svelte";
50
+ export { default as RowMark, type RowMarkProps } from "./RowMark.svelte";
51
+ export { default as Selector, selectorTabId, type SelectMode, type SelectorActivation, type SelectorItem, type SelectorOrientation, type SelectorProps, type SelectorSize, type SelectorVariant } from "./Selector.svelte";
52
+ export { default as Sheet, type SheetProps } from "./Sheet.svelte";
53
+ export { default as SidebarRow, type SidebarCount, type SidebarRowProps } from "./SidebarRow.svelte";
54
+ export { default as SignInCard, type ResetAnswer, type SignInAnswer, type SignInCardProps, type SignInLabelKeys, type SignInText } from "./SignInCard.svelte";
55
+ export { default as SignInField, type SignInFieldProps } from "./SignInField.svelte";
56
+ export { default as SkeletonRow, type SkeletonRowProps } from "./SkeletonRow.svelte";
57
+ export { default as SubCard, type SubCardProps } from "./SubCard.svelte";
58
+ export { default as Table, type TableColumn, type TableProps } from "./Table.svelte";
59
+ export { default as TextArea, type TextAreaProps } from "./TextArea.svelte";
60
+ export { default as TextField, type FieldWidth, type TextFieldProps } from "./TextField.svelte";
61
+ export { default as ToastCard, type ToastCardProps } from "./ToastCard.svelte";
62
+ export { default as ToastViewport, type ToastViewportEntry, type ToastViewportProps } from "./ToastViewport.svelte";
63
+ export { default as Toggle, type ToggleProps } from "./Toggle.svelte";
64
+ export { default as Tree, type TreeNode, type TreeProps } from "./Tree.svelte";
65
+ export { default as UnavailableNotice, type UnavailableNoticeProps } from "./UnavailableNotice.svelte";
66
+ export { default as Window, type WindowAction, type WindowProps, type WindowSize } from "./Window.svelte";
67
+ export { default as WindowBar, type WindowBarProps } from "./WindowBar.svelte";
68
+ export { useAccent, useDensity, useHue, useLabelMode, useMotion, useRainbow, useShape } from "./engines.svelte.js";
69
+ export { useConfirm, useDialogKeys, type ConfirmOptions, type ConfirmText } from "./confirm.svelte.js";
70
+ export { useFieldName } from "./fieldName.js";
71
+ export { deviceGlyph } from "./fortressParts.js";
72
+ export { glyphFor, IconBack, IconCalendar, IconCancel, IconCheck, IconClose, IconCopy, IconExpand, IconEye, IconEyeOff, IconFolderOpen, IconForward, IconPause, IconPencil, IconPlay, IconResetArrow, IconStar, IconUpload, IconWindowMaximise, IconWindowMinimise, IconWindowRestore, setGlyphResolver } from "./glyphs.js";
73
+ export * from "./portalHue.svelte.js";
74
+ export { useTipBubble, type TipBubble } from "./bubble.svelte.js";
75
+ export * from "./useDragArmed.svelte.js";
76
+ export { usePaypalButtons, type PaypalButtonsOptions } from "./usePaypalButtons.svelte.js";
77
+ export type { ToastAction } from "@glimstone/core";
78
+ export { GLIMSTONE_RELEASE_URL, GLIMSTONE_REPO, GLIMSTONE_VERSION } from "@glimstone/core";
package/dist/index.js ADDED
@@ -0,0 +1,77 @@
1
+ export { default as AboutCard } from "./AboutCard.svelte";
2
+ export { default as Badge } from "./Badge.svelte";
3
+ export { default as BrandMark } from "./BrandMark.svelte";
4
+ export { default as BusyRing } from "./BusyRing.svelte";
5
+ export { default as Button } from "./Button.svelte";
6
+ export { default as Card } from "./Card.svelte";
7
+ export { default as Checkbox } from "./Checkbox.svelte";
8
+ export { default as CoffeeDialog } from "./CoffeeDialog.svelte";
9
+ export { default as ColorPicker } from "./ColorPicker.svelte";
10
+ export { default as ConfirmDialog } from "./ConfirmDialog.svelte";
11
+ export { default as ContextMenu } from "./ContextMenu.svelte";
12
+ export { default as CopyField } from "./CopyField.svelte";
13
+ export { default as CryptoDonateDialog } from "./CryptoDonateDialog.svelte";
14
+ export { default as DropdownListbox } from "./DropdownListbox.svelte";
15
+ export { default as EmptyState } from "./EmptyState.svelte";
16
+ export { default as FieldError } from "./FieldError.svelte";
17
+ export { default as FieldRow } from "./FieldRow.svelte";
18
+ export { default as FieldRowGroup } from "./FieldRowGroup.svelte";
19
+ export { default as Fortress } from "./Fortress.svelte";
20
+ export { default as FortressAppCard } from "./FortressAppCard.svelte";
21
+ export { default as FortressDoubtWindow } from "./FortressDoubtWindow.svelte";
22
+ export { default as FortressPairing } from "./FortressPairing.svelte";
23
+ export { default as FortressPermissions } from "./FortressPermissions.svelte";
24
+ export { default as FortressStatusWindow } from "./FortressStatusWindow.svelte";
25
+ export { default as GlyphField } from "./GlyphField.svelte";
26
+ export { default as GlyphTile } from "./GlyphTile.svelte";
27
+ export { default as IconButton } from "./IconButton.svelte";
28
+ export { default as IconTipButton } from "./IconTipButton.svelte";
29
+ export { default as InfoAboutCard } from "./InfoAboutCard.svelte";
30
+ export { default as InfoBubble } from "./InfoBubble.svelte";
31
+ export { default as InfoHelpCard } from "./InfoHelpCard.svelte";
32
+ export { default as InfoTile } from "./InfoTile.svelte";
33
+ export { default as InfoVersionCard } from "./InfoVersionCard.svelte";
34
+ export { default as InstanceCard } from "./InstanceCard.svelte";
35
+ export { default as Kbd } from "./Kbd.svelte";
36
+ export { default as ListRow } from "./ListRow.svelte";
37
+ export { default as ListTable } from "./ListTable.svelte";
38
+ export { default as MarkSvg } from "./MarkSvg.svelte";
39
+ export { default as MenuBar } from "./MenuBar.svelte";
40
+ export { default as Meter } from "./Meter.svelte";
41
+ export { default as NumberField } from "./NumberField.svelte";
42
+ export { default as PasswordField } from "./PasswordField.svelte";
43
+ export { default as PathField } from "./PathField.svelte";
44
+ export { default as PaypalDialog } from "./PaypalDialog.svelte";
45
+ export { default as Pill } from "./Pill.svelte";
46
+ export { default as Popover } from "./Popover.svelte";
47
+ export { default as PresenceBadges } from "./PresenceBadges.svelte";
48
+ export { default as ProgressBar } from "./ProgressBar.svelte";
49
+ export { default as ReadmeButton } from "./ReadmeButton.svelte";
50
+ export { default as RowMark } from "./RowMark.svelte";
51
+ export { default as Selector, selectorTabId } from "./Selector.svelte";
52
+ export { default as Sheet } from "./Sheet.svelte";
53
+ export { default as SidebarRow } from "./SidebarRow.svelte";
54
+ export { default as SignInCard } from "./SignInCard.svelte";
55
+ export { default as SignInField } from "./SignInField.svelte";
56
+ export { default as SkeletonRow } from "./SkeletonRow.svelte";
57
+ export { default as SubCard } from "./SubCard.svelte";
58
+ export { default as Table } from "./Table.svelte";
59
+ export { default as TextArea } from "./TextArea.svelte";
60
+ export { default as TextField } from "./TextField.svelte";
61
+ export { default as ToastCard } from "./ToastCard.svelte";
62
+ export { default as ToastViewport } from "./ToastViewport.svelte";
63
+ export { default as Toggle } from "./Toggle.svelte";
64
+ export { default as Tree } from "./Tree.svelte";
65
+ export { default as UnavailableNotice } from "./UnavailableNotice.svelte";
66
+ export { default as Window } from "./Window.svelte";
67
+ export { default as WindowBar } from "./WindowBar.svelte";
68
+ export { useAccent, useDensity, useHue, useLabelMode, useMotion, useRainbow, useShape } from "./engines.svelte.js";
69
+ export { useConfirm, useDialogKeys } from "./confirm.svelte.js";
70
+ export { useFieldName } from "./fieldName.js";
71
+ export { deviceGlyph } from "./fortressParts.js";
72
+ export { glyphFor, IconBack, IconCalendar, IconCancel, IconCheck, IconClose, IconCopy, IconExpand, IconEye, IconEyeOff, IconFolderOpen, IconForward, IconPause, IconPencil, IconPlay, IconResetArrow, IconStar, IconUpload, IconWindowMaximise, IconWindowMinimise, IconWindowRestore, setGlyphResolver } from "./glyphs.js";
73
+ export * from "./portalHue.svelte.js";
74
+ export { useTipBubble } from "./bubble.svelte.js";
75
+ export * from "./useDragArmed.svelte.js";
76
+ export { usePaypalButtons } from "./usePaypalButtons.svelte.js";
77
+ export { GLIMSTONE_RELEASE_URL, GLIMSTONE_REPO, GLIMSTONE_VERSION } from "@glimstone/core";
package/dist/lift.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * An attachment that moves its element into the portal target, the body or an
3
+ * open sheet, so no card's `overflow: hidden` clips it.
4
+ */
5
+ export declare function lift(node: HTMLElement): () => void;
package/dist/lift.js ADDED
@@ -0,0 +1,9 @@
1
+ import { portalTarget } from "@glimstone/core";
2
+ /**
3
+ * An attachment that moves its element into the portal target, the body or an
4
+ * open sheet, so no card's `overflow: hidden` clips it.
5
+ */
6
+ export function lift(node) {
7
+ portalTarget().append(node);
8
+ return () => node.remove();
9
+ }