@nexart/ui-renderer 0.4.0 → 0.6.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 +186 -27
- package/dist/capabilities.d.ts +29 -8
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +120 -269
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/presets/primitives.d.ts.map +1 -1
- package/dist/presets/primitives.js +651 -0
- package/dist/preview/code-renderer.d.ts +2 -2
- package/dist/preview/code-renderer.d.ts.map +1 -1
- package/dist/preview/code-renderer.js +62 -30
- package/dist/system.d.ts +2 -1
- package/dist/system.d.ts.map +1 -1
- package/dist/system.js +22 -7
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.6.0 - Code Mode Renderer
|
|
3
3
|
*
|
|
4
4
|
* ╔══════════════════════════════════════════════════════════════════════════╗
|
|
5
5
|
* ║ PREVIEW RENDERER — MIRRORS @nexart/codemode-sdk BEHAVIOR ║
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* To ensure faithful mirroring, this renderer:
|
|
20
20
|
* 1. Uses identical forbidden pattern validation as the SDK
|
|
21
|
-
* 2. Uses identical VAR handling (read-only, 10
|
|
21
|
+
* 2. Uses identical VAR handling (read-only, 0-10 input → 10 runtime, 0-100 strict, errors not clamps)
|
|
22
22
|
* 3. Uses identical seeded RNG (Mulberry32) and Perlin noise
|
|
23
23
|
* 4. Uses identical time variable semantics (frameCount, t, time, tGlobal)
|
|
24
24
|
*
|
|
@@ -27,34 +27,44 @@
|
|
|
27
27
|
const PROTOCOL_VERSION = '1.0.0';
|
|
28
28
|
let activeRendererInstance = null;
|
|
29
29
|
/**
|
|
30
|
-
* Validate and normalize VAR array to
|
|
31
|
-
* MIRRORS @nexart/codemode-sdk behavior exactly.
|
|
30
|
+
* Validate and normalize VAR array to 10 elements.
|
|
32
31
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
32
|
+
* ╔════════════════════════════════════════════════════════════════════════════╗
|
|
33
|
+
* ║ MUST MATCH @nexart/codemode-sdk v1.1.0 EXACTLY ║
|
|
34
|
+
* ║ Any change here requires updating codemode-sdk's normalizeVars() too. ║
|
|
35
|
+
* ╚════════════════════════════════════════════════════════════════════════════╝
|
|
36
|
+
*
|
|
37
|
+
* Rules (SDK v1.1.0, Protocol v1.0.0):
|
|
38
|
+
* - VAR is OPTIONAL: omit or pass [] for empty (defaults to all zeros)
|
|
39
|
+
* - VAR input length MUST be 0-10 elements (protocol error if > 10)
|
|
40
|
+
* - VAR values MUST be finite numbers (protocol error if not)
|
|
41
|
+
* - VAR values MUST be in range 0-100 (protocol error if out of range, NO clamping)
|
|
37
42
|
* - VAR is read-only inside sketches
|
|
43
|
+
* - Output is ALWAYS 10 elements (padded with zeros) for protocol consistency
|
|
38
44
|
*/
|
|
39
45
|
function normalizeVars(vars) {
|
|
40
46
|
if (!vars || !Array.isArray(vars)) {
|
|
41
|
-
console.log('[UIRenderer] No vars provided, using
|
|
47
|
+
console.log('[UIRenderer] No vars provided, using defaults [0,0,0,0,0,0,0,0,0,0]');
|
|
42
48
|
return [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
43
49
|
}
|
|
44
|
-
if (vars.length
|
|
45
|
-
throw new Error(`[Code Mode Protocol Error] VAR array must have
|
|
50
|
+
if (vars.length > 10) {
|
|
51
|
+
throw new Error(`[Code Mode Protocol Error] VAR array must have at most 10 elements, got ${vars.length}`);
|
|
46
52
|
}
|
|
47
53
|
const result = [];
|
|
48
|
-
for (let i = 0; i <
|
|
54
|
+
for (let i = 0; i < vars.length; i++) {
|
|
49
55
|
const v = vars[i];
|
|
50
|
-
if (typeof v !== 'number') {
|
|
51
|
-
throw new Error(`[Code Mode Protocol Error] VAR[${i}] must be a number, got ${typeof v}`);
|
|
56
|
+
if (typeof v !== 'number' || !Number.isFinite(v)) {
|
|
57
|
+
throw new Error(`[Code Mode Protocol Error] VAR[${i}] must be a finite number, got ${typeof v === 'number' ? v : typeof v}`);
|
|
52
58
|
}
|
|
53
59
|
if (v < 0 || v > 100) {
|
|
54
|
-
|
|
60
|
+
throw new Error(`[Code Mode Protocol Error] VAR[${i}] = ${v} is out of range. Values must be 0-100.`);
|
|
55
61
|
}
|
|
56
62
|
result.push(v);
|
|
57
63
|
}
|
|
64
|
+
// Pad with zeros to always have 10 elements for protocol consistency
|
|
65
|
+
while (result.length < 10) {
|
|
66
|
+
result.push(0);
|
|
67
|
+
}
|
|
58
68
|
return result;
|
|
59
69
|
}
|
|
60
70
|
function createSeededRNG(seed = 123456) {
|
|
@@ -106,24 +116,46 @@ function createSeededNoise(seed = 0) {
|
|
|
106
116
|
return (lerp(lerp(lerp(grad(permutation[AA], x, y, z), grad(permutation[BA], x - 1, y, z), u), lerp(grad(permutation[AB], x, y - 1, z), grad(permutation[BB], x - 1, y - 1, z), u), v), lerp(lerp(grad(permutation[AA + 1], x, y, z - 1), grad(permutation[BA + 1], x - 1, y, z - 1), u), lerp(grad(permutation[AB + 1], x, y - 1, z - 1), grad(permutation[BB + 1], x - 1, y - 1, z - 1), u), v), w) + 1) / 2;
|
|
107
117
|
};
|
|
108
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Create a protected, read-only VAR array for protocol execution.
|
|
121
|
+
*
|
|
122
|
+
* ╔════════════════════════════════════════════════════════════════════════════╗
|
|
123
|
+
* ║ MUST MATCH @nexart/codemode-sdk v1.1.0 EXACTLY ║
|
|
124
|
+
* ║ Any change here requires updating codemode-sdk's createProtocolVAR() too. ║
|
|
125
|
+
* ╚════════════════════════════════════════════════════════════════════════════╝
|
|
126
|
+
*
|
|
127
|
+
* SDK v1.1.0 Rules (Protocol v1.0.0):
|
|
128
|
+
* - Input accepts 0-10 elements
|
|
129
|
+
* - Runtime VAR is ALWAYS 10 elements (padded with zeros)
|
|
130
|
+
* - Values are numeric, must be in 0-100 range (validated upstream)
|
|
131
|
+
* - Read-only: writes throw descriptive errors
|
|
132
|
+
*/
|
|
109
133
|
function createProtectedVAR(vars) {
|
|
110
|
-
|
|
134
|
+
// Create frozen 10-element array (upstream normalizeVars ensures this)
|
|
135
|
+
const normalizedVars = [];
|
|
136
|
+
for (let i = 0; i < 10; i++) {
|
|
137
|
+
normalizedVars[i] = vars?.[i] ?? 0;
|
|
138
|
+
}
|
|
139
|
+
// Freeze the array to prevent modifications
|
|
140
|
+
const frozenVars = Object.freeze(normalizedVars);
|
|
141
|
+
// Wrap in Proxy for descriptive error messages on write attempts
|
|
111
142
|
return new Proxy(frozenVars, {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
143
|
+
set(_target, prop, _value) {
|
|
144
|
+
const propName = typeof prop === 'symbol' ? prop.toString() : prop;
|
|
145
|
+
throw new Error(`[Code Mode Protocol Error] VAR is read-only. ` +
|
|
146
|
+
`Cannot write to VAR[${propName}]. ` +
|
|
147
|
+
`VAR[0..9] are protocol inputs, not sketch state.`);
|
|
148
|
+
},
|
|
149
|
+
deleteProperty(_target, prop) {
|
|
150
|
+
const propName = typeof prop === 'symbol' ? prop.toString() : prop;
|
|
151
|
+
throw new Error(`[Code Mode Protocol Error] VAR is read-only. ` +
|
|
152
|
+
`Cannot delete VAR[${propName}].`);
|
|
153
|
+
},
|
|
154
|
+
defineProperty(_target, prop) {
|
|
155
|
+
const propName = typeof prop === 'symbol' ? prop.toString() : prop;
|
|
156
|
+
throw new Error(`[Code Mode Protocol Error] Cannot define new VAR properties. ` +
|
|
157
|
+
`VAR is fixed at 10 elements (VAR[0..9]). Attempted: ${propName}`);
|
|
122
158
|
},
|
|
123
|
-
set(target, prop, value) {
|
|
124
|
-
console.warn(`[UIRenderer Protocol Warning] VAR is read-only. Attempted write to VAR[${String(prop)}] blocked.`);
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
159
|
});
|
|
128
160
|
}
|
|
129
161
|
export function createP5Runtime(canvas, width, height, seed, vars = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) {
|
package/dist/system.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.6.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.1.0 VAR semantics.
|
|
6
7
|
*/
|
|
7
8
|
import type { NexArtSystemInput, NexArtSystem, DeclarativeSystem, NexArtCodeSystem, UnifiedSystem, ValidationResult } from './types';
|
|
8
9
|
export declare function validateSystem(input: NexArtSystemInput): ValidationResult;
|
package/dist/system.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EAEZ,iBAAiB,EAEjB,gBAAgB,EAEhB,aAAa,EAGb,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AA6UjB,wBAAgB,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,gBAAgB,CAiBzE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CA8DnE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEjF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,aAAa,CAEjF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAErF"}
|
package/dist/system.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.6.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.1.0 VAR semantics.
|
|
6
7
|
*/
|
|
7
|
-
const CURRENT_VERSION = '0.
|
|
8
|
+
const CURRENT_VERSION = '0.6';
|
|
8
9
|
function isCodeSystem(input) {
|
|
9
10
|
return 'type' in input && input.type === 'code';
|
|
10
11
|
}
|
|
@@ -22,7 +23,14 @@ const VALID_ELEMENT_TYPES = ['dots', 'lines', 'waves', 'grid', 'flowField', 'orb
|
|
|
22
23
|
const VALID_MOTION_SOURCES = ['none', 'time', 'seed'];
|
|
23
24
|
const VALID_TEXTURES = ['none', 'noise', 'grain'];
|
|
24
25
|
const VALID_BACKGROUND_PRESETS = ['layered-waves', 'soft-noise-field', 'orbital-lines', 'flowing-stripes', 'minimal-grid'];
|
|
25
|
-
const VALID_PRIMITIVE_NAMES = [
|
|
26
|
+
const VALID_PRIMITIVE_NAMES = [
|
|
27
|
+
'dots', 'lines', 'waves', 'stripes', 'circles', 'grid',
|
|
28
|
+
'polygons', 'diamonds', 'hexgrid', 'stars', 'concentricSquares',
|
|
29
|
+
'spirals', 'rays', 'orbits', 'rings', 'arcs', 'radialLines', 'petals',
|
|
30
|
+
'flow', 'particles', 'bubbles',
|
|
31
|
+
'crosshatch', 'chevrons', 'zigzag', 'weave', 'moire',
|
|
32
|
+
'curves', 'noise', 'mesh', 'branches',
|
|
33
|
+
];
|
|
26
34
|
const VALID_PALETTES = ['offwhite-dark', 'midnight', 'warm-neutral', 'ocean', 'sunset', 'forest'];
|
|
27
35
|
function validateUnifiedElement(el, index) {
|
|
28
36
|
const errors = [];
|
|
@@ -228,18 +236,25 @@ function validateCodeSystem(input) {
|
|
|
228
236
|
if (input.seed !== undefined && typeof input.seed !== 'number') {
|
|
229
237
|
errors.push('seed must be a number');
|
|
230
238
|
}
|
|
239
|
+
// VAR validation: matches @nexart/codemode-sdk v1.1.0 exactly
|
|
240
|
+
// - Input is optional (0-10 elements)
|
|
241
|
+
// - Values must be finite numbers in 0-100 range
|
|
242
|
+
// - Runtime is always 10 elements (padded with zeros)
|
|
231
243
|
if (input.vars !== undefined) {
|
|
232
244
|
if (!Array.isArray(input.vars)) {
|
|
233
245
|
errors.push('vars must be an array');
|
|
234
246
|
}
|
|
235
|
-
else if (input.vars.length
|
|
236
|
-
errors.push(
|
|
247
|
+
else if (input.vars.length > 10) {
|
|
248
|
+
errors.push(`[Code Mode Protocol Error] VAR array must have at most 10 elements, got ${input.vars.length}`);
|
|
237
249
|
}
|
|
238
250
|
else {
|
|
239
251
|
for (let i = 0; i < input.vars.length; i++) {
|
|
240
252
|
const v = input.vars[i];
|
|
241
|
-
if (typeof v !== 'number') {
|
|
242
|
-
errors.push(`[Code Mode Protocol Error] VAR[${i}] must be a number`);
|
|
253
|
+
if (typeof v !== 'number' || !Number.isFinite(v)) {
|
|
254
|
+
errors.push(`[Code Mode Protocol Error] VAR[${i}] must be a finite number, got ${typeof v === 'number' ? v : typeof v}`);
|
|
255
|
+
}
|
|
256
|
+
else if (v < 0 || v > 100) {
|
|
257
|
+
errors.push(`[Code Mode Protocol Error] VAR[${i}] = ${v} is out of range. Values must be 0-100.`);
|
|
243
258
|
}
|
|
244
259
|
}
|
|
245
260
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.6.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.1.0 VAR semantics.
|
|
6
7
|
*/
|
|
7
|
-
export declare const SDK_VERSION = "0.
|
|
8
|
+
export declare const SDK_VERSION = "0.6.0";
|
|
8
9
|
export declare const AESTHETIC_DEFAULTS: {
|
|
9
10
|
readonly background: {
|
|
10
11
|
readonly r: 246;
|
|
@@ -52,7 +53,7 @@ export interface BackgroundElement {
|
|
|
52
53
|
loop?: LoopConfig;
|
|
53
54
|
seed?: number;
|
|
54
55
|
}
|
|
55
|
-
export type PrimitiveName = 'waves' | 'dots' | 'lines' | 'grid' | 'flow' | 'orbits' | 'circles' | 'stripes';
|
|
56
|
+
export type PrimitiveName = 'waves' | 'dots' | 'lines' | 'grid' | 'flow' | 'orbits' | 'circles' | 'stripes' | 'spirals' | 'rays' | 'stars' | 'polygons' | 'hexgrid' | 'arcs' | 'crosshatch' | 'chevrons' | 'zigzag' | 'rings' | 'diamonds' | 'bubbles' | 'mesh' | 'curves' | 'noise' | 'particles' | 'petals' | 'branches' | 'weave' | 'moire' | 'radialLines' | 'concentricSquares';
|
|
56
57
|
export interface PrimitiveElement {
|
|
57
58
|
type: 'primitive';
|
|
58
59
|
name: PrimitiveName;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;C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I,CAAA;KAAE,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
|
package/dist/types.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.6.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.1.0 VAR semantics.
|
|
6
7
|
*/
|
|
7
|
-
export const SDK_VERSION = '0.
|
|
8
|
+
export const SDK_VERSION = '0.6.0';
|
|
8
9
|
export const AESTHETIC_DEFAULTS = {
|
|
9
10
|
background: { r: 246, g: 245, b: 242 },
|
|
10
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
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Declarative and Code Mode system authoring SDK for NexArt Protocol (non-canonical, preview only). Mirrors @nexart/codemode-sdk v1.1.0 VAR semantics.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|