@cyann/dash-lab 0.0.0-stage → 0.1.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 (96) hide show
  1. package/AGENTS.md +138 -0
  2. package/CHANGELOG.md +48 -0
  3. package/CONTRIBUTING.md +94 -0
  4. package/LICENSE +21 -0
  5. package/README.md +154 -2
  6. package/THIRD_PARTY_NOTICES.md +31 -0
  7. package/dist/commands/CommandContext.d.ts +19 -0
  8. package/dist/commands/CommandContext.d.ts.map +1 -0
  9. package/dist/commands/CommandPalette.d.ts +10 -0
  10. package/dist/commands/CommandPalette.d.ts.map +1 -0
  11. package/dist/commands/CommandProvider.d.ts +12 -0
  12. package/dist/commands/CommandProvider.d.ts.map +1 -0
  13. package/dist/commands/CommandRegistry.d.ts +40 -0
  14. package/dist/commands/CommandRegistry.d.ts.map +1 -0
  15. package/dist/commands/searchCommands.d.ts +3 -0
  16. package/dist/commands/searchCommands.d.ts.map +1 -0
  17. package/dist/commands/shortcuts.d.ts +7 -0
  18. package/dist/commands/shortcuts.d.ts.map +1 -0
  19. package/dist/dash-lab.css +2 -0
  20. package/dist/i18n/I18nProvider.d.ts +20 -0
  21. package/dist/i18n/I18nProvider.d.ts.map +1 -0
  22. package/dist/i18n/i18nStore.d.ts +31 -0
  23. package/dist/i18n/i18nStore.d.ts.map +1 -0
  24. package/dist/i18n/messages.d.ts +3 -0
  25. package/dist/i18n/messages.d.ts.map +1 -0
  26. package/dist/index.d.ts +32 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +2561 -0
  29. package/dist/layout/DockWorkspace.d.ts +7 -0
  30. package/dist/layout/DockWorkspace.d.ts.map +1 -0
  31. package/dist/layout/LayoutControls.d.ts +5 -0
  32. package/dist/layout/LayoutControls.d.ts.map +1 -0
  33. package/dist/layout/Workbench.d.ts +40 -0
  34. package/dist/layout/Workbench.d.ts.map +1 -0
  35. package/dist/layout/layoutPersistence.d.ts +22 -0
  36. package/dist/layout/layoutPersistence.d.ts.map +1 -0
  37. package/dist/layout/layoutStore.d.ts +13 -0
  38. package/dist/layout/layoutStore.d.ts.map +1 -0
  39. package/dist/layout/panels.d.ts +21 -0
  40. package/dist/layout/panels.d.ts.map +1 -0
  41. package/dist/layout/useLayoutManagement.d.ts +21 -0
  42. package/dist/layout/useLayoutManagement.d.ts.map +1 -0
  43. package/dist/layout/useWorkbenchCommands.d.ts +14 -0
  44. package/dist/layout/useWorkbenchCommands.d.ts.map +1 -0
  45. package/dist/library.d.ts +3 -0
  46. package/dist/library.d.ts.map +1 -0
  47. package/dist/notifications/NotificationButton.d.ts +3 -0
  48. package/dist/notifications/NotificationButton.d.ts.map +1 -0
  49. package/dist/notifications/NotificationContext.d.ts +5 -0
  50. package/dist/notifications/NotificationContext.d.ts.map +1 -0
  51. package/dist/notifications/NotificationProvider.d.ts +11 -0
  52. package/dist/notifications/NotificationProvider.d.ts.map +1 -0
  53. package/dist/notifications/NotificationToasts.d.ts +2 -0
  54. package/dist/notifications/NotificationToasts.d.ts.map +1 -0
  55. package/dist/notifications/NotificationViewport.d.ts +2 -0
  56. package/dist/notifications/NotificationViewport.d.ts.map +1 -0
  57. package/dist/notifications/notificationStore.d.ts +56 -0
  58. package/dist/notifications/notificationStore.d.ts.map +1 -0
  59. package/dist/notifications/preferences.d.ts +10 -0
  60. package/dist/notifications/preferences.d.ts.map +1 -0
  61. package/dist/overlays/dialogMotion.d.ts +3 -0
  62. package/dist/overlays/dialogMotion.d.ts.map +1 -0
  63. package/dist/overlays/useDialogDismiss.d.ts +9 -0
  64. package/dist/overlays/useDialogDismiss.d.ts.map +1 -0
  65. package/dist/plugins/PluginContext.d.ts +5 -0
  66. package/dist/plugins/PluginContext.d.ts.map +1 -0
  67. package/dist/plugins/PluginRegistry.d.ts +98 -0
  68. package/dist/plugins/PluginRegistry.d.ts.map +1 -0
  69. package/dist/plugins/pluginState.d.ts +19 -0
  70. package/dist/plugins/pluginState.d.ts.map +1 -0
  71. package/dist/settings/ApplicationMenu.d.ts +2 -0
  72. package/dist/settings/ApplicationMenu.d.ts.map +1 -0
  73. package/dist/settings/SettingsDialog.d.ts +12 -0
  74. package/dist/settings/SettingsDialog.d.ts.map +1 -0
  75. package/dist/settings/configuration.d.ts +36 -0
  76. package/dist/settings/configuration.d.ts.map +1 -0
  77. package/dist/settings/useWorkbenchConfiguration.d.ts +15 -0
  78. package/dist/settings/useWorkbenchConfiguration.d.ts.map +1 -0
  79. package/dist/theme/ThemeProvider.d.ts +17 -0
  80. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  81. package/dist/theme/ThemeToggle.d.ts +3 -0
  82. package/dist/theme/ThemeToggle.d.ts.map +1 -0
  83. package/dist/theme/palettes.d.ts +153 -0
  84. package/dist/theme/palettes.d.ts.map +1 -0
  85. package/dist/theme/themeStore.d.ts +31 -0
  86. package/dist/theme/themeStore.d.ts.map +1 -0
  87. package/docs/api.md +171 -0
  88. package/docs/application-guide.md +332 -0
  89. package/docs/architecture.md +59 -0
  90. package/docs/decisions/001-library-and-demo.md +9 -0
  91. package/docs/decisions/002-local-plugins-and-languages.md +17 -0
  92. package/docs/decisions/003-plugin-state-checkpoints.md +11 -0
  93. package/docs/dependencies.md +33 -0
  94. package/docs/validation.md +126 -0
  95. package/package.json +97 -4
  96. package/scripts/install-hooks.mjs +17 -0
