@nexart/ui-renderer 0.4.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.
@@ -1,282 +1,113 @@
1
1
  /**
2
- * @nexart/ui-renderer v0.2.0 - Capabilities Discovery
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)
7
+ *
8
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
9
+ * Primitives are helper generators that compile to Code Mode sketches.
10
+ * They exist for convenience and rapid prototyping only.
11
+ * The canonical output is always the compiled Code Mode source.
6
12
  */
13
+ const SHARED_PARAMS = {
14
+ count: {
15
+ type: 'number',
16
+ required: false,
17
+ description: 'Element count (clamped to 3-50)',
18
+ min: 3,
19
+ max: 50,
20
+ default: 12,
21
+ },
22
+ color: {
23
+ type: 'string',
24
+ required: false,
25
+ description: 'CSS color string (e.g., "#ffffff", "rgb(255,255,255)")',
26
+ default: 'foreground color from palette',
27
+ },
28
+ opacity: {
29
+ type: 'number',
30
+ required: false,
31
+ description: 'Opacity from 0.1 to 1',
32
+ min: 0.1,
33
+ max: 1,
34
+ default: 1,
35
+ },
36
+ strokeWeight: {
37
+ type: 'enum',
38
+ required: false,
39
+ description: 'Stroke thickness preset or number (0.5-4)',
40
+ options: ['auto', 'thin', 'medium', 'thick'],
41
+ default: 'auto',
42
+ },
43
+ motion: {
44
+ type: 'enum',
45
+ required: false,
46
+ description: 'Animation speed preset',
47
+ options: ['slow', 'medium', 'fast'],
48
+ default: 'slow',
49
+ },
50
+ };
51
+ function createPrimitive(name, category, description) {
52
+ return {
53
+ name,
54
+ category,
55
+ description,
56
+ compilesTo: 'codemode',
57
+ isCanonical: false,
58
+ parameters: { ...SHARED_PARAMS },
59
+ };
60
+ }
7
61
  export function getCapabilities() {
8
62
  return {
9
- version: '0.2.0',
63
+ version: '0.7.0',
10
64
  isCanonical: false,
11
65
  isArchival: false,
12
66
  renderer: '@nexart/ui-renderer',
67
+ primitivesMeta: {
68
+ notice: 'Primitives are helper generators that compile to Code Mode sketches. They are NOT canonical.',
69
+ count: 30,
70
+ categories: ['basic', 'geometric', 'radial', 'flow', 'patterns', 'organic'],
71
+ compilesTo: 'codemode',
72
+ isCanonical: false,
73
+ },
13
74
  primitives: [
14
- {
15
- type: 'dots',
16
- description: 'Scattered dot patterns with various distributions',
17
- parameters: {
18
- distribution: {
19
- type: 'enum',
20
- required: true,
21
- description: 'How dots are distributed across the canvas',
22
- options: ['random', 'radial', 'grid', 'spiral'],
23
- },
24
- count: {
25
- type: 'number',
26
- required: true,
27
- description: 'Number of dots to render',
28
- min: 1,
29
- max: 10000,
30
- },
31
- size: {
32
- type: 'tuple',
33
- required: true,
34
- description: 'Size range [min, max] in pixels',
35
- tupleLength: 2,
36
- },
37
- color: {
38
- type: 'string',
39
- required: false,
40
- description: 'CSS color or named color',
41
- default: 'white',
42
- },
43
- opacity: {
44
- type: 'number',
45
- required: false,
46
- description: 'Opacity from 0 to 1',
47
- min: 0,
48
- max: 1,
49
- default: 1,
50
- },
51
- },
52
- },
53
- {
54
- type: 'lines',
55
- description: 'Linear patterns in various directions',
56
- parameters: {
57
- direction: {
58
- type: 'enum',
59
- required: true,
60
- description: 'Direction of lines',
61
- options: ['horizontal', 'vertical', 'diagonal', 'radial'],
62
- },
63
- count: {
64
- type: 'number',
65
- required: true,
66
- description: 'Number of lines',
67
- min: 1,
68
- max: 500,
69
- },
70
- thickness: {
71
- type: 'tuple',
72
- required: true,
73
- description: 'Thickness range [min, max] in pixels',
74
- tupleLength: 2,
75
- },
76
- color: {
77
- type: 'string',
78
- required: false,
79
- description: 'CSS color or named color',
80
- default: 'white',
81
- },
82
- opacity: {
83
- type: 'number',
84
- required: false,
85
- description: 'Opacity from 0 to 1',
86
- min: 0,
87
- max: 1,
88
- default: 1,
89
- },
90
- },
91
- },
92
- {
93
- type: 'waves',
94
- description: 'Sinusoidal wave patterns',
95
- parameters: {
96
- axis: {
97
- type: 'enum',
98
- required: true,
99
- description: 'Primary axis of wave motion',
100
- options: ['x', 'y'],
101
- },
102
- amplitude: {
103
- type: 'number',
104
- required: true,
105
- description: 'Wave height as fraction of canvas (0-1)',
106
- min: 0,
107
- max: 1,
108
- },
109
- frequency: {
110
- type: 'number',
111
- required: true,
112
- description: 'Number of wave cycles',
113
- min: 0.1,
114
- max: 10,
115
- },
116
- count: {
117
- type: 'number',
118
- required: false,
119
- description: 'Number of parallel waves',
120
- min: 1,
121
- max: 50,
122
- default: 8,
123
- },
124
- color: {
125
- type: 'string',
126
- required: false,
127
- description: 'CSS color or named color',
128
- default: 'white',
129
- },
130
- opacity: {
131
- type: 'number',
132
- required: false,
133
- description: 'Opacity from 0 to 1',
134
- min: 0,
135
- max: 1,
136
- default: 1,
137
- },
138
- },
139
- },
140
- {
141
- type: 'grid',
142
- description: 'Regular grid of shapes',
143
- parameters: {
144
- rows: {
145
- type: 'number',
146
- required: true,
147
- description: 'Number of rows',
148
- min: 1,
149
- max: 100,
150
- },
151
- cols: {
152
- type: 'number',
153
- required: true,
154
- description: 'Number of columns',
155
- min: 1,
156
- max: 100,
157
- },
158
- shape: {
159
- type: 'enum',
160
- required: true,
161
- description: 'Shape at each grid point',
162
- options: ['square', 'circle', 'diamond'],
163
- },
164
- cellSize: {
165
- type: 'number',
166
- required: false,
167
- description: 'Size of each cell shape in pixels',
168
- },
169
- color: {
170
- type: 'string',
171
- required: false,
172
- description: 'CSS color or named color',
173
- default: 'white',
174
- },
175
- opacity: {
176
- type: 'number',
177
- required: false,
178
- description: 'Opacity from 0 to 1',
179
- min: 0,
180
- max: 1,
181
- default: 1,
182
- },
183
- },
184
- },
185
- {
186
- type: 'flowField',
187
- description: 'Particle traces following a noise-based vector field',
188
- parameters: {
189
- resolution: {
190
- type: 'number',
191
- required: true,
192
- description: 'Grid resolution for noise sampling',
193
- min: 5,
194
- max: 100,
195
- },
196
- strength: {
197
- type: 'number',
198
- required: true,
199
- description: 'Field influence strength (0-1)',
200
- min: 0,
201
- max: 1,
202
- },
203
- particles: {
204
- type: 'number',
205
- required: true,
206
- description: 'Number of particles',
207
- min: 10,
208
- max: 5000,
209
- },
210
- color: {
211
- type: 'string',
212
- required: false,
213
- description: 'CSS color or named color',
214
- default: 'white',
215
- },
216
- opacity: {
217
- type: 'number',
218
- required: false,
219
- description: 'Opacity from 0 to 1',
220
- min: 0,
221
- max: 1,
222
- default: 1,
223
- },
224
- },
225
- },
226
- {
227
- type: 'orbits',
228
- description: 'Circular orbital patterns with dots',
229
- parameters: {
230
- count: {
231
- type: 'number',
232
- required: true,
233
- description: 'Number of orbital rings',
234
- min: 1,
235
- max: 20,
236
- },
237
- radius: {
238
- type: 'tuple',
239
- required: true,
240
- description: 'Radius range [min, max] in pixels',
241
- tupleLength: 2,
242
- },
243
- dotCount: {
244
- type: 'number',
245
- required: true,
246
- description: 'Dots per orbit',
247
- min: 1,
248
- max: 200,
249
- },
250
- speed: {
251
- type: 'number',
252
- required: false,
253
- description: 'Rotation speed multiplier',
254
- min: 0,
255
- max: 5,
256
- default: 1,
257
- },
258
- color: {
259
- type: 'string',
260
- required: false,
261
- description: 'CSS color or named color',
262
- default: 'white',
263
- },
264
- opacity: {
265
- type: 'number',
266
- required: false,
267
- description: 'Opacity from 0 to 1',
268
- min: 0,
269
- max: 1,
270
- default: 1,
271
- },
272
- },
273
- },
75
+ createPrimitive('dots', 'basic', 'Grid or random dot patterns with noise-based movement'),
76
+ createPrimitive('lines', 'basic', 'Vertical wavy lines with sinusoidal motion'),
77
+ createPrimitive('waves', 'basic', 'Horizontal wave patterns with phase animation'),
78
+ createPrimitive('stripes', 'basic', 'Simple horizontal stripes with wave offset'),
79
+ createPrimitive('circles', 'basic', 'Concentric pulsing circles from center'),
80
+ createPrimitive('grid', 'basic', 'Rotating square grid with noise-based variation'),
81
+ createPrimitive('polygons', 'geometric', 'Random rotating polygons (3-7 sides)'),
82
+ createPrimitive('diamonds', 'geometric', 'Diamond grid with noise-driven rotation'),
83
+ createPrimitive('hexgrid', 'geometric', 'Honeycomb hexagonal tessellation'),
84
+ createPrimitive('stars', 'geometric', 'Scattered rotating star shapes (5-7 points)'),
85
+ createPrimitive('concentricSquares', 'geometric', 'Nested rotating squares from center'),
86
+ createPrimitive('spirals', 'radial', 'Multiple expanding spirals from center'),
87
+ createPrimitive('rays', 'radial', 'Lines emanating from center with noise length'),
88
+ createPrimitive('orbits', 'radial', 'Wobbling orbital rings around center'),
89
+ createPrimitive('rings', 'radial', 'Alternating concentric rings with pulse'),
90
+ createPrimitive('arcs', 'radial', 'Random partial circles at varying radii'),
91
+ createPrimitive('radialLines', 'radial', 'Lines from inner to outer radius'),
92
+ createPrimitive('petals', 'radial', 'Flower petal pattern radiating from center'),
93
+ createPrimitive('flow', 'flow', 'Particle traces following noise-based flow field'),
94
+ createPrimitive('particles', 'flow', 'Scattered particles with motion tails'),
95
+ createPrimitive('bubbles', 'flow', 'Rising floating bubbles with wobble'),
96
+ createPrimitive('crosshatch', 'patterns', 'Cross-hatched shading lines'),
97
+ createPrimitive('chevrons', 'patterns', 'V-shaped wave patterns'),
98
+ createPrimitive('zigzag', 'patterns', 'Zigzag horizontal lines'),
99
+ createPrimitive('weave', 'patterns', 'Interlocking woven pattern'),
100
+ createPrimitive('moire', 'patterns', 'Overlapping circle interference pattern'),
101
+ createPrimitive('curves', 'organic', 'Random bezier curves with animated control points'),
102
+ createPrimitive('noise', 'organic', 'Perlin noise vector field visualization'),
103
+ createPrimitive('mesh', 'organic', 'Deformed triangular mesh with noise displacement'),
104
+ createPrimitive('branches', 'organic', 'Fractal tree branches'),
274
105
  ],
275
106
  background: {
276
107
  color: {
277
108
  type: 'string',
278
109
  required: true,
279
- description: 'Background color (CSS color or named color like "blue", "black", "#1a1a2e")',
110
+ description: 'Background color (CSS color)',
280
111
  },
281
112
  texture: {
282
113
  type: 'enum',
@@ -319,16 +150,34 @@ export function getCapabilities() {
319
150
  },
320
151
  limits: {
321
152
  maxElements: 20,
322
- maxParticles: 5000,
323
- maxDots: 10000,
324
- maxLines: 500,
325
- maxOrbits: 20,
326
- maxGridSize: 100,
153
+ maxCount: 50,
154
+ maxPrimitives: 30,
327
155
  },
328
156
  };
329
157
  }
330
158
  export function getPrimitiveTypes() {
331
- return ['dots', 'lines', 'waves', 'grid', 'flowField', 'orbits'];
159
+ return [
160
+ 'dots', 'lines', 'waves', 'stripes', 'circles', 'grid',
161
+ 'polygons', 'diamonds', 'hexgrid', 'stars', 'concentricSquares',
162
+ 'spirals', 'rays', 'orbits', 'rings', 'arcs', 'radialLines', 'petals',
163
+ 'flow', 'particles', 'bubbles',
164
+ 'crosshatch', 'chevrons', 'zigzag', 'weave', 'moire',
165
+ 'curves', 'noise', 'mesh', 'branches',
166
+ ];
167
+ }
168
+ export function getPrimitivesByCategory() {
169
+ return {
170
+ basic: ['dots', 'lines', 'waves', 'stripes', 'circles', 'grid'],
171
+ geometric: ['polygons', 'diamonds', 'hexgrid', 'stars', 'concentricSquares'],
172
+ radial: ['spirals', 'rays', 'orbits', 'rings', 'arcs', 'radialLines', 'petals'],
173
+ flow: ['flow', 'particles', 'bubbles'],
174
+ patterns: ['crosshatch', 'chevrons', 'zigzag', 'weave', 'moire'],
175
+ organic: ['curves', 'noise', 'mesh', 'branches'],
176
+ };
177
+ }
178
+ export function getPrimitiveInfo(name) {
179
+ const caps = getCapabilities();
180
+ return caps.primitives.find(p => p.name === name) || null;
332
181
  }
333
182
  export function getMotionSources() {
334
183
  return ['none', 'time', 'seed'];
@@ -336,3 +185,6 @@ export function getMotionSources() {
336
185
  export function getBackgroundTextures() {
337
186
  return ['none', 'noise', 'grain'];
338
187
  }
188
+ export function isPrimitiveValid(name) {
189
+ return getPrimitiveTypes().includes(name);
190
+ }
@@ -1,7 +1,8 @@
1
1
  /**
2
- * @nexart/ui-renderer v0.3.0 - System Compiler
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 {
@@ -1 +1 @@
1
- {"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;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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AAM,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.3.0 - System Compiler
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.3.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
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * @nexart/ui-renderer
3
- * Version: 0.4.0
3
+ * Version: 0.7.0
4
4
  *
5
5
  * Opinionated Generative Design System SDK for NexArt Protocol
6
+ * Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0)
6
7
  *
7
8
  * ⚠️ IMPORTANT DISCLAIMER
8
9
  *
@@ -24,6 +25,11 @@
24
25
  * - Beauty by default > unlimited freedom
25
26
  * - Aesthetic guardrails ensure pleasing output automatically
26
27
  * - All elements compile to Code Mode for deterministic rendering
28
+ *
29
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
30
+ * Primitives are helper generators that compile to Code Mode sketches.
31
+ * They exist for convenience and rapid prototyping only.
32
+ * The canonical output is always the compiled Code Mode source.
27
33
  */
28
34
  export { createSystem, validateSystem, isCodeModeSystem, isDeclarativeSystem, isUnifiedModeSystem } from './system';
29
35
  export { compileSystem, serializeSystem } from './compiler';
@@ -33,13 +39,14 @@ export { renderUnifiedSystem } from './preview/unified-renderer';
33
39
  export { compileBackgroundPreset, getPaletteColors } from './presets/backgrounds';
34
40
  export { compilePrimitive } from './presets/primitives';
35
41
  export { wrapSketch, validateSketchSafety } from './presets/sketch-wrapper';
36
- export { getCapabilities, getPrimitiveTypes, getMotionSources, getBackgroundTextures, } from './capabilities';
42
+ export { getCapabilities, getPrimitiveTypes, getPrimitivesByCategory, getPrimitiveInfo, isPrimitiveValid, getMotionSources, getBackgroundTextures, } from './capabilities';
37
43
  export type { NexArtSystemInput, NexArtSystem, DeclarativeSystemInput, DeclarativeSystem, CodeSystem, NexArtCodeSystem, UnifiedSystemInput, UnifiedSystem, UnifiedElement, BackgroundElement, PrimitiveElement, SketchElement, BackgroundPreset, PrimitiveName, ColorPalette, MotionSpeed, StrokeWeightAuto, LoopConfig, DeclarativeElement, SystemElement, DotsElement, LinesElement, WavesElement, GridElement, FlowFieldElement, OrbitsElement, BackgroundConfig, MotionConfig, PreviewOptions, ValidationResult, } from './types';
38
44
  export { AESTHETIC_DEFAULTS, SDK_VERSION as TYPE_SDK_VERSION } from './types';
39
45
  export type { Capabilities, PrimitiveCapability, ParameterSpec, } from './capabilities';
40
- export declare const SDK_VERSION = "0.4.0";
41
- export declare const PROTOCOL_VERSION = "0.4";
46
+ export declare const SDK_VERSION = "0.6.0";
47
+ export declare const PROTOCOL_VERSION = "0.6";
42
48
  export declare const IS_CANONICAL = false;
43
49
  export declare const IS_ARCHIVAL = false;
44
50
  export declare const RENDERER = "@nexart/ui-renderer";
51
+ export declare const PRIMITIVES_ARE_CANONICAL = false;
45
52
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;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,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,E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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,8 +1,9 @@
1
1
  /**
2
2
  * @nexart/ui-renderer
3
- * Version: 0.4.0
3
+ * Version: 0.7.0
4
4
  *
5
5
  * Opinionated Generative Design System SDK for NexArt Protocol
6
+ * Mirrors @nexart/codemode-sdk v1.4.0 (Protocol v1.2.0)
6
7
  *
7
8
  * ⚠️ IMPORTANT DISCLAIMER
8
9
  *
@@ -24,6 +25,11 @@
24
25
  * - Beauty by default > unlimited freedom
25
26
  * - Aesthetic guardrails ensure pleasing output automatically
26
27
  * - All elements compile to Code Mode for deterministic rendering
28
+ *
29
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
30
+ * Primitives are helper generators that compile to Code Mode sketches.
31
+ * They exist for convenience and rapid prototyping only.
32
+ * The canonical output is always the compiled Code Mode source.
27
33
  */
28
34
  export { createSystem, validateSystem, isCodeModeSystem, isDeclarativeSystem, isUnifiedModeSystem } from './system';
29
35
  export { compileSystem, serializeSystem } from './compiler';
@@ -33,10 +39,11 @@ export { renderUnifiedSystem } from './preview/unified-renderer';
33
39
  export { compileBackgroundPreset, getPaletteColors } from './presets/backgrounds';
34
40
  export { compilePrimitive } from './presets/primitives';
35
41
  export { wrapSketch, validateSketchSafety } from './presets/sketch-wrapper';
36
- export { getCapabilities, getPrimitiveTypes, getMotionSources, getBackgroundTextures, } from './capabilities';
42
+ export { getCapabilities, getPrimitiveTypes, getPrimitivesByCategory, getPrimitiveInfo, isPrimitiveValid, getMotionSources, getBackgroundTextures, } from './capabilities';
37
43
  export { AESTHETIC_DEFAULTS, SDK_VERSION as TYPE_SDK_VERSION } from './types';
38
- export const SDK_VERSION = '0.4.0';
39
- export const PROTOCOL_VERSION = '0.4';
44
+ export const SDK_VERSION = '0.6.0';
45
+ export const PROTOCOL_VERSION = '0.6';
40
46
  export const IS_CANONICAL = false;
41
47
  export const IS_ARCHIVAL = false;
42
48
  export const RENDERER = '@nexart/ui-renderer';
49
+ export const PRIMITIVES_ARE_CANONICAL = false;
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/presets/primitives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAsB,MAAM,UAAU,CAAC;AAE5F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsCD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,UAAU,GAAE,MAA0B,GAAG,MAAM,CA2BxG"}
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/presets/primitives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAsB,MAAM,UAAU,CAAC;AAE5F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsCD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,UAAU,GAAE,MAA0B,GAAG,MAAM,CAuExG"}