snowbase-templates-installer 1.0.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.
- package/README.md +70 -0
- package/bin/cli.js +140 -0
- package/landing-pages/ai-saas-template/.orchids/orchids.json +8 -0
- package/landing-pages/ai-saas-template/README.md +36 -0
- package/landing-pages/ai-saas-template/bun.lock +2062 -0
- package/landing-pages/ai-saas-template/components.json +22 -0
- package/landing-pages/ai-saas-template/eslint.config.mjs +33 -0
- package/landing-pages/ai-saas-template/next.config.ts +24 -0
- package/landing-pages/ai-saas-template/package-lock.json +11708 -0
- package/landing-pages/ai-saas-template/package.json +114 -0
- package/landing-pages/ai-saas-template/postcss.config.mjs +7 -0
- package/landing-pages/ai-saas-template/public/file.svg +1 -0
- package/landing-pages/ai-saas-template/public/globe.svg +1 -0
- package/landing-pages/ai-saas-template/public/next.svg +1 -0
- package/landing-pages/ai-saas-template/public/vercel.svg +1 -0
- package/landing-pages/ai-saas-template/public/window.svg +1 -0
- package/landing-pages/ai-saas-template/src/app/favicon.ico +0 -0
- package/landing-pages/ai-saas-template/src/app/global-error.tsx +5 -0
- package/landing-pages/ai-saas-template/src/app/globals.css +172 -0
- package/landing-pages/ai-saas-template/src/app/layout.tsx +42 -0
- package/landing-pages/ai-saas-template/src/app/page.tsx +23 -0
- package/landing-pages/ai-saas-template/src/components/ErrorReporter.tsx +136 -0
- package/landing-pages/ai-saas-template/src/components/sections/cta.tsx +62 -0
- package/landing-pages/ai-saas-template/src/components/sections/features-grid.tsx +205 -0
- package/landing-pages/ai-saas-template/src/components/sections/footer.tsx +111 -0
- package/landing-pages/ai-saas-template/src/components/sections/hero.tsx +92 -0
- package/landing-pages/ai-saas-template/src/components/sections/logos.tsx +69 -0
- package/landing-pages/ai-saas-template/src/components/sections/navbar.tsx +83 -0
- package/landing-pages/ai-saas-template/src/components/sections/testimonials-header.tsx +41 -0
- package/landing-pages/ai-saas-template/src/components/sections/value-props.tsx +97 -0
- package/landing-pages/ai-saas-template/src/components/ui/accordion.tsx +66 -0
- package/landing-pages/ai-saas-template/src/components/ui/alert-dialog.tsx +157 -0
- package/landing-pages/ai-saas-template/src/components/ui/alert.tsx +66 -0
- package/landing-pages/ai-saas-template/src/components/ui/aspect-ratio.tsx +11 -0
- package/landing-pages/ai-saas-template/src/components/ui/avatar.tsx +53 -0
- package/landing-pages/ai-saas-template/src/components/ui/badge.tsx +46 -0
- package/landing-pages/ai-saas-template/src/components/ui/breadcrumb.tsx +109 -0
- package/landing-pages/ai-saas-template/src/components/ui/button-group.tsx +83 -0
- package/landing-pages/ai-saas-template/src/components/ui/button.tsx +59 -0
- package/landing-pages/ai-saas-template/src/components/ui/calendar.tsx +213 -0
- package/landing-pages/ai-saas-template/src/components/ui/card.tsx +92 -0
- package/landing-pages/ai-saas-template/src/components/ui/carousel.tsx +241 -0
- package/landing-pages/ai-saas-template/src/components/ui/chart.tsx +353 -0
- package/landing-pages/ai-saas-template/src/components/ui/checkbox.tsx +32 -0
- package/landing-pages/ai-saas-template/src/components/ui/collapsible.tsx +33 -0
- package/landing-pages/ai-saas-template/src/components/ui/command.tsx +184 -0
- package/landing-pages/ai-saas-template/src/components/ui/context-menu.tsx +252 -0
- package/landing-pages/ai-saas-template/src/components/ui/dialog.tsx +143 -0
- package/landing-pages/ai-saas-template/src/components/ui/drawer.tsx +135 -0
- package/landing-pages/ai-saas-template/src/components/ui/dropdown-menu.tsx +257 -0
- package/landing-pages/ai-saas-template/src/components/ui/empty.tsx +104 -0
- package/landing-pages/ai-saas-template/src/components/ui/field.tsx +248 -0
- package/landing-pages/ai-saas-template/src/components/ui/form.tsx +167 -0
- package/landing-pages/ai-saas-template/src/components/ui/hover-card.tsx +44 -0
- package/landing-pages/ai-saas-template/src/components/ui/input-group.tsx +170 -0
- package/landing-pages/ai-saas-template/src/components/ui/input-otp.tsx +77 -0
- package/landing-pages/ai-saas-template/src/components/ui/input.tsx +21 -0
- package/landing-pages/ai-saas-template/src/components/ui/item.tsx +193 -0
- package/landing-pages/ai-saas-template/src/components/ui/kbd.tsx +28 -0
- package/landing-pages/ai-saas-template/src/components/ui/label.tsx +24 -0
- package/landing-pages/ai-saas-template/src/components/ui/menubar.tsx +276 -0
- package/landing-pages/ai-saas-template/src/components/ui/navigation-menu.tsx +168 -0
- package/landing-pages/ai-saas-template/src/components/ui/pagination.tsx +127 -0
- package/landing-pages/ai-saas-template/src/components/ui/popover.tsx +48 -0
- package/landing-pages/ai-saas-template/src/components/ui/progress.tsx +31 -0
- package/landing-pages/ai-saas-template/src/components/ui/radio-group.tsx +45 -0
- package/landing-pages/ai-saas-template/src/components/ui/resizable.tsx +56 -0
- package/landing-pages/ai-saas-template/src/components/ui/scroll-area.tsx +58 -0
- package/landing-pages/ai-saas-template/src/components/ui/select.tsx +185 -0
- package/landing-pages/ai-saas-template/src/components/ui/separator.tsx +28 -0
- package/landing-pages/ai-saas-template/src/components/ui/sheet.tsx +139 -0
- package/landing-pages/ai-saas-template/src/components/ui/sidebar.tsx +726 -0
- package/landing-pages/ai-saas-template/src/components/ui/skeleton.tsx +13 -0
- package/landing-pages/ai-saas-template/src/components/ui/slider.tsx +63 -0
- package/landing-pages/ai-saas-template/src/components/ui/sonner.tsx +25 -0
- package/landing-pages/ai-saas-template/src/components/ui/spinner.tsx +16 -0
- package/landing-pages/ai-saas-template/src/components/ui/switch.tsx +31 -0
- package/landing-pages/ai-saas-template/src/components/ui/table.tsx +116 -0
- package/landing-pages/ai-saas-template/src/components/ui/tabs.tsx +66 -0
- package/landing-pages/ai-saas-template/src/components/ui/textarea.tsx +18 -0
- package/landing-pages/ai-saas-template/src/components/ui/toggle-group.tsx +73 -0
- package/landing-pages/ai-saas-template/src/components/ui/toggle.tsx +47 -0
- package/landing-pages/ai-saas-template/src/components/ui/tooltip.tsx +61 -0
- package/landing-pages/ai-saas-template/src/hooks/use-mobile.ts +19 -0
- package/landing-pages/ai-saas-template/src/lib/hooks/use-mobile.tsx +21 -0
- package/landing-pages/ai-saas-template/src/lib/utils.ts +6 -0
- package/landing-pages/ai-saas-template/src/visual-edits/VisualEditsMessenger.tsx +2159 -0
- package/landing-pages/ai-saas-template/src/visual-edits/component-tagger-loader.js +460 -0
- package/landing-pages/ai-saas-template/tsconfig.json +42 -0
- package/landing-pages/open-engineer-template/.orchids/orchids.json +8 -0
- package/landing-pages/open-engineer-template/README.md +36 -0
- package/landing-pages/open-engineer-template/bun.lock +2062 -0
- package/landing-pages/open-engineer-template/components.json +22 -0
- package/landing-pages/open-engineer-template/eslint.config.mjs +33 -0
- package/landing-pages/open-engineer-template/next.config.ts +24 -0
- package/landing-pages/open-engineer-template/package-lock.json +13669 -0
- package/landing-pages/open-engineer-template/package.json +114 -0
- package/landing-pages/open-engineer-template/postcss.config.mjs +7 -0
- package/landing-pages/open-engineer-template/public/file.svg +1 -0
- package/landing-pages/open-engineer-template/public/globe.svg +1 -0
- package/landing-pages/open-engineer-template/public/next.svg +1 -0
- package/landing-pages/open-engineer-template/public/vercel.svg +1 -0
- package/landing-pages/open-engineer-template/public/window.svg +1 -0
- package/landing-pages/open-engineer-template/src/app/favicon.ico +0 -0
- package/landing-pages/open-engineer-template/src/app/global-error.tsx +5 -0
- package/landing-pages/open-engineer-template/src/app/globals.css +189 -0
- package/landing-pages/open-engineer-template/src/app/layout.tsx +42 -0
- package/landing-pages/open-engineer-template/src/app/page.tsx +31 -0
- package/landing-pages/open-engineer-template/src/components/ErrorReporter.tsx +136 -0
- package/landing-pages/open-engineer-template/src/components/sections/cta-stats.tsx +71 -0
- package/landing-pages/open-engineer-template/src/components/sections/faq.tsx +188 -0
- package/landing-pages/open-engineer-template/src/components/sections/features-grid.tsx +193 -0
- package/landing-pages/open-engineer-template/src/components/sections/footer.tsx +137 -0
- package/landing-pages/open-engineer-template/src/components/sections/header.tsx +105 -0
- package/landing-pages/open-engineer-template/src/components/sections/hero.tsx +118 -0
- package/landing-pages/open-engineer-template/src/components/sections/how-it-works.tsx +123 -0
- package/landing-pages/open-engineer-template/src/components/sections/pricing.tsx +168 -0
- package/landing-pages/open-engineer-template/src/components/sections/testimonials-logos.tsx +88 -0
- package/landing-pages/open-engineer-template/src/components/sections/use-cases.tsx +141 -0
- package/landing-pages/open-engineer-template/src/components/sections/workflow-tabs.tsx +792 -0
- package/landing-pages/open-engineer-template/src/components/ui/accordion.tsx +66 -0
- package/landing-pages/open-engineer-template/src/components/ui/alert-dialog.tsx +157 -0
- package/landing-pages/open-engineer-template/src/components/ui/alert.tsx +66 -0
- package/landing-pages/open-engineer-template/src/components/ui/aspect-ratio.tsx +11 -0
- package/landing-pages/open-engineer-template/src/components/ui/avatar.tsx +53 -0
- package/landing-pages/open-engineer-template/src/components/ui/badge.tsx +46 -0
- package/landing-pages/open-engineer-template/src/components/ui/breadcrumb.tsx +109 -0
- package/landing-pages/open-engineer-template/src/components/ui/button-group.tsx +83 -0
- package/landing-pages/open-engineer-template/src/components/ui/button.tsx +59 -0
- package/landing-pages/open-engineer-template/src/components/ui/calendar.tsx +213 -0
- package/landing-pages/open-engineer-template/src/components/ui/card.tsx +92 -0
- package/landing-pages/open-engineer-template/src/components/ui/carousel.tsx +241 -0
- package/landing-pages/open-engineer-template/src/components/ui/chart.tsx +353 -0
- package/landing-pages/open-engineer-template/src/components/ui/checkbox.tsx +32 -0
- package/landing-pages/open-engineer-template/src/components/ui/collapsible.tsx +33 -0
- package/landing-pages/open-engineer-template/src/components/ui/command.tsx +184 -0
- package/landing-pages/open-engineer-template/src/components/ui/context-menu.tsx +252 -0
- package/landing-pages/open-engineer-template/src/components/ui/dialog.tsx +143 -0
- package/landing-pages/open-engineer-template/src/components/ui/drawer.tsx +135 -0
- package/landing-pages/open-engineer-template/src/components/ui/dropdown-menu.tsx +257 -0
- package/landing-pages/open-engineer-template/src/components/ui/empty.tsx +104 -0
- package/landing-pages/open-engineer-template/src/components/ui/field.tsx +248 -0
- package/landing-pages/open-engineer-template/src/components/ui/form.tsx +167 -0
- package/landing-pages/open-engineer-template/src/components/ui/hover-card.tsx +44 -0
- package/landing-pages/open-engineer-template/src/components/ui/input-group.tsx +170 -0
- package/landing-pages/open-engineer-template/src/components/ui/input-otp.tsx +77 -0
- package/landing-pages/open-engineer-template/src/components/ui/input.tsx +21 -0
- package/landing-pages/open-engineer-template/src/components/ui/item.tsx +193 -0
- package/landing-pages/open-engineer-template/src/components/ui/kbd.tsx +28 -0
- package/landing-pages/open-engineer-template/src/components/ui/label.tsx +24 -0
- package/landing-pages/open-engineer-template/src/components/ui/menubar.tsx +276 -0
- package/landing-pages/open-engineer-template/src/components/ui/navigation-menu.tsx +168 -0
- package/landing-pages/open-engineer-template/src/components/ui/pagination.tsx +127 -0
- package/landing-pages/open-engineer-template/src/components/ui/popover.tsx +48 -0
- package/landing-pages/open-engineer-template/src/components/ui/progress.tsx +31 -0
- package/landing-pages/open-engineer-template/src/components/ui/radio-group.tsx +45 -0
- package/landing-pages/open-engineer-template/src/components/ui/resizable.tsx +56 -0
- package/landing-pages/open-engineer-template/src/components/ui/scroll-area.tsx +58 -0
- package/landing-pages/open-engineer-template/src/components/ui/select.tsx +185 -0
- package/landing-pages/open-engineer-template/src/components/ui/separator.tsx +28 -0
- package/landing-pages/open-engineer-template/src/components/ui/sheet.tsx +139 -0
- package/landing-pages/open-engineer-template/src/components/ui/sidebar.tsx +726 -0
- package/landing-pages/open-engineer-template/src/components/ui/skeleton.tsx +13 -0
- package/landing-pages/open-engineer-template/src/components/ui/slider.tsx +63 -0
- package/landing-pages/open-engineer-template/src/components/ui/sonner.tsx +25 -0
- package/landing-pages/open-engineer-template/src/components/ui/spinner.tsx +16 -0
- package/landing-pages/open-engineer-template/src/components/ui/switch.tsx +31 -0
- package/landing-pages/open-engineer-template/src/components/ui/table.tsx +116 -0
- package/landing-pages/open-engineer-template/src/components/ui/tabs.tsx +66 -0
- package/landing-pages/open-engineer-template/src/components/ui/textarea.tsx +18 -0
- package/landing-pages/open-engineer-template/src/components/ui/toggle-group.tsx +73 -0
- package/landing-pages/open-engineer-template/src/components/ui/toggle.tsx +47 -0
- package/landing-pages/open-engineer-template/src/components/ui/tooltip.tsx +61 -0
- package/landing-pages/open-engineer-template/src/hooks/use-mobile.ts +19 -0
- package/landing-pages/open-engineer-template/src/lib/hooks/use-mobile.tsx +21 -0
- package/landing-pages/open-engineer-template/src/lib/utils.ts +6 -0
- package/landing-pages/open-engineer-template/src/visual-edits/VisualEditsMessenger.tsx +2159 -0
- package/landing-pages/open-engineer-template/src/visual-edits/component-tagger-loader.js +460 -0
- package/landing-pages/open-engineer-template/tsconfig.json +42 -0
- package/package.json +36 -0
- package/templates.json +22 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.default = componentTagger;
|
|
5
|
+
const parser_1 = require("@babel/parser");
|
|
6
|
+
const magic_string_1 = require("magic-string");
|
|
7
|
+
const estree_walker_1 = require("estree-walker");
|
|
8
|
+
const path = require("path");
|
|
9
|
+
/* ───────────────────────────────────────────── Blacklists */
|
|
10
|
+
const threeFiberElems = [
|
|
11
|
+
"object3D",
|
|
12
|
+
"audioListener",
|
|
13
|
+
"positionalAudio",
|
|
14
|
+
"mesh",
|
|
15
|
+
"batchedMesh",
|
|
16
|
+
"instancedMesh",
|
|
17
|
+
"scene",
|
|
18
|
+
"sprite",
|
|
19
|
+
"lOD",
|
|
20
|
+
"skinnedMesh",
|
|
21
|
+
"skeleton",
|
|
22
|
+
"bone",
|
|
23
|
+
"lineSegments",
|
|
24
|
+
"lineLoop",
|
|
25
|
+
"points",
|
|
26
|
+
"group",
|
|
27
|
+
"camera",
|
|
28
|
+
"perspectiveCamera",
|
|
29
|
+
"orthographicCamera",
|
|
30
|
+
"cubeCamera",
|
|
31
|
+
"arrayCamera",
|
|
32
|
+
"instancedBufferGeometry",
|
|
33
|
+
"bufferGeometry",
|
|
34
|
+
"boxBufferGeometry",
|
|
35
|
+
"circleBufferGeometry",
|
|
36
|
+
"coneBufferGeometry",
|
|
37
|
+
"cylinderBufferGeometry",
|
|
38
|
+
"dodecahedronBufferGeometry",
|
|
39
|
+
"extrudeBufferGeometry",
|
|
40
|
+
"icosahedronBufferGeometry",
|
|
41
|
+
"latheBufferGeometry",
|
|
42
|
+
"octahedronBufferGeometry",
|
|
43
|
+
"planeBufferGeometry",
|
|
44
|
+
"polyhedronBufferGeometry",
|
|
45
|
+
"ringBufferGeometry",
|
|
46
|
+
"shapeBufferGeometry",
|
|
47
|
+
"sphereBufferGeometry",
|
|
48
|
+
"tetrahedronBufferGeometry",
|
|
49
|
+
"torusBufferGeometry",
|
|
50
|
+
"torusKnotBufferGeometry",
|
|
51
|
+
"tubeBufferGeometry",
|
|
52
|
+
"wireframeGeometry",
|
|
53
|
+
"tetrahedronGeometry",
|
|
54
|
+
"octahedronGeometry",
|
|
55
|
+
"icosahedronGeometry",
|
|
56
|
+
"dodecahedronGeometry",
|
|
57
|
+
"polyhedronGeometry",
|
|
58
|
+
"tubeGeometry",
|
|
59
|
+
"torusKnotGeometry",
|
|
60
|
+
"torusGeometry",
|
|
61
|
+
"sphereGeometry",
|
|
62
|
+
"ringGeometry",
|
|
63
|
+
"planeGeometry",
|
|
64
|
+
"latheGeometry",
|
|
65
|
+
"shapeGeometry",
|
|
66
|
+
"extrudeGeometry",
|
|
67
|
+
"edgesGeometry",
|
|
68
|
+
"coneGeometry",
|
|
69
|
+
"cylinderGeometry",
|
|
70
|
+
"circleGeometry",
|
|
71
|
+
"boxGeometry",
|
|
72
|
+
"capsuleGeometry",
|
|
73
|
+
"material",
|
|
74
|
+
"shadowMaterial",
|
|
75
|
+
"spriteMaterial",
|
|
76
|
+
"rawShaderMaterial",
|
|
77
|
+
"shaderMaterial",
|
|
78
|
+
"pointsMaterial",
|
|
79
|
+
"meshPhysicalMaterial",
|
|
80
|
+
"meshStandardMaterial",
|
|
81
|
+
"meshPhongMaterial",
|
|
82
|
+
"meshToonMaterial",
|
|
83
|
+
"meshNormalMaterial",
|
|
84
|
+
"meshLambertMaterial",
|
|
85
|
+
"meshDepthMaterial",
|
|
86
|
+
"meshDistanceMaterial",
|
|
87
|
+
"meshBasicMaterial",
|
|
88
|
+
"meshMatcapMaterial",
|
|
89
|
+
"lineDashedMaterial",
|
|
90
|
+
"lineBasicMaterial",
|
|
91
|
+
"primitive",
|
|
92
|
+
"light",
|
|
93
|
+
"spotLightShadow",
|
|
94
|
+
"spotLight",
|
|
95
|
+
"pointLight",
|
|
96
|
+
"rectAreaLight",
|
|
97
|
+
"hemisphereLight",
|
|
98
|
+
"directionalLightShadow",
|
|
99
|
+
"directionalLight",
|
|
100
|
+
"ambientLight",
|
|
101
|
+
"lightShadow",
|
|
102
|
+
"ambientLightProbe",
|
|
103
|
+
"hemisphereLightProbe",
|
|
104
|
+
"lightProbe",
|
|
105
|
+
"spotLightHelper",
|
|
106
|
+
"skeletonHelper",
|
|
107
|
+
"pointLightHelper",
|
|
108
|
+
"hemisphereLightHelper",
|
|
109
|
+
"gridHelper",
|
|
110
|
+
"polarGridHelper",
|
|
111
|
+
"directionalLightHelper",
|
|
112
|
+
"cameraHelper",
|
|
113
|
+
"boxHelper",
|
|
114
|
+
"box3Helper",
|
|
115
|
+
"planeHelper",
|
|
116
|
+
"arrowHelper",
|
|
117
|
+
"axesHelper",
|
|
118
|
+
"texture",
|
|
119
|
+
"videoTexture",
|
|
120
|
+
"dataTexture",
|
|
121
|
+
"dataTexture3D",
|
|
122
|
+
"compressedTexture",
|
|
123
|
+
"cubeTexture",
|
|
124
|
+
"canvasTexture",
|
|
125
|
+
"depthTexture",
|
|
126
|
+
"raycaster",
|
|
127
|
+
"vector2",
|
|
128
|
+
"vector3",
|
|
129
|
+
"vector4",
|
|
130
|
+
"euler",
|
|
131
|
+
"matrix3",
|
|
132
|
+
"matrix4",
|
|
133
|
+
"quaternion",
|
|
134
|
+
"bufferAttribute",
|
|
135
|
+
"float16BufferAttribute",
|
|
136
|
+
"float32BufferAttribute",
|
|
137
|
+
"float64BufferAttribute",
|
|
138
|
+
"int8BufferAttribute",
|
|
139
|
+
"int16BufferAttribute",
|
|
140
|
+
"int32BufferAttribute",
|
|
141
|
+
"uint8BufferAttribute",
|
|
142
|
+
"uint16BufferAttribute",
|
|
143
|
+
"uint32BufferAttribute",
|
|
144
|
+
"instancedBufferAttribute",
|
|
145
|
+
"color",
|
|
146
|
+
"fog",
|
|
147
|
+
"fogExp2",
|
|
148
|
+
"shape",
|
|
149
|
+
"colorShiftMaterial"
|
|
150
|
+
];
|
|
151
|
+
const dreiElems = [
|
|
152
|
+
"AsciiRenderer",
|
|
153
|
+
"Billboard",
|
|
154
|
+
"Clone",
|
|
155
|
+
"ComputedAttribute",
|
|
156
|
+
"Decal",
|
|
157
|
+
"Edges",
|
|
158
|
+
"Effects",
|
|
159
|
+
"GradientTexture",
|
|
160
|
+
"MarchingCubes",
|
|
161
|
+
"Outlines",
|
|
162
|
+
"PositionalAudio",
|
|
163
|
+
"Sampler",
|
|
164
|
+
"ScreenSizer",
|
|
165
|
+
"ScreenSpace",
|
|
166
|
+
"Splat",
|
|
167
|
+
"Svg",
|
|
168
|
+
"Text",
|
|
169
|
+
"Text3D",
|
|
170
|
+
"Trail",
|
|
171
|
+
"CubeCamera",
|
|
172
|
+
"OrthographicCamera",
|
|
173
|
+
"PerspectiveCamera",
|
|
174
|
+
"CameraControls",
|
|
175
|
+
"FaceControls",
|
|
176
|
+
"KeyboardControls",
|
|
177
|
+
"MotionPathControls",
|
|
178
|
+
"PresentationControls",
|
|
179
|
+
"ScrollControls",
|
|
180
|
+
"DragControls",
|
|
181
|
+
"GizmoHelper",
|
|
182
|
+
"Grid",
|
|
183
|
+
"Helper",
|
|
184
|
+
"PivotControls",
|
|
185
|
+
"TransformControls",
|
|
186
|
+
"CubeTexture",
|
|
187
|
+
"Fbx",
|
|
188
|
+
"Gltf",
|
|
189
|
+
"Ktx2",
|
|
190
|
+
"Loader",
|
|
191
|
+
"Progress",
|
|
192
|
+
"ScreenVideoTexture",
|
|
193
|
+
"Texture",
|
|
194
|
+
"TrailTexture",
|
|
195
|
+
"VideoTexture",
|
|
196
|
+
"WebcamVideoTexture",
|
|
197
|
+
"CycleRaycast",
|
|
198
|
+
"DetectGPU",
|
|
199
|
+
"Example",
|
|
200
|
+
"FaceLandmarker",
|
|
201
|
+
"Fbo",
|
|
202
|
+
"Html",
|
|
203
|
+
"Select",
|
|
204
|
+
"SpriteAnimator",
|
|
205
|
+
"StatsGl",
|
|
206
|
+
"Stats",
|
|
207
|
+
"Trail",
|
|
208
|
+
"Wireframe",
|
|
209
|
+
"CurveModifier",
|
|
210
|
+
"AdaptiveDpr",
|
|
211
|
+
"AdaptiveEvents",
|
|
212
|
+
"BakeShadows",
|
|
213
|
+
"Bvh",
|
|
214
|
+
"Detailed",
|
|
215
|
+
"Instances",
|
|
216
|
+
"Merged",
|
|
217
|
+
"meshBounds",
|
|
218
|
+
"PerformanceMonitor",
|
|
219
|
+
"Points",
|
|
220
|
+
"Preload",
|
|
221
|
+
"Segments",
|
|
222
|
+
"Fisheye",
|
|
223
|
+
"Hud",
|
|
224
|
+
"Mask",
|
|
225
|
+
"MeshPortalMaterial",
|
|
226
|
+
"RenderCubeTexture",
|
|
227
|
+
"RenderTexture",
|
|
228
|
+
"View",
|
|
229
|
+
"MeshDiscardMaterial",
|
|
230
|
+
"MeshDistortMaterial",
|
|
231
|
+
"MeshReflectorMaterial",
|
|
232
|
+
"MeshRefractionMaterial",
|
|
233
|
+
"MeshTransmissionMaterial",
|
|
234
|
+
"MeshWobbleMaterial",
|
|
235
|
+
"PointMaterial",
|
|
236
|
+
"shaderMaterial",
|
|
237
|
+
"SoftShadows",
|
|
238
|
+
"CatmullRomLine",
|
|
239
|
+
"CubicBezierLine",
|
|
240
|
+
"Facemesh",
|
|
241
|
+
"Line",
|
|
242
|
+
"Mesh",
|
|
243
|
+
"QuadraticBezierLine",
|
|
244
|
+
"RoundedBox",
|
|
245
|
+
"ScreenQuad",
|
|
246
|
+
"AccumulativeShadows",
|
|
247
|
+
"Backdrop",
|
|
248
|
+
"BBAnchor",
|
|
249
|
+
"Bounds",
|
|
250
|
+
"CameraShake",
|
|
251
|
+
"Caustics",
|
|
252
|
+
"Center",
|
|
253
|
+
"Cloud",
|
|
254
|
+
"ContactShadows",
|
|
255
|
+
"Environment",
|
|
256
|
+
"Float",
|
|
257
|
+
"Lightformer",
|
|
258
|
+
"MatcapTexture",
|
|
259
|
+
"NormalTexture",
|
|
260
|
+
"RandomizedLight",
|
|
261
|
+
"Resize",
|
|
262
|
+
"ShadowAlpha",
|
|
263
|
+
"Shadow",
|
|
264
|
+
"Sky",
|
|
265
|
+
"Sparkles",
|
|
266
|
+
"SpotLightShadow",
|
|
267
|
+
"SpotLight",
|
|
268
|
+
"Stage",
|
|
269
|
+
"Stars",
|
|
270
|
+
"OrbitControls"
|
|
271
|
+
];
|
|
272
|
+
const shouldTag = (name) => !threeFiberElems.includes(name) && !dreiElems.includes(name);
|
|
273
|
+
// ➕ Collect aliases of the Next.js <Image> component so we can reliably tag it even if it was renamed.
|
|
274
|
+
const isNextImageAlias = (aliases, name) => aliases.has(name);
|
|
275
|
+
const extractLiteralValue = (node) => {
|
|
276
|
+
if (!node)
|
|
277
|
+
return undefined;
|
|
278
|
+
switch (node.type) {
|
|
279
|
+
case 'StringLiteral':
|
|
280
|
+
return node.value;
|
|
281
|
+
case 'NumericLiteral':
|
|
282
|
+
return node.value;
|
|
283
|
+
case 'BooleanLiteral':
|
|
284
|
+
return node.value;
|
|
285
|
+
case 'ObjectExpression':
|
|
286
|
+
const obj = {};
|
|
287
|
+
for (const prop of node.properties) {
|
|
288
|
+
if (prop.type === 'ObjectProperty' && !prop.computed) {
|
|
289
|
+
const key = prop.key.type === 'Identifier' ? prop.key.name : prop.key.value;
|
|
290
|
+
obj[key] = extractLiteralValue(prop.value);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return obj;
|
|
294
|
+
case 'ArrayExpression':
|
|
295
|
+
return node.elements.map((el) => extractLiteralValue(el));
|
|
296
|
+
default:
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
const findVariableDeclarations = (ast) => {
|
|
301
|
+
const variables = new Map();
|
|
302
|
+
(0, estree_walker_1.walk)(ast, {
|
|
303
|
+
enter(node) {
|
|
304
|
+
var _a;
|
|
305
|
+
// Handle const/let/var declarations
|
|
306
|
+
if (node.type === 'VariableDeclaration') {
|
|
307
|
+
for (const declarator of node.declarations) {
|
|
308
|
+
if (declarator.id.type === 'Identifier' && declarator.init) {
|
|
309
|
+
const varName = declarator.id.name;
|
|
310
|
+
const value = extractLiteralValue(declarator.init);
|
|
311
|
+
variables.set(varName, {
|
|
312
|
+
name: varName,
|
|
313
|
+
type: Array.isArray(value) ? 'array' : typeof value === 'object' ? 'object' : 'primitive',
|
|
314
|
+
value,
|
|
315
|
+
arrayItems: Array.isArray(value) ? value : undefined,
|
|
316
|
+
loc: (_a = declarator.loc) === null || _a === void 0 ? void 0 : _a.start
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
return variables;
|
|
324
|
+
};
|
|
325
|
+
const findMapContext = (node, variables) => {
|
|
326
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
327
|
+
// Walk up the tree to find if this JSX element is inside a map call
|
|
328
|
+
let current = node;
|
|
329
|
+
let depth = 0;
|
|
330
|
+
const maxDepth = 10; // Prevent infinite loops
|
|
331
|
+
while (current && depth < maxDepth) {
|
|
332
|
+
if (current.type === 'CallExpression' &&
|
|
333
|
+
((_a = current.callee) === null || _a === void 0 ? void 0 : _a.type) === 'MemberExpression' &&
|
|
334
|
+
((_c = (_b = current.callee) === null || _b === void 0 ? void 0 : _b.property) === null || _c === void 0 ? void 0 : _c.name) === 'map') {
|
|
335
|
+
// Found a .map() call, check if it's on a known array
|
|
336
|
+
const arrayName = (_d = current.callee.object) === null || _d === void 0 ? void 0 : _d.name;
|
|
337
|
+
const mapCallback = (_e = current.arguments) === null || _e === void 0 ? void 0 : _e[0];
|
|
338
|
+
if (arrayName && (mapCallback === null || mapCallback === void 0 ? void 0 : mapCallback.type) === 'ArrowFunctionExpression') {
|
|
339
|
+
const itemParam = (_f = mapCallback.params) === null || _f === void 0 ? void 0 : _f[0];
|
|
340
|
+
const indexParam = (_g = mapCallback.params) === null || _g === void 0 ? void 0 : _g[1];
|
|
341
|
+
if ((itemParam === null || itemParam === void 0 ? void 0 : itemParam.type) === 'Identifier') {
|
|
342
|
+
const varInfo = variables.get(arrayName);
|
|
343
|
+
return {
|
|
344
|
+
arrayName,
|
|
345
|
+
itemVarName: itemParam.name,
|
|
346
|
+
arrayItems: varInfo === null || varInfo === void 0 ? void 0 : varInfo.arrayItems,
|
|
347
|
+
arrayLoc: varInfo === null || varInfo === void 0 ? void 0 : varInfo.loc,
|
|
348
|
+
indexVarName: (indexParam === null || indexParam === void 0 ? void 0 : indexParam.type) === 'Identifier' ? indexParam.name : undefined
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
current = current.parent;
|
|
354
|
+
depth++;
|
|
355
|
+
}
|
|
356
|
+
return null;
|
|
357
|
+
};
|
|
358
|
+
const getSemanticName = (node, mapContext, imageAliases) => {
|
|
359
|
+
const getName = () => {
|
|
360
|
+
if (node.name.type === 'JSXIdentifier')
|
|
361
|
+
return node.name.name;
|
|
362
|
+
if (node.name.type === 'JSXMemberExpression')
|
|
363
|
+
return `${node.name.object.name}.${node.name.property.name}`;
|
|
364
|
+
return null;
|
|
365
|
+
};
|
|
366
|
+
const tagName = getName();
|
|
367
|
+
if (!tagName)
|
|
368
|
+
return null;
|
|
369
|
+
// For Next.js Image components, always return 'img' so the name is a valid HTML tag.
|
|
370
|
+
if (isNextImageAlias(imageAliases, tagName)) {
|
|
371
|
+
return 'img';
|
|
372
|
+
}
|
|
373
|
+
return isNextImageAlias(imageAliases, tagName) ? 'img' : tagName;
|
|
374
|
+
};
|
|
375
|
+
/* ───────────────────────────────────────────── Loader */
|
|
376
|
+
function componentTagger(src, map) {
|
|
377
|
+
const done = this.async();
|
|
378
|
+
try {
|
|
379
|
+
if (/node_modules/.test(this.resourcePath))
|
|
380
|
+
return done(null, src, map);
|
|
381
|
+
const ast = (0, parser_1.parse)(src, {
|
|
382
|
+
sourceType: 'module',
|
|
383
|
+
plugins: ['jsx', 'typescript'],
|
|
384
|
+
});
|
|
385
|
+
const ms = new magic_string_1.default(src);
|
|
386
|
+
const rel = path.relative(process.cwd(), this.resourcePath);
|
|
387
|
+
let mutated = false;
|
|
388
|
+
// Add parent references to AST nodes for upward traversal (non-enumerable to avoid infinite recursion)
|
|
389
|
+
(0, estree_walker_1.walk)(ast, {
|
|
390
|
+
enter(node, parent) {
|
|
391
|
+
if (parent && !Object.prototype.hasOwnProperty.call(node, 'parent')) {
|
|
392
|
+
Object.defineProperty(node, 'parent', { value: parent, enumerable: false });
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
// 0️⃣ Collect variable declarations first
|
|
397
|
+
const variables = findVariableDeclarations(ast);
|
|
398
|
+
// 1️⃣ Gather local identifiers that reference `next/image`.
|
|
399
|
+
const imageAliases = new Set();
|
|
400
|
+
(0, estree_walker_1.walk)(ast, {
|
|
401
|
+
enter(node) {
|
|
402
|
+
if (node.type === 'ImportDeclaration' &&
|
|
403
|
+
node.source.value === 'next/image') {
|
|
404
|
+
for (const spec of node.specifiers) {
|
|
405
|
+
imageAliases.add(spec.local.name);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
});
|
|
410
|
+
// 2️⃣ Inject attributes with enhanced semantic context.
|
|
411
|
+
(0, estree_walker_1.walk)(ast, {
|
|
412
|
+
enter(node) {
|
|
413
|
+
var _a;
|
|
414
|
+
if (node.type !== 'JSXOpeningElement')
|
|
415
|
+
return;
|
|
416
|
+
const mapContext = findMapContext(node, variables);
|
|
417
|
+
const semanticName = getSemanticName(node, mapContext, imageAliases);
|
|
418
|
+
if (!semanticName ||
|
|
419
|
+
['Fragment', 'React.Fragment'].includes(semanticName) ||
|
|
420
|
+
(!isNextImageAlias(imageAliases, semanticName.split('-')[0]) &&
|
|
421
|
+
!shouldTag(semanticName)))
|
|
422
|
+
return;
|
|
423
|
+
const { line, column } = node.loc.start;
|
|
424
|
+
let orchidsId = `${rel}:${line}:${column}`;
|
|
425
|
+
// Enhance the ID with context if we have map information
|
|
426
|
+
if (mapContext) {
|
|
427
|
+
orchidsId += `@${mapContext.arrayName}`;
|
|
428
|
+
}
|
|
429
|
+
// 🔍 Append referenced variable locations for simple identifier references in props
|
|
430
|
+
(_a = node.attributes) === null || _a === void 0 ? void 0 : _a.forEach((attr) => {
|
|
431
|
+
var _a, _b;
|
|
432
|
+
if (attr.type === 'JSXAttribute' &&
|
|
433
|
+
((_a = attr.value) === null || _a === void 0 ? void 0 : _a.type) === 'JSXExpressionContainer' &&
|
|
434
|
+
((_b = attr.value.expression) === null || _b === void 0 ? void 0 : _b.type) === 'Identifier') {
|
|
435
|
+
const refName = attr.value.expression.name;
|
|
436
|
+
const varInfo = variables.get(refName);
|
|
437
|
+
if (varInfo) {
|
|
438
|
+
orchidsId += `@${refName}`;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
// 📍 If inside a map context and we have an index variable, inject data-map-index
|
|
443
|
+
if (mapContext === null || mapContext === void 0 ? void 0 : mapContext.indexVarName) {
|
|
444
|
+
ms.appendLeft(node.name.end, ` data-map-index={${mapContext.indexVarName}}`);
|
|
445
|
+
}
|
|
446
|
+
ms.appendLeft(node.name.end, ` data-orchids-id="${orchidsId}" data-orchids-name="${semanticName}"`);
|
|
447
|
+
mutated = true;
|
|
448
|
+
},
|
|
449
|
+
});
|
|
450
|
+
if (!mutated)
|
|
451
|
+
return done(null, src, map);
|
|
452
|
+
const out = ms.toString();
|
|
453
|
+
const outMap = ms.generateMap({ hires: true });
|
|
454
|
+
/* Turbopack expects the sourcemap as a JSON *string*. */
|
|
455
|
+
done(null, out, JSON.stringify(outMap));
|
|
456
|
+
}
|
|
457
|
+
catch (err) {
|
|
458
|
+
done(err);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"module": "esnext",
|
|
15
|
+
"moduleResolution": "bundler",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"jsx": "preserve",
|
|
19
|
+
"incremental": true,
|
|
20
|
+
"plugins": [
|
|
21
|
+
{
|
|
22
|
+
"name": "next"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"paths": {
|
|
26
|
+
"@/*": [
|
|
27
|
+
"./src/*"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"next-env.d.ts",
|
|
33
|
+
"**/*.ts",
|
|
34
|
+
"**/*.tsx",
|
|
35
|
+
".next/types/**/*.ts",
|
|
36
|
+
".next/dev/types/**/*.ts",
|
|
37
|
+
"**/*.mts"
|
|
38
|
+
],
|
|
39
|
+
"exclude": [
|
|
40
|
+
"node_modules"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|