@nexart/ui-renderer 0.7.0 → 0.8.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 +132 -323
- package/dist/capabilities.d.ts +5 -7
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +6 -8
- package/dist/compiler.d.ts +3 -3
- package/dist/compiler.js +4 -4
- package/dist/index.d.ts +33 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -30
- package/dist/preview/canvas-scaler.d.ts +49 -0
- package/dist/preview/canvas-scaler.d.ts.map +1 -0
- package/dist/preview/canvas-scaler.js +74 -0
- package/dist/preview/code-renderer.d.ts +11 -28
- package/dist/preview/code-renderer.d.ts.map +1 -1
- package/dist/preview/code-renderer.js +115 -660
- package/dist/preview/frame-budget.d.ts +43 -0
- package/dist/preview/frame-budget.d.ts.map +1 -0
- package/dist/preview/frame-budget.js +78 -0
- package/dist/preview/preview-engine.d.ts +42 -0
- package/dist/preview/preview-engine.d.ts.map +1 -0
- package/dist/preview/preview-engine.js +201 -0
- package/dist/preview/preview-runtime.d.ts +28 -0
- package/dist/preview/preview-runtime.d.ts.map +1 -0
- package/dist/preview/preview-runtime.js +512 -0
- package/dist/preview/preview-types.d.ts +116 -0
- package/dist/preview/preview-types.d.ts.map +1 -0
- package/dist/preview/preview-types.js +36 -0
- package/dist/preview/renderer.d.ts +3 -3
- package/dist/preview/renderer.js +3 -3
- package/dist/preview/unified-renderer.d.ts.map +1 -1
- package/dist/preview/unified-renderer.js +45 -22
- package/dist/system.d.ts +2 -2
- package/dist/system.d.ts.map +1 -1
- package/dist/system.js +8 -10
- package/dist/types.d.ts +9 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -5
- package/package.json +2 -2
package/dist/preview/renderer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.8.0 - Preview Renderer
|
|
3
3
|
*
|
|
4
4
|
* Renders visual approximations of NexArt systems.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Lightweight preview runtime — NOT canonical, NOT archival.
|
|
6
|
+
* For canonical output: use @nexart/codemode-sdk
|
|
7
7
|
*/
|
|
8
8
|
import { isCodeModeSystem, isUnifiedModeSystem } from '../system';
|
|
9
9
|
import { renderCodeModeSystem } from './code-renderer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-renderer.d.ts","sourceRoot":"","sources":["../../src/preview/unified-renderer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAkB,cAAc,EAAoE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"unified-renderer.d.ts","sourceRoot":"","sources":["../../src/preview/unified-renderer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAkB,cAAc,EAAoE,MAAM,UAAU,CAAC;AAmBhJ,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;AA6ED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,cAAmB,GAC3B,eAAe,CAsPjB"}
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
import { compileBackgroundPreset, getPaletteColors } from '../presets/backgrounds';
|
|
7
7
|
import { compilePrimitive } from '../presets/primitives';
|
|
8
8
|
import { wrapSketch, validateSketchSafety } from '../presets/sketch-wrapper';
|
|
9
|
-
import {
|
|
9
|
+
import { createPreviewRuntime } from './preview-runtime';
|
|
10
|
+
import { calculateScaledDimensions, applyScaledDimensions } from './canvas-scaler';
|
|
11
|
+
import { createFrameBudget, canRenderFrame, recordFrame, resetBudget, shouldSkipFrame } from './frame-budget';
|
|
12
|
+
import { PREVIEW_BUDGET } from './preview-types';
|
|
10
13
|
function validateSketchElement(element) {
|
|
11
14
|
const { safe, warnings } = validateSketchSafety(element.code);
|
|
12
15
|
if (!safe) {
|
|
@@ -78,13 +81,19 @@ function compileSketchElement(element) {
|
|
|
78
81
|
};
|
|
79
82
|
}
|
|
80
83
|
export function renderUnifiedSystem(system, canvas, options = {}) {
|
|
84
|
+
console.log('[UIRenderer] Unified preview → lightweight runtime with budget limits');
|
|
85
|
+
console.log(`[UIRenderer] Budget: max ${PREVIEW_BUDGET.MAX_FRAMES} frames, ${PREVIEW_BUDGET.MAX_TOTAL_TIME_MS}ms`);
|
|
81
86
|
const { showBadge = true, onPreview, onComplete, onError } = options;
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
const scaled = calculateScaledDimensions(system.width, system.height);
|
|
88
|
+
if (scaled.wasScaled) {
|
|
89
|
+
console.log(`[UIRenderer] Canvas scaled: ${system.width}x${system.height} → ${scaled.renderWidth}x${scaled.renderHeight}`);
|
|
90
|
+
}
|
|
91
|
+
applyScaledDimensions(canvas, scaled);
|
|
84
92
|
const ctx = canvas.getContext('2d');
|
|
85
93
|
let animationId = null;
|
|
86
94
|
let isRunning = false;
|
|
87
95
|
let isDestroyed = false;
|
|
96
|
+
const budget = createFrameBudget();
|
|
88
97
|
const palette = inferPalette(system.elements);
|
|
89
98
|
const colors = getPaletteColors(palette);
|
|
90
99
|
const totalFrames = system.loop?.duration ?? 120;
|
|
@@ -124,23 +133,23 @@ export function renderUnifiedSystem(system, canvas, options = {}) {
|
|
|
124
133
|
const drawBadge = () => {
|
|
125
134
|
if (!showBadge)
|
|
126
135
|
return;
|
|
127
|
-
const text = '⚠️ Preview
|
|
128
|
-
ctx.font = '
|
|
136
|
+
const text = '⚠️ Preview';
|
|
137
|
+
ctx.font = '10px -apple-system, sans-serif';
|
|
129
138
|
const metrics = ctx.measureText(text);
|
|
130
|
-
const padding =
|
|
139
|
+
const padding = 6;
|
|
131
140
|
const badgeWidth = metrics.width + padding * 2;
|
|
132
|
-
const badgeHeight =
|
|
133
|
-
const x =
|
|
134
|
-
const y =
|
|
141
|
+
const badgeHeight = 18;
|
|
142
|
+
const x = scaled.renderWidth - badgeWidth - 6;
|
|
143
|
+
const y = 6;
|
|
135
144
|
ctx.fillStyle = 'rgba(255, 100, 100, 0.15)';
|
|
136
145
|
ctx.strokeStyle = 'rgba(255, 100, 100, 0.4)';
|
|
137
146
|
ctx.lineWidth = 1;
|
|
138
147
|
ctx.beginPath();
|
|
139
|
-
ctx.roundRect(x, y, badgeWidth, badgeHeight,
|
|
148
|
+
ctx.roundRect(x, y, badgeWidth, badgeHeight, 3);
|
|
140
149
|
ctx.fill();
|
|
141
150
|
ctx.stroke();
|
|
142
151
|
ctx.fillStyle = '#ff9999';
|
|
143
|
-
ctx.fillText(text, x + padding, y +
|
|
152
|
+
ctx.fillText(text, x + padding, y + 13);
|
|
144
153
|
};
|
|
145
154
|
const executeCode = (p, code, frame, t) => {
|
|
146
155
|
if (!code.trim())
|
|
@@ -212,27 +221,41 @@ export function renderUnifiedSystem(system, canvas, options = {}) {
|
|
|
212
221
|
if (isDestroyed)
|
|
213
222
|
return;
|
|
214
223
|
try {
|
|
215
|
-
let
|
|
216
|
-
const p =
|
|
224
|
+
let frameCount = 0;
|
|
225
|
+
const p = createPreviewRuntime(canvas, scaled.renderWidth, scaled.renderHeight, system.seed);
|
|
217
226
|
runSetup(p);
|
|
227
|
+
resetBudget(budget);
|
|
228
|
+
isRunning = true;
|
|
218
229
|
const loop = () => {
|
|
219
230
|
if (!isRunning || isDestroyed)
|
|
220
231
|
return;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
232
|
+
if (!canRenderFrame(budget)) {
|
|
233
|
+
console.log(`[UIRenderer] Budget exhausted: ${budget.exhaustionReason}`);
|
|
234
|
+
isRunning = false;
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
frameCount++;
|
|
238
|
+
if (!shouldSkipFrame(frameCount)) {
|
|
239
|
+
const t = (frameCount % totalFrames) / totalFrames;
|
|
240
|
+
p.randomSeed(system.seed);
|
|
241
|
+
p.noiseSeed(system.seed);
|
|
242
|
+
try {
|
|
243
|
+
runDraw(p, frameCount, t);
|
|
244
|
+
drawBadge();
|
|
245
|
+
recordFrame(budget);
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
console.warn('[UIRenderer] Draw error:', error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
227
251
|
animationId = requestAnimationFrame(loop);
|
|
228
252
|
};
|
|
229
|
-
isRunning = true;
|
|
230
253
|
animationId = requestAnimationFrame(loop);
|
|
231
254
|
}
|
|
232
255
|
catch (error) {
|
|
233
256
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
257
|
+
console.warn('[UIRenderer] Loop render error:', err.message);
|
|
234
258
|
onError?.(err);
|
|
235
|
-
throw err;
|
|
236
259
|
}
|
|
237
260
|
};
|
|
238
261
|
const render = () => {
|
|
@@ -256,7 +279,7 @@ export function renderUnifiedSystem(system, canvas, options = {}) {
|
|
|
256
279
|
const destroy = () => {
|
|
257
280
|
isDestroyed = true;
|
|
258
281
|
stop();
|
|
259
|
-
ctx.clearRect(0, 0,
|
|
282
|
+
ctx.clearRect(0, 0, scaled.renderWidth, scaled.renderHeight);
|
|
260
283
|
};
|
|
261
284
|
const renderer = {
|
|
262
285
|
render,
|
package/dist/system.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.8.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
|
-
*
|
|
6
|
+
* Lightweight preview runtime — soft validation, no protocol errors.
|
|
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.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA2UjB,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,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.8.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
|
-
*
|
|
6
|
+
* Lightweight preview runtime — soft validation, no protocol errors.
|
|
7
7
|
*/
|
|
8
|
-
const CURRENT_VERSION = '0.
|
|
8
|
+
const CURRENT_VERSION = '0.8';
|
|
9
9
|
function isCodeSystem(input) {
|
|
10
10
|
return 'type' in input && input.type === 'code';
|
|
11
11
|
}
|
|
@@ -236,25 +236,23 @@ 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
|
|
240
|
-
//
|
|
241
|
-
// - Values must be finite numbers in 0-100 range
|
|
242
|
-
// - Runtime is always 10 elements (padded with zeros)
|
|
239
|
+
// VAR validation (soft - clamping applied at runtime, not errors)
|
|
240
|
+
// Preview renderer is permissive - clamps values instead of rejecting
|
|
243
241
|
if (input.vars !== undefined) {
|
|
244
242
|
if (!Array.isArray(input.vars)) {
|
|
245
243
|
errors.push('vars must be an array');
|
|
246
244
|
}
|
|
247
245
|
else if (input.vars.length > 10) {
|
|
248
|
-
|
|
246
|
+
console.warn(`[UIRenderer] VAR array has ${input.vars.length} elements, will use first 10`);
|
|
249
247
|
}
|
|
250
248
|
else {
|
|
251
249
|
for (let i = 0; i < input.vars.length; i++) {
|
|
252
250
|
const v = input.vars[i];
|
|
253
251
|
if (typeof v !== 'number' || !Number.isFinite(v)) {
|
|
254
|
-
|
|
252
|
+
console.warn(`[UIRenderer] VAR[${i}] is not a valid number, will use 0`);
|
|
255
253
|
}
|
|
256
254
|
else if (v < 0 || v > 100) {
|
|
257
|
-
|
|
255
|
+
console.warn(`[UIRenderer] VAR[${i}] = ${v} is out of 0-100 range, will be clamped`);
|
|
258
256
|
}
|
|
259
257
|
}
|
|
260
258
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nexart/ui-renderer v0.
|
|
2
|
+
* @nexart/ui-renderer v0.8.0 - Type Definitions
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* This SDK is non-canonical and for
|
|
6
|
-
*
|
|
4
|
+
* Lightweight Preview Runtime for NexArt Protocol.
|
|
5
|
+
* This SDK is non-canonical and for preview only.
|
|
6
|
+
*
|
|
7
|
+
* Performance-optimized with budget limits:
|
|
8
|
+
* - Max frames: 30
|
|
9
|
+
* - Max total time: 500ms
|
|
10
|
+
* - Max canvas dimension: 900px
|
|
7
11
|
*/
|
|
8
|
-
export declare const SDK_VERSION = "0.
|
|
12
|
+
export declare const SDK_VERSION = "0.8.0";
|
|
9
13
|
export declare const AESTHETIC_DEFAULTS: {
|
|
10
14
|
readonly background: {
|
|
11
15
|
readonly r: 246;
|
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;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7E,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,cAAc,CAAC;AAEnB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
|
5
|
-
* This SDK is non-canonical and for
|
|
6
|
-
*
|
|
4
|
+
* Lightweight Preview Runtime for NexArt Protocol.
|
|
5
|
+
* This SDK is non-canonical and for preview only.
|
|
6
|
+
*
|
|
7
|
+
* Performance-optimized with budget limits:
|
|
8
|
+
* - Max frames: 30
|
|
9
|
+
* - Max total time: 500ms
|
|
10
|
+
* - Max canvas dimension: 900px
|
|
7
11
|
*/
|
|
8
|
-
export const SDK_VERSION = '0.
|
|
12
|
+
export const SDK_VERSION = '0.8.0';
|
|
9
13
|
export const AESTHETIC_DEFAULTS = {
|
|
10
14
|
background: { r: 246, g: 245, b: 242 },
|
|
11
15
|
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": "
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Lightweight Preview Runtime for NexArt Protocol. Non-canonical, performance-optimized with budget limits (max 30 frames, 500ms, 900px canvas).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|