@synopackageland/ui 0.4.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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSES/THIRD_PARTY.md +1866 -0
  3. package/README.md +440 -0
  4. package/dist/components/app/app-action-bar/AppActionBar.vue.d.ts +15 -0
  5. package/dist/components/app/app-layout/AppLayout.vue.d.ts +26 -0
  6. package/dist/components/app/app-root/AppRoot.vue.d.ts +20 -0
  7. package/dist/components/app/app-sidebar/AppSidebar.vue.d.ts +34 -0
  8. package/dist/components/app/app-toolbar/AppToolbar.vue.d.ts +22 -0
  9. package/dist/components/app/page-header/PageHeader.vue.d.ts +17 -0
  10. package/dist/components/app/section-tabs/SectionTabs.vue.d.ts +16 -0
  11. package/dist/components/composite/callout/Callout.vue.d.ts +19 -0
  12. package/dist/components/composite/data-grid/DataGrid.vue.d.ts +126 -0
  13. package/dist/components/composite/data-grid/columnWidths.d.ts +6 -0
  14. package/dist/components/composite/data-grid/labels.d.ts +12 -0
  15. package/dist/components/composite/data-table/DataTable.vue.d.ts +34 -0
  16. package/dist/components/composite/empty-state/EmptyState.vue.d.ts +19 -0
  17. package/dist/components/composite/file-picker/FilePicker.vue.d.ts +49 -0
  18. package/dist/components/composite/search-field/SearchField.vue.d.ts +19 -0
  19. package/dist/components/composite/settings-row/SettingsRow.vue.d.ts +22 -0
  20. package/dist/components/composite/settings-section/SettingsSection.vue.d.ts +21 -0
  21. package/dist/components/composite/tree-view/TreeView.vue.d.ts +44 -0
  22. package/dist/components/primitives/accordion/Accordion.vue.d.ts +28 -0
  23. package/dist/components/primitives/badge/Badge.vue.d.ts +18 -0
  24. package/dist/components/primitives/button/Button.vue.d.ts +28 -0
  25. package/dist/components/primitives/button/IconButton.vue.d.ts +25 -0
  26. package/dist/components/primitives/checkbox/Checkbox.vue.d.ts +16 -0
  27. package/dist/components/primitives/context-menu/ContextMenu.vue.d.ts +26 -0
  28. package/dist/components/primitives/context-menu/ContextMenuItems.vue.d.ts +13 -0
  29. package/dist/components/primitives/context-menu/types.d.ts +13 -0
  30. package/dist/components/primitives/date-picker/DatePicker.vue.d.ts +25 -0
  31. package/dist/components/primitives/dialog/Dialog.vue.d.ts +44 -0
  32. package/dist/components/primitives/dropdown-menu/DropdownMenu.vue.d.ts +36 -0
  33. package/dist/components/primitives/input/Input.vue.d.ts +21 -0
  34. package/dist/components/primitives/input/Textarea.vue.d.ts +19 -0
  35. package/dist/components/primitives/loading/LoadingArea.vue.d.ts +8 -0
  36. package/dist/components/primitives/loading/LoadingIndicator.vue.d.ts +10 -0
  37. package/dist/components/primitives/loading/LoadingMask.vue.d.ts +20 -0
  38. package/dist/components/primitives/popover/Popover.vue.d.ts +24 -0
  39. package/dist/components/primitives/progress/Progress.vue.d.ts +11 -0
  40. package/dist/components/primitives/radio-group/RadioGroup.vue.d.ts +22 -0
  41. package/dist/components/primitives/select/Select.vue.d.ts +21 -0
  42. package/dist/components/primitives/separator/Separator.vue.d.ts +8 -0
  43. package/dist/components/primitives/sheet/Sheet.vue.d.ts +47 -0
  44. package/dist/components/primitives/skeleton/Skeleton.vue.d.ts +12 -0
  45. package/dist/components/primitives/spinner/Spinner.vue.d.ts +10 -0
  46. package/dist/components/primitives/split-button/SplitButton.vue.d.ts +30 -0
  47. package/dist/components/primitives/surface/Surface.vue.d.ts +22 -0
  48. package/dist/components/primitives/switch/Switch.vue.d.ts +15 -0
  49. package/dist/components/primitives/tabs/Tabs.vue.d.ts +28 -0
  50. package/dist/components/primitives/toast/ToastProvider.vue.d.ts +21 -0
  51. package/dist/components/primitives/toast/toast.d.ts +25 -0
  52. package/dist/components/primitives/tooltip/Tooltip.vue.d.ts +21 -0
  53. package/dist/index.d.ts +59 -0
  54. package/dist/index.js +15795 -0
  55. package/dist/lib/appRoot.d.ts +2 -0
  56. package/dist/lib/cn.d.ts +2 -0
  57. package/dist/lib/localModal.d.ts +44 -0
  58. package/dist/reka-runtime.json +23 -0
  59. package/dist/theme.css +1 -0
  60. package/dist/themes/dsm7-embedded-reset.css +1 -0
  61. package/dist/themes/dsm7-embedded-theme.css +1 -0
  62. package/dist/themes/dsm7-embedded.css +1 -0
  63. package/dist/themes/dsm7.css +1 -0
  64. package/docs/app-local-modal.md +120 -0
  65. package/package.json +51 -0
