@wix/zero-config-implementation 1.57.0 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/src/converters/data-item-builder.test.ts +1 -1
- package/src/converters/data-item-builder.ts +3 -3
- package/src/information-extractors/react/utils/mock-generator.ts +2 -2
- package/src/information-extractors/ts/utils/semantic-type-resolver.ts +2 -2
- package/src/wix-type-to-data-type.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -11261,7 +11261,7 @@ function K8({
|
|
|
11261
11261
|
i === "ReactNode" || i === "ReactElement" ? t.dataType = It.container : (t.dataType = It.text, t.text = {});
|
|
11262
11262
|
return;
|
|
11263
11263
|
}
|
|
11264
|
-
if (s === "@wix/
|
|
11264
|
+
if (s === "@wix/editor-react-types") {
|
|
11265
11265
|
const a = L2[i];
|
|
11266
11266
|
a ? (t.dataType = It[a], j8({ dataItem: t, builderType: a, propUsages: r, propPath: n })) : (t.dataType = It.text, t.text = {});
|
|
11267
11267
|
return;
|
|
@@ -12281,7 +12281,7 @@ function f5(t, e) {
|
|
|
12281
12281
|
const n = r.getName(), i = G1(r, e);
|
|
12282
12282
|
if (i === "@types/react" || i === "react")
|
|
12283
12283
|
return U2.has(n) ? { kind: "semantic", value: n, source: i } : void 0;
|
|
12284
|
-
if (i === "@wix/
|
|
12284
|
+
if (i === "@wix/editor-react-types")
|
|
12285
12285
|
return W2(n) ? { kind: "semantic", value: n, source: i } : void 0;
|
|
12286
12286
|
}
|
|
12287
12287
|
function m5(t, e) {
|
|
@@ -12343,7 +12343,7 @@ function g5({
|
|
|
12343
12343
|
value: n,
|
|
12344
12344
|
source: u
|
|
12345
12345
|
};
|
|
12346
|
-
if (
|
|
12346
|
+
if (u === "@wix/editor-react-types" && W2(n))
|
|
12347
12347
|
return {
|
|
12348
12348
|
kind: "semantic",
|
|
12349
12349
|
value: n,
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"registry": "https://registry.npmjs.org/",
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.58.0",
|
|
8
8
|
"description": "Core library for extracting component manifests from JS and CSS files",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@wix/react-component-schema": "1.
|
|
47
|
+
"@wix/react-component-schema": "1.5.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@faker-js/faker": "^10.2.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
"falconPackageHash": "
|
|
88
|
+
"falconPackageHash": "f7fcdc7c7a9bd8348098a4e3301700ca40fb26281cd6352c13146b45"
|
|
89
89
|
}
|
|
@@ -49,7 +49,7 @@ describe('buildDataItem — arrayItems oneof branching', () => {
|
|
|
49
49
|
const semanticImage: ResolvedType = {
|
|
50
50
|
kind: 'semantic',
|
|
51
51
|
value: 'Image',
|
|
52
|
-
source: '@wix/
|
|
52
|
+
source: '@wix/editor-react-types',
|
|
53
53
|
}
|
|
54
54
|
const result = buildDataItem(buildArrayProp(semanticImage))
|
|
55
55
|
expect(result.isOk()).toBe(true)
|
|
@@ -344,7 +344,7 @@ function handleUnionType(
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
/**
|
|
347
|
-
* Handles semantic types from React and @wix/
|
|
347
|
+
* Handles semantic types from React and @wix/editor-react-types packages.
|
|
348
348
|
* Unknown semantic sources or types silently fall back to text.
|
|
349
349
|
*/
|
|
350
350
|
function handleSemanticType({
|
|
@@ -372,8 +372,8 @@ function handleSemanticType({
|
|
|
372
372
|
return
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
// Wix
|
|
376
|
-
if (source === '@wix/
|
|
375
|
+
// Wix editor-react-types (Builder) types - map directly to DATA_TYPE via explicit lookup
|
|
376
|
+
if (source === '@wix/editor-react-types') {
|
|
377
377
|
const dataTypeKey = WIX_TYPE_TO_DATA_TYPE[semanticValue]
|
|
378
378
|
if (dataTypeKey) {
|
|
379
379
|
dataItem.dataType = DATA_TYPE[dataTypeKey]
|
|
@@ -383,7 +383,7 @@ function generateMockLink(): Record<string, unknown> {
|
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
// String fields and string-literal-union fields of @wix/
|
|
386
|
+
// String fields and string-literal-union fields of @wix/editor-react-types A11y.
|
|
387
387
|
// These are emitted as unique trackable strings — DOM/React will accept any
|
|
388
388
|
// string for `aria-*` attributes regardless of the TS type union, so the spy
|
|
389
389
|
// markers flow through unchanged and the prop-tracker can detect usage.
|
|
@@ -412,7 +412,7 @@ const A11Y_STRING_FIELDS = [
|
|
|
412
412
|
'ariaInvalid',
|
|
413
413
|
] as const
|
|
414
414
|
|
|
415
|
-
// Numeric fields of @wix/
|
|
415
|
+
// Numeric fields of @wix/editor-react-types A11y.
|
|
416
416
|
const A11Y_NUMBER_FIELDS = ['tabIndex', 'ariaLevel'] as const
|
|
417
417
|
|
|
418
418
|
// Pure-boolean A11y fields (e.g. `multiline`) are intentionally omitted: the
|
|
@@ -74,7 +74,7 @@ function checkForSemanticType(
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// Check Wix types - only ones that map to DATA_TYPE keys
|
|
77
|
-
if (packageName === '@wix/
|
|
77
|
+
if (packageName === '@wix/editor-react-types') {
|
|
78
78
|
if (isValidWixSemanticType(symbolName)) {
|
|
79
79
|
return { kind: 'semantic', value: symbolName, source: packageName }
|
|
80
80
|
}
|
|
@@ -196,7 +196,7 @@ function resolveTypeBody({
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
// Check Wix types - only ones that map to DATA_TYPE keys
|
|
199
|
-
if (packageName === '@wix/
|
|
199
|
+
if (packageName === '@wix/editor-react-types') {
|
|
200
200
|
if (isValidWixSemanticType(typeString)) {
|
|
201
201
|
return {
|
|
202
202
|
kind: 'semantic',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DATA } from '@wix/react-component-schema'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Maps @wix/
|
|
5
|
-
* Derived from the exports of @wix/
|
|
4
|
+
* Maps @wix/editor-react-types type names (PascalCase) to their DATA_TYPE keys.
|
|
5
|
+
* Derived from the exports of @wix/editor-react-types.
|
|
6
6
|
*/
|
|
7
7
|
export const WIX_TYPE_TO_DATA_TYPE: Record<string, keyof typeof DATA.DATA_TYPE> = {
|
|
8
8
|
Link: 'link',
|