package/AGENTS.md ADDED
@@ -0,0 +1,138 @@
1
+ # Engineering Charter — AGENTS.md
2
+
3
+ ## Mission
4
+
5
+ Build software that is **correct, simple, elegant, and easy for a human to take over**.
6
+ Optimize for human comprehension and long-term ownership, not for the amount of code generated or the speed of the first implementation.
7
+
8
+ **Decision rule:** every new line, abstraction, dependency, layer, and document must earn its place.
9
+
10
+ ## 1. Autonomy and approval
11
+
12
+ Work independently on routine implementation, local refactoring, documentation, and safe build/test/lint commands within the project workspace. Do not interrupt for ordinary choices that respect this charter.
13
+
14
+ **Ask the project owner before:**
15
+ - Adding any external dependency, including development or test dependencies.
16
+ - Introducing a framework or changing the project's technology stack. Do not select a new framework by default.
17
+ - Making a breaking change to a public API, a core contract, or a significant architectural decision.
18
+ - Performing destructive operations, publishing or deploying, accessing secrets, or sending project data to an external service.
19
+
20
+ For decisions requiring approval, explain the need, realistic alternatives, trade-offs, and your recommendation. Never interpret silence as approval. This file does not override the execution environment's permission and security controls.
21
+
22
+ ## 2. Prefer less code
23
+
24
+ - First understand the existing code and reuse what already solves the problem.
25
+ - Do not implement speculative features, generic infrastructure, or abstractions for hypothetical future requirements (**YAGNI**).
26
+ - Prefer the simplest solution that preserves correctness and foreseeable evolution; avoid cleverness and boilerplate.
27
+ - Remove unnecessary complexity when it is safely in scope, but avoid unrelated refactoring.
28
+ - A small, explicit implementation often beats an elaborate architecture.
29
+
30
+ ## 3. Write code humans can read
31
+
32
+ - **Keep code visually airy**, Spacing out code blocks vertically (separating variable declarations, processing, and return statements with blank lines) would make it even easier for humans to review the code.
33
+ - Avoid excessive line wrapping. Keep method signatures, expressions, and short statements on a single line whenever reasonably readable, as the output will be viewed on a wide screen.
34
+ - Give classes, functions, parameters, and variables **precise, intention-revealing names**.
35
+ - Prefer short, cohesive functions and classes with one clear reason to change; do not impose arbitrary line limits.
36
+ - Separate meaningful logical steps, loops, and conditionals with blank lines. Keep code visually airy and consistently formatted.
37
+ - Prefer expressive code over comments. Comments should be rare, concise, **in English**, and explain *why* a non-obvious constraint exists—not narrate *what* the code does.
38
+ - Put substantial explanations in Markdown documentation, not large in-code comment blocks.
39
+ - Favor well-defined object-oriented abstractions when appropriate to the domain, without wrapping trivial behavior in needless classes.
40
+ - Follow the repository's established naming and formatting conventions unless explicitly asked to change them.
41
+ - Add line space between logic blocks of codes, separate blocks as **variable declarations**, different **logic parts of code** and **results** with line space.
42
+ - Limite usage of comments as minimum
43
+ - Write the comments in English
44
+ - Follow the naming conventions defined in the `convention/` directory whenever they apply to the language or framework used in the project.
45
+
46
+ ## 4. Compose components; keep architecture light
47
+
48
+ - Organize packages/modules around **cohesive capabilities or components** with clear responsibilities and minimal public surfaces.
49
+ - Use a small number of meaningful architectural layers when the application needs them (for example, domain, data/model, and presentation).
50
+ - Keep dependencies directional and acyclic: higher-level consumers may use lower-level services; lower-level components must not know their concrete higher-level consumers.
51
+ - Communicate upward through returned values, events, callbacks, or contracts defined at the appropriate boundary—not hidden reverse dependencies.
52
+ - Keep the domain engine independent of UI and infrastructure details; replacing the UI must not require rewriting the engine.
53
+ - Apply **SOLID**, composition, substitutable contracts, and design patterns (Composite, Strategy, Interpreter, Template Method, etc.) **when they genuinely improve clarity or extension**.
54
+ - Do not introduce interfaces, factories, adapters, or extra layers solely to satisfy a pattern. A package need not be a separately deployable module.
55
+ - MVC and similar UI patterns are tools for separating responsibilities, not mandatory templates for every feature.
56
+
57
+ ## 5. Own external dependencies
58
+
59
+ **Default: use the language/platform and existing project libraries.** Keep the dependency graph small. Prefer focused, lightweight libraries to broad frameworks; do not add a new framework without explicit approval.
60
+
61
+ Before *proposing* a new library, provide a concise assessment of:
62
+ 1. What problem it solves and why existing/native code is insufficient.
63
+ 2. Alternatives and architectural impact, including transitive dependencies.
64
+ 3. Maintenance status, version stability, known security issues, and resource cost where relevant.
65
+ 4. **Licensing:** inspect the authoritative license text and relevant transitive licenses; identify attribution, source-disclosure, redistribution, SaaS/network-use, and commercial/on-premise implications as applicable. Flag uncertainty rather than asserting legal certainty.
66
+
67
+ **Do not install or add the dependency until the owner approves it.**
68
+
69
+ Updates of **existing** dependencies are encouraged when justified. Preserve reproducible versions/lockfiles, review release notes and breaking changes, run relevant unit **and integration** tests, and add regression tests where needed. Never assume mocked tests prove real-library compatibility. Escalate changes that break public contracts or require major redesign.
70
+
71
+ ## 6. Test behavior and invariants
72
+
73
+ - Prefer a TDD-style loop where practical: define expected behavior, implement, then refactor.
74
+ - For a bug, first add a failing regression test that reproduces it whenever feasible.
75
+ - Test public contracts, invariants, boundary values, error paths, equivalence cases, and important component interactions.
76
+ - Include integration tests at boundaries with real libraries or services when mocks would conceal compatibility failures.
77
+ - Keep tests deterministic, readable, independent, and proportionate to risk. Do not write tests only to inflate coverage numbers.
78
+ - Run the relevant tests after each meaningful change; run a wider suite for dependency updates, migrations, and structural refactors.
79
+ - Never weaken assertions, delete meaningful tests, or conceal failures simply to make a suite pass.
80
+
81
+ ## 7. Document for human handover
82
+
83
+ Maintain just enough **Markdown** documentation that a new developer can locate the main components, understand their interactions, and safely make a change.
84
+
85
+ - Keep a short README with setup, build/test commands, and pointers to architecture documentation.
86
+ - Describe major components, dependency direction, key workflows, public contracts, invariants, and known constraints.
87
+ - Record consequential architectural decisions as brief **ADRs**: context, options, chosen approach, and *why*.
88
+ - Use **Mermaid diagrams** when a diagram explains structure or flow better than prose.
89
+ - Update affected documentation alongside code. Avoid redundant or automatically generated essays that become stale.
90
+
91
+ ## 8. UI/UX for web applications
92
+
93
+ When building an interface, treat usability as a first-class acceptance criterion:
94
+
95
+ - Make domain concepts easy to discover, understand, and manipulate; do not leak internal engine complexity into the UI.
96
+ - Maintain consistent visual hierarchy, spacing, navigation, terminology, and interaction patterns.
97
+ - Provide clear feedback and deliberate empty, loading, success, and error states.
98
+ - Support keyboard use, semantic HTML, accessible labels, sensible contrast.
99
+ - Keep interactions responsive; measure before adding rendering complexity or optimizations.
100
+ - Respect the existing design language and component conventions; do not introduce a UI framework or component library without approval.
101
+ - For web projects, assess whether responsive design is appropriate for the intended use case. Do not assume it is required by default. If unclear, ask for confirmation before implementing it.
102
+
103
+ ## 9. Finish with a self-review and concise handover
104
+
105
+ Before marking work complete, check:
106
+
107
+ - **Necessity:** could any code, dependency, abstraction, or layer be removed?
108
+ - **Clarity:** can another developer understand names, control flow, and component boundaries?
109
+ - **Architecture:** are responsibilities cohesive, dependencies directional, and contracts preserved?
110
+ - **Safety:** are licenses/approvals respected and errors handled rather than hidden?
111
+ - **Evidence:** are appropriate tests passing and architecture docs current?
112
+
113
+ End with a short report: **what changed; noteworthy decisions; tests run and results; documentation updated; remaining risks or approvals needed.** State clearly what was *not* verified. Do not claim tests or checks were run if they were not.
114
+
115
+ ## 10. Commit your modifications
116
+
117
+ When developpment is finished, commit it in the local repository.
118
+
119
+ - DO NOT push it automatically to the repository. A human check is necessary and a manual intervension is needed.
120
+ - Create one commit per feature. Prompt will enumerate each features.S
121
+ - Commit with idiomatic and concise message
122
+ - Every commit must be atomic and must be able to compile and perform tests without any error
123
+
124
+ ## 11. Project handover map
125
+
126
+ Public library exports live in `src/index.ts`; implementation is organized by capability under `src/`. The consuming application is under `demo/src/`, with plugins discovered only from its local `plugins/*/index.ts` entry points. Keep plugin activation synchronous, registrations transactional, and mounted panel identities stable. Read `docs/api.md` and `docs/architecture.md` before changing public contracts.
127
+
128
+ Use Node.js 24 LTS. Run the relevant strict type, Vitest, lint/format, build, browser, and packed-consumer checks described in `CONTRIBUTING.md`. Update public JSDoc, English/French labels, affected Markdown, Storybook examples, and `CHANGELOG.md` with each feature. Generated `dist/`, demo builds, profiles, and test artifacts are ignored and must not be edited as sources.
129
+
130
+ ## 12. Maintain release notes automatically
131
+
132
+ For every implemented feature, fix, public-contract change, or release, update `release-node.md` as part of the same work and commit. Do this without waiting for a separate documentation request. Record concrete resulting behavior, compatibility implications, verification, and remaining limits; keep the shorter `CHANGELOG.md` consistent. Move entries to an actual version/date only when a release is made. Never claim a package was published, deployed, or remotely verified without evidence.
133
+
134
+ For application/plugin work, read `docs/application-guide.md` and `docs/api.md` first. Keep the README's ten-minute tutorial executable, including its file paths, discovery pattern, commands, and examples.
135
+
136
+ ---
137
+
138
+ **North star:** an agent's best contribution is not code that merely works today, but a system its human owner can confidently understand, maintain, and evolve tomorrow.
package/CHANGELOG.md ADDED
@@ -0,0 +1,48 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ The package currently declares version `0.1.0`. No publication or release tag is created by the implementation workflow.
6
+
7
+ ### Added
8
+
9
+ - Notification popups slide/fade out on dismissal, expiry, history removal, disabling popups or stack replacement, with immediate logical updates and reduced-motion support.
10
+
11
+ - Automatic custom-layout checkpoints and immediate header/footer persistence, with a Custom layout preset replacing the toolbar save/restore/reset buttons. Built-in presets preserve the custom arrangement; existing commands and storage keys remain compatible.
12
+
13
+ - Azure, High Contrast, Emerald and Umber themes, each in light/dark, selected in the hamburger menu and automatically persisted with preferences.
14
+
15
+ - Validated npm publication script with simulation, account verification for `cyann`, public scoped publication, and prerelease tags.
16
+ - Optional `PluginAPI.registerState` callbacks for centralized JSON export/import and layout checkpoints, including plugin rollback, legacy-file compatibility, and a stateful Hello World demo.
17
+ - Reusable React/TypeScript library and a separate Vite Hello World demo, with watch and one-shot startup commands.
18
+ - Dockview panels, chrome slots, Focus mode, and a combined View control.
19
+ - Light/dark CSS tokens, Ant Design integration, reduced-motion support, and blue/gray themes.
20
+ - Versioned explicit layout saves, restore/reset, and application/columns/rows presets.
21
+ - Bounded notification history, unread state, configurable popups, and larger readable controls.
22
+ - Command registry, scoped keyboard shortcuts, and a searchable command palette with recent selections.
23
+ - File menu, Settings, Preferences, and validated JSON configuration import/export.
24
+ - Modal entrance/backdrop animations, backdrop dismissal, and independent panel scrolling.
25
+ - Local-directory plugin SDK covering panels, commands, menus, status, and monitoring; the demo uses Vite discovery.
26
+ - English/French interfaces, language persistence, extensible catalogs, and translated command search.
27
+ - Vitest service/store/provider contracts, real-browser interactions, Storybook, and a packed-consumer compatibility check.
28
+ - API, architecture, contribution, dependency/license, and validation documentation under MIT.
29
+ - GitHub Actions quality/browser workflows, Husky, staged lint/format checks, Conventional Commits, and issue/PR templates.
30
+ - Ten-minute plugin tutorial, complete application/plugin guide, detailed [release notes](release-node.md), and agent instructions to maintain release records with future work.
31
+ - Demo panel counts derived from discovered plugin contributions, with application chrome and plugin status following the selected language.
32
+
33
+ ### Fixed
34
+
35
+ - Firefox notification dialogs now animate before native closure, with the same fallback shared by Settings and Commands. Reopening cancels pending closure, Escape follows the animated path, and reduced motion stays immediate.
36
+
37
+ ### Changed
38
+
39
+ - Modal dialogs and backdrops animate on closure as well as opening, preserving native focus handoff, rapid reopening, Preferences content, and reduced-motion choices.
40
+ - Successful npm publication creates an annotated local `version-<version>` Git tag on the validated release commit. Simulation and failed publication create no tag; conflicting tags block publication and existing tags on the same commit are retained.
41
+ - Package name and consumer imports now use `@cyann/dash-lab`, following the existing `@cyann/js-parsec` and `@cyann/js-commons` convention. JSON configuration identifiers and browser-storage keys remain compatible.
42
+ - Airier vertical spacing across library, demo, tests, Storybook examples, and scripts, separating declarations, processing steps, and results.
43
+
44
+ ### Compatibility
45
+
46
+ - Version-1 configuration files without a language continue to import as English.
47
+ - Plugins are synchronous trusted startup code bundled with the consuming application; membership changes require a remount/rebuild.
48
+ - Desktop workstations are the supported interface target. Cross-browser coverage and tooling audit limits are recorded in [validation](docs/validation.md) and [dependencies](docs/dependencies.md).
@@ -0,0 +1,94 @@
1
+ # Contributing
2
+
3
+ Use Node.js 24 LTS, Git, and npm. Read [AGENTS.md](AGENTS.md) before changing the project; it defines dependency approval, architecture, validation, and local-commit rules.
4
+
5
+ ```sh
6
+ npm ci
7
+ npm run dev
8
+ ```
9
+
10
+ The demo opens at http://127.0.0.1:5173. `dev` watches the library, declarations, and application. `npm run start` builds once and previews at http://127.0.0.1:4173. Use `npm.cmd` if PowerShell blocks `npm.ps1`.
11
+
12
+ ## Scope and structure
13
+
14
+ - `src/`: reusable library, public exports in `src/index.ts`.
15
+ - `demo/src/`: consuming application, including local plugins discovered by Vite.
16
+ - `src/**/*.test.*`: Vitest contracts, stores, and provider tests.
17
+ - `src/**/*.stories.tsx`: interactive component examples.
18
+ - `scripts/`: startup, browser interactions, and packed-consumer verification.
19
+ - `docs/`: architecture, decisions, API reference, dependencies, and validation evidence.
20
+
21
+ Keep library dependencies directed toward services and contracts. Application-specific code belongs in the demo or another consumer. Public APIs need English JSDoc, examples, and backward compatibility. New runtime-visible labels need English and French support; application/plugin catalogs remain application-owned.
22
+
23
+ ## Before committing
24
+
25
+ ```sh
26
+ npm run check
27
+ npm run lint
28
+ npm run format:check
29
+ npm test
30
+ npm run build
31
+ npm run test:package
32
+ npm run build:storybook
33
+ ```
34
+
35
+ `test:package` uses the npm cache populated by installation to install the produced tarball offline into a fresh consumer. Keep `test-results/` for diagnostics; do not commit generated builds, caches, or screenshots.
36
+
37
+ For an interface or effect-lifecycle change, start the demo and run `npm run test:browser` in another terminal. It uses an installed Chromium browser, with Microsoft Edge as the Windows default. Set `BROWSER_PATH` for another executable. To test development directly, use `npm run test:browser -- http://127.0.0.1:5173`. Screenshots and isolated profiles stay in `test-results/`. Tests must preserve actual panel instances, focus behavior, and meaningful assertions.
38
+
39
+ For modal changes, also run `npm run test:firefox` after a build and `npm run test:firefox -- --dev`. This targeted WebDriver BiDi regression starts/closes its own server and an isolated headless Firefox profile. Windows defaults to `C:/Program Files/Mozilla Firefox/firefox.exe`; set `FIREFOX_PATH` for another installation. It checks notification exit on button/Escape/backdrop dismissal, focus restoration, rapid reopening, command handoff, and reduced motion without adding a browser automation dependency.
40
+
41
+ Use focused commits such as `feat(plugin): add an application contribution`, `fix(layout): preserve a saved checkpoint`, or `docs: clarify plugin startup`. Make one coherent feature or fix per commit. Do not publish or push automatically. Update the affected documentation and [CHANGELOG.md](CHANGELOG.md), including verification and any remaining limits.
42
+
43
+ ## Git hooks and CI
44
+
45
+ Development installation runs `prepare` to install Husky for this repository. Pre-commit runs lint-staged (ESLint/Prettier on staged code; Prettier on staged documents), and commit-msg checks Conventional Commits with a 100-character header limit. CI and production installs skip hook installation. Consumers installing the published-format tarball do not need Husky.
46
+
47
+ GitHub Actions defines Linux/Windows Node 24 checks and a Linux Node 22.13 compatibility job, plus Windows Edge interactions against compiled and development servers. Pull-request commits are checked over the base/head range. The workflows have read-only repository permissions and do not publish packages or deploy.
48
+
49
+ For the same browser orchestration locally, run `npm run build`, then `npm run test:browser:ci` and `npm run test:browser:ci -- --dev`. These commands own and close their temporary servers on ports 4383 and 5383. The full script still accepts `BROWSER_PATH` when Edge is unavailable.
50
+
51
+ ## Publish to npm
52
+
53
+ The npm package name is `@cyann/dash-lab`, matching `@cyann/js-parsec` and `@cyann/js-commons`. The repository and product remain named `dash-lab`. Use `@cyann/dash-lab` in imports and `@cyann/dash-lab/style.css` for styles.
54
+
55
+ First simulate publication; no npm login is required for this mode:
56
+
57
+ ```sh
58
+ npm run publish:npm -- --dry-run
59
+ ```
60
+
61
+ The script runs strict TypeScript, lint, formatting, Vitest, publication-script tests, and the packed-consumer check (which builds the library). It packs the resulting library into an ignored `test-results/npm-publish/` directory, then invokes [`npm publish --dry-run`](https://docs.npmjs.com/cli/v11/commands/npm-publish/). The current version stays unchanged, no Git tag is created, and uncommitted work is allowed for simulation.
62
+
63
+ For a real publication, commit the prepared release notes/version and sign in as `cyann`:
64
+
65
+ ```sh
66
+ npm login --registry=https://registry.npmjs.org/
67
+ npm run publish:npm
68
+ ```
69
+
70
+ Real publication requires a clean Git checkout and verifies the logged-in account using [`npm whoami`](https://docs.npmjs.com/cli/v11/commands/npm-whoami/). It records the release commit, runs the same checks, and verifies that Git stays clean and HEAD unchanged before packing. It publishes the exact packed tarball publicly to `https://registry.npmjs.org/`, then creates an annotated local Git tag `version-<version>` on the recorded commit only after npm succeeds. npm handles any required interactive two-factor authentication. Credentials stay in npm's normal authentication setup; the script does not embed tokens or log in on your behalf.
71
+
72
+ An existing tag on the release commit is reused unchanged. A tag pointing to another commit blocks publication before contacting npm; it is never overwritten. Git committer identity is checked before publishing. If npm succeeds but Git tagging fails (for example, signing fails), the command reports partial success and exits with an error: repair the local tag on the reported commit manually, without republishing that npm version. Tags and commits are never pushed automatically.
73
+
74
+ The script publishes the version already declared in `package.json`. For subsequent releases, update `CHANGELOG.md` and `release-node.md`, then explicitly select a new version, for example:
75
+
76
+ ```sh
77
+ npm version patch --no-git-tag-version
78
+ git add package.json package-lock.json CHANGELOG.md release-node.md
79
+ git commit -m "chore(release): prepare next version"
80
+ npm run publish:npm -- --dry-run
81
+ npm run publish:npm
82
+ ```
83
+
84
+ `npm version --no-git-tag-version` updates the manifest/lockfile without creating a premature release tag. Commit those files with the release notes before publishing; the publication script creates the tag after success. It never changes versions or creates commits. Stable versions use the `latest` npm distribution tag; prerelease versions default to `next` and cannot target `latest`. Override with `npm run publish:npm -- --tag next`. This npm tag is separate from the Git version tag, such as `version-0.2.0-rc.1`. npm rejects an already published name/version; choose a new version rather than overwriting it.
85
+
86
+ The script does not run browser or Storybook builds; run the existing browser/Storybook checks separately for interface changes. Use `npm.cmd` in these examples if PowerShell blocks `npm.ps1`.
87
+
88
+ ## Dependencies and reports
89
+
90
+ Use the current stack and platform APIs first. Obtain approval before adding a dependency not explicitly requested by the owner. Record versions, authoritative license texts, transitive implications, Node requirements, and relevant security findings in [dependency notes](docs/dependencies.md). Do not apply forced audit downgrades or hide failures.
91
+
92
+ Bug reports should contain Node/browser versions, steps, expected and actual behavior, and a minimal reproduction. Remove private data from logs and configuration files before sharing them. Contributions are provided under the project's [MIT license](LICENSE).
93
+
94
+ Keep [release-node.md](release-node.md) current in the same commit as each feature or fix, including verified outcomes and limits. Use the [application/plugin guide](docs/application-guide.md) for complete setup recipes. Tutorial code is part of the handover contract and should compile against the public package.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dash-lab contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,155 @@
1
- # Temporary Holding Version
1
+ # dash-lab
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ npm package name: `@cyann/dash-lab`.
4
+
5
+ Build once. Create many.
6
+
7
+ A reusable React workbench for desktop applications: dockable panels, light/dark themes, saved layouts, commands and shortcuts, notifications, settings, local plugins, and English/French interfaces. The Hello World demo consumes the same public API as an application.
8
+
9
+ ## Run the demo
10
+
11
+ Use Node.js 24 LTS, or Node.js 22.13+ in the 22.x series. From this repository directory:
12
+
13
+ ```sh
14
+ npm install
15
+ npm run dev
16
+ ```
17
+
18
+ Open http://127.0.0.1:5173. Development runs the library build with `--watch`, watches TypeScript declarations, and serves the demo with hot reload. Ctrl+C closes the watchers and server.
19
+
20
+ ```sh
21
+ npm run start
22
+ ```
23
+
24
+ This checks types, builds the library and demo once, and previews at http://127.0.0.1:4173. It does not watch files or require a prior build. On Windows, use `npm.cmd` if PowerShell blocks `npm.ps1`.
25
+
26
+ ## Ten-minute tutorial: your first plugin
27
+
28
+ ### 1. Start the workspace — two minutes
29
+
30
+ Run the commands above. Try dragging a tab, switching themes, and opening Commands with Ctrl/⌘+Shift+P. View hides the header and footer together; Focus hides all chrome and Escape restores it.
31
+
32
+ ### 2. Add a component — three minutes
33
+
34
+ Create `demo/src/plugins/counter/Counter.tsx`:
35
+
36
+ ```tsx
37
+ import { useState } from 'react';
38
+
39
+ export function Counter() {
40
+ const [count, setCount] = useState(0);
41
+ return (
42
+ <section style={{ padding: 24 }}>
43
+ <h1>Counter</h1>
44
+ <p>
45
+ Value: <output aria-label="Counter value">{count}</output>
46
+ </p>
47
+ <button type="button" onClick={() => setCount((value) => value + 1)}>
48
+ Increment
49
+ </button>
50
+ </section>
51
+ );
52
+ }
53
+ ```
54
+
55
+ ### 3. Register the plugin — two minutes
56
+
57
+ Create `demo/src/plugins/counter/index.ts`:
58
+
59
+ ```ts
60
+ import type { WorkbenchPlugin } from '@cyann/dash-lab';
61
+ import { Counter } from './Counter';
62
+
63
+ const plugin: WorkbenchPlugin = {
64
+ id: 'counter',
65
+ activate(api) {
66
+ api.registerPanel({ id: 'counter.panel', title: 'Counter', component: Counter });
67
+ api.registerCommand({
68
+ id: 'counter.notify',
69
+ title: 'Counter: send a notification',
70
+ execute: ({ notify }) => {
71
+ notify({ title: 'The counter plugin is ready.', level: 'success' });
72
+ },
73
+ });
74
+ api.registerMenu({ id: 'counter.menu', title: 'Counter notification', commandId: 'counter.notify' });
75
+ },
76
+ };
77
+
78
+ export default plugin;
79
+ ```
80
+
81
+ The demo already discovers `src/plugins/*/index.ts` with Vite. Its plugin boundary reloads when membership changes. If the old saved layout has a different panel set, it is rejected and the default layout stays usable; a new custom checkpoint is saved automatically after arranging your panels.
82
+
83
+ ### 4. Use it — two minutes
84
+
85
+ Select Counter, click Increment, and switch tabs or enter/leave Focus. The counter value remains. Open Plugins → Counter notification, or search `counter.notify` in Commands, to run the registered action. No additional entry in the demo component is required.
86
+
87
+ Activation is synchronous. IDs must be unique; `workbench.*` command IDs are reserved. Plugin panels are registered before application panels, and references must point to earlier panels. A panel without a position uses Dockview's default placement. Plugins are trusted application code bundled with the app; production membership changes require a rebuild.
88
+
89
+ ### 5. Verify and continue — one minute
90
+
91
+ ```sh
92
+ npm run check
93
+ npm test
94
+ npm run build
95
+ ```
96
+
97
+ Save a layout, change Preferences → Language, and try JSON export/import from File. Plugins can opt in with `api.registerState({ exportState, importState })`; the Hello World demo saves its name and greeting with the layout and configuration. For a fresh consuming application, all six plugin contributions, state handlers, language catalogs, and troubleshooting, follow the [application and plugin guide](docs/application-guide.md). The [API reference](docs/api.md) covers individual contracts.
98
+
99
+ ## Use the library
100
+
101
+ ```sh
102
+ npm install @cyann/dash-lab
103
+ ```
104
+
105
+ Maintainers can prepare publication with `npm run publish:npm -- --dry-run`, then publish a committed release with `npm run publish:npm`. See [the publication guide](CONTRIBUTING.md#publish-to-npm) for account setup, versioning, and prerelease tags.
106
+
107
+ Build a local tarball with `npm pack` and install it in a consuming application. No npm publication is assumed. React and React DOM are peers; import the stylesheet explicitly and give the workbench a parent with a height:
108
+
109
+ ```tsx
110
+ import { Workbench } from '@cyann/dash-lab';
111
+ import '@cyann/dash-lab/style.css';
112
+
113
+ export function App() {
114
+ return (
115
+ <div style={{ height: '100vh' }}>
116
+ <Workbench title="My Lab">Ready</Workbench>
117
+ </div>
118
+ );
119
+ }
120
+ ```
121
+
122
+ Use an optional surrounding router for application routes. Workbench supplies isolated theme, notification, command, and language providers, or reuses explicit ancestors. Its stable panels retain React state and scroll independently.
123
+
124
+ ## Development and checks
125
+
126
+ ```sh
127
+ npm run check
128
+ npm run lint
129
+ npm run format:check
130
+ npm test
131
+ npm run build
132
+ npm run test:package
133
+ npm run build:storybook
134
+ npm run test:browser:ci
135
+ npm run test:browser:ci -- --dev
136
+ ```
137
+
138
+ Browser checks use installed Microsoft Edge on Windows. Set `BROWSER_PATH` for another Chromium executable. `npm run test:browser -- http://127.0.0.1:5173` tests an already running demo. The CI runner owns its temporary server. Screenshots, profiles, and packed consumers stay in ignored `test-results/`.
139
+
140
+ `npm run storybook` opens the interactive examples. Husky installs local hooks during development installation: staged ESLint/Prettier checks and Conventional Commits. CI/production installs skip hook setup. GitHub Actions includes Windows/Linux checks and does not publish or deploy.
141
+
142
+ ## Documentation
143
+
144
+ - [Application and plugin guide](docs/application-guide.md): complete setup and contribution recipes for humans and agents.
145
+ - [Public API](docs/api.md): props, providers, hooks, services, and persisted-format contracts.
146
+ - [Architecture and decisions](docs/architecture.md): ownership and dependency direction.
147
+ - [Contributing](CONTRIBUTING.md) and [agent instructions](AGENTS.md): implementation and validation rules.
148
+ - [Release notes](release-node.md) and [changelog](CHANGELOG.md): completed features and release status.
149
+ - [Validation](docs/validation.md) and [dependencies/licenses](docs/dependencies.md): evidence and known limits.
150
+
151
+ Desktop workstations are the supported target. Browser verification currently covers Chromium/Edge; Firefox and Safari are not verified. Runtime audit and remaining tooling/bundle warnings are documented in the dependency notes.
152
+
153
+ ## License
154
+
155
+ [MIT](LICENSE), with retained [third-party notices](THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,31 @@
1
+ # Third-party notices
2
+
3
+ dash-lab is licensed under MIT. Dependencies retain their own licenses and copyright notices.
4
+
5
+ The ESM library leaves React, React DOM, Ant Design, Dockview React, and Zustand external. npm installs those packages separately with their published notices. Development tools are not shipped in the library package. See `docs/dependencies.md` in the source repository for the inventory and audit limitations.
6
+
7
+ ## Dockview stylesheet
8
+
9
+ The distributed stylesheet includes Dockview CSS from dockview-react 8.8.3. The following notice is reproduced from the installed package's LICENCE.md. Source: https://github.com/dockview/dockview.
10
+
11
+ MIT License
12
+
13
+ Copyright (c) 2021 mathuo
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
@@ -0,0 +1,19 @@
1
+ import type { CommandDefinition, CommandRegistry } from './CommandRegistry.js';
2
+ export declare const CommandContext: import("react").Context<{
3
+ registry: CommandRegistry;
4
+ execute: (id: string) => Promise<boolean>;
5
+ } | null>;
6
+ /** Commands and operations supplied by the nearest CommandProvider. */
7
+ export interface CommandControls {
8
+ /** Registered actions in registration order. */
9
+ commands: readonly CommandDefinition[];
10
+ /** Register an action and receive its cleanup function. */
11
+ register: CommandRegistry['register'];
12
+ /** Execute an action, reporting failures to the nearest notification center when one is present. */
13
+ execute: (id: string) => Promise<boolean>;
14
+ /** Check current availability. */
15
+ canExecute: CommandRegistry['canExecute'];
16
+ }
17
+ /** Access the nearest registry through React; requires CommandProvider or a Workbench ancestor. */
18
+ export declare function useCommands(): CommandControls;
19
+ //# sourceMappingURL=CommandContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandContext.d.ts","sourceRoot":"","sources":["../../src/commands/CommandContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE/E,eAAO,MAAM,cAAc;cAA6B,eAAe;aAAW,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC;SAAgB,CAAC;AAEnI,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,2DAA2D;IAC3D,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACtC,oGAAoG;IACpG,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,kCAAkC;IAClC,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED,mGAAmG;AACnG,wBAAgB,WAAW,IAAI,eAAe,CAW7C"}
@@ -0,0 +1,10 @@
1
+ /** Options for the controlled command palette. */
2
+ export interface CommandPaletteProps {
3
+ /** Whether the palette should be open. */
4
+ open: boolean;
5
+ /** Requests closure after dismissal or selection. */
6
+ onClose: () => void;
7
+ }
8
+ /** Searches and executes the nearest registry's commands; requires command and notification providers. */
9
+ export declare function CommandPalette({ open, onClose }: CommandPaletteProps): import("react").JSX.Element;
10
+ //# sourceMappingURL=CommandPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../src/commands/CommandPalette.tsx"],"names":[],"mappings":"AAQA,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,IAAI,EAAE,OAAO,CAAC;IACd,qDAAqD;IACrD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AACD,0GAA0G;AAC1G,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,mBAAmB,+BA0JpE"}
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ import { CommandRegistry } from './CommandRegistry.js';
3
+ /** Options for an application command registry. */
4
+ export interface CommandProviderProps {
5
+ /** Components that register or execute actions. */
6
+ children: ReactNode;
7
+ /** Optional existing registry. Keep stable while mounted. */
8
+ registry?: CommandRegistry;
9
+ }
10
+ /** Provides a registry and routes execution failures into the nearest notification center. */
11
+ export declare function CommandProvider({ children, registry: supplied }: CommandProviderProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=CommandProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandProvider.d.ts","sourceRoot":"","sources":["../../src/commands/CommandProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BAgCrF"}
@@ -0,0 +1,40 @@
1
+ import type { ShortcutEvent, ShortcutPlatform } from './shortcuts.js';
2
+ /** An application action, callable by ID and optionally by keyboard. */
3
+ export interface CommandDefinition {
4
+ /** Unique identifier within this registry. Workbench reserves the workbench.* namespace. */
5
+ readonly id: string;
6
+ /** Human-readable action name. */
7
+ readonly title: string;
8
+ /** Key combination, for example Mod+Alt+S or Mod+Enter. Mod means Command on macOS and Control elsewhere. */
9
+ readonly shortcut?: string;
10
+ /** Handler; asynchronous commands remain unavailable until this promise settles. */
11
+ readonly execute: () => void | Promise<void>;
12
+ /** Optional predicate evaluated at execution time. */
13
+ readonly isEnabled?: () => boolean;
14
+ /** Permit the shortcut inside text inputs and contenteditable regions. Defaults to false. */
15
+ readonly allowInEditable?: boolean;
16
+ }
17
+ /** A framework-independent command registry with conflict detection and disposable registrations. */
18
+ export declare class CommandRegistry {
19
+ private readonly platform;
20
+ private readonly entries;
21
+ private readonly running;
22
+ private readonly listeners;
23
+ private snapshot;
24
+ /** Selects how Mod is resolved. Defaults to Control; the React provider detects the browser platform. */
25
+ constructor(platform?: ShortcutPlatform);
26
+ private publish;
27
+ /** Register an action. Duplicate IDs and equivalent shortcuts throw before changing the registry. Returns an idempotent unregister function. */
28
+ readonly register: (command: CommandDefinition) => (() => void);
29
+ /** Return a stable snapshot suitable for external-store subscriptions. */
30
+ readonly getCommands: () => readonly CommandDefinition[];
31
+ /** Subscribe to registration and execution-state changes; returns an unsubscribe function. */
32
+ readonly subscribe: (listener: () => void) => (() => void);
33
+ /** Whether the command exists, is enabled, and is not already running. Predicate errors propagate. */
34
+ readonly canExecute: (id: string) => boolean;
35
+ /** Execute by ID. Resolves false for unknown, disabled, or running actions; handler and predicate errors reject. */
36
+ readonly execute: (id: string) => Promise<boolean>;
37
+ /** Find an enabled keyboard action, respecting composition, repeats, prior handlers, AltGraph, and text-entry policy. */
38
+ readonly matchShortcut: (event: ShortcutEvent, inEditable?: boolean) => CommandDefinition | undefined;
39
+ }
40
+ //# sourceMappingURL=CommandRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandRegistry.d.ts","sourceRoot":"","sources":["../../src/commands/CommandRegistry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6GAA6G;IAC7G,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,oFAAoF;IACpF,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,sDAAsD;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;IACnC,6FAA6F;IAC7F,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAOD,qGAAqG;AACrG,qBAAa,eAAe;IAOd,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwC;IAChE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IACxD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,OAAO,CAAC,QAAQ,CAAoC;IAEpD,yGAAyG;gBAC5E,QAAQ,GAAE,gBAA0B;IAEjE,OAAO,CAAC,OAAO;IAMf,gJAAgJ;IAChJ,QAAQ,CAAC,QAAQ,GAAI,SAAS,iBAAiB,KAAG,CAAC,MAAM,IAAI,CAAC,CAsB5D;IAEF,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,QAAO,SAAS,iBAAiB,EAAE,CAAkB;IAEzE,8FAA8F;IAC9F,QAAQ,CAAC,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAMvD;IAEF,sGAAsG;IACtG,QAAQ,CAAC,UAAU,GAAI,IAAI,MAAM,KAAG,OAAO,CAIzC;IAEF,oHAAoH;IACpH,QAAQ,CAAC,OAAO,GAAU,IAAI,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC,CAgBrD;IAEF,yHAAyH;IACzH,QAAQ,CAAC,aAAa,GAAI,OAAO,aAAa,EAAE,oBAAkB,KAAG,iBAAiB,GAAG,SAAS,CAQhG;CACH"}
@@ -0,0 +1,3 @@
1
+ import type { CommandDefinition } from './CommandRegistry.js';
2
+ export declare function searchCommands(commands: readonly CommandDefinition[], query: string, recent: readonly string[]): CommandDefinition[];
3
+ //# sourceMappingURL=searchCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchCommands.d.ts","sourceRoot":"","sources":["../../src/commands/searchCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA6B9D,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,uBAa9G"}
@@ -0,0 +1,7 @@
1
+ /** Platform used to resolve the portable Mod modifier. */
2
+ export type ShortcutPlatform = 'mac' | 'other';
3
+ /** Native keyboard properties required by the framework-independent matcher. */
4
+ export type ShortcutEvent = Pick<KeyboardEvent, 'key' | 'ctrlKey' | 'metaKey' | 'altKey' | 'shiftKey' | 'repeat' | 'isComposing' | 'defaultPrevented' | 'getModifierState'>;
5
+ export declare function eventSignature(event: Pick<ShortcutEvent, 'key' | 'ctrlKey' | 'metaKey' | 'altKey' | 'shiftKey'>): string;
6
+ export declare function parseShortcut(shortcut: string, platform: ShortcutPlatform): string;
7
+ //# sourceMappingURL=shortcuts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../src/commands/shortcuts.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,CAAC;AAC/C,gFAAgF;AAChF,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,aAAa,EACb,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAC3H,CAAC;AAqBF,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC,UAE/G;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,UAkCzE"}