@glimstone/vue 0.0.0-stage → 4.0.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 (50) hide show
  1. package/README.md +51 -2
  2. package/dist/Badge.vue.d.ts +49 -0
  3. package/dist/BrandMark.vue.d.ts +6 -0
  4. package/dist/Button.vue.d.ts +43 -0
  5. package/dist/Card.vue.d.ts +25 -0
  6. package/dist/Combobox.js +70 -0
  7. package/dist/Combobox.vue.d.ts +27 -0
  8. package/dist/ConfirmDialog.vue.d.ts +37 -0
  9. package/dist/EmptyState.vue.d.ts +28 -0
  10. package/dist/IconTipButton.vue.d.ts +24 -0
  11. package/dist/InfoAboutCard.vue.d.ts +4 -0
  12. package/dist/InfoBubble.vue.d.ts +9 -0
  13. package/dist/InfoHelpCard.vue.d.ts +6 -0
  14. package/dist/InfoTile.vue.d.ts +22 -0
  15. package/dist/InfoVersionCard.vue.d.ts +15 -0
  16. package/dist/ListSelect.vue.d.ts +37 -0
  17. package/dist/MenuChoice.vue.d.ts +27 -0
  18. package/dist/MenuSelect.vue.d.ts +37 -0
  19. package/dist/MenuSubmenu.vue.d.ts +31 -0
  20. package/dist/NumberField.vue.d.ts +10 -0
  21. package/dist/ReadmeButton.vue.d.ts +33 -0
  22. package/dist/Select.js +444 -0
  23. package/dist/Select.vue.d.ts +50 -0
  24. package/dist/SelectFace.vue.d.ts +26 -0
  25. package/dist/Selector.vue.d.ts +55 -0
  26. package/dist/SelectorSegment.vue.d.ts +28 -0
  27. package/dist/SidebarRow.vue.d.ts +22 -0
  28. package/dist/Slider.js +36 -0
  29. package/dist/Slider.vue.d.ts +23 -0
  30. package/dist/SubCard.vue.d.ts +21 -0
  31. package/dist/TipBubble.vue.d.ts +7 -0
  32. package/dist/TipWrap-rNAEgvb0.js +51 -0
  33. package/dist/TipWrap.d.ts +11 -0
  34. package/dist/ToastViewport.vue.d.ts +25 -0
  35. package/dist/Toggle.vue.d.ts +21 -0
  36. package/dist/UnavailableNotice.vue.d.ts +20 -0
  37. package/dist/confirm.d.ts +20 -0
  38. package/dist/engines.d.ts +12 -0
  39. package/dist/entries/combobox.d.ts +1 -0
  40. package/dist/entries/select.d.ts +1 -0
  41. package/dist/entries/slider.d.ts +1 -0
  42. package/dist/glyphs-CvCRgBMU.js +27 -0
  43. package/dist/glyphs.d.ts +21 -0
  44. package/dist/index.d.ts +29 -0
  45. package/dist/index.js +1301 -0
  46. package/dist/info.d.ts +71 -0
  47. package/dist/selectParts.d.ts +25 -0
  48. package/dist/selectorItem.d.ts +19 -0
  49. package/dist/tipBubble.d.ts +16 -0
  50. package/package.json +47 -4
