@ai-matrx/canvas 0.0.0-bootstrap.0 → 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.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +20 -2
- package/dist/index.cjs +758 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +380 -0
- package/dist/index.d.ts +380 -0
- package/dist/index.js +735 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +1477 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +424 -0
- package/dist/react.d.ts +424 -0
- package/dist/react.js +1458 -0
- package/dist/react.js.map +1 -0
- package/dist/styles.css +451 -0
- package/dist/tokens.css +49 -0
- package/package.json +85 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
- Publish the existing Canvas implementation as an independently installable package with dual ESM/CommonJS entries and packaged styles.
|
|
6
|
+
- Report unavailable storage and malformed saved layouts through the existing error sink while keeping the canvas usable.
|
|
7
|
+
|
|
8
|
+
### Consumer action
|
|
9
|
+
|
|
10
|
+
- Replace workspace Canvas imports with `@ai-matrx/canvas` at `latest`; remove source aliases and transpile overrides.
|
|
11
|
+
- Import `@ai-matrx/canvas/styles.css` and optionally `@ai-matrx/canvas/tokens.css`; keep the existing host identity, store and theme ports.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AI Matrix Engine
|
|
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,21 @@
|
|
|
1
|
-
# @ai-matrx/canvas
|
|
1
|
+
# @ai-matrx/canvas
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A docked right-hand canvas column with split panes, tabs, fullscreen, identity-based deduplication and persisted layout. Core state is framework-independent; React components ship through `./react`.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import "@ai-matrx/canvas/styles.css";
|
|
7
|
+
import "@ai-matrx/canvas/tokens.css";
|
|
8
|
+
import { CanvasProvider, CanvasFrame, CanvasToggle, registerCanvasKind, defineCanvasKind } from "@ai-matrx/canvas/react";
|
|
9
|
+
|
|
10
|
+
registerCanvasKind(defineCanvasKind({ id: "note", label: "Note", icon: NoteIcon, load: () => import("./NoteView") }));
|
|
11
|
+
|
|
12
|
+
<CanvasProvider>
|
|
13
|
+
<CanvasFrame><App header={<CanvasToggle />} /></CanvasFrame>
|
|
14
|
+
</CanvasProvider>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`NoteIcon`, `NoteView` and `App` are your host components. A Redux host passes `store={bindCanvasToReduxStore(store, (s) => s.canvasHost)}` after mounting `canvasReducer`. Hosts own identity, navigation and token values; the package owns layout, pane/tab behavior and restoration.
|
|
18
|
+
|
|
19
|
+
Entries: core (`.`), React (`./react`), structural CSS (`./styles.css`) and optional default theme values (`./tokens.css`). Item data must be plain JSON; failures are reported through `onError`.
|
|
20
|
+
|
|
21
|
+
MIT.
|