@use-voltra/core 1.3.0-rc.1

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.
Files changed (100) hide show
  1. package/README.md +30 -0
  2. package/build/cjs/index.js +23 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/jsx/createVoltraComponent.js +21 -0
  5. package/build/cjs/jsx/createVoltraComponent.js.map +1 -0
  6. package/build/cjs/package.json +3 -0
  7. package/build/cjs/payload/short-names.js +331 -0
  8. package/build/cjs/payload/short-names.js.map +1 -0
  9. package/build/cjs/payload.js +26 -0
  10. package/build/cjs/payload.js.map +1 -0
  11. package/build/cjs/renderer/context-registry.js +28 -0
  12. package/build/cjs/renderer/context-registry.js.map +1 -0
  13. package/build/cjs/renderer/dispatcher.js +62 -0
  14. package/build/cjs/renderer/dispatcher.js.map +1 -0
  15. package/build/cjs/renderer/element-registry.js +58 -0
  16. package/build/cjs/renderer/element-registry.js.map +1 -0
  17. package/build/cjs/renderer/flatten-styles.js +23 -0
  18. package/build/cjs/renderer/flatten-styles.js.map +1 -0
  19. package/build/cjs/renderer/index.js +23 -0
  20. package/build/cjs/renderer/index.js.map +1 -0
  21. package/build/cjs/renderer/render-cache.js +19 -0
  22. package/build/cjs/renderer/render-cache.js.map +1 -0
  23. package/build/cjs/renderer/renderer.js +358 -0
  24. package/build/cjs/renderer/renderer.js.map +1 -0
  25. package/build/cjs/renderer/stylesheet-registry.js +47 -0
  26. package/build/cjs/renderer/stylesheet-registry.js.map +1 -0
  27. package/build/cjs/renderer/types.js +3 -0
  28. package/build/cjs/renderer/types.js.map +1 -0
  29. package/build/cjs/styles/index.js +3 -0
  30. package/build/cjs/styles/index.js.map +1 -0
  31. package/build/cjs/styles/types.js +3 -0
  32. package/build/cjs/styles/types.js.map +1 -0
  33. package/build/cjs/types.js +3 -0
  34. package/build/cjs/types.js.map +1 -0
  35. package/build/esm/index.js +7 -0
  36. package/build/esm/index.js.map +1 -0
  37. package/build/esm/jsx/createVoltraComponent.js +16 -0
  38. package/build/esm/jsx/createVoltraComponent.js.map +1 -0
  39. package/build/esm/package.json +3 -0
  40. package/build/esm/payload/short-names.js +326 -0
  41. package/build/esm/payload/short-names.js.map +1 -0
  42. package/build/esm/payload.js +22 -0
  43. package/build/esm/payload.js.map +1 -0
  44. package/build/esm/renderer/context-registry.js +24 -0
  45. package/build/esm/renderer/context-registry.js.map +1 -0
  46. package/build/esm/renderer/dispatcher.js +54 -0
  47. package/build/esm/renderer/dispatcher.js.map +1 -0
  48. package/build/esm/renderer/element-registry.js +53 -0
  49. package/build/esm/renderer/element-registry.js.map +1 -0
  50. package/build/esm/renderer/flatten-styles.js +19 -0
  51. package/build/esm/renderer/flatten-styles.js.map +1 -0
  52. package/build/esm/renderer/index.js +8 -0
  53. package/build/esm/renderer/index.js.map +1 -0
  54. package/build/esm/renderer/render-cache.js +15 -0
  55. package/build/esm/renderer/render-cache.js.map +1 -0
  56. package/build/esm/renderer/renderer.js +351 -0
  57. package/build/esm/renderer/renderer.js.map +1 -0
  58. package/build/esm/renderer/stylesheet-registry.js +43 -0
  59. package/build/esm/renderer/stylesheet-registry.js.map +1 -0
  60. package/build/esm/renderer/types.js +2 -0
  61. package/build/esm/renderer/types.js.map +1 -0
  62. package/build/esm/styles/index.js +2 -0
  63. package/build/esm/styles/index.js.map +1 -0
  64. package/build/esm/styles/types.js +2 -0
  65. package/build/esm/styles/types.js.map +1 -0
  66. package/build/esm/types.js +2 -0
  67. package/build/esm/types.js.map +1 -0
  68. package/build/types/index.d.ts +7 -0
  69. package/build/types/index.d.ts.map +1 -0
  70. package/build/types/jsx/createVoltraComponent.d.ts +12 -0
  71. package/build/types/jsx/createVoltraComponent.d.ts.map +1 -0
  72. package/build/types/payload/short-names.d.ts +5 -0
  73. package/build/types/payload/short-names.d.ts.map +1 -0
  74. package/build/types/payload.d.ts +2 -0
  75. package/build/types/payload.d.ts.map +1 -0
  76. package/build/types/renderer/context-registry.d.ts +13 -0
  77. package/build/types/renderer/context-registry.d.ts.map +1 -0
  78. package/build/types/renderer/dispatcher.d.ts +35 -0
  79. package/build/types/renderer/dispatcher.d.ts.map +1 -0
  80. package/build/types/renderer/element-registry.d.ts +10 -0
  81. package/build/types/renderer/element-registry.d.ts.map +1 -0
  82. package/build/types/renderer/flatten-styles.d.ts +5 -0
  83. package/build/types/renderer/flatten-styles.d.ts.map +1 -0
  84. package/build/types/renderer/index.d.ts +9 -0
  85. package/build/types/renderer/index.d.ts.map +1 -0
  86. package/build/types/renderer/render-cache.d.ts +6 -0
  87. package/build/types/renderer/render-cache.d.ts.map +1 -0
  88. package/build/types/renderer/renderer.d.ts +26 -0
  89. package/build/types/renderer/renderer.d.ts.map +1 -0
  90. package/build/types/renderer/stylesheet-registry.d.ts +6 -0
  91. package/build/types/renderer/stylesheet-registry.d.ts.map +1 -0
  92. package/build/types/renderer/types.d.ts +4 -0
  93. package/build/types/renderer/types.d.ts.map +1 -0
  94. package/build/types/styles/index.d.ts +2 -0
  95. package/build/types/styles/index.d.ts.map +1 -0
  96. package/build/types/styles/types.d.ts +8 -0
  97. package/build/types/styles/types.d.ts.map +1 -0
  98. package/build/types/types.d.ts +36 -0
  99. package/build/types/types.d.ts.map +1 -0
  100. package/package.json +52 -0