@@ -0,0 +1,120 @@
1
+ # App-local modal
2
+
3
+ Status: implemented for 0.4.0 (unreleased). The public API approved for U4 is
4
+ `AppRoot modal-scope="app"`; the default remains `"document"`.
5
+
6
+ ```vue
7
+ <AppRoot modal-scope="app" style="width: 480px; height: 500px">
8
+ <Dialog v-model:open="open" title="Settings" description="Package settings" />
9
+ <Sheet v-model:open="details" title="Details" description="Details" />
10
+ </AppRoot>
11
+ ```
12
+
13
+ Give each independent Vue app a unique `app.config.idPrefix` before mounting.
14
+ Supply a bounded root size and import the embedded theme inside DSM. The root
15
+ creates a scrollable background wrapper and a sibling portal host. Dialog,
16
+ Sheet and supported popup primitives inherit the root mode; there are no
17
+ per-dialog scope overrides. Select the mode at mount time and remount to change
18
+ it. Nesting an app-local AppRoot and simultaneous app/document overlays throw explicit
19
+ errors; a rejected overlay must be closed/unmounted by the app's error handler.
20
+
21
+ ## Behavior and accessibility
22
+
23
+ | Concern | Default document mode | App mode |
24
+ | --- | --- | --- |
25
+ | Pointer | Original Reka document stack and body lock. | Inert only this root's background and lower local modal layers; other roots/host remain interactive. |
26
+ | Scroll | Shared body scroll lock and compensation policy. | Lock the background wrapper, preserve its scroll position, and contain backdrop wheel/touch gestures locally. Active panels and host/other-app scrolling remain native. |
27
+ | Accessibility | Original Reka hideOthers semantics. | Local inert/aria-hidden ownership; keep the active dialog and registered popup branches accessible. Dialogs keep role, title and description references and omit aria-modal, since the rest of the page is available. |
28
+ | Focus | Original document FocusScope coordination. | Loop Tab/Shift+Tab in the active local panel while focus belongs to it. Deliberate other-app/host transitions remain outside the local trap. |
29
+ | Escape | Original document layer routing. | Route once to the focused root's top layer. IME composition is ignored and cancellation is preserved. Host/body events infer no local app. |
30
+ | Cleanup | Shared Reka lock counts. | Restore locally owned inert/ARIA/style values only when still owned. Remove listeners/branches on unmount and never mutate body. |
31
+
32
+ Opening from a focused trigger or an actual pointer activation moves focus into
33
+ the panel. A programmatic open in an unfocused app does not steal another app's
34
+ focus. Closing restores a connected local trigger only if focus still belongs
35
+ to that app; disconnected triggers fall back to the remaining local panel/root.
36
+ Nested panels retain the parent background lock, temporarily hide/inert the
37
+ parent panel, and restore its interaction on close. Presence/exit animations
38
+ retain layer ownership until Reka actually removes the layer.
39
+
40
+ A host must provide an accessible window switch mechanism: a looping Tab
41
+ sequence inside a local dialog does not itself reach another app. There is no
42
+ claim of whole-document modality in app mode. VoiceOver/NVDA exposure and
43
+ Safari/iOS gesture behavior still need manual acceptance.
44
+
45
+ Dialog and Sheet forward cancellable `escapeKeyDown`, `pointerDownOutside`,
46
+ `interactOutside`, `openAutoFocus`, and `closeAutoFocus` events. For example:
47
+
48
+ ```vue
49
+ <Dialog title="Settings" @escape-key-down="event => event.preventDefault()" />
50
+ ```
51
+
52
+ ## Popup coverage
53
+
54
+ Popover, Select, DropdownMenu, DatePicker (through Popover), SplitButton (through
55
+ DropdownMenu), ContextMenu (through Menu), and Tooltip use the same patched
56
+ DismissableLayer/focus boundary. Portal branches are part of the local stack;
57
+ closing a child does not also close the parent. Tooltip-open coordination is
58
+ local to the root. Toast portals/live announcements remain in the sibling
59
+ portal host, outside the inert background. Raw Reka primitives from a separate
60
+ consumer import are outside this contract.
61
+
62
+ The wrapper is the registered background scroll container in this version.
63
+ Scroll containers within it are blocked by inert/background containment while
64
+ a local modal is present. Apps with their own external Teleports or desktop
65
+ scrolling cannot claim independent containment. Keep custom portals inside the
66
+ root and inside the active panel, or use the library's supported popup components.
67
+
68
+ ## Delivery and patch maintenance
69
+
70
+ Reka 2.10.5 is an exact development dependency, bundled into the UI library's
71
+ ESM dist. It is no longer a consumer runtime dependency. Vue remains an external
72
+ peer, and the bundled code uses that same Vue instance. Existing consumers get
73
+ the body-style fix on rebuilding with 0.4.0 without a package-manager patch or
74
+ app code change. Independent modality is opt-in.
75
+
76
+ `build/reka-patches.json` records the SHA-256 of every original upstream ESM
77
+ module plus exact before/after hunks. `build/rekaPatch.ts` verifies the installed
78
+ version and all input hashes before the build; each hunk must match exactly
79
+ once. The Vite plugin loads patched modules in memory, never edits node_modules,
80
+ and is also used by Vitest. Any source/hash/hunk mismatch fails the build.
81
+
82
+ The body-scroll patch follows the U3 shared-lock candidate: save owned body
83
+ padding-right, margin-right, overflow, pointer-events and root scrollbar-width
84
+ values/priorities once on lock acquisition; restore once after the final release.
85
+ The bundled DismissableLayer additionally preserves the original pointer-events
86
+ priority. AppRoot-lifetime snapshots and body MutationObservers are not used.
87
+
88
+ The library adds a private scope bridge to Reka's shared primitives rather than
89
+ copying the full modal implementation. Default Reka rendering, Presence,
90
+ component contexts, labels and keyboard navigation remain in use. The bridge
91
+ bypasses document scroll locking, hideOthers, global layer stacks and global
92
+ FocusScope/guards only when the app context is present.
93
+
94
+ `dist/reka-runtime.json` records the patch manifest hash, source hashes and
95
+ bundle hash. `pnpm check:package` verifies inventory, external imports, consumer
96
+ dependency/declaration boundaries and the complete Reka MIT notice.
97
+ `pnpm notices:update` / `pnpm notices:check` include the bundled runtime's graph.
98
+
99
+ ## Verification and limitations
100
+
101
+ - Unit regressions cover interleaved body locks, important styles, repeated cycles,
102
+ unmount, local background ownership/external changes, mixed-mode rejection,
103
+ nested layers, focused-root Escape and unfocused programmatic opens.
104
+ - `pnpm check:local-browser [output-dir] [existing-ego-space-id]` packs and installs
105
+ the UI in a clean consumer, verifies a single Vue/no external Reka dependency,
106
+ and uses native mouse/keyboard input in Chromium. It also runs the existing
107
+ default document-mode isolation fixture against that installed package.
108
+ - The default document-wide pointer/ARIA policy remains intentional. Independent
109
+ apps without unique idPrefix still collide; this remains an executable expected
110
+ failure, not a promise of automatic ID assignment.
111
+ - Simultaneous app/document overlays are rejected within this bundled runtime.
112
+ Separate UI versions, multiple Reka runtime copies or unrelated host modal
113
+ libraries cannot coordinate ownership through this private bridge. Do not mix
114
+ them; rebuilding all participating apps with one SDK version is recommended.
115
+ - The default shared body lock still does not arbitrate unrelated libraries
116
+ changing its owned properties during a lock. Local ownership restoration does
117
+ preserve externally changed attribute/style values.
118
+ - Evidence is bounded to Chromium in one document. Firefox, WebKit/iOS, iframe,
119
+ shadow-DOM focus paths and manual assistive-technology acceptance are unverified.
120
+ Do not infer DSM runtime certification or browser-wide support from these tests.
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "version": "0.4.0",
3
+ "description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "sideEffects": [
7
+ "**/*.css"
8
+ ],
9
+ "files": [
10
+ "dist",
11
+ "LICENSE",
12
+ "LICENSES",
13
+ "README.md",
14
+ "docs/app-local-modal.md"
15
+ ],
16
+ "main": "./dist/index.js",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./theme.css": "./dist/theme.css",
25
+ "./themes/dsm7.css": "./dist/themes/dsm7.css",
26
+ "./themes/dsm7-embedded.css": "./dist/themes/dsm7-embedded.css",
27
+ "./themes/dsm7-embedded-reset.css": "./dist/themes/dsm7-embedded-reset.css",
28
+ "./themes/dsm7-embedded-theme.css": "./dist/themes/dsm7-embedded-theme.css"
29
+ },
30
+ "peerDependencies": {
31
+ "vue": "^3.5.0"
32
+ },
33
+ "dependencies": {
34
+ "@internationalized/date": "3.12.4",
35
+ "@lucide/vue": "1.48.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=20"
39
+ },
40
+ "config": {
41
+ "bundledRuntime": {
42
+ "reka-ui": "2.10.5"
43
+ }
44
+ },
45
+ "name": "@synopackageland/ui",
46
+ "homepage": "https://www.varvis.me/docs/",
47
+ "publishConfig": {
48
+ "registry": "https://registry.npmjs.org",
49
+ "access": "public"
50
+ }
51
+ }