@nexart/ui-renderer 0.3.1 → 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.
@@ -1,13 +1,27 @@
1
1
  /**
2
- * @nexart/ui-renderer v0.2.0 - Capabilities Discovery
2
+ * @nexart/ui-renderer v0.6.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
+ *
7
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
8
+ * Primitives are helper generators that compile to Code Mode sketches.
9
+ * They exist for convenience and rapid prototyping only.
10
+ * The canonical output is always the compiled Code Mode source.
6
11
  */
7
12
  export interface PrimitiveCapability {
8
- type: string;
13
+ name: string;
14
+ category: 'basic' | 'geometric' | 'radial' | 'flow' | 'patterns' | 'organic';
9
15
  description: string;
10
- parameters: Record<string, ParameterSpec>;
16
+ compilesTo: 'codemode';
17
+ isCanonical: false;
18
+ parameters: {
19
+ count: ParameterSpec;
20
+ color: ParameterSpec;
21
+ opacity: ParameterSpec;
22
+ strokeWeight: ParameterSpec;
23
+ motion: ParameterSpec;
24
+ };
11
25
  }
12
26
  export interface ParameterSpec {
13
27
  type: 'number' | 'string' | 'enum' | 'tuple' | 'boolean';
@@ -24,6 +38,13 @@ export interface Capabilities {
24
38
  isCanonical: false;
25
39
  isArchival: false;
26
40
  renderer: '@nexart/ui-renderer';
41
+ primitivesMeta: {
42
+ notice: string;
43
+ count: number;
44
+ categories: string[];
45
+ compilesTo: 'codemode';
46
+ isCanonical: false;
47
+ };
27
48
  primitives: PrimitiveCapability[];
28
49
  background: {
29
50
  color: ParameterSpec;
@@ -40,15 +61,15 @@ export interface Capabilities {
40
61
  };
41
62
  limits: {
42
63
  maxElements: number;
43
- maxParticles: number;
44
- maxDots: number;
45
- maxLines: number;
46
- maxOrbits: number;
47
- maxGridSize: number;
64
+ maxCount: number;
65
+ maxPrimitives: number;
48
66
  };
49
67
  }
50
68
  export declare function getCapabilities(): Capabilities;
51
69
  export declare function getPrimitiveTypes(): string[];
70
+ export declare function getPrimitivesByCategory(): Record<string, string[]>;
71
+ export declare function getPrimitiveInfo(name: string): PrimitiveCapability | null;
52
72
  export declare function getMotionSources(): string[];
53
73
  export declare function getBackgroundTextures(): string[];
74
+ export declare function isPrimitiveValid(name: string): boolean;
54
75
  //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC3C;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,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,E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,gBAAgB,IAAI,MAAM,EAAE,CAE3C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD"}
@@ -1,282 +1,112 @@
1
1
  /**
2
- * @nexart/ui-renderer v0.2.0 - Capabilities Discovery
2
+ * @nexart/ui-renderer v0.6.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
+ *
7
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
8
+ * Primitives are helper generators that compile to Code Mode sketches.
9
+ * They exist for convenience and rapid prototyping only.
10
+ * The canonical output is always the compiled Code Mode source.
6
11
  */
12
+ const SHARED_PARAMS = {
13
+ count: {
14
+ type: 'number',
15
+ required: false,
16
+ description: 'Element count (clamped to 3-50)',
17
+ min: 3,
18
+ max: 50,
19
+ default: 12,
20
+ },
21
+ color: {
22
+ type: 'string',
23
+ required: false,
24
+ description: 'CSS color string (e.g., "#ffffff", "rgb(255,255,255)")',
25
+ default: 'foreground color from palette',
26
+ },
27
+ opacity: {
28
+ type: 'number',
29
+ required: false,
30
+ description: 'Opacity from 0.1 to 1',
31
+ min: 0.1,
32
+ max: 1,
33
+ default: 1,
34
+ },
35
+ strokeWeight: {
36
+ type: 'enum',
37
+ required: false,
38
+ description: 'Stroke thickness preset or number (0.5-4)',
39
+ options: ['auto', 'thin', 'medium', 'thick'],
40
+ default: 'auto',
41
+ },
42
+ motion: {
43
+ type: 'enum',
44
+ required: false,
45
+ description: 'Animation speed preset',
46
+ options: ['slow', 'medium', 'fast'],
47
+ default: 'slow',
48
+ },
49
+ };
50
+ function createPrimitive(name, category, description) {
51
+ return {
52
+ name,
53
+ category,
54
+ description,
55
+ compilesTo: 'codemode',
56
+ isCanonical: false,
57
+ parameters: { ...SHARED_PARAMS },
58
+ };
59
+ }
7
60
  export function getCapabilities() {
8
61
  return {
9
- version: '0.2.0',
62
+ version: '0.6.0',
10
63
  isCanonical: false,
11
64
  isArchival: false,
12
65
  renderer: '@nexart/ui-renderer',
66
+ primitivesMeta: {
67
+ notice: 'Primitives are helper generators that compile to Code Mode sketches. They are NOT canonical.',
68
+ count: 30,
69
+ categories: ['basic', 'geometric', 'radial', 'flow', 'patterns', 'organic'],
70
+ compilesTo: 'codemode',
71
+ isCanonical: false,
72
+ },
13
73
  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
- },
74
+ createPrimitive('dots', 'basic', 'Grid or random dot patterns with noise-based movement'),
75
+ createPrimitive('lines', 'basic', 'Vertical wavy lines with sinusoidal motion'),
76
+ createPrimitive('waves', 'basic', 'Horizontal wave patterns with phase animation'),
77
+ createPrimitive('stripes', 'basic', 'Simple horizontal stripes with wave offset'),
78
+ createPrimitive('circles', 'basic', 'Concentric pulsing circles from center'),
79
+ createPrimitive('grid', 'basic', 'Rotating square grid with noise-based variation'),
80
+ createPrimitive('polygons', 'geometric', 'Random rotating polygons (3-7 sides)'),
81
+ createPrimitive('diamonds', 'geometric', 'Diamond grid with noise-driven rotation'),
82
+ createPrimitive('hexgrid', 'geometric', 'Honeycomb hexagonal tessellation'),
83
+ createPrimitive('stars', 'geometric', 'Scattered rotating star shapes (5-7 points)'),
84
+ createPrimitive('concentricSquares', 'geometric', 'Nested rotating squares from center'),
85
+ createPrimitive('spirals', 'radial', 'Multiple expanding spirals from center'),
86
+ createPrimitive('rays', 'radial', 'Lines emanating from center with noise length'),
87
+ createPrimitive('orbits', 'radial', 'Wobbling orbital rings around center'),
88
+ createPrimitive('rings', 'radial', 'Alternating concentric rings with pulse'),
89
+ createPrimitive('arcs', 'radial', 'Random partial circles at varying radii'),
90
+ createPrimitive('radialLines', 'radial', 'Lines from inner to outer radius'),
91
+ createPrimitive('petals', 'radial', 'Flower petal pattern radiating from center'),
92
+ createPrimitive('flow', 'flow', 'Particle traces following noise-based flow field'),
93
+ createPrimitive('particles', 'flow', 'Scattered particles with motion tails'),
94
+ createPrimitive('bubbles', 'flow', 'Rising floating bubbles with wobble'),
95
+ createPrimitive('crosshatch', 'patterns', 'Cross-hatched shading lines'),
96
+ createPrimitive('chevrons', 'patterns', 'V-shaped wave patterns'),
97
+ createPrimitive('zigzag', 'patterns', 'Zigzag horizontal lines'),
98
+ createPrimitive('weave', 'patterns', 'Interlocking woven pattern'),
99
+ createPrimitive('moire', 'patterns', 'Overlapping circle interference pattern'),
100
+ createPrimitive('curves', 'organic', 'Random bezier curves with animated control points'),
101
+ createPrimitive('noise', 'organic', 'Perlin noise vector field visualization'),
102
+ createPrimitive('mesh', 'organic', 'Deformed triangular mesh with noise displacement'),
103
+ createPrimitive('branches', 'organic', 'Fractal tree branches'),
274
104
  ],
275
105
  background: {
276
106
  color: {
277
107
  type: 'string',
278
108
  required: true,
279
- description: 'Background color (CSS color or named color like "blue", "black", "#1a1a2e")',
109
+ description: 'Background color (CSS color)',
280
110
  },
281
111
  texture: {
282
112
  type: 'enum',
@@ -319,16 +149,34 @@ export function getCapabilities() {
319
149
  },
320
150
  limits: {
321
151
  maxElements: 20,
322
- maxParticles: 5000,
323
- maxDots: 10000,
324
- maxLines: 500,
325
- maxOrbits: 20,
326
- maxGridSize: 100,
152
+ maxCount: 50,
153
+ maxPrimitives: 30,
327
154
  },
328
155
  };
329
156
  }
330
157
  export function getPrimitiveTypes() {
331
- return ['dots', 'lines', 'waves', 'grid', 'flowField', 'orbits'];
158
+ return [
159
+ 'dots', 'lines', 'waves', 'stripes', 'circles', 'grid',
160
+ 'polygons', 'diamonds', 'hexgrid', 'stars', 'concentricSquares',
161
+ 'spirals', 'rays', 'orbits', 'rings', 'arcs', 'radialLines', 'petals',
162
+ 'flow', 'particles', 'bubbles',
163
+ 'crosshatch', 'chevrons', 'zigzag', 'weave', 'moire',
164
+ 'curves', 'noise', 'mesh', 'branches',
165
+ ];
166
+ }
167
+ export function getPrimitivesByCategory() {
168
+ return {
169
+ basic: ['dots', 'lines', 'waves', 'stripes', 'circles', 'grid'],
170
+ geometric: ['polygons', 'diamonds', 'hexgrid', 'stars', 'concentricSquares'],
171
+ radial: ['spirals', 'rays', 'orbits', 'rings', 'arcs', 'radialLines', 'petals'],
172
+ flow: ['flow', 'particles', 'bubbles'],
173
+ patterns: ['crosshatch', 'chevrons', 'zigzag', 'weave', 'moire'],
174
+ organic: ['curves', 'noise', 'mesh', 'branches'],
175
+ };
176
+ }
177
+ export function getPrimitiveInfo(name) {
178
+ const caps = getCapabilities();
179
+ return caps.primitives.find(p => p.name === name) || null;
332
180
  }
333
181
  export function getMotionSources() {
334
182
  return ['none', 'time', 'seed'];
@@ -336,3 +184,6 @@ export function getMotionSources() {
336
184
  export function getBackgroundTextures() {
337
185
  return ['none', 'noise', 'grain'];
338
186
  }
187
+ export function isPrimitiveValid(name) {
188
+ return getPrimitiveTypes().includes(name);
189
+ }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @nexart/ui-renderer
3
- * Version: 0.4.0
3
+ * Version: 0.6.0
4
4
  *
5
5
  * Opinionated Generative Design System SDK for NexArt Protocol
6
6
  *
@@ -24,6 +24,11 @@
24
24
  * - Beauty by default > unlimited freedom
25
25
  * - Aesthetic guardrails ensure pleasing output automatically
26
26
  * - All elements compile to Code Mode for deterministic rendering
27
+ *
28
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
29
+ * Primitives are helper generators that compile to Code Mode sketches.
30
+ * They exist for convenience and rapid prototyping only.
31
+ * The canonical output is always the compiled Code Mode source.
27
32
  */
28
33
  export { createSystem, validateSystem, isCodeModeSystem, isDeclarativeSystem, isUnifiedModeSystem } from './system';
29
34
  export { compileSystem, serializeSystem } from './compiler';
@@ -33,13 +38,14 @@ export { renderUnifiedSystem } from './preview/unified-renderer';
33
38
  export { compileBackgroundPreset, getPaletteColors } from './presets/backgrounds';
34
39
  export { compilePrimitive } from './presets/primitives';
35
40
  export { wrapSketch, validateSketchSafety } from './presets/sketch-wrapper';
36
- export { getCapabilities, getPrimitiveTypes, getMotionSources, getBackgroundTextures, } from './capabilities';
41
+ export { getCapabilities, getPrimitiveTypes, getPrimitivesByCategory, getPrimitiveInfo, isPrimitiveValid, getMotionSources, getBackgroundTextures, } from './capabilities';
37
42
  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
43
  export { AESTHETIC_DEFAULTS, SDK_VERSION as TYPE_SDK_VERSION } from './types';
39
44
  export type { Capabilities, PrimitiveCapability, ParameterSpec, } from './capabilities';
40
- export declare const SDK_VERSION = "0.4.0";
41
- export declare const PROTOCOL_VERSION = "0.4";
45
+ export declare const SDK_VERSION = "0.6.0";
46
+ export declare const PROTOCOL_VERSION = "0.6";
42
47
  export declare const IS_CANONICAL = false;
43
48
  export declare const IS_ARCHIVAL = false;
44
49
  export declare const RENDERER = "@nexart/ui-renderer";
50
+ export declare const PRIMITIVES_ARE_CANONICAL = false;
45
51
  //# 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,W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AAgB,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,6 +1,6 @@
1
1
  /**
2
2
  * @nexart/ui-renderer
3
- * Version: 0.4.0
3
+ * Version: 0.6.0
4
4
  *
5
5
  * Opinionated Generative Design System SDK for NexArt Protocol
6
6
  *
@@ -24,6 +24,11 @@
24
24
  * - Beauty by default > unlimited freedom
25
25
  * - Aesthetic guardrails ensure pleasing output automatically
26
26
  * - All elements compile to Code Mode for deterministic rendering
27
+ *
28
+ * ⚠️ PRIMITIVES ARE NON-CANONICAL
29
+ * Primitives are helper generators that compile to Code Mode sketches.
30
+ * They exist for convenience and rapid prototyping only.
31
+ * The canonical output is always the compiled Code Mode source.
27
32
  */
28
33
  export { createSystem, validateSystem, isCodeModeSystem, isDeclarativeSystem, isUnifiedModeSystem } from './system';
29
34
  export { compileSystem, serializeSystem } from './compiler';
@@ -33,10 +38,11 @@ export { renderUnifiedSystem } from './preview/unified-renderer';
33
38
  export { compileBackgroundPreset, getPaletteColors } from './presets/backgrounds';
34
39
  export { compilePrimitive } from './presets/primitives';
35
40
  export { wrapSketch, validateSketchSafety } from './presets/sketch-wrapper';
36
- export { getCapabilities, getPrimitiveTypes, getMotionSources, getBackgroundTextures, } from './capabilities';
41
+ export { getCapabilities, getPrimitiveTypes, getPrimitivesByCategory, getPrimitiveInfo, isPrimitiveValid, getMotionSources, getBackgroundTextures, } from './capabilities';
37
42
  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';
43
+ export const SDK_VERSION = '0.6.0';
44
+ export const PROTOCOL_VERSION = '0.6';
40
45
  export const IS_CANONICAL = false;
41
46
  export const IS_ARCHIVAL = false;
42
47
  export const RENDERER = '@nexart/ui-renderer';
48
+ 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"}