@archie/devtools 0.0.41 → 0.0.43
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/dist/{chunk-6QB35SLQ.mjs → chunk-P5XMHBFS.mjs} +249 -3
- package/dist/collection-binding.mjs +1 -1
- package/dist/index.d.mts +199 -0
- package/dist/index.d.ts +199 -0
- package/dist/index.js +249 -3
- package/dist/index.mjs +1 -1
- package/fixtures/prop-source.fixture.json +310 -0
- package/package.json +3 -2
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "attr-local-const-string",
|
|
4
|
+
"description": "const local con init string, sin props desestructuradas — atributo de la USAGE",
|
|
5
|
+
"code": "export default function Screen() {\n const title = \"Contenido\";\n return <Section title={title} />;\n}",
|
|
6
|
+
"usageComponentName": "Section",
|
|
7
|
+
"editorMeta": {
|
|
8
|
+
"nodeId": "src/components.jsx:3:10:Section",
|
|
9
|
+
"file": "src/components.jsx",
|
|
10
|
+
"line": 3,
|
|
11
|
+
"col": 10,
|
|
12
|
+
"componentName": "Section",
|
|
13
|
+
"staticProps": {
|
|
14
|
+
"title": "__dynamic__"
|
|
15
|
+
},
|
|
16
|
+
"movable": false,
|
|
17
|
+
"parentNodeId": null,
|
|
18
|
+
"childrenText": null,
|
|
19
|
+
"propSources": {
|
|
20
|
+
"title": {
|
|
21
|
+
"kind": "local-const",
|
|
22
|
+
"name": "title",
|
|
23
|
+
"file": "src/components.jsx",
|
|
24
|
+
"line": 2,
|
|
25
|
+
"col": 17,
|
|
26
|
+
"literal": "Contenido",
|
|
27
|
+
"refs": 1
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "attr-local-const-template-no-interp",
|
|
34
|
+
"description": "const local con init template literal SIN interpolaciones",
|
|
35
|
+
"code": "export default function Screen() {\n const title = `Contenido fijo`;\n return <Section title={title} />;\n}",
|
|
36
|
+
"usageComponentName": "Section",
|
|
37
|
+
"editorMeta": {
|
|
38
|
+
"nodeId": "src/components.jsx:3:10:Section",
|
|
39
|
+
"file": "src/components.jsx",
|
|
40
|
+
"line": 3,
|
|
41
|
+
"col": 10,
|
|
42
|
+
"componentName": "Section",
|
|
43
|
+
"staticProps": {
|
|
44
|
+
"title": "__dynamic__"
|
|
45
|
+
},
|
|
46
|
+
"movable": false,
|
|
47
|
+
"parentNodeId": null,
|
|
48
|
+
"childrenText": null,
|
|
49
|
+
"propSources": {
|
|
50
|
+
"title": {
|
|
51
|
+
"kind": "local-const",
|
|
52
|
+
"name": "title",
|
|
53
|
+
"file": "src/components.jsx",
|
|
54
|
+
"line": 2,
|
|
55
|
+
"col": 17,
|
|
56
|
+
"literal": "Contenido fijo",
|
|
57
|
+
"refs": 1
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "attr-local-const-refs-2",
|
|
64
|
+
"description": "FE MINOR-5: el MISMO const alimenta dos elementos — refs:2 en ambas usages",
|
|
65
|
+
"code": "export default function Screen() {\n const title = \"Contenido\";\n return (\n <div>\n <Section title={title} />\n <Aside title={title} />\n </div>\n );\n}",
|
|
66
|
+
"usageComponentName": "Section",
|
|
67
|
+
"editorMeta": {
|
|
68
|
+
"nodeId": "src/components.jsx:5:7:Section",
|
|
69
|
+
"file": "src/components.jsx",
|
|
70
|
+
"line": 5,
|
|
71
|
+
"col": 7,
|
|
72
|
+
"componentName": "Section",
|
|
73
|
+
"staticProps": {
|
|
74
|
+
"title": "__dynamic__"
|
|
75
|
+
},
|
|
76
|
+
"movable": true,
|
|
77
|
+
"parentNodeId": "src/components.jsx:4:5:div",
|
|
78
|
+
"childrenText": null,
|
|
79
|
+
"propSources": {
|
|
80
|
+
"title": {
|
|
81
|
+
"kind": "local-const",
|
|
82
|
+
"name": "title",
|
|
83
|
+
"file": "src/components.jsx",
|
|
84
|
+
"line": 2,
|
|
85
|
+
"col": 17,
|
|
86
|
+
"literal": "Contenido",
|
|
87
|
+
"refs": 2
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "attr-identifier-destructured-prop",
|
|
94
|
+
"description": "identificador que es una prop desestructurada del componente",
|
|
95
|
+
"code": "function Screen({ title }) { return <Section title={title} />; }",
|
|
96
|
+
"usageComponentName": "Section",
|
|
97
|
+
"editorMeta": {
|
|
98
|
+
"nodeId": "src/components.jsx:1:37:Section",
|
|
99
|
+
"file": "src/components.jsx",
|
|
100
|
+
"line": 1,
|
|
101
|
+
"col": 37,
|
|
102
|
+
"componentName": "Section",
|
|
103
|
+
"staticProps": {
|
|
104
|
+
"title": "__dynamic__"
|
|
105
|
+
},
|
|
106
|
+
"movable": false,
|
|
107
|
+
"parentNodeId": null,
|
|
108
|
+
"childrenText": null,
|
|
109
|
+
"propBindings": [
|
|
110
|
+
{
|
|
111
|
+
"target": "attr:title",
|
|
112
|
+
"prop": "title",
|
|
113
|
+
"kind": "direct"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"propOwner": "Screen",
|
|
117
|
+
"propSources": {
|
|
118
|
+
"title": {
|
|
119
|
+
"kind": "identifier",
|
|
120
|
+
"name": "title"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "attr-identifier-plain-param",
|
|
127
|
+
"description": "identificador que es un parametro NO desestructurado",
|
|
128
|
+
"code": "function Screen(props) { return <Section title={props} />; }",
|
|
129
|
+
"usageComponentName": "Section",
|
|
130
|
+
"editorMeta": {
|
|
131
|
+
"nodeId": "src/components.jsx:1:33:Section",
|
|
132
|
+
"file": "src/components.jsx",
|
|
133
|
+
"line": 1,
|
|
134
|
+
"col": 33,
|
|
135
|
+
"componentName": "Section",
|
|
136
|
+
"staticProps": {
|
|
137
|
+
"title": "__dynamic__"
|
|
138
|
+
},
|
|
139
|
+
"movable": false,
|
|
140
|
+
"parentNodeId": null,
|
|
141
|
+
"childrenText": null,
|
|
142
|
+
"propSources": {
|
|
143
|
+
"title": {
|
|
144
|
+
"kind": "identifier",
|
|
145
|
+
"name": "props"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "attr-member-props-title",
|
|
152
|
+
"description": "props.title — parametro plano accedido por propiedad",
|
|
153
|
+
"code": "function Screen(props) { return <Section title={props.title} />; }",
|
|
154
|
+
"usageComponentName": "Section",
|
|
155
|
+
"editorMeta": {
|
|
156
|
+
"nodeId": "src/components.jsx:1:33:Section",
|
|
157
|
+
"file": "src/components.jsx",
|
|
158
|
+
"line": 1,
|
|
159
|
+
"col": 33,
|
|
160
|
+
"componentName": "Section",
|
|
161
|
+
"staticProps": {
|
|
162
|
+
"title": "__dynamic__"
|
|
163
|
+
},
|
|
164
|
+
"movable": false,
|
|
165
|
+
"parentNodeId": null,
|
|
166
|
+
"childrenText": null,
|
|
167
|
+
"propSources": {
|
|
168
|
+
"title": {
|
|
169
|
+
"kind": "member",
|
|
170
|
+
"root": "props",
|
|
171
|
+
"path": [
|
|
172
|
+
"title"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "attr-member-deep-chain",
|
|
180
|
+
"description": "item.address.city — cadena de propiedades, en orden",
|
|
181
|
+
"code": "function Screen({ item }) { return <Section title={item.address.city} />; }",
|
|
182
|
+
"usageComponentName": "Section",
|
|
183
|
+
"editorMeta": {
|
|
184
|
+
"nodeId": "src/components.jsx:1:36:Section",
|
|
185
|
+
"file": "src/components.jsx",
|
|
186
|
+
"line": 1,
|
|
187
|
+
"col": 36,
|
|
188
|
+
"componentName": "Section",
|
|
189
|
+
"staticProps": {
|
|
190
|
+
"title": "__dynamic__"
|
|
191
|
+
},
|
|
192
|
+
"movable": false,
|
|
193
|
+
"parentNodeId": null,
|
|
194
|
+
"childrenText": null,
|
|
195
|
+
"propBindings": [
|
|
196
|
+
{
|
|
197
|
+
"target": "attr:title",
|
|
198
|
+
"prop": "item",
|
|
199
|
+
"kind": "formatted"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"propOwner": "Screen",
|
|
203
|
+
"propSources": {
|
|
204
|
+
"title": {
|
|
205
|
+
"kind": "member",
|
|
206
|
+
"root": "item",
|
|
207
|
+
"path": [
|
|
208
|
+
"address",
|
|
209
|
+
"city"
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "attr-other-reassigned",
|
|
217
|
+
"description": "binding reasignado en el fichero — nunca se traza",
|
|
218
|
+
"code": "export default function Screen() {\n let title = \"Contenido\";\n title = \"Otro valor\";\n return <Section title={title} />;\n}",
|
|
219
|
+
"usageComponentName": "Section",
|
|
220
|
+
"editorMeta": {
|
|
221
|
+
"nodeId": "src/components.jsx:4:10:Section",
|
|
222
|
+
"file": "src/components.jsx",
|
|
223
|
+
"line": 4,
|
|
224
|
+
"col": 10,
|
|
225
|
+
"componentName": "Section",
|
|
226
|
+
"staticProps": {
|
|
227
|
+
"title": "__dynamic__"
|
|
228
|
+
},
|
|
229
|
+
"movable": false,
|
|
230
|
+
"parentNodeId": null,
|
|
231
|
+
"childrenText": null,
|
|
232
|
+
"propSources": {
|
|
233
|
+
"title": {
|
|
234
|
+
"kind": "other"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"id": "attr-other-cross-module-import",
|
|
241
|
+
"description": "identificador importado de otro modulo — nunca se traza",
|
|
242
|
+
"code": "import { title } from './constants';\nexport default function Screen() {\n return <Section title={title} />;\n}",
|
|
243
|
+
"usageComponentName": "Section",
|
|
244
|
+
"editorMeta": {
|
|
245
|
+
"nodeId": "src/components.jsx:3:10:Section",
|
|
246
|
+
"file": "src/components.jsx",
|
|
247
|
+
"line": 3,
|
|
248
|
+
"col": 10,
|
|
249
|
+
"componentName": "Section",
|
|
250
|
+
"staticProps": {
|
|
251
|
+
"title": "__dynamic__"
|
|
252
|
+
},
|
|
253
|
+
"movable": false,
|
|
254
|
+
"parentNodeId": null,
|
|
255
|
+
"childrenText": null,
|
|
256
|
+
"propSources": {
|
|
257
|
+
"title": {
|
|
258
|
+
"kind": "other"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "children-local-const",
|
|
265
|
+
"description": "const local trazado a traves de la SOLA expresion hija",
|
|
266
|
+
"code": "export default function Screen() {\n const title = \"Contenido\";\n return <Section>{title}</Section>;\n}",
|
|
267
|
+
"usageComponentName": "Section",
|
|
268
|
+
"editorMeta": {
|
|
269
|
+
"nodeId": "src/components.jsx:3:10:Section",
|
|
270
|
+
"file": "src/components.jsx",
|
|
271
|
+
"line": 3,
|
|
272
|
+
"col": 10,
|
|
273
|
+
"componentName": "Section",
|
|
274
|
+
"staticProps": null,
|
|
275
|
+
"movable": false,
|
|
276
|
+
"parentNodeId": null,
|
|
277
|
+
"childrenText": "__dynamic__",
|
|
278
|
+
"childrenSource": {
|
|
279
|
+
"kind": "local-const",
|
|
280
|
+
"name": "title",
|
|
281
|
+
"file": "src/components.jsx",
|
|
282
|
+
"line": 2,
|
|
283
|
+
"col": 17,
|
|
284
|
+
"literal": "Contenido",
|
|
285
|
+
"refs": 1
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"id": "children-shadowing-map-callback-param",
|
|
291
|
+
"description": "MINOR-1: un const de modulo con el mismo nombre NUNCA gana — el parametro del callback de .map() shadowea",
|
|
292
|
+
"code": "const title = \"modulo\";\nexport default function Screen({ items }) {\n return items.map(({ title }) => <CardTitle>{title}</CardTitle>);\n}",
|
|
293
|
+
"usageComponentName": "CardTitle",
|
|
294
|
+
"editorMeta": {
|
|
295
|
+
"nodeId": "src/components.jsx:3:35:CardTitle",
|
|
296
|
+
"file": "src/components.jsx",
|
|
297
|
+
"line": 3,
|
|
298
|
+
"col": 35,
|
|
299
|
+
"componentName": "CardTitle",
|
|
300
|
+
"staticProps": null,
|
|
301
|
+
"movable": false,
|
|
302
|
+
"parentNodeId": null,
|
|
303
|
+
"childrenText": "__dynamic__",
|
|
304
|
+
"childrenSource": {
|
|
305
|
+
"kind": "identifier",
|
|
306
|
+
"name": "title"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archie/devtools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "DevTools for Archie generated applications - Route synchronization and editor communication",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"release": "node publish.js"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
|
-
"dist/**/*"
|
|
43
|
+
"dist/**/*",
|
|
44
|
+
"fixtures/**/*"
|
|
44
45
|
],
|
|
45
46
|
"keywords": [
|
|
46
47
|
"vite",
|