@niscorp/nova 0.5.1 → 0.5.2
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @niscorp/nova
|
|
2
2
|
|
|
3
|
+
## 0.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 501e355: DESIGN.md says how `useCanvas` and `useRenderTree` cache: `useCanvas` keeps the state `onCanvasChange` hands it (the shell compares states with `sameCanvasState`), and `useRenderTree` compares the shell's phrases as well as its data.
|
|
8
|
+
|
|
9
|
+
**What to change:** nothing. Documentation only.
|
|
10
|
+
|
|
3
11
|
## 0.5.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/DESIGN.md
CHANGED
|
@@ -636,18 +636,20 @@ so `useSyncExternalStore`'s `getSnapshot` returns a stable reference
|
|
|
636
636
|
when nothing has changed. This is mandatory for tearing-safety in
|
|
637
637
|
React's concurrent rendering.
|
|
638
638
|
|
|
639
|
-
- **`useRenderTree`** caches by **data identity
|
|
640
|
-
the current data object; if the cached
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
`
|
|
646
|
-
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
639
|
+
- **`useRenderTree`** caches by **data identity** and the shell's
|
|
640
|
+
phrases. The runtime exposes the current data object; if the cached
|
|
641
|
+
data reference is `===` to the current one, and the shell's phrases
|
|
642
|
+
are `===` to the cached ones, the cached `RenderNode[]` is returned
|
|
643
|
+
unchanged. When the runtime mutates data, or `setPhrases` changes the
|
|
644
|
+
phrases, the cache misses, the layout is re-rendered, and the new
|
|
645
|
+
`RenderNode[]` becomes the cached snapshot. A missing instance returns
|
|
646
|
+
a singleton `EMPTY` constant so re-renders are also stable in that case.
|
|
647
|
+
- **`useCanvas`** caches the state `onCanvasChange` hands it, and calls
|
|
648
|
+
`getCanvasState` only when nothing is cached for that shell and canvas. The shell's
|
|
649
|
+
`onCanvasChange` compares consecutive states (`sameCanvasState`, over
|
|
650
|
+
the stack length, active id, and per-frame `(id, status)` tuples) and
|
|
651
|
+
calls its handler only when they differ; the handler stores the new
|
|
652
|
+
state and notifies the React store.
|
|
651
653
|
|
|
652
654
|
Both contracts are verified by `test/react/snapshot-stability.test.tsx`,
|
|
653
655
|
which asserts referential equality across re-renders without state
|
|
@@ -10,15 +10,15 @@ import '../../../schemas-pMyyuXV7.cjs';
|
|
|
10
10
|
declare const Stack: vue.DefineSetupFnComponent<{
|
|
11
11
|
direction?: "row" | "column" | undefined;
|
|
12
12
|
gap?: number | undefined;
|
|
13
|
-
align?: "
|
|
14
|
-
justify?: "
|
|
13
|
+
align?: "start" | "center" | "end" | "stretch" | undefined;
|
|
14
|
+
justify?: "start" | "center" | "end" | "between" | "around" | undefined;
|
|
15
15
|
padding?: number | undefined;
|
|
16
16
|
wrap?: boolean | undefined;
|
|
17
17
|
}, {}, {}, {
|
|
18
18
|
direction?: "row" | "column" | undefined;
|
|
19
19
|
gap?: number | undefined;
|
|
20
|
-
align?: "
|
|
21
|
-
justify?: "
|
|
20
|
+
align?: "start" | "center" | "end" | "stretch" | undefined;
|
|
21
|
+
justify?: "start" | "center" | "end" | "between" | "around" | undefined;
|
|
22
22
|
padding?: number | undefined;
|
|
23
23
|
wrap?: boolean | undefined;
|
|
24
24
|
} & {}, vue.PublicProps> & {
|
|
@@ -31,14 +31,14 @@ declare const Stack: vue.DefineSetupFnComponent<{
|
|
|
31
31
|
}>>;
|
|
32
32
|
gap: zod.ZodOptional<zod.ZodNumber>;
|
|
33
33
|
align: zod.ZodOptional<zod.ZodEnum<{
|
|
34
|
-
center: "center";
|
|
35
34
|
start: "start";
|
|
35
|
+
center: "center";
|
|
36
36
|
end: "end";
|
|
37
37
|
stretch: "stretch";
|
|
38
38
|
}>>;
|
|
39
39
|
justify: zod.ZodOptional<zod.ZodEnum<{
|
|
40
|
-
center: "center";
|
|
41
40
|
start: "start";
|
|
41
|
+
center: "center";
|
|
42
42
|
end: "end";
|
|
43
43
|
between: "between";
|
|
44
44
|
around: "around";
|
|
@@ -72,12 +72,12 @@ declare const Box: vue.DefineSetupFnComponent<{
|
|
|
72
72
|
declare const Text: vue.DefineSetupFnComponent<{
|
|
73
73
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
74
74
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
75
|
-
weight?: "
|
|
75
|
+
weight?: "normal" | "medium" | "bold" | undefined;
|
|
76
76
|
color?: string | undefined;
|
|
77
77
|
}, {}, {}, {
|
|
78
78
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
79
79
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
80
|
-
weight?: "
|
|
80
|
+
weight?: "normal" | "medium" | "bold" | undefined;
|
|
81
81
|
color?: string | undefined;
|
|
82
82
|
} & {}, vue.PublicProps> & {
|
|
83
83
|
meta: {
|
|
@@ -99,9 +99,9 @@ declare const Text: vue.DefineSetupFnComponent<{
|
|
|
99
99
|
"2xl": "2xl";
|
|
100
100
|
}>>;
|
|
101
101
|
weight: zod.ZodOptional<zod.ZodEnum<{
|
|
102
|
-
bold: "bold";
|
|
103
102
|
normal: "normal";
|
|
104
103
|
medium: "medium";
|
|
104
|
+
bold: "bold";
|
|
105
105
|
}>>;
|
|
106
106
|
color: zod.ZodOptional<zod.ZodString>;
|
|
107
107
|
}, zod_v4_core.$strict>;
|
|
@@ -10,15 +10,15 @@ import '../../../schemas-pMyyuXV7.js';
|
|
|
10
10
|
declare const Stack: vue.DefineSetupFnComponent<{
|
|
11
11
|
direction?: "row" | "column" | undefined;
|
|
12
12
|
gap?: number | undefined;
|
|
13
|
-
align?: "
|
|
14
|
-
justify?: "
|
|
13
|
+
align?: "start" | "center" | "end" | "stretch" | undefined;
|
|
14
|
+
justify?: "start" | "center" | "end" | "between" | "around" | undefined;
|
|
15
15
|
padding?: number | undefined;
|
|
16
16
|
wrap?: boolean | undefined;
|
|
17
17
|
}, {}, {}, {
|
|
18
18
|
direction?: "row" | "column" | undefined;
|
|
19
19
|
gap?: number | undefined;
|
|
20
|
-
align?: "
|
|
21
|
-
justify?: "
|
|
20
|
+
align?: "start" | "center" | "end" | "stretch" | undefined;
|
|
21
|
+
justify?: "start" | "center" | "end" | "between" | "around" | undefined;
|
|
22
22
|
padding?: number | undefined;
|
|
23
23
|
wrap?: boolean | undefined;
|
|
24
24
|
} & {}, vue.PublicProps> & {
|
|
@@ -31,14 +31,14 @@ declare const Stack: vue.DefineSetupFnComponent<{
|
|
|
31
31
|
}>>;
|
|
32
32
|
gap: zod.ZodOptional<zod.ZodNumber>;
|
|
33
33
|
align: zod.ZodOptional<zod.ZodEnum<{
|
|
34
|
-
center: "center";
|
|
35
34
|
start: "start";
|
|
35
|
+
center: "center";
|
|
36
36
|
end: "end";
|
|
37
37
|
stretch: "stretch";
|
|
38
38
|
}>>;
|
|
39
39
|
justify: zod.ZodOptional<zod.ZodEnum<{
|
|
40
|
-
center: "center";
|
|
41
40
|
start: "start";
|
|
41
|
+
center: "center";
|
|
42
42
|
end: "end";
|
|
43
43
|
between: "between";
|
|
44
44
|
around: "around";
|
|
@@ -72,12 +72,12 @@ declare const Box: vue.DefineSetupFnComponent<{
|
|
|
72
72
|
declare const Text: vue.DefineSetupFnComponent<{
|
|
73
73
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
74
74
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
75
|
-
weight?: "
|
|
75
|
+
weight?: "normal" | "medium" | "bold" | undefined;
|
|
76
76
|
color?: string | undefined;
|
|
77
77
|
}, {}, {}, {
|
|
78
78
|
as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
|
|
79
79
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
80
|
-
weight?: "
|
|
80
|
+
weight?: "normal" | "medium" | "bold" | undefined;
|
|
81
81
|
color?: string | undefined;
|
|
82
82
|
} & {}, vue.PublicProps> & {
|
|
83
83
|
meta: {
|
|
@@ -99,9 +99,9 @@ declare const Text: vue.DefineSetupFnComponent<{
|
|
|
99
99
|
"2xl": "2xl";
|
|
100
100
|
}>>;
|
|
101
101
|
weight: zod.ZodOptional<zod.ZodEnum<{
|
|
102
|
-
bold: "bold";
|
|
103
102
|
normal: "normal";
|
|
104
103
|
medium: "medium";
|
|
104
|
+
bold: "bold";
|
|
105
105
|
}>>;
|
|
106
106
|
color: zod.ZodOptional<zod.ZodString>;
|
|
107
107
|
}, zod_v4_core.$strict>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niscorp/nova",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Declarative UI framework for AI agents — JSON layouts, shell orchestration, React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -215,9 +215,9 @@
|
|
|
215
215
|
"vitest": "^4.1.2",
|
|
216
216
|
"vue": "^3.5.43",
|
|
217
217
|
"zod": "^4.6.5",
|
|
218
|
-
"@niscorp/cortex": "^0.1.
|
|
219
|
-
"@niscorp/
|
|
220
|
-
"@niscorp/
|
|
218
|
+
"@niscorp/cortex": "^0.1.6",
|
|
219
|
+
"@niscorp/prism": "^0.3.3",
|
|
220
|
+
"@niscorp/strata": "^0.1.9"
|
|
221
221
|
},
|
|
222
222
|
"peerDependencies": {
|
|
223
223
|
"ink": "^7.1.1",
|
|
@@ -225,9 +225,9 @@
|
|
|
225
225
|
"react": "^19.2.4",
|
|
226
226
|
"zod": "^4.2.0",
|
|
227
227
|
"vue": "^3.5.0",
|
|
228
|
-
"@niscorp/cortex": "^0.1.
|
|
229
|
-
"@niscorp/prism": "^0.3.
|
|
230
|
-
"@niscorp/strata": "^0.1.
|
|
228
|
+
"@niscorp/cortex": "^0.1.6",
|
|
229
|
+
"@niscorp/prism": "^0.3.3",
|
|
230
|
+
"@niscorp/strata": "^0.1.9"
|
|
231
231
|
},
|
|
232
232
|
"peerDependenciesMeta": {
|
|
233
233
|
"@niscorp/cortex": {
|