@vieo-io/ui 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +65 -5
  2. package/dist/core/index.d.ts +10 -0
  3. package/dist/core/index.js +9 -0
  4. package/dist/core/reveal.d.ts +10 -0
  5. package/dist/core/reveal.js +65 -0
  6. package/dist/core/search.d.ts +5 -0
  7. package/dist/core/search.js +12 -0
  8. package/dist/core/settingsSearch.d.ts +21 -0
  9. package/dist/core/settingsSearch.js +37 -0
  10. package/dist/core/update/build.d.ts +48 -0
  11. package/dist/core/update/build.js +90 -0
  12. package/dist/core/update/follow.d.ts +39 -0
  13. package/dist/core/update/follow.js +49 -0
  14. package/dist/core/update/notNow.d.ts +4 -0
  15. package/dist/core/update/notNow.js +18 -0
  16. package/dist/core/update/offer.d.ts +32 -0
  17. package/dist/core/update/offer.js +19 -0
  18. package/dist/core/update/reload.d.ts +12 -0
  19. package/dist/core/update/reload.js +16 -0
  20. package/dist/core/update/types.d.ts +33 -0
  21. package/dist/react/index.d.ts +4 -0
  22. package/dist/react/index.js +4 -0
  23. package/dist/react/settingsSearch.d.ts +35 -0
  24. package/dist/react/settingsSearch.js +97 -0
  25. package/dist/react/update/Offer.d.ts +9 -0
  26. package/dist/react/update/Offer.js +4 -0
  27. package/dist/react/update/UpdateNotice.d.ts +37 -0
  28. package/dist/react/update/UpdateNotice.js +141 -0
  29. package/dist/react/update/hooks.d.ts +9 -0
  30. package/dist/react/update/hooks.js +51 -0
  31. package/dist/search.css +83 -0
  32. package/dist/setting.css +26 -0
  33. package/dist/{CommandPalette.d.ts → solid/CommandPalette.d.ts} +1 -1
  34. package/dist/{CommandPalette.jsx → solid/CommandPalette.jsx} +5 -10
  35. package/dist/{Dialog.jsx → solid/Dialog.jsx} +1 -1
  36. package/dist/{Icon.d.ts → solid/Icon.d.ts} +1 -1
  37. package/dist/{Icon.jsx → solid/Icon.jsx} +1 -1
  38. package/dist/{Listbox.jsx → solid/Listbox.jsx} +2 -2
  39. package/dist/{Menu.jsx → solid/Menu.jsx} +3 -3
  40. package/dist/{Popover.jsx → solid/Popover.jsx} +2 -2
  41. package/dist/{SegmentedControl.jsx → solid/SegmentedControl.jsx} +2 -2
  42. package/dist/{Sidebar.jsx → solid/Sidebar.jsx} +1 -1
  43. package/dist/{Tabs.jsx → solid/Tabs.jsx} +2 -2
  44. package/dist/{TextField.jsx → solid/TextField.jsx} +1 -1
  45. package/dist/{Toolbar.jsx → solid/Toolbar.jsx} +1 -1
  46. package/dist/{Tooltip.jsx → solid/Tooltip.jsx} +1 -1
  47. package/dist/{Tree.jsx → solid/Tree.jsx} +2 -2
  48. package/dist/{index.d.ts → solid/index.d.ts} +1 -1
  49. package/dist/{index.js → solid/index.js} +1 -1
  50. package/dist/solid/trigger.js +1 -0
  51. package/dist/styles.css +2 -0
  52. package/dist/update.css +118 -0
  53. package/package.json +39 -8
  54. /package/dist/{aria.d.ts → core/aria.d.ts} +0 -0
  55. /package/dist/{aria.js → core/aria.js} +0 -0
  56. /package/dist/{layers.d.ts → core/layers.d.ts} +0 -0
  57. /package/dist/{layers.js → core/layers.js} +0 -0
  58. /package/dist/{paths.d.ts → core/paths.d.ts} +0 -0
  59. /package/dist/{paths.js → core/paths.js} +0 -0
  60. /package/dist/{roving.d.ts → core/roving.d.ts} +0 -0
  61. /package/dist/{roving.js → core/roving.js} +0 -0
  62. /package/dist/{trigger.js → core/update/types.js} +0 -0
  63. /package/dist/{AppShell.d.ts → solid/AppShell.d.ts} +0 -0
  64. /package/dist/{AppShell.jsx → solid/AppShell.jsx} +0 -0
  65. /package/dist/{AppSwitcher.d.ts → solid/AppSwitcher.d.ts} +0 -0
  66. /package/dist/{AppSwitcher.jsx → solid/AppSwitcher.jsx} +0 -0
  67. /package/dist/{Badge.d.ts → solid/Badge.d.ts} +0 -0
  68. /package/dist/{Badge.jsx → solid/Badge.jsx} +0 -0
  69. /package/dist/{Button.d.ts → solid/Button.d.ts} +0 -0
  70. /package/dist/{Button.jsx → solid/Button.jsx} +0 -0
  71. /package/dist/{Checkbox.d.ts → solid/Checkbox.d.ts} +0 -0
  72. /package/dist/{Checkbox.jsx → solid/Checkbox.jsx} +0 -0
  73. /package/dist/{Dialog.d.ts → solid/Dialog.d.ts} +0 -0
  74. /package/dist/{EmptyState.d.ts → solid/EmptyState.d.ts} +0 -0
  75. /package/dist/{EmptyState.jsx → solid/EmptyState.jsx} +0 -0
  76. /package/dist/{IconButton.d.ts → solid/IconButton.d.ts} +0 -0
  77. /package/dist/{IconButton.jsx → solid/IconButton.jsx} +0 -0
  78. /package/dist/{Kbd.d.ts → solid/Kbd.d.ts} +0 -0
  79. /package/dist/{Kbd.jsx → solid/Kbd.jsx} +0 -0
  80. /package/dist/{Listbox.d.ts → solid/Listbox.d.ts} +0 -0
  81. /package/dist/{Menu.d.ts → solid/Menu.d.ts} +0 -0
  82. /package/dist/{ObjectCard.d.ts → solid/ObjectCard.d.ts} +0 -0
  83. /package/dist/{ObjectCard.jsx → solid/ObjectCard.jsx} +0 -0
  84. /package/dist/{Popover.d.ts → solid/Popover.d.ts} +0 -0
  85. /package/dist/{Resizer.d.ts → solid/Resizer.d.ts} +0 -0
  86. /package/dist/{Resizer.jsx → solid/Resizer.jsx} +0 -0
  87. /package/dist/{SegmentedControl.d.ts → solid/SegmentedControl.d.ts} +0 -0
  88. /package/dist/{Select.d.ts → solid/Select.d.ts} +0 -0
  89. /package/dist/{Select.jsx → solid/Select.jsx} +0 -0
  90. /package/dist/{SettingRow.d.ts → solid/SettingRow.d.ts} +0 -0
  91. /package/dist/{SettingRow.jsx → solid/SettingRow.jsx} +0 -0
  92. /package/dist/{Sidebar.d.ts → solid/Sidebar.d.ts} +0 -0
  93. /package/dist/{Switch.d.ts → solid/Switch.d.ts} +0 -0
  94. /package/dist/{Switch.jsx → solid/Switch.jsx} +0 -0
  95. /package/dist/{Tabs.d.ts → solid/Tabs.d.ts} +0 -0
  96. /package/dist/{TextField.d.ts → solid/TextField.d.ts} +0 -0
  97. /package/dist/{Toast.d.ts → solid/Toast.d.ts} +0 -0
  98. /package/dist/{Toast.jsx → solid/Toast.jsx} +0 -0
  99. /package/dist/{Toolbar.d.ts → solid/Toolbar.d.ts} +0 -0
  100. /package/dist/{Tooltip.d.ts → solid/Tooltip.d.ts} +0 -0
  101. /package/dist/{Tree.d.ts → solid/Tree.d.ts} +0 -0
  102. /package/dist/{trigger.d.ts → solid/trigger.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { Portal, Show } from '@solidjs/web';
2
2
  import { createEffect, createSignal, createUniqueId, onSettled } from 'solid-js';
3
- import { place } from './layers';
3
+ import { place } from '../core/layers';
4
4
  /** How long the pointer rests on a trigger before its tooltip shows. Keyboard focus shows it at once. */
5
5
  const HOVER_DELAY_MS = 500;
6
6
  /** A short label shown on hover or keyboard focus, and hidden on Escape. */
@@ -1,8 +1,8 @@
1
1
  import { For, Show } from '@solidjs/web';
2
2
  import { createMemo, createSignal, createUniqueId } from 'solid-js';
3
- import { aria } from './aria';
3
+ import { aria } from '../core/aria';
4
+ import { moveFor, typeahead } from '../core/roving';
4
5
  import { Icon } from './Icon';
5
- import { moveFor, typeahead } from './roving';
6
6
  /**
7
7
  * Navigation as a WAI-ARIA tree. Up and Down move through the visible rows, Right opens a folder or enters it, Left
8
8
  * closes one or goes to its parent, Home and End reach either end, and a letter moves to the next row starting with it.
@@ -1,6 +1,6 @@
1
+ export { aria } from '../core/aria';
1
2
  export { AppShell, type AppShellProps } from './AppShell';
2
3
  export { type App, AppMark, AppSwitcher, type AppSwitcherProps } from './AppSwitcher';
3
- export { aria } from './aria';
4
4
  export { Badge, type BadgeProps } from './Badge';
5
5
  export { Button, type ButtonProps } from './Button';
6
6
  export { Checkbox, type CheckboxProps } from './Checkbox';
@@ -1,6 +1,6 @@
1
+ export { aria } from '../core/aria';
1
2
  export { AppShell } from './AppShell';
2
3
  export { AppMark, AppSwitcher } from './AppSwitcher';
3
- export { aria } from './aria';
4
4
  export { Badge } from './Badge';
5
5
  export { Button } from './Button';
6
6
  export { Checkbox } from './Checkbox';
@@ -0,0 +1 @@
1
+ export {};
package/dist/styles.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import "./object-card.css";
11
11
  @import "./palette.css";
12
12
  @import "./popover.css";
13
+ @import "./search.css";
13
14
  @import "./setting.css";
14
15
  @import "./shell.css";
15
16
  @import "./small.css";
@@ -18,3 +19,4 @@
18
19
  @import "./toolbar.css";
19
20
  @import "./tooltip.css";
20
21
  @import "./tree.css";
22
+ @import "./update.css";
@@ -0,0 +1,118 @@
1
+ /*
2
+ * The update card, drawn from @vieo-io/tokens. An app puts it under its own bar with --vieo-update-notice-top.
3
+ * Each rule names the card, so an app's own button and link styles do not change it.
4
+ */
5
+ .vieo-update-notice {
6
+ position: fixed;
7
+ right: 16px;
8
+ top: var(--vieo-update-notice-top, calc(max(10px, env(safe-area-inset-top)) + 54px));
9
+ z-index: 41;
10
+ display: flex;
11
+ align-items: center;
12
+ gap: 12px;
13
+ box-sizing: border-box;
14
+ max-width: min(640px, calc(100vw - 32px));
15
+ padding: 10px 12px 10px 16px;
16
+ border: 1px solid var(--border);
17
+ border-radius: 12px;
18
+ background: var(--raised);
19
+ box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
20
+ color: var(--text);
21
+ font-family: var(--font-family-ui);
22
+ font-size: 13px;
23
+ line-height: 1.5;
24
+ }
25
+
26
+ .vieo-update-notice[hidden] {
27
+ display: none;
28
+ }
29
+
30
+ .vieo-update-notice a {
31
+ color: inherit;
32
+ text-decoration: inherit;
33
+ }
34
+
35
+ /* A long reason, such as a package's address, breaks where it must rather than pushing the buttons off the card. */
36
+ .vieo-update-notice > span {
37
+ min-width: 0;
38
+ overflow-wrap: anywhere;
39
+ }
40
+
41
+ /* On a narrow screen the text wraps and the link and the button stay whole. */
42
+ .vieo-update-notice a,
43
+ .vieo-update-notice .vieo-update-action {
44
+ flex: none;
45
+ white-space: nowrap;
46
+ }
47
+
48
+ .vieo-update-notice .vieo-update-action {
49
+ min-height: 32px;
50
+ margin: 0;
51
+ padding: 6px 12px;
52
+ border: 1px solid var(--accent);
53
+ border-radius: 8px;
54
+ background: var(--accent);
55
+ color: var(--accent-ink);
56
+ font: inherit;
57
+ font-weight: 600;
58
+ cursor: pointer;
59
+ }
60
+
61
+ .vieo-update-notice .vieo-update-action:active {
62
+ transform: translateY(1px);
63
+ }
64
+
65
+ .vieo-update-notice .vieo-update-not-now {
66
+ display: inline-grid;
67
+ flex: none;
68
+ place-items: center;
69
+ width: 28px;
70
+ height: 28px;
71
+ min-height: 0;
72
+ margin: 0;
73
+ padding: 0;
74
+ border: 1px solid transparent;
75
+ border-radius: 7px;
76
+ background: transparent;
77
+ color: var(--muted);
78
+ cursor: pointer;
79
+ }
80
+
81
+ .vieo-update-notice .vieo-update-not-now:hover {
82
+ background: var(--bg-hover);
83
+ color: var(--text);
84
+ }
85
+
86
+ .vieo-update-notice .vieo-update-not-now:focus-visible {
87
+ outline: 2px solid var(--accent);
88
+ outline-offset: 1px;
89
+ }
90
+
91
+ .vieo-update-notice .vieo-update-not-now svg {
92
+ width: 16px;
93
+ height: 16px;
94
+ fill: none;
95
+ stroke: currentColor;
96
+ stroke-width: 2;
97
+ stroke-linecap: round;
98
+ stroke-linejoin: round;
99
+ }
100
+
101
+ @media (pointer: coarse) {
102
+ .vieo-update-notice .vieo-update-action {
103
+ min-height: 40px;
104
+ }
105
+
106
+ .vieo-update-notice .vieo-update-not-now {
107
+ width: 32px;
108
+ height: 32px;
109
+ }
110
+ }
111
+
112
+ @media (max-width: 700px) {
113
+ .vieo-update-notice {
114
+ left: 8px;
115
+ right: 8px;
116
+ max-width: none;
117
+ }
118
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vieo-io/ui",
3
- "version": "0.2.0",
4
- "description": "Vieo's components in Solid 2.0, styled by @vieo-io/tokens",
3
+ "version": "0.3.0",
4
+ "description": "Vieo's components: a framework-free core with Solid and React bindings, styled by @vieo-io/tokens",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
7
7
  "repository": {
@@ -18,16 +18,40 @@
18
18
  ],
19
19
  "exports": {
20
20
  ".": {
21
- "types": "./dist/index.d.ts",
22
- "solid": "./dist/index.js"
21
+ "types": "./dist/solid/index.d.ts",
22
+ "solid": "./dist/solid/index.js"
23
+ },
24
+ "./solid": {
25
+ "types": "./dist/solid/index.d.ts",
26
+ "solid": "./dist/solid/index.js"
27
+ },
28
+ "./core": {
29
+ "types": "./dist/core/index.d.ts",
30
+ "default": "./dist/core/index.js"
31
+ },
32
+ "./react": {
33
+ "types": "./dist/react/index.d.ts",
34
+ "default": "./dist/react/index.js"
23
35
  },
24
36
  "./styles.css": "./dist/styles.css"
25
37
  },
26
38
  "peerDependencies": {
27
39
  "@solidjs/web": "^2.0.3",
28
- "@vieo-io/tokens": "^0.2.0",
40
+ "@vieo-io/tokens": ">=0.2.0 <0.4.0",
41
+ "react": "^18.3 || ^19",
29
42
  "solid-js": "^2.0.3"
30
43
  },
44
+ "peerDependenciesMeta": {
45
+ "@solidjs/web": {
46
+ "optional": true
47
+ },
48
+ "react": {
49
+ "optional": true
50
+ },
51
+ "solid-js": {
52
+ "optional": true
53
+ }
54
+ },
31
55
  "dependencies": {
32
56
  "@floating-ui/dom": "1.8.0",
33
57
  "@solid-primitives/focus": "1.0.0",
@@ -39,17 +63,24 @@
39
63
  "@solidjs/testing-library": "1.0.0-rc.2",
40
64
  "@solidjs/vite-plugin": "3.0.1",
41
65
  "@solidjs/web": "2.0.3",
66
+ "@testing-library/dom": "10.4.2",
67
+ "@testing-library/react": "16.3.3",
68
+ "@types/react": "19.3.0",
69
+ "@types/react-dom": "19.3.0",
70
+ "@vitejs/plugin-react": "6.1.2",
42
71
  "jsdom": "31.0.1",
72
+ "react": "19.3.1",
73
+ "react-dom": "19.3.1",
43
74
  "solid-js": "2.0.3",
44
75
  "vite": "8.3.8",
45
76
  "vitest": "5.1.1",
46
- "@vieo-io/tokens": "0.2.0"
77
+ "@vieo-io/tokens": "0.3.0"
47
78
  },
48
79
  "sideEffects": [
49
80
  "**/*.css"
50
81
  ],
51
82
  "scripts": {
52
- "build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/*.css dist/",
53
- "test": "vitest run && tsc --noEmit -p ."
83
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && tsc -p tsconfig.react.build.json && cp src/*.css dist/",
84
+ "test": "vitest run && tsc --noEmit -p . && tsc --noEmit -p tsconfig.react.json"
54
85
  }
55
86
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes