@nexart/ui-renderer 0.6.0 → 0.7.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/README.md +17 -15
- package/dist/capabilities.d.ts +2 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +3 -2
- package/dist/compiler.d.ts +2 -1
- package/dist/compiler.d.ts.map +1 -1
- package/dist/compiler.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/preview/code-renderer.d.ts +2 -2
- package/dist/preview/code-renderer.js +7 -7
- package/dist/preview/renderer.d.ts +2 -1
- package/dist/preview/renderer.d.ts.map +1 -1
- package/dist/preview/renderer.js +2 -1
- package/dist/system.d.ts +2 -2
- package/dist/system.js +4 -4
- package/dist/types.d.ts +3 -3
- package/dist/types.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @nexart/ui-renderer
|
|
2
2
|
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
|
|
5
5
|
**Declarative and Code Mode System Authoring SDK for NexArt Protocol**
|
|
6
6
|
|
|
@@ -19,30 +19,32 @@ Version: 0.6.0
|
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
## PROTOCOL LOCK — v1.
|
|
22
|
+
## PROTOCOL LOCK — v1.2.0 (MIRROR)
|
|
23
23
|
|
|
24
24
|
| Property | Value |
|
|
25
25
|
|----------|-------|
|
|
26
26
|
| Protocol Name | NexArt Code Mode |
|
|
27
|
-
| Version | v1.
|
|
28
|
-
| Status | **
|
|
27
|
+
| Version | v1.2.0 |
|
|
28
|
+
| Status | **STABLE** |
|
|
29
|
+
| Phase | 3 |
|
|
29
30
|
| This SDK | Mirror only — NOT authoritative |
|
|
30
|
-
| Canonical Authority | @nexart/codemode-sdk |
|
|
31
|
-
| Lock Date |
|
|
31
|
+
| Canonical Authority | @nexart/codemode-sdk v1.4.0 |
|
|
32
|
+
| Lock Date | January 2026 |
|
|
32
33
|
|
|
33
|
-
**This SDK mirrors the
|
|
34
|
+
**This SDK mirrors the v1.2.0 protocol surface. Any future protocol change requires v2.0.0 in @nexart/codemode-sdk first.**
|
|
34
35
|
|
|
35
36
|
This SDK mirrors:
|
|
36
37
|
- Execution model (Static and Loop modes)
|
|
37
38
|
- VAR[0..9] specification (0-10 input, always 10 at runtime)
|
|
38
39
|
- Determinism behavior (seed + VAR → consistent preview)
|
|
39
|
-
- Time semantics (t, frameCount, time, tGlobal)
|
|
40
|
+
- Time semantics (t, frameCount, time, tGlobal, totalFrames)
|
|
40
41
|
- Forbidden patterns list (13 patterns)
|
|
41
42
|
- Error message format (`[Code Mode Protocol Error]`)
|
|
43
|
+
- v1.2.0 features: curveVertex, bezierVertex, pixel system, createGraphics
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
45
|
-
## Protocol Alignment (v1.
|
|
47
|
+
## Protocol Alignment (v1.2.0)
|
|
46
48
|
|
|
47
49
|
This SDK mirrors NexArt Protocol behavior. It is NOT canonical.
|
|
48
50
|
|
|
@@ -83,11 +85,11 @@ The following patterns are rejected (mirroring @nexart/codemode-sdk exactly):
|
|
|
83
85
|
- `document.*`, `window.*` — DOM access forbidden
|
|
84
86
|
- `import`, `require()` — external imports forbidden
|
|
85
87
|
|
|
86
|
-
### VAR Protocol — v1.
|
|
88
|
+
### VAR Protocol — v1.2.0 (MIRROR of SDK v1.4.0)
|
|
87
89
|
|
|
88
90
|
VAR[0..9] is a read-only array of 10 protocol variables (0-100 strict range).
|
|
89
91
|
|
|
90
|
-
**VAR Specification (mirrors @nexart/codemode-sdk v1.
|
|
92
|
+
**VAR Specification (mirrors @nexart/codemode-sdk v1.4.0):**
|
|
91
93
|
|
|
92
94
|
| Property | Value | Enforcement |
|
|
93
95
|
|----------|-------|-------------|
|
|
@@ -100,7 +102,7 @@ VAR[0..9] is a read-only array of 10 protocol variables (0-100 strict range).
|
|
|
100
102
|
| Lifecycle | Stable for entire render | Guaranteed |
|
|
101
103
|
| Default | All zeros | If not provided |
|
|
102
104
|
|
|
103
|
-
**This specification mirrors @nexart/codemode-sdk v1.
|
|
105
|
+
**This specification mirrors @nexart/codemode-sdk v1.4.0 exactly.**
|
|
104
106
|
|
|
105
107
|
```typescript
|
|
106
108
|
// Correct usage
|
|
@@ -360,7 +362,7 @@ import { getCapabilities } from '@nexart/ui-renderer';
|
|
|
360
362
|
|
|
361
363
|
const caps = getCapabilities();
|
|
362
364
|
// {
|
|
363
|
-
// version: '0.
|
|
365
|
+
// version: '0.7.0',
|
|
364
366
|
// isCanonical: false,
|
|
365
367
|
// isArchival: false,
|
|
366
368
|
// renderer: '@nexart/ui-renderer',
|
|
@@ -489,7 +491,7 @@ All Code Mode previews log their delegation:
|
|
|
489
491
|
|
|
490
492
|
```
|
|
491
493
|
[UIRenderer] Preview delegation → @nexart/codemode-sdk
|
|
492
|
-
[UIRenderer] Protocol version: 1.
|
|
494
|
+
[UIRenderer] Protocol version: 1.2.0
|
|
493
495
|
[UIRenderer] Mode: loop
|
|
494
496
|
```
|
|
495
497
|
|
|
@@ -533,4 +535,4 @@ If the protocol rejects code:
|
|
|
533
535
|
|
|
534
536
|
MIT License
|
|
535
537
|
|
|
536
|
-
Copyright (c) 2024 NexArt
|
|
538
|
+
Copyright (c) 2024-2026 NexArt
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Capabilities Discovery
|
|
3
3
|
*
|
|
4
4
|
* Exposes SDK capabilities for AI tools and builders.
|
|
5
5
|
* Critical for preventing hallucination and SDK bypass.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0)
|
|
6
7
|
*
|
|
7
8
|
* ⚠️ PRIMITIVES ARE NON-CANONICAL
|
|
8
9
|
* Primitives are helper generators that compile to Code Mode sketches.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,KAAK,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,aAAa,CAAC;QACrB,KAAK,EAAE,aAAa,CAAC;QACrB,OAAO,EAAE,aAAa,CAAC;QACvB,YAAY,EAAE,aAAa,CAAC;QAC5B,MAAM,EAAE,aAAa,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACzD,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,KAAK,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC;IAClB,QAAQ,EAAE,qBAAqB,CAAC;IAEhC,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,UAAU,EAAE,UAAU,CAAC;QACvB,WAAW,EAAE,KAAK,CAAC;KACpB,CAAC;IAEF,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAElC,UAAU,EAAE;QACV,KAAK,EAAE,aAAa,CAAC;QACrB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE;YACR,IAAI,EAAE,aAAa,CAAC;YACpB,MAAM,EAAE,aAAa,CAAC;YACtB,KAAK,EAAE,aAAa,CAAC;SACtB,CAAC;KACH,CAAC;IAEF,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,KAAK,EAAE,aAAa,CAAC;KACtB,CAAC;IAEF,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAwDD,wBAAgB,eAAe,IAAI,YAAY,CA0G9C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAS5C;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CASlE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAGzE;AAED,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAE3C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|
package/dist/capabilities.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Capabilities Discovery
|
|
3
3
|
*
|
|
4
4
|
* Exposes SDK capabilities for AI tools and builders.
|
|
5
5
|
* Critical for preventing hallucination and SDK bypass.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0)
|
|
6
7
|
*
|
|
7
8
|
* ⚠️ PRIMITIVES ARE NON-CANONICAL
|
|
8
9
|
* Primitives are helper generators that compile to Code Mode sketches.
|
|
@@ -59,7 +60,7 @@ function createPrimitive(name, category, description) {
|
|
|
59
60
|
}
|
|
60
61
|
export function getCapabilities() {
|
|
61
62
|
return {
|
|
62
|
-
version: '0.
|
|
63
|
+
version: '0.7.0',
|
|
63
64
|
isCanonical: false,
|
|
64
65
|
isArchival: false,
|
|
65
66
|
renderer: '@nexart/ui-renderer',
|
package/dist/compiler.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - System Compiler
|
|
3
3
|
*
|
|
4
4
|
* Compiles validated systems into canonical protocol-compatible JSON.
|
|
5
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0).
|
|
5
6
|
*/
|
|
6
7
|
import type { NexArtSystem } from './types';
|
|
7
8
|
export interface CompiledDeclarativeSystem {
|
package/dist/compiler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAsD,MAAM,SAAS,CAAC;AAGhG,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,aAAa,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE;YACT,IAAI,EAAE,MAAM,CAAC;YACb,MAAM,EAAE,MAAM,EAAE,CAAC;YACjB,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC,CAAC;IACH,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,cAAc,GAAG,yBAAyB,GAAG,kBAAkB,CAAC;AAI5E,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAMlE;AAyFD,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAG5D"}
|
package/dist/compiler.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - System Compiler
|
|
3
3
|
*
|
|
4
4
|
* Compiles validated systems into canonical protocol-compatible JSON.
|
|
5
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0).
|
|
5
6
|
*/
|
|
6
7
|
import { isCodeModeSystem } from './system';
|
|
7
|
-
const COMPILER_VERSION = '0.
|
|
8
|
+
const COMPILER_VERSION = '0.7.0';
|
|
8
9
|
export function compileSystem(system) {
|
|
9
10
|
if (isCodeModeSystem(system)) {
|
|
10
11
|
return compileCodeSystem(system);
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,kBAAkB,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9E,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAClC,eAAO,MAAM,WAAW,QAAQ,CAAC;AACjC,eAAO,MAAM,QAAQ,wBAAwB,CAAC;AAC9C,eAAO,MAAM,wBAAwB,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Code Mode Renderer
|
|
3
3
|
*
|
|
4
4
|
* ╔══════════════════════════════════════════════════════════════════════════╗
|
|
5
5
|
* ║ PREVIEW RENDERER — MIRRORS @nexart/codemode-sdk BEHAVIOR ║
|
|
6
6
|
* ║ ║
|
|
7
7
|
* ║ This file is a MIRROR, not an authority. ║
|
|
8
8
|
* ║ ║
|
|
9
|
-
* ║ Authority: @nexart/codemode-sdk (Protocol v1.
|
|
9
|
+
* ║ Authority: @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0) ║
|
|
10
10
|
* ╚══════════════════════════════════════════════════════════════════════════╝
|
|
11
11
|
*
|
|
12
12
|
* ARCHITECTURAL NOTE:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Code Mode Renderer
|
|
3
3
|
*
|
|
4
4
|
* ╔══════════════════════════════════════════════════════════════════════════╗
|
|
5
5
|
* ║ PREVIEW RENDERER — MIRRORS @nexart/codemode-sdk BEHAVIOR ║
|
|
6
6
|
* ║ ║
|
|
7
7
|
* ║ This file is a MIRROR, not an authority. ║
|
|
8
8
|
* ║ ║
|
|
9
|
-
* ║ Authority: @nexart/codemode-sdk (Protocol v1.
|
|
9
|
+
* ║ Authority: @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0) ║
|
|
10
10
|
* ╚══════════════════════════════════════════════════════════════════════════╝
|
|
11
11
|
*
|
|
12
12
|
* ARCHITECTURAL NOTE:
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
*
|
|
25
25
|
* For archival/canonical output, use @nexart/codemode-sdk directly.
|
|
26
26
|
*/
|
|
27
|
-
const PROTOCOL_VERSION = '1.
|
|
27
|
+
const PROTOCOL_VERSION = '1.2.0';
|
|
28
28
|
let activeRendererInstance = null;
|
|
29
29
|
/**
|
|
30
30
|
* Validate and normalize VAR array to 10 elements.
|
|
31
31
|
*
|
|
32
32
|
* ╔════════════════════════════════════════════════════════════════════════════╗
|
|
33
|
-
* ║ MUST MATCH @nexart/codemode-sdk v1.
|
|
33
|
+
* ║ MUST MATCH @nexart/codemode-sdk v1.4.0 EXACTLY ║
|
|
34
34
|
* ║ Any change here requires updating codemode-sdk's normalizeVars() too. ║
|
|
35
35
|
* ╚════════════════════════════════════════════════════════════════════════════╝
|
|
36
36
|
*
|
|
37
|
-
* Rules (SDK v1.
|
|
37
|
+
* Rules (SDK v1.4.0, Protocol v1.2.0):
|
|
38
38
|
* - VAR is OPTIONAL: omit or pass [] for empty (defaults to all zeros)
|
|
39
39
|
* - VAR input length MUST be 0-10 elements (protocol error if > 10)
|
|
40
40
|
* - VAR values MUST be finite numbers (protocol error if not)
|
|
@@ -120,11 +120,11 @@ function createSeededNoise(seed = 0) {
|
|
|
120
120
|
* Create a protected, read-only VAR array for protocol execution.
|
|
121
121
|
*
|
|
122
122
|
* ╔════════════════════════════════════════════════════════════════════════════╗
|
|
123
|
-
* ║ MUST MATCH @nexart/codemode-sdk v1.
|
|
123
|
+
* ║ MUST MATCH @nexart/codemode-sdk v1.4.0 EXACTLY ║
|
|
124
124
|
* ║ Any change here requires updating codemode-sdk's createProtocolVAR() too. ║
|
|
125
125
|
* ╚════════════════════════════════════════════════════════════════════════════╝
|
|
126
126
|
*
|
|
127
|
-
* SDK v1.
|
|
127
|
+
* SDK v1.4.0 Rules (Protocol v1.2.0):
|
|
128
128
|
* - Input accepts 0-10 elements
|
|
129
129
|
* - Runtime VAR is ALWAYS 10 elements (padded with zeros)
|
|
130
130
|
* - Values are numeric, must be in 0-100 range (validated upstream)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Preview Renderer
|
|
3
3
|
*
|
|
4
4
|
* Renders visual approximations of NexArt systems.
|
|
5
5
|
* This is NOT canonical output - for preview/exploration only.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0).
|
|
6
7
|
*/
|
|
7
8
|
import type { NexArtSystem, PreviewOptions } from '../types';
|
|
8
9
|
export interface PreviewRenderer {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/preview/renderer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/preview/renderer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoC,cAAc,EAAE,MAAM,UAAU,CAAC;AAyC/F,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC;CACnB;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,cAAmB,GAC3B,eAAe,CAmKjB"}
|
package/dist/preview/renderer.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Preview Renderer
|
|
3
3
|
*
|
|
4
4
|
* Renders visual approximations of NexArt systems.
|
|
5
5
|
* This is NOT canonical output - for preview/exploration only.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0).
|
|
6
7
|
*/
|
|
7
8
|
import { isCodeModeSystem, isUnifiedModeSystem } from '../system';
|
|
8
9
|
import { renderCodeModeSystem } from './code-renderer';
|
package/dist/system.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - System Creation & Validation
|
|
3
3
|
*
|
|
4
4
|
* Opinionated generative design system with aesthetic guardrails.
|
|
5
5
|
* Supports background, primitive, and sketch element types.
|
|
6
|
-
* Mirrors @nexart/codemode-sdk v1.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0) VAR semantics.
|
|
7
7
|
*/
|
|
8
8
|
import type { NexArtSystemInput, NexArtSystem, DeclarativeSystem, NexArtCodeSystem, UnifiedSystem, ValidationResult } from './types';
|
|
9
9
|
export declare function validateSystem(input: NexArtSystemInput): ValidationResult;
|
package/dist/system.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - System Creation & Validation
|
|
3
3
|
*
|
|
4
4
|
* Opinionated generative design system with aesthetic guardrails.
|
|
5
5
|
* Supports background, primitive, and sketch element types.
|
|
6
|
-
* Mirrors @nexart/codemode-sdk v1.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0) VAR semantics.
|
|
7
7
|
*/
|
|
8
|
-
const CURRENT_VERSION = '0.
|
|
8
|
+
const CURRENT_VERSION = '0.7';
|
|
9
9
|
function isCodeSystem(input) {
|
|
10
10
|
return 'type' in input && input.type === 'code';
|
|
11
11
|
}
|
|
@@ -236,7 +236,7 @@ function validateCodeSystem(input) {
|
|
|
236
236
|
if (input.seed !== undefined && typeof input.seed !== 'number') {
|
|
237
237
|
errors.push('seed must be a number');
|
|
238
238
|
}
|
|
239
|
-
// VAR validation: matches @nexart/codemode-sdk v1.
|
|
239
|
+
// VAR validation: matches @nexart/codemode-sdk v1.4.0 exactly
|
|
240
240
|
// - Input is optional (0-10 elements)
|
|
241
241
|
// - Values must be finite numbers in 0-100 range
|
|
242
242
|
// - Runtime is always 10 elements (padded with zeros)
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Opinionated generative design system with aesthetic guardrails.
|
|
5
5
|
* This SDK is non-canonical and for authoring/preview only.
|
|
6
|
-
* Mirrors @nexart/codemode-sdk v1.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0) VAR semantics.
|
|
7
7
|
*/
|
|
8
|
-
export declare const SDK_VERSION = "0.
|
|
8
|
+
export declare const SDK_VERSION = "0.7.0";
|
|
9
9
|
export declare const AESTHETIC_DEFAULTS: {
|
|
10
10
|
readonly background: {
|
|
11
11
|
readonly r: 246;
|
package/dist/types.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.7.0 - Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Opinionated generative design system with aesthetic guardrails.
|
|
5
5
|
* This SDK is non-canonical and for authoring/preview only.
|
|
6
|
-
* Mirrors @nexart/codemode-sdk v1.
|
|
6
|
+
* Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0) VAR semantics.
|
|
7
7
|
*/
|
|
8
|
-
export const SDK_VERSION = '0.
|
|
8
|
+
export const SDK_VERSION = '0.7.0';
|
|
9
9
|
export const AESTHETIC_DEFAULTS = {
|
|
10
10
|
background: { r: 246, g: 245, b: 242 },
|
|
11
11
|
foreground: { r: 45, g: 45, b: 45 },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexart/ui-renderer",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Declarative and Code Mode system authoring SDK for NexArt Protocol (non-canonical, preview only). Mirrors @nexart/codemode-sdk v1.
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Declarative and Code Mode system authoring SDK for NexArt Protocol (non-canonical, preview only). Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"prepublishOnly": "npm run build"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@nexart/codemode-sdk": "^1.
|
|
24
|
+
"@nexart/codemode-sdk": "^1.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.0.0"
|