@idealyst/tooling 1.2.24 → 1.2.25

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.
@@ -0,0 +1,481 @@
1
+ // src/rules/reactNativePrimitives.ts
2
+ var REACT_NATIVE_SOURCES = [
3
+ "react-native",
4
+ "react-native-web",
5
+ "react-native-gesture-handler",
6
+ "react-native-reanimated",
7
+ "react-native-safe-area-context",
8
+ "react-native-screens",
9
+ "react-native-svg",
10
+ "@react-native-vector-icons/material-design-icons",
11
+ "@react-native-vector-icons/common",
12
+ "@react-native-community/async-storage",
13
+ "@react-native-picker/picker",
14
+ "expo",
15
+ "expo-constants",
16
+ "expo-linking",
17
+ "expo-status-bar"
18
+ ];
19
+ var CORE_PRIMITIVES = [
20
+ {
21
+ name: "View",
22
+ source: "react-native",
23
+ platform: "react-native",
24
+ description: "Basic container component"
25
+ },
26
+ {
27
+ name: "Text",
28
+ source: "react-native",
29
+ platform: "react-native",
30
+ description: "Text display component"
31
+ },
32
+ {
33
+ name: "Image",
34
+ source: "react-native",
35
+ platform: "react-native",
36
+ description: "Image display component"
37
+ },
38
+ {
39
+ name: "ImageBackground",
40
+ source: "react-native",
41
+ platform: "react-native",
42
+ description: "Background image container"
43
+ },
44
+ {
45
+ name: "ScrollView",
46
+ source: "react-native",
47
+ platform: "react-native",
48
+ description: "Scrollable container"
49
+ },
50
+ {
51
+ name: "FlatList",
52
+ source: "react-native",
53
+ platform: "react-native",
54
+ description: "Performant list component"
55
+ },
56
+ {
57
+ name: "SectionList",
58
+ source: "react-native",
59
+ platform: "react-native",
60
+ description: "Sectioned list component"
61
+ },
62
+ {
63
+ name: "VirtualizedList",
64
+ source: "react-native",
65
+ platform: "react-native",
66
+ description: "Base virtualized list"
67
+ }
68
+ ];
69
+ var INTERACTIVE_PRIMITIVES = [
70
+ {
71
+ name: "TouchableOpacity",
72
+ source: "react-native",
73
+ platform: "react-native",
74
+ description: "Touch with opacity feedback"
75
+ },
76
+ {
77
+ name: "TouchableHighlight",
78
+ source: "react-native",
79
+ platform: "react-native",
80
+ description: "Touch with highlight feedback"
81
+ },
82
+ {
83
+ name: "TouchableWithoutFeedback",
84
+ source: "react-native",
85
+ platform: "react-native",
86
+ description: "Touch without visual feedback"
87
+ },
88
+ {
89
+ name: "TouchableNativeFeedback",
90
+ source: "react-native",
91
+ platform: "react-native",
92
+ description: "Android ripple feedback"
93
+ },
94
+ {
95
+ name: "Pressable",
96
+ source: "react-native",
97
+ platform: "react-native",
98
+ description: "Modern press handler component"
99
+ },
100
+ {
101
+ name: "Button",
102
+ source: "react-native",
103
+ platform: "react-native",
104
+ description: "Basic button component"
105
+ }
106
+ ];
107
+ var INPUT_PRIMITIVES = [
108
+ {
109
+ name: "TextInput",
110
+ source: "react-native",
111
+ platform: "react-native",
112
+ description: "Text input field"
113
+ },
114
+ {
115
+ name: "Switch",
116
+ source: "react-native",
117
+ platform: "react-native",
118
+ description: "Toggle switch component"
119
+ },
120
+ {
121
+ name: "Slider",
122
+ source: "react-native",
123
+ platform: "react-native",
124
+ description: "Slider input (deprecated)"
125
+ }
126
+ ];
127
+ var MODAL_PRIMITIVES = [
128
+ {
129
+ name: "Modal",
130
+ source: "react-native",
131
+ platform: "react-native",
132
+ description: "Modal overlay component"
133
+ },
134
+ {
135
+ name: "Alert",
136
+ source: "react-native",
137
+ platform: "react-native",
138
+ description: "Native alert dialog"
139
+ },
140
+ {
141
+ name: "ActionSheetIOS",
142
+ source: "react-native",
143
+ platform: "react-native",
144
+ description: "iOS action sheet"
145
+ },
146
+ {
147
+ name: "StatusBar",
148
+ source: "react-native",
149
+ platform: "react-native",
150
+ description: "Status bar controller"
151
+ }
152
+ ];
153
+ var ANIMATION_PRIMITIVES = [
154
+ {
155
+ name: "Animated",
156
+ source: "react-native",
157
+ platform: "react-native",
158
+ description: "Animation library namespace"
159
+ },
160
+ {
161
+ name: "Easing",
162
+ source: "react-native",
163
+ platform: "react-native",
164
+ description: "Easing functions"
165
+ },
166
+ {
167
+ name: "LayoutAnimation",
168
+ source: "react-native",
169
+ platform: "react-native",
170
+ description: "Layout animation controller"
171
+ }
172
+ ];
173
+ var PLATFORM_PRIMITIVES = [
174
+ {
175
+ name: "Platform",
176
+ source: "react-native",
177
+ platform: "react-native",
178
+ description: "Platform detection utility"
179
+ },
180
+ {
181
+ name: "Dimensions",
182
+ source: "react-native",
183
+ platform: "react-native",
184
+ description: "Screen dimensions utility"
185
+ },
186
+ {
187
+ name: "PixelRatio",
188
+ source: "react-native",
189
+ platform: "react-native",
190
+ description: "Pixel ratio utility"
191
+ },
192
+ {
193
+ name: "Appearance",
194
+ source: "react-native",
195
+ platform: "react-native",
196
+ description: "Color scheme detection"
197
+ },
198
+ {
199
+ name: "useColorScheme",
200
+ source: "react-native",
201
+ platform: "react-native",
202
+ description: "Color scheme hook"
203
+ },
204
+ {
205
+ name: "useWindowDimensions",
206
+ source: "react-native",
207
+ platform: "react-native",
208
+ description: "Window dimensions hook"
209
+ }
210
+ ];
211
+ var EVENT_PRIMITIVES = [
212
+ {
213
+ name: "BackHandler",
214
+ source: "react-native",
215
+ platform: "react-native",
216
+ description: "Android back button handler"
217
+ },
218
+ {
219
+ name: "Keyboard",
220
+ source: "react-native",
221
+ platform: "react-native",
222
+ description: "Keyboard event handler"
223
+ },
224
+ {
225
+ name: "PanResponder",
226
+ source: "react-native",
227
+ platform: "react-native",
228
+ description: "Gesture responder system"
229
+ },
230
+ {
231
+ name: "Linking",
232
+ source: "react-native",
233
+ platform: "react-native",
234
+ description: "Deep linking utility"
235
+ },
236
+ {
237
+ name: "AppState",
238
+ source: "react-native",
239
+ platform: "react-native",
240
+ description: "App lifecycle state"
241
+ }
242
+ ];
243
+ var SAFETY_PRIMITIVES = [
244
+ {
245
+ name: "SafeAreaView",
246
+ source: "react-native",
247
+ platform: "react-native",
248
+ description: "Safe area inset container"
249
+ },
250
+ {
251
+ name: "KeyboardAvoidingView",
252
+ source: "react-native",
253
+ platform: "react-native",
254
+ description: "Keyboard avoidance container"
255
+ }
256
+ ];
257
+ var ACCESSIBILITY_PRIMITIVES = [
258
+ {
259
+ name: "AccessibilityInfo",
260
+ source: "react-native",
261
+ platform: "react-native",
262
+ description: "Accessibility information API"
263
+ }
264
+ ];
265
+ var STYLE_PRIMITIVES = [
266
+ {
267
+ name: "StyleSheet",
268
+ source: "react-native",
269
+ platform: "react-native",
270
+ description: "Style sheet creator"
271
+ }
272
+ ];
273
+ var REACT_NATIVE_PRIMITIVES = [
274
+ ...CORE_PRIMITIVES,
275
+ ...INTERACTIVE_PRIMITIVES,
276
+ ...INPUT_PRIMITIVES,
277
+ ...MODAL_PRIMITIVES,
278
+ ...ANIMATION_PRIMITIVES,
279
+ ...PLATFORM_PRIMITIVES,
280
+ ...EVENT_PRIMITIVES,
281
+ ...SAFETY_PRIMITIVES,
282
+ ...ACCESSIBILITY_PRIMITIVES,
283
+ ...STYLE_PRIMITIVES
284
+ ];
285
+ var REACT_NATIVE_PRIMITIVE_NAMES = new Set(
286
+ REACT_NATIVE_PRIMITIVES.map((p) => p.name)
287
+ );
288
+ var REACT_NATIVE_RULE_SET = {
289
+ platform: "react-native",
290
+ primitives: REACT_NATIVE_PRIMITIVES,
291
+ sources: [...REACT_NATIVE_SOURCES]
292
+ };
293
+ function isReactNativePrimitive(name) {
294
+ return REACT_NATIVE_PRIMITIVE_NAMES.has(name);
295
+ }
296
+ function getReactNativePrimitive(name) {
297
+ return REACT_NATIVE_PRIMITIVES.find((p) => p.name === name);
298
+ }
299
+
300
+ // src/rules/reactDomPrimitives.ts
301
+ var REACT_DOM_SOURCES = [
302
+ "react-dom",
303
+ "react-dom/client",
304
+ "react-dom/server"
305
+ ];
306
+ var DOM_API_PRIMITIVES = [
307
+ {
308
+ name: "createPortal",
309
+ source: "react-dom",
310
+ platform: "react-dom",
311
+ description: "Render children into a different DOM node"
312
+ },
313
+ {
314
+ name: "flushSync",
315
+ source: "react-dom",
316
+ platform: "react-dom",
317
+ description: "Force synchronous DOM updates"
318
+ },
319
+ {
320
+ name: "createRoot",
321
+ source: "react-dom/client",
322
+ platform: "react-dom",
323
+ description: "Create a React root for rendering"
324
+ },
325
+ {
326
+ name: "hydrateRoot",
327
+ source: "react-dom/client",
328
+ platform: "react-dom",
329
+ description: "Hydrate server-rendered content"
330
+ },
331
+ {
332
+ name: "render",
333
+ source: "react-dom",
334
+ platform: "react-dom",
335
+ description: "Legacy render function (deprecated)"
336
+ },
337
+ {
338
+ name: "hydrate",
339
+ source: "react-dom",
340
+ platform: "react-dom",
341
+ description: "Legacy hydrate function (deprecated)"
342
+ },
343
+ {
344
+ name: "unmountComponentAtNode",
345
+ source: "react-dom",
346
+ platform: "react-dom",
347
+ description: "Legacy unmount function (deprecated)"
348
+ },
349
+ {
350
+ name: "findDOMNode",
351
+ source: "react-dom",
352
+ platform: "react-dom",
353
+ description: "Find DOM node (deprecated)"
354
+ }
355
+ ];
356
+ var HTML_INTRINSIC_ELEMENTS = [
357
+ // Document structure
358
+ "html",
359
+ "head",
360
+ "body",
361
+ "main",
362
+ "header",
363
+ "footer",
364
+ "nav",
365
+ "aside",
366
+ "article",
367
+ "section",
368
+ // Content sectioning
369
+ "div",
370
+ "span",
371
+ "p",
372
+ "h1",
373
+ "h2",
374
+ "h3",
375
+ "h4",
376
+ "h5",
377
+ "h6",
378
+ // Text content
379
+ "a",
380
+ "strong",
381
+ "em",
382
+ "code",
383
+ "pre",
384
+ "blockquote",
385
+ "br",
386
+ "hr",
387
+ // Lists
388
+ "ul",
389
+ "ol",
390
+ "li",
391
+ "dl",
392
+ "dt",
393
+ "dd",
394
+ // Tables
395
+ "table",
396
+ "thead",
397
+ "tbody",
398
+ "tfoot",
399
+ "tr",
400
+ "th",
401
+ "td",
402
+ "caption",
403
+ "colgroup",
404
+ "col",
405
+ // Forms
406
+ "form",
407
+ "input",
408
+ "textarea",
409
+ "select",
410
+ "option",
411
+ "optgroup",
412
+ "button",
413
+ "label",
414
+ "fieldset",
415
+ "legend",
416
+ "datalist",
417
+ "output",
418
+ "progress",
419
+ "meter",
420
+ // Media
421
+ "img",
422
+ "video",
423
+ "audio",
424
+ "source",
425
+ "track",
426
+ "picture",
427
+ "figure",
428
+ "figcaption",
429
+ "canvas",
430
+ "svg",
431
+ "iframe",
432
+ "embed",
433
+ "object",
434
+ // Interactive
435
+ "details",
436
+ "summary",
437
+ "dialog",
438
+ "menu",
439
+ // Scripting
440
+ "script",
441
+ "noscript",
442
+ "template",
443
+ "slot"
444
+ ];
445
+ var REACT_DOM_PRIMITIVES = [...DOM_API_PRIMITIVES];
446
+ var REACT_DOM_PRIMITIVE_NAMES = new Set(
447
+ REACT_DOM_PRIMITIVES.map((p) => p.name)
448
+ );
449
+ var HTML_ELEMENT_NAMES = new Set(HTML_INTRINSIC_ELEMENTS);
450
+ var REACT_DOM_RULE_SET = {
451
+ platform: "react-dom",
452
+ primitives: REACT_DOM_PRIMITIVES,
453
+ sources: [...REACT_DOM_SOURCES]
454
+ };
455
+ function isReactDomPrimitive(name) {
456
+ return REACT_DOM_PRIMITIVE_NAMES.has(name);
457
+ }
458
+ function isHtmlElement(name) {
459
+ return HTML_ELEMENT_NAMES.has(name);
460
+ }
461
+ function getReactDomPrimitive(name) {
462
+ return REACT_DOM_PRIMITIVES.find((p) => p.name === name);
463
+ }
464
+ export {
465
+ HTML_ELEMENT_NAMES,
466
+ HTML_INTRINSIC_ELEMENTS,
467
+ REACT_DOM_PRIMITIVES,
468
+ REACT_DOM_PRIMITIVE_NAMES,
469
+ REACT_DOM_RULE_SET,
470
+ REACT_DOM_SOURCES,
471
+ REACT_NATIVE_PRIMITIVES,
472
+ REACT_NATIVE_PRIMITIVE_NAMES,
473
+ REACT_NATIVE_RULE_SET,
474
+ REACT_NATIVE_SOURCES,
475
+ getReactDomPrimitive,
476
+ getReactNativePrimitive,
477
+ isHtmlElement,
478
+ isReactDomPrimitive,
479
+ isReactNativePrimitive
480
+ };
481
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/rules/reactNativePrimitives.ts","../../src/rules/reactDomPrimitives.ts"],"sourcesContent":["import { PrimitiveRule, PrimitiveRuleSet } from '../types';\n\n/**\n * Module sources that indicate React Native platform\n */\nexport const REACT_NATIVE_SOURCES = [\n 'react-native',\n 'react-native-web',\n 'react-native-gesture-handler',\n 'react-native-reanimated',\n 'react-native-safe-area-context',\n 'react-native-screens',\n 'react-native-svg',\n '@react-native-vector-icons/material-design-icons',\n '@react-native-vector-icons/common',\n '@react-native-community/async-storage',\n '@react-native-picker/picker',\n 'expo',\n 'expo-constants',\n 'expo-linking',\n 'expo-status-bar',\n] as const;\n\n/**\n * Core React Native view primitives\n */\nconst CORE_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'View',\n source: 'react-native',\n platform: 'react-native',\n description: 'Basic container component',\n },\n {\n name: 'Text',\n source: 'react-native',\n platform: 'react-native',\n description: 'Text display component',\n },\n {\n name: 'Image',\n source: 'react-native',\n platform: 'react-native',\n description: 'Image display component',\n },\n {\n name: 'ImageBackground',\n source: 'react-native',\n platform: 'react-native',\n description: 'Background image container',\n },\n {\n name: 'ScrollView',\n source: 'react-native',\n platform: 'react-native',\n description: 'Scrollable container',\n },\n {\n name: 'FlatList',\n source: 'react-native',\n platform: 'react-native',\n description: 'Performant list component',\n },\n {\n name: 'SectionList',\n source: 'react-native',\n platform: 'react-native',\n description: 'Sectioned list component',\n },\n {\n name: 'VirtualizedList',\n source: 'react-native',\n platform: 'react-native',\n description: 'Base virtualized list',\n },\n];\n\n/**\n * Interactive/touchable primitives\n */\nconst INTERACTIVE_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'TouchableOpacity',\n source: 'react-native',\n platform: 'react-native',\n description: 'Touch with opacity feedback',\n },\n {\n name: 'TouchableHighlight',\n source: 'react-native',\n platform: 'react-native',\n description: 'Touch with highlight feedback',\n },\n {\n name: 'TouchableWithoutFeedback',\n source: 'react-native',\n platform: 'react-native',\n description: 'Touch without visual feedback',\n },\n {\n name: 'TouchableNativeFeedback',\n source: 'react-native',\n platform: 'react-native',\n description: 'Android ripple feedback',\n },\n {\n name: 'Pressable',\n source: 'react-native',\n platform: 'react-native',\n description: 'Modern press handler component',\n },\n {\n name: 'Button',\n source: 'react-native',\n platform: 'react-native',\n description: 'Basic button component',\n },\n];\n\n/**\n * Input primitives\n */\nconst INPUT_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'TextInput',\n source: 'react-native',\n platform: 'react-native',\n description: 'Text input field',\n },\n {\n name: 'Switch',\n source: 'react-native',\n platform: 'react-native',\n description: 'Toggle switch component',\n },\n {\n name: 'Slider',\n source: 'react-native',\n platform: 'react-native',\n description: 'Slider input (deprecated)',\n },\n];\n\n/**\n * Modal and overlay primitives\n */\nconst MODAL_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'Modal',\n source: 'react-native',\n platform: 'react-native',\n description: 'Modal overlay component',\n },\n {\n name: 'Alert',\n source: 'react-native',\n platform: 'react-native',\n description: 'Native alert dialog',\n },\n {\n name: 'ActionSheetIOS',\n source: 'react-native',\n platform: 'react-native',\n description: 'iOS action sheet',\n },\n {\n name: 'StatusBar',\n source: 'react-native',\n platform: 'react-native',\n description: 'Status bar controller',\n },\n];\n\n/**\n * Animation primitives\n */\nconst ANIMATION_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'Animated',\n source: 'react-native',\n platform: 'react-native',\n description: 'Animation library namespace',\n },\n {\n name: 'Easing',\n source: 'react-native',\n platform: 'react-native',\n description: 'Easing functions',\n },\n {\n name: 'LayoutAnimation',\n source: 'react-native',\n platform: 'react-native',\n description: 'Layout animation controller',\n },\n];\n\n/**\n * Platform and device primitives\n */\nconst PLATFORM_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'Platform',\n source: 'react-native',\n platform: 'react-native',\n description: 'Platform detection utility',\n },\n {\n name: 'Dimensions',\n source: 'react-native',\n platform: 'react-native',\n description: 'Screen dimensions utility',\n },\n {\n name: 'PixelRatio',\n source: 'react-native',\n platform: 'react-native',\n description: 'Pixel ratio utility',\n },\n {\n name: 'Appearance',\n source: 'react-native',\n platform: 'react-native',\n description: 'Color scheme detection',\n },\n {\n name: 'useColorScheme',\n source: 'react-native',\n platform: 'react-native',\n description: 'Color scheme hook',\n },\n {\n name: 'useWindowDimensions',\n source: 'react-native',\n platform: 'react-native',\n description: 'Window dimensions hook',\n },\n];\n\n/**\n * Event handling primitives\n */\nconst EVENT_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'BackHandler',\n source: 'react-native',\n platform: 'react-native',\n description: 'Android back button handler',\n },\n {\n name: 'Keyboard',\n source: 'react-native',\n platform: 'react-native',\n description: 'Keyboard event handler',\n },\n {\n name: 'PanResponder',\n source: 'react-native',\n platform: 'react-native',\n description: 'Gesture responder system',\n },\n {\n name: 'Linking',\n source: 'react-native',\n platform: 'react-native',\n description: 'Deep linking utility',\n },\n {\n name: 'AppState',\n source: 'react-native',\n platform: 'react-native',\n description: 'App lifecycle state',\n },\n];\n\n/**\n * Safety primitives\n */\nconst SAFETY_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'SafeAreaView',\n source: 'react-native',\n platform: 'react-native',\n description: 'Safe area inset container',\n },\n {\n name: 'KeyboardAvoidingView',\n source: 'react-native',\n platform: 'react-native',\n description: 'Keyboard avoidance container',\n },\n];\n\n/**\n * Accessibility primitives\n */\nconst ACCESSIBILITY_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'AccessibilityInfo',\n source: 'react-native',\n platform: 'react-native',\n description: 'Accessibility information API',\n },\n];\n\n/**\n * Style primitives\n */\nconst STYLE_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'StyleSheet',\n source: 'react-native',\n platform: 'react-native',\n description: 'Style sheet creator',\n },\n];\n\n/**\n * All React Native primitives combined\n */\nexport const REACT_NATIVE_PRIMITIVES: PrimitiveRule[] = [\n ...CORE_PRIMITIVES,\n ...INTERACTIVE_PRIMITIVES,\n ...INPUT_PRIMITIVES,\n ...MODAL_PRIMITIVES,\n ...ANIMATION_PRIMITIVES,\n ...PLATFORM_PRIMITIVES,\n ...EVENT_PRIMITIVES,\n ...SAFETY_PRIMITIVES,\n ...ACCESSIBILITY_PRIMITIVES,\n ...STYLE_PRIMITIVES,\n];\n\n/**\n * Set of primitive names for quick lookup\n */\nexport const REACT_NATIVE_PRIMITIVE_NAMES = new Set(\n REACT_NATIVE_PRIMITIVES.map((p) => p.name)\n);\n\n/**\n * Complete rule set for React Native\n */\nexport const REACT_NATIVE_RULE_SET: PrimitiveRuleSet = {\n platform: 'react-native',\n primitives: REACT_NATIVE_PRIMITIVES,\n sources: [...REACT_NATIVE_SOURCES],\n};\n\n/**\n * Check if a name is a React Native primitive\n */\nexport function isReactNativePrimitive(name: string): boolean {\n return REACT_NATIVE_PRIMITIVE_NAMES.has(name);\n}\n\n/**\n * Get primitive info by name\n */\nexport function getReactNativePrimitive(name: string): PrimitiveRule | undefined {\n return REACT_NATIVE_PRIMITIVES.find((p) => p.name === name);\n}\n","import { PrimitiveRule, PrimitiveRuleSet } from '../types';\n\n/**\n * Module sources that indicate React DOM platform\n */\nexport const REACT_DOM_SOURCES = [\n 'react-dom',\n 'react-dom/client',\n 'react-dom/server',\n] as const;\n\n/**\n * React DOM API primitives\n * These are functions/components that are React DOM specific\n */\nconst DOM_API_PRIMITIVES: PrimitiveRule[] = [\n {\n name: 'createPortal',\n source: 'react-dom',\n platform: 'react-dom',\n description: 'Render children into a different DOM node',\n },\n {\n name: 'flushSync',\n source: 'react-dom',\n platform: 'react-dom',\n description: 'Force synchronous DOM updates',\n },\n {\n name: 'createRoot',\n source: 'react-dom/client',\n platform: 'react-dom',\n description: 'Create a React root for rendering',\n },\n {\n name: 'hydrateRoot',\n source: 'react-dom/client',\n platform: 'react-dom',\n description: 'Hydrate server-rendered content',\n },\n {\n name: 'render',\n source: 'react-dom',\n platform: 'react-dom',\n description: 'Legacy render function (deprecated)',\n },\n {\n name: 'hydrate',\n source: 'react-dom',\n platform: 'react-dom',\n description: 'Legacy hydrate function (deprecated)',\n },\n {\n name: 'unmountComponentAtNode',\n source: 'react-dom',\n platform: 'react-dom',\n description: 'Legacy unmount function (deprecated)',\n },\n {\n name: 'findDOMNode',\n source: 'react-dom',\n platform: 'react-dom',\n description: 'Find DOM node (deprecated)',\n },\n];\n\n/**\n * Intrinsic HTML elements that indicate web-only code\n * These are JSX intrinsic elements that only exist in DOM\n *\n * Note: These are detected via JSX usage, not imports\n * This list is for reference and specialized detection\n */\nexport const HTML_INTRINSIC_ELEMENTS = [\n // Document structure\n 'html',\n 'head',\n 'body',\n 'main',\n 'header',\n 'footer',\n 'nav',\n 'aside',\n 'article',\n 'section',\n\n // Content sectioning\n 'div',\n 'span',\n 'p',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n\n // Text content\n 'a',\n 'strong',\n 'em',\n 'code',\n 'pre',\n 'blockquote',\n 'br',\n 'hr',\n\n // Lists\n 'ul',\n 'ol',\n 'li',\n 'dl',\n 'dt',\n 'dd',\n\n // Tables\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'tr',\n 'th',\n 'td',\n 'caption',\n 'colgroup',\n 'col',\n\n // Forms\n 'form',\n 'input',\n 'textarea',\n 'select',\n 'option',\n 'optgroup',\n 'button',\n 'label',\n 'fieldset',\n 'legend',\n 'datalist',\n 'output',\n 'progress',\n 'meter',\n\n // Media\n 'img',\n 'video',\n 'audio',\n 'source',\n 'track',\n 'picture',\n 'figure',\n 'figcaption',\n 'canvas',\n 'svg',\n 'iframe',\n 'embed',\n 'object',\n\n // Interactive\n 'details',\n 'summary',\n 'dialog',\n 'menu',\n\n // Scripting\n 'script',\n 'noscript',\n 'template',\n 'slot',\n] as const;\n\n/**\n * All React DOM primitives (API functions)\n */\nexport const REACT_DOM_PRIMITIVES: PrimitiveRule[] = [...DOM_API_PRIMITIVES];\n\n/**\n * Set of primitive names for quick lookup\n */\nexport const REACT_DOM_PRIMITIVE_NAMES = new Set(\n REACT_DOM_PRIMITIVES.map((p) => p.name)\n);\n\n/**\n * Set of HTML intrinsic element names for quick lookup\n */\nexport const HTML_ELEMENT_NAMES: Set<string> = new Set(HTML_INTRINSIC_ELEMENTS);\n\n/**\n * Complete rule set for React DOM\n */\nexport const REACT_DOM_RULE_SET: PrimitiveRuleSet = {\n platform: 'react-dom',\n primitives: REACT_DOM_PRIMITIVES,\n sources: [...REACT_DOM_SOURCES],\n};\n\n/**\n * Check if a name is a React DOM primitive (API function)\n */\nexport function isReactDomPrimitive(name: string): boolean {\n return REACT_DOM_PRIMITIVE_NAMES.has(name);\n}\n\n/**\n * Check if a name is an HTML intrinsic element\n */\nexport function isHtmlElement(name: string): boolean {\n return HTML_ELEMENT_NAMES.has(name);\n}\n\n/**\n * Get primitive info by name\n */\nexport function getReactDomPrimitive(name: string): PrimitiveRule | undefined {\n return REACT_DOM_PRIMITIVES.find((p) => p.name === name);\n}\n"],"mappings":";AAKO,IAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKA,IAAM,kBAAmC;AAAA,EACvC;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,aAAa;AAAA,EACf;A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define the structure of the auto-generated component registry
5
+ * that documents all components with their props, types, and valid values.
6
+ */
7
+ /**
8
+ * Definition of a single component prop
9
+ */
10
+ interface PropDefinition {
11
+ /** The prop name */
12
+ name: string;
13
+ /** The TypeScript type as a string (e.g., 'Intent', 'Size', 'boolean', 'string') */
14
+ type: string;
15
+ /** Valid values for this prop (for unions, enums, theme-derived types) */
16
+ values?: string[];
17
+ /** Default value if specified in the component */
18
+ default?: string | number | boolean;
19
+ /** Description from JSDoc */
20
+ description?: string;
21
+ /** Whether the prop is required */
22
+ required: boolean;
23
+ }
24
+ /**
25
+ * Configuration for a controlled state binding
26
+ */
27
+ interface ControlledState {
28
+ /** Initial value for the state */
29
+ initial: any;
30
+ /** The prop name that receives the onChange callback */
31
+ onChangeProp: string;
32
+ /** If true, the callback toggles a boolean value instead of receiving a new value */
33
+ toggle?: boolean;
34
+ }
35
+ /**
36
+ * Sample props for rendering the component in documentation
37
+ */
38
+ interface SampleProps {
39
+ /** Props needed to render the component (required props, sample data) */
40
+ props?: Record<string, any>;
41
+ /** Default children for the component */
42
+ children?: any;
43
+ /** Controlled state bindings - key is the prop name, value is the state config */
44
+ state?: Record<string, ControlledState>;
45
+ }
46
+ /**
47
+ * Definition of a component in the registry
48
+ */
49
+ interface ComponentDefinition {
50
+ /** Component name (e.g., 'Button', 'Card') */
51
+ name: string;
52
+ /** Component description from static property or JSDoc */
53
+ description?: string;
54
+ /** All props for this component */
55
+ props: Record<string, PropDefinition>;
56
+ /** Component category for grouping (e.g., 'form', 'display', 'layout') */
57
+ category?: ComponentCategory;
58
+ /** Path to the component file (relative) */
59
+ filePath?: string;
60
+ /** Sample props for rendering in documentation (from docs.ts) */
61
+ sampleProps?: SampleProps;
62
+ }
63
+ /**
64
+ * Component categories for organizing documentation
65
+ */
66
+ type ComponentCategory = 'layout' | 'form' | 'display' | 'navigation' | 'overlay' | 'data' | 'feedback';
67
+ /**
68
+ * The complete component registry
69
+ */
70
+ type ComponentRegistry = Record<string, ComponentDefinition>;
71
+ /**
72
+ * Theme values extracted from the theme configuration
73
+ */
74
+ interface ThemeValues {
75
+ /** Intent names (e.g., ['primary', 'success', 'error', ...]) */
76
+ intents: string[];
77
+ /** Size keys per component (e.g., { button: ['xs', 'sm', 'md', ...], ... }) */
78
+ sizes: Record<string, string[]>;
79
+ /** Radius keys (e.g., ['none', 'xs', 'sm', 'md', ...]) */
80
+ radii: string[];
81
+ /** Shadow keys (e.g., ['none', 'sm', 'md', 'lg', 'xl']) */
82
+ shadows: string[];
83
+ /** Breakpoint keys (e.g., ['xs', 'sm', 'md', 'lg', 'xl']) */
84
+ breakpoints: string[];
85
+ /** Typography keys (e.g., ['h1', 'h2', 'body1', 'body2', ...]) */
86
+ typography: string[];
87
+ /** Surface color keys */
88
+ surfaceColors: string[];
89
+ /** Text color keys */
90
+ textColors: string[];
91
+ /** Border color keys */
92
+ borderColors: string[];
93
+ }
94
+ /**
95
+ * Options for the component analyzer
96
+ */
97
+ interface ComponentAnalyzerOptions {
98
+ /** Paths to scan for components (e.g., ['packages/components/src']) */
99
+ componentPaths: string[];
100
+ /** Path to the theme file (e.g., 'packages/theme/src/lightTheme.ts') */
101
+ themePath: string;
102
+ /** Component names to include (default: all) */
103
+ include?: string[];
104
+ /** Component names to exclude */
105
+ exclude?: string[];
106
+ /** Whether to include internal/private components */
107
+ includeInternal?: boolean;
108
+ }
109
+ /**
110
+ * Options for the Vite plugin
111
+ */
112
+ interface IdealystDocsPluginOptions extends ComponentAnalyzerOptions {
113
+ /** Output mode: 'virtual' for virtual module, 'file' for physical file */
114
+ output?: 'virtual' | 'file';
115
+ /** Path to write the registry file (if output is 'file') */
116
+ outputPath?: string;
117
+ /** Enable debug logging */
118
+ debug?: boolean;
119
+ }
120
+
121
+ export type { ComponentRegistry as C, IdealystDocsPluginOptions as I, PropDefinition as P, SampleProps as S, ThemeValues as T, ComponentDefinition as a, ComponentAnalyzerOptions as b, ControlledState as c, ComponentCategory as d };