package/dist/info.d.ts ADDED
@@ -0,0 +1,71 @@
1
+ import type { Component } from "vue";
2
+ import type { OpenUrl, UpdateCheck, VersionRow } from "@glimstone/core";
3
+ export interface InfoVersionCardProps {
4
+ text: {
5
+ title: string;
6
+ /** The card's "(i)", such as what a click on a number opens. */
7
+ hint?: string;
8
+ unreleased: (version: string) => string;
9
+ /** "Release notes". Only drawn with `onReleaseNotes` and without the `whats-new` slot. */
10
+ releaseNotes?: string;
11
+ };
12
+ /** The app first, then the design language, then every component it ships. */
13
+ rows: VersionRow[];
14
+ updateCheck?: UpdateCheck;
15
+ /** Opens the app's window on the running version's release notes, for an app that marks no changes. */
16
+ onReleaseNotes?: () => void;
17
+ openUrl?: OpenUrl;
18
+ hueIndex?: number;
19
+ }
20
+ export interface InfoHelpCardProps {
21
+ text: {
22
+ title?: string;
23
+ hint?: string;
24
+ report: string;
25
+ repoButton: string;
26
+ mailButton: string;
27
+ mailSubject: string;
28
+ bugReport?: string;
29
+ bugReportSub?: string;
30
+ manual?: string;
31
+ manualSub?: string;
32
+ };
33
+ repoUrl: string;
34
+ repoGlyph?: Component;
35
+ /** The workshop's own mailbox. Omit it and the card offers no mail route. */
36
+ mailAddress?: string;
37
+ /** The envelope, `MAIL_SVG` from appMarks.ts, which opens under the pointer. */
38
+ mailGlyph?: Component;
39
+ /** The app's handbook. The README is not a manual. */
40
+ manualUrl?: string;
41
+ manualGlyph?: Component;
42
+ /** Downloads the instance's logs and settings as one file, without passwords, keys or credentials. */
43
+ onBugReport?: () => void;
44
+ bugGlyph?: Component;
45
+ openUrl?: OpenUrl;
46
+ hueIndex?: number;
47
+ }
48
+ export interface InfoAboutCardProps {
49
+ text: {
50
+ title: string;
51
+ body: string;
52
+ coffee: string;
53
+ /** The coffee button's accessible name; its artwork carries the words. */
54
+ coffeeButton: string;
55
+ /** Only drawn together with `onPaypal`. */
56
+ paypalButton?: string;
57
+ /** Only drawn together with `onCrypto`. */
58
+ cryptoButton?: string;
59
+ };
60
+ /** Opens the coffee window, which stays inside the app. */
61
+ onCoffee: () => void;
62
+ /** Buy Me a Coffee's own button artwork, `COFFEE_BUTTON_SVG` from appMarks.ts. */
63
+ coffeeArt: Component;
64
+ onPaypal?: () => void;
65
+ /** Passed rather than resolved by label key, because a rule keyed on
66
+ * "crypto" would put a currency's symbol on unrelated settings. */
67
+ paypalGlyph?: Component;
68
+ onCrypto?: () => void;
69
+ cryptoGlyph?: Component;
70
+ hueIndex?: number;
71
+ }
@@ -0,0 +1,25 @@
1
+ import { type Component, type Ref } from "vue";
2
+ import { type SelectChoice, type SelectEntry as Entry, type SelectRun, type SelectSubmenu as Submenu } from "@glimstone/core";
3
+ export type SelectOption<T extends string = string> = SelectChoice<T, Component>;
4
+ export type SelectSubmenu<T extends string = string> = Submenu<T, Component>;
5
+ export type SelectEntry<T extends string = string> = Entry<T, Component>;
6
+ export type SelectGroup<T extends string = string> = SelectRun<T, Component>;
7
+ /**
8
+ * The trigger's rainbow position, for a list portalled out of the card that
9
+ * sets it. `.glim-hue` travels with the properties, never alone.
10
+ */
11
+ export declare function usePortalHue(open: () => boolean, trigger: Ref<HTMLElement | null>): {
12
+ style: import("vue").ComputedRef<Record<string, string> | undefined>;
13
+ className: import("vue").ComputedRef<"" | "glim-hue">;
14
+ };
15
+ /**
16
+ * The wheel steps through every option in list order while the closed trigger
17
+ * has focus (rule 14), and each bump of `count` shakes it once.
18
+ */
19
+ export declare function useTriggerMotion<T extends string>(trigger: Ref<HTMLElement | null>, o: {
20
+ all: () => SelectOption<T>[];
21
+ value: () => T | null;
22
+ inert: () => boolean;
23
+ onChange: (value: T) => void;
24
+ shakeCount: () => number;
25
+ }): void;
@@ -0,0 +1,19 @@
1
+ import type { Component } from "vue";
2
+ export interface SelectorItem {
3
+ /** Stable id, handed back through v-model. */
4
+ id: string;
5
+ label: string;
6
+ /** Shown before the label; in a tab strip it is tinted with its tab's hue. */
7
+ glyph?: Component;
8
+ disabled?: boolean;
9
+ /** Why the segment is in its state, shown in the bubble a keyboard reaches. */
10
+ title?: string;
11
+ /** The fuller version of a terse label, shown in the bubble. */
12
+ tip?: string;
13
+ /** Shows the glyph alone in every mode but text; the label stays the name. */
14
+ iconOnly?: boolean;
15
+ /** Tiles only: the page's own address, so a tile can open in a new tab. */
16
+ href?: string;
17
+ /** Tiles only: a page with nothing on it yet, dimmed rather than hidden. */
18
+ dim?: boolean;
19
+ }
@@ -0,0 +1,16 @@
1
+ import { type ComputedRef, type Ref } from "vue";
2
+ export interface TipBubble {
3
+ /** The trigger the bubble is placed against. */
4
+ trigger: Ref<HTMLElement | null>;
5
+ bubble: Ref<HTMLElement | null>;
6
+ id: string;
7
+ text: ComputedRef<string | undefined>;
8
+ shown: ComputedRef<boolean>;
9
+ /** `aria-describedby` while open, so the bubble is announced as the trigger's description. */
10
+ describedBy: ComputedRef<string | undefined>;
11
+ show: () => void;
12
+ hide: () => void;
13
+ /** Focus opens the bubble only when the keyboard was used last; a mouse user gets focus as a side effect. */
14
+ showOnFocus: () => void;
15
+ }
16
+ export declare function useTipBubble(tip: () => string | undefined, disabled?: () => boolean): TipBubble;
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@glimstone/vue",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "4.0.0",
4
+ "description": "GlimStone's components for Vue",
5
+ "license": "AGPL-3.0-only",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/junkerderprovinz/glimstone.git",
9
+ "directory": "packages/vue"
10
+ },
11
+ "homepage": "https://junkerderprovinz.github.io/glimstone/",
12
+ "type": "module",
13
+ "sideEffects": false,
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./Select": {
20
+ "types": "./dist/entries/select.d.ts",
21
+ "default": "./dist/Select.js"
22
+ },
23
+ "./Combobox": {
24
+ "types": "./dist/entries/combobox.d.ts",
25
+ "default": "./dist/Combobox.js"
26
+ },
27
+ "./Slider": {
28
+ "types": "./dist/entries/slider.d.ts",
29
+ "default": "./dist/Slider.js"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "scripts": {
36
+ "build": "vite build && vue-tsc -p tsconfig.build.json"
37
+ },
38
+ "dependencies": {
39
+ "@glimstone/core": "4.0.0"
40
+ },
41
+ "peerDependencies": {
42
+ "@zag-js/combobox": "^1.46.0",
43
+ "@zag-js/menu": "^1.46.0",
44
+ "@zag-js/select": "^1.46.0",
45
+ "@zag-js/slider": "^1.46.0",
46
+ "@zag-js/vue": "^1.46.0",
47
+ "vue": "^3.5.0"
48
+ }
49
+ }