@@ -0,0 +1,326 @@
1
+ // 🤖 AUTO-GENERATED from data/components.json
2
+ // DO NOT EDIT MANUALLY - Changes will be overwritten
3
+ // Schema version: 1.0.0
4
+ export const NAME_TO_SHORT = {
5
+ absolutePosition: 'ap',
6
+ alignItems: 'ai',
7
+ alignment: 'al',
8
+ alignSelf: 'as',
9
+ aspectRatio: 'ar',
10
+ assetName: 'an',
11
+ background: 'bkg',
12
+ backgroundColor: 'bg',
13
+ backgroundStyle: 'bgs',
14
+ base64: 'b64',
15
+ border: 'bd',
16
+ borderColor: 'bc',
17
+ borderRadius: 'br',
18
+ borderWidth: 'bw',
19
+ bottom: 'b',
20
+ buttonStyle: 'bs',
21
+ checked: 'chk',
22
+ clipped: 'clip',
23
+ color: 'c',
24
+ colors: 'cls',
25
+ contentAlignment: 'ca',
26
+ contentColor: 'cc',
27
+ contentDescription: 'cdesc',
28
+ cornerRadius: 'cr',
29
+ countDown: 'cd',
30
+ currentValueLabel: 'cvl',
31
+ deepLinkUrl: 'dlu',
32
+ defaultValue: 'dv',
33
+ destination: 'dest',
34
+ direction: 'dir',
35
+ dither: 'dth',
36
+ durationMs: 'dur',
37
+ enabled: 'en',
38
+ endAtMs: 'end',
39
+ endPoint: 'ep',
40
+ fallback: 'flb',
41
+ fillMaxHeight: 'fmh',
42
+ fillMaxWidth: 'fmw',
43
+ fixedSizeHorizontal: 'fsh',
44
+ fixedSizeVertical: 'fsv',
45
+ flex: 'fl',
46
+ flexBasis: 'fb',
47
+ flexDirection: 'fdir',
48
+ flexGrow: 'fg',
49
+ flexGrowWidth: 'fgw',
50
+ flexShrink: 'fk',
51
+ font: 'fnt',
52
+ fontFamily: 'ff',
53
+ fontSize: 'fs',
54
+ fontVariant: 'fvar',
55
+ fontWeight: 'fw',
56
+ foregroundStyle: 'fgs',
57
+ foregroundStyleScale: 'fss',
58
+ frame: 'f',
59
+ gap: 'g',
60
+ gaugeStyle: 'gs',
61
+ glassEffect: 'ge',
62
+ height: 'h',
63
+ horizontalAlignment: 'halig',
64
+ horizontalPadding: 'hp',
65
+ icon: 'ic',
66
+ id: 'id',
67
+ italic: 'it',
68
+ justifyContent: 'jc',
69
+ kerning: 'kern',
70
+ label: 'lbl',
71
+ layout: 'ly',
72
+ layoutPriority: 'lp',
73
+ left: 'l',
74
+ legendVisibility: 'lgv',
75
+ letterSpacing: 'ls',
76
+ lineHeight: 'lh',
77
+ lineLimit: 'll',
78
+ lineSpacing: 'lsp',
79
+ lineWidth: 'lw',
80
+ margin: 'm',
81
+ marginBottom: 'mb',
82
+ marginHorizontal: 'mh',
83
+ marginLeft: 'ml',
84
+ marginRight: 'mr',
85
+ marginTop: 'mt',
86
+ marginVertical: 'mv',
87
+ marks: 'mrk',
88
+ maskElement: 'me',
89
+ maxHeight: 'maxh',
90
+ maximumValue: 'max',
91
+ maximumValueLabel: 'maxl',
92
+ maxLines: 'mxl',
93
+ maxWidth: 'maxw',
94
+ minHeight: 'minh',
95
+ minimumValue: 'min',
96
+ minimumValueLabel: 'minvl',
97
+ minLength: 'minl',
98
+ minWidth: 'minw',
99
+ monospacedDigit: 'md',
100
+ multilineTextAlignment: 'mta',
101
+ name: 'n',
102
+ numberOfLines: 'nol',
103
+ offset: 'off',
104
+ offsetX: 'ox',
105
+ offsetY: 'oy',
106
+ opacity: 'op',
107
+ overflow: 'ov',
108
+ padding: 'pad',
109
+ paddingBottom: 'pb',
110
+ paddingHorizontal: 'ph',
111
+ paddingLeft: 'pl',
112
+ paddingRight: 'pr',
113
+ paddingTop: 'pt',
114
+ paddingVertical: 'pv',
115
+ position: 'pos',
116
+ progressColor: 'pc',
117
+ resizeMode: 'rm',
118
+ right: 'r',
119
+ rotationEffect: 're',
120
+ scale: 'sc',
121
+ scaleEffect: 'sce',
122
+ shadow: 'sh',
123
+ shadowColor: 'shc',
124
+ shadowOffset: 'sho',
125
+ shadowOpacity: 'shop',
126
+ shadowRadius: 'shr',
127
+ showHours: 'shrs',
128
+ size: 'sz',
129
+ smallCaps: 'smc',
130
+ source: 'src',
131
+ spacing: 'sp',
132
+ startAtMs: 'start',
133
+ startPoint: 'stp',
134
+ stops: 'sts',
135
+ strikethrough: 'st',
136
+ style: 's',
137
+ systemImage: 'si',
138
+ text: 'txt',
139
+ textAlign: 'ta',
140
+ textDecorationLine: 'tdl',
141
+ textStyle: 'ts',
142
+ textTemplates: 'tt',
143
+ thumb: 'th',
144
+ tint: 'tnt',
145
+ tintColor: 'tc',
146
+ title: 'ttl',
147
+ top: 't',
148
+ trackColor: 'trc',
149
+ transform: 'tf',
150
+ type: 'typ',
151
+ underline: 'ul',
152
+ value: 'v',
153
+ verticalAlignment: 'valig',
154
+ weight: 'wt',
155
+ width: 'w',
156
+ xAxisGridStyle: 'xgs',
157
+ xAxisVisibility: 'xav',
158
+ yAxisGridStyle: 'ygs',
159
+ yAxisVisibility: 'yav',
160
+ zIndex: 'zi',
161
+ };
162
+ export const SHORT_TO_NAME = {
163
+ ap: 'absolutePosition',
164
+ ai: 'alignItems',
165
+ al: 'alignment',
166
+ as: 'alignSelf',
167
+ ar: 'aspectRatio',
168
+ an: 'assetName',
169
+ bkg: 'background',
170
+ bg: 'backgroundColor',
171
+ bgs: 'backgroundStyle',
172
+ b64: 'base64',
173
+ bd: 'border',
174
+ bc: 'borderColor',
175
+ br: 'borderRadius',
176
+ bw: 'borderWidth',
177
+ b: 'bottom',
178
+ bs: 'buttonStyle',
179
+ chk: 'checked',
180
+ clip: 'clipped',
181
+ c: 'color',
182
+ cls: 'colors',
183
+ ca: 'contentAlignment',
184
+ cc: 'contentColor',
185
+ cdesc: 'contentDescription',
186
+ cr: 'cornerRadius',
187
+ cd: 'countDown',
188
+ cvl: 'currentValueLabel',
189
+ dlu: 'deepLinkUrl',
190
+ dv: 'defaultValue',
191
+ dest: 'destination',
192
+ dir: 'direction',
193
+ dth: 'dither',
194
+ dur: 'durationMs',
195
+ en: 'enabled',
196
+ end: 'endAtMs',
197
+ ep: 'endPoint',
198
+ flb: 'fallback',
199
+ fmh: 'fillMaxHeight',
200
+ fmw: 'fillMaxWidth',
201
+ fsh: 'fixedSizeHorizontal',
202
+ fsv: 'fixedSizeVertical',
203
+ fl: 'flex',
204
+ fb: 'flexBasis',
205
+ fdir: 'flexDirection',
206
+ fg: 'flexGrow',
207
+ fgw: 'flexGrowWidth',
208
+ fk: 'flexShrink',
209
+ fnt: 'font',
210
+ ff: 'fontFamily',
211
+ fs: 'fontSize',
212
+ fvar: 'fontVariant',
213
+ fw: 'fontWeight',
214
+ fgs: 'foregroundStyle',
215
+ fss: 'foregroundStyleScale',
216
+ f: 'frame',
217
+ g: 'gap',
218
+ gs: 'gaugeStyle',
219
+ ge: 'glassEffect',
220
+ h: 'height',
221
+ halig: 'horizontalAlignment',
222
+ hp: 'horizontalPadding',
223
+ ic: 'icon',
224
+ id: 'id',
225
+ it: 'italic',
226
+ jc: 'justifyContent',
227
+ kern: 'kerning',
228
+ lbl: 'label',
229
+ ly: 'layout',
230
+ lp: 'layoutPriority',
231
+ l: 'left',
232
+ lgv: 'legendVisibility',
233
+ ls: 'letterSpacing',
234
+ lh: 'lineHeight',
235
+ ll: 'lineLimit',
236
+ lsp: 'lineSpacing',
237
+ lw: 'lineWidth',
238
+ m: 'margin',
239
+ mb: 'marginBottom',
240
+ mh: 'marginHorizontal',
241
+ ml: 'marginLeft',
242
+ mr: 'marginRight',
243
+ mt: 'marginTop',
244
+ mv: 'marginVertical',
245
+ mrk: 'marks',
246
+ me: 'maskElement',
247
+ maxh: 'maxHeight',
248
+ max: 'maximumValue',
249
+ maxl: 'maximumValueLabel',
250
+ mxl: 'maxLines',
251
+ maxw: 'maxWidth',
252
+ minh: 'minHeight',
253
+ min: 'minimumValue',
254
+ minvl: 'minimumValueLabel',
255
+ minl: 'minLength',
256
+ minw: 'minWidth',
257
+ md: 'monospacedDigit',
258
+ mta: 'multilineTextAlignment',
259
+ n: 'name',
260
+ nol: 'numberOfLines',
261
+ off: 'offset',
262
+ ox: 'offsetX',
263
+ oy: 'offsetY',
264
+ op: 'opacity',
265
+ ov: 'overflow',
266
+ pad: 'padding',
267
+ pb: 'paddingBottom',
268
+ ph: 'paddingHorizontal',
269
+ pl: 'paddingLeft',
270
+ pr: 'paddingRight',
271
+ pt: 'paddingTop',
272
+ pv: 'paddingVertical',
273
+ pos: 'position',
274
+ pc: 'progressColor',
275
+ rm: 'resizeMode',
276
+ r: 'right',
277
+ re: 'rotationEffect',
278
+ sc: 'scale',
279
+ sce: 'scaleEffect',
280
+ sh: 'shadow',
281
+ shc: 'shadowColor',
282
+ sho: 'shadowOffset',
283
+ shop: 'shadowOpacity',
284
+ shr: 'shadowRadius',
285
+ shrs: 'showHours',
286
+ sz: 'size',
287
+ smc: 'smallCaps',
288
+ src: 'source',
289
+ sp: 'spacing',
290
+ start: 'startAtMs',
291
+ stp: 'startPoint',
292
+ sts: 'stops',
293
+ st: 'strikethrough',
294
+ s: 'style',
295
+ si: 'systemImage',
296
+ txt: 'text',
297
+ ta: 'textAlign',
298
+ tdl: 'textDecorationLine',
299
+ ts: 'textStyle',
300
+ tt: 'textTemplates',
301
+ th: 'thumb',
302
+ tnt: 'tint',
303
+ tc: 'tintColor',
304
+ ttl: 'title',
305
+ t: 'top',
306
+ trc: 'trackColor',
307
+ tf: 'transform',
308
+ typ: 'type',
309
+ ul: 'underline',
310
+ v: 'value',
311
+ valig: 'verticalAlignment',
312
+ wt: 'weight',
313
+ w: 'width',
314
+ xgs: 'xAxisGridStyle',
315
+ xav: 'xAxisVisibility',
316
+ ygs: 'yAxisGridStyle',
317
+ yav: 'yAxisVisibility',
318
+ zi: 'zIndex',
319
+ };
320
+ export function shorten(name) {
321
+ return NAME_TO_SHORT[name] ?? name;
322
+ }
323
+ export function expand(short) {
324
+ return SHORT_TO_NAME[short] ?? short;
325
+ }
326
+ //# sourceMappingURL=short-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"short-names.js","sourceRoot":"","sources":["../../../src/payload/short-names.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,qDAAqD;AACrD,wBAAwB;AAExB,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,gBAAgB,EAAE,IAAI;IACtB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,KAAK;IACjB,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,KAAK;IACtB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,GAAG;IACX,WAAW,EAAE,IAAI;IACjB,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CAAC"}
@@ -0,0 +1,22 @@
1
+ const MAX_ACTIVITYKIT_BYTES = 4096;
2
+ const EFFECTIVE_JSON_BUDGET = 3345;
3
+ const utf8ByteLength = (s) => {
4
+ try {
5
+ if (typeof TextEncoder !== 'undefined')
6
+ return new TextEncoder().encode(s).length;
7
+ }
8
+ catch { }
9
+ try {
10
+ return encodeURI(s).replace(/%[A-F\d]{2}/gi, 'X').length;
11
+ }
12
+ catch {
13
+ return s.length;
14
+ }
15
+ };
16
+ export const ensurePayloadWithinBudget = (compressedPayload) => {
17
+ const bytes = utf8ByteLength(compressedPayload);
18
+ if (bytes > EFFECTIVE_JSON_BUDGET) {
19
+ throw new Error(`[Voltra] Compressed payload size ${bytes}B exceeds safe budget ${EFFECTIVE_JSON_BUDGET}B (ActivityKit hard cap ${MAX_ACTIVITYKIT_BYTES}B). You need to reduce the complexity of your UI.`);
20
+ }
21
+ };
22
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../src/payload.ts"],"names":[],"mappings":"AAAA,MAAM,qBAAqB,GAAG,IAAI,CAAA;AAClC,MAAM,qBAAqB,GAAG,IAAI,CAAA;AAElC,MAAM,cAAc,GAAG,CAAC,CAAS,EAAU,EAAE;IAC3C,IAAI,CAAC;QACH,IAAI,OAAO,WAAW,KAAK,WAAW;YAAE,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IACnF,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,MAAM,CAAA;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC,MAAM,CAAA;IACjB,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,iBAAyB,EAAQ,EAAE;IAC3E,MAAM,KAAK,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAE/C,IAAI,KAAK,GAAG,qBAAqB,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,oCAAoC,KAAK,yBAAyB,qBAAqB,2BAA2B,qBAAqB,mDAAmD,CAC3L,CAAA;IACH,CAAC;AACH,CAAC,CAAA"}
@@ -0,0 +1,24 @@
1
+ export const getContextRegistry = () => {
2
+ const contextMap = new Map();
3
+ return {
4
+ pushProvider: (context, value) => {
5
+ const stack = contextMap.get(context) || [];
6
+ stack.push(value);
7
+ contextMap.set(context, stack);
8
+ },
9
+ popProvider: (context) => {
10
+ const stack = contextMap.get(context);
11
+ if (stack) {
12
+ stack.pop();
13
+ }
14
+ },
15
+ readContext: (context) => {
16
+ const stack = contextMap.get(context);
17
+ if (stack && stack.length > 0) {
18
+ return stack[stack.length - 1];
19
+ }
20
+ return context._currentValue;
21
+ },
22
+ };
23
+ };
24
+ //# sourceMappingURL=context-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-registry.js","sourceRoot":"","sources":["../../../src/renderer/context-registry.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAoB,EAAE;IACtD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAE5B,OAAO;QACL,YAAY,EAAE,CAAI,OAAmB,EAAE,KAAQ,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;YAC3C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACjB,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAChC,CAAC;QACD,WAAW,EAAE,CAAI,OAAmB,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACrC,IAAI,KAAK,EAAE,CAAC;gBACV,KAAK,CAAC,GAAG,EAAE,CAAA;YACb,CAAC;QACH,CAAC;QACD,WAAW,EAAE,CAAI,OAAmB,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YAErC,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC9B,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YAChC,CAAC;YAED,OAAO,OAAO,CAAC,aAAa,CAAA;QAC9B,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ const REACT_CONTEXT_TYPE = Symbol.for('react.context');
3
+ const REACT_MEMO_CACHE_SENTINEL = Symbol.for('react.memo_cache_sentinel');
4
+ export const getHooksDispatcher = (registry) => ({
5
+ useContext: (context) => registry.readContext(context),
6
+ use: (usable) => {
7
+ if (usable !== null &&
8
+ typeof usable === 'object' &&
9
+ usable.$$typeof === REACT_CONTEXT_TYPE) {
10
+ return registry.readContext(usable);
11
+ }
12
+ if (usable !== null &&
13
+ (typeof usable === 'object' || typeof usable === 'function') &&
14
+ typeof usable.then === 'function') {
15
+ throw new Error('use() with promises is not supported in Voltra. Async data fetching is not available in this synchronous renderer.');
16
+ }
17
+ throw new Error(`An unsupported type was passed to use(): ${String(usable)}`);
18
+ },
19
+ useState: (initial) => [
20
+ typeof initial === 'function' ? initial() : initial,
21
+ () => { },
22
+ ],
23
+ useReducer: (_, initialArg, init) => {
24
+ const state = init ? init(initialArg) : initialArg;
25
+ return [state, () => { }];
26
+ },
27
+ useMemo: (factory) => factory(),
28
+ useCallback: (cb) => cb,
29
+ useRef: (initial) => ({ current: initial }),
30
+ useEffect: () => { },
31
+ useLayoutEffect: () => { },
32
+ useInsertionEffect: () => { },
33
+ useId: () => Math.random().toString(36).substr(2, 9),
34
+ useDebugValue: () => { },
35
+ useImperativeHandle: () => { },
36
+ useDeferredValue: (value) => value,
37
+ useTransition: () => [false, (func) => func()],
38
+ useSyncExternalStore: (_, getSnapshot) => getSnapshot(),
39
+ useActionState: (_, initialState, _permalink) => [initialState, () => { }, false],
40
+ useOptimistic: (passthrough) => [passthrough, () => { }],
41
+ useEffectEvent: (callback) => callback,
42
+ useMemoCache: (size) => {
43
+ const data = new Array(size);
44
+ for (let i = 0; i < size; i++) {
45
+ data[i] = REACT_MEMO_CACHE_SENTINEL;
46
+ }
47
+ return data;
48
+ },
49
+ useCacheRefresh: () => () => { },
50
+ });
51
+ export const getReactCurrentDispatcher = () => {
52
+ return React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
53
+ };
54
+ //# sourceMappingURL=dispatcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../../../src/renderer/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAA;AAI7E,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;AACtD,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;AAoCzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,QAAyB,EAAwB,EAAE,CAAC,CAAC;IACtF,UAAU,EAAE,CAAI,OAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC;IACrE,GAAG,EAAE,CAAI,MAAuB,EAAK,EAAE;QACrC,IACE,MAAM,KAAK,IAAI;YACf,OAAO,MAAM,KAAK,QAAQ;YACzB,MAAgC,CAAC,QAAQ,KAAK,kBAAkB,EACjE,CAAC;YACD,OAAO,QAAQ,CAAC,WAAW,CAAC,MAA+B,CAAC,CAAA;QAC9D,CAAC;QAED,IACE,MAAM,KAAK,IAAI;YACf,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK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E,EAAE,CAAC,KAAK;IACxC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,IAAgB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC,WAAW,EAAE;IACvD,cAAc,EAAE,CAAI,CAAU,EAAE,YAAe,EAAE,UAAmB,EAAE,EAAE,CACtE,CAAC,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,KAAK,CAA6B;IAC7D,aAAa,EAAE,CAAI,WAAc,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC,CAAmC;IAC/F,cAAc,EAAE,CAAqB,QAAW,EAAK,EAAE,CAAC,QAAQ;IAChE,YAAY,EAAE,CAAC,IAAY,EAAE,EAAE;QAC7B,MAAM,IAAI,GAAG,IAAI,KAAK,CAAU,IAAI,CAAC,CAAA;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,CAAC,GAAG,yBAAyB,CAAA;QACrC,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IACD,eAAe,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;CAChC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAoB,EAAE;IAC7D,OAAO,KAAK,CAAC,+DAA+D,CAAA;AAC9E,CAAC,CAAA"}
@@ -0,0 +1,53 @@
1
+ export const createElementRegistry = () => {
2
+ const elementToIndex = new Map();
3
+ const elements = [];
4
+ return {
5
+ isRegistered: (element) => {
6
+ return elementToIndex.get(element);
7
+ },
8
+ register: (element, rendered) => {
9
+ const index = elements.length;
10
+ elementToIndex.set(element, index);
11
+ elements.push(rendered);
12
+ return index;
13
+ },
14
+ getElements: () => elements,
15
+ };
16
+ };
17
+ export const preScanForDuplicates = (element) => {
18
+ const seen = new Set();
19
+ const duplicates = new Set();
20
+ const scan = (node) => {
21
+ if (node === null || node === undefined || typeof node !== 'object') {
22
+ return;
23
+ }
24
+ if (Array.isArray(node)) {
25
+ for (const child of node) {
26
+ scan(child);
27
+ }
28
+ return;
29
+ }
30
+ if (seen.has(node)) {
31
+ duplicates.add(node);
32
+ }
33
+ else {
34
+ seen.add(node);
35
+ }
36
+ if ('props' in node) {
37
+ const props = node.props;
38
+ if (props) {
39
+ if (props.children !== undefined) {
40
+ scan(props.children);
41
+ }
42
+ for (const [key, value] of Object.entries(props)) {
43
+ if (key !== 'children' && value && typeof value === 'object' && 'type' in value && 'props' in value) {
44
+ scan(value);
45
+ }
46
+ }
47
+ }
48
+ }
49
+ };
50
+ scan(element);
51
+ return duplicates;
52
+ };
53
+ //# sourceMappingURL=element-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-registry.js","sourceRoot":"","sources":["../../../src/renderer/element-registry.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAoB,EAAE;IACzD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAqB,CAAA;IACnD,MAAM,QAAQ,GAAqB,EAAE,CAAA;IAErC,OAAO;QACL,YAAY,EAAE,CAAC,OAAkB,EAAsB,EAAE;YACvD,OAAO,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACpC,CAAC;QACD,QAAQ,EAAE,CAAC,OAAkB,EAAE,QAAwB,EAAU,EAAE;YACjE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAA;YAC7B,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;YAClC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACvB,OAAO,KAAK,CAAA;QACd,CAAC;QACD,WAAW,EAAE,GAAqB,EAAE,CAAC,QAAQ;KAC9C,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAA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AC;QACH,CAAC;IACH,CAAC,CAAA;IAED,IAAI,CAAC,OAAO,CAAC,CAAA;IACb,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA"}
@@ -0,0 +1,19 @@
1
+ export const flattenStyle = (style) => {
2
+ if (!style) {
3
+ return null;
4
+ }
5
+ if (!Array.isArray(style)) {
6
+ return style;
7
+ }
8
+ const result = {};
9
+ for (let i = 0, styleLength = style.length; i < styleLength; ++i) {
10
+ const computedStyle = flattenStyle(style[i]);
11
+ if (computedStyle) {
12
+ for (const key in computedStyle) {
13
+ result[key] = computedStyle[key];
14
+ }
15
+ }
16
+ }
17
+ return result;
18
+ };
19
+ //# sourceMappingURL=flatten-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-styles.js","sourceRoot":"","sources":["../../../src/renderer/flatten-styles.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,YAAY,GAAG,CAA+B,KAA2B,EAA2B,EAAE;IACjH,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAyB,CAAA;IAClC,CAAC;IAED,MAAM,MAAM,GAA4B,EAAE,CAAA;IAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC;QACjE,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;QAC5C,IAAI,aAAa,EAAE,CAAC;YAClB,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;gBAChC,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;YAClC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAA0B,CAAA;AACnC,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ export { getContextRegistry } from './context-registry.js';
2
+ export { getHooksDispatcher, getReactCurrentDispatcher } from './dispatcher.js';
3
+ export { createElementRegistry, preScanForDuplicates } from './element-registry.js';
4
+ export { flattenStyle } from './flatten-styles.js';
5
+ export { getRenderCache } from './render-cache.js';
6
+ export { createVoltraRenderer, renderVariantToJson, transformProps, VOLTRA_PAYLOAD_VERSION, } from './renderer.js';
7
+ export { createStylesheetRegistry } from './stylesheet-registry.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC/E,OAAO,EAAE,qBAAqB,EAAwB,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAoB,MAAM,mBAAmB,CAAA;AACpE,OAAO,EAEL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,sBAAsB,GACvB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,wBAAwB,EAA2B,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,15 @@
1
+ export const getRenderCache = (renderer) => {
2
+ const renderCache = new Map();
3
+ return {
4
+ getOrRender: (node) => {
5
+ const cached = renderCache.get(node);
6
+ if (cached) {
7
+ return cached;
8
+ }
9
+ const result = renderer(node);
10
+ renderCache.set(node, result);
11
+ return result;
12
+ },
13
+ };
14
+ };
15
+ //# sourceMappingURL=render-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-cache.js","sourceRoot":"","sources":["../../../src/renderer/render-cache.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAA+B,EAAe,EAAE;IAC7E,MAAM,WAAW,GAAG,IAAI,GAAG,EAA6B,CAAA;IAExD,OAAO;QACL,WAAW,EAAE,CAAC,IAAe,EAAkB,EAAE;YAC/C,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAEpC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,MAAM,CAAA;YACf,CAAC;YAED,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;YAC7B,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;YAE7B,OAAO,MAAM,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}