@ornikar/kitt-universal 27.5.1-canary.eac3fc19869888632e3a59913cf9f700a72b0dad.0 → 27.6.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/CHANGELOG.md +6 -4
- package/dist/definitions/TabBar/TabBar.d.ts +6 -4
- package/dist/definitions/TabBar/TabBar.d.ts.map +1 -1
- package/dist/definitions/TabBar/TabBarItem.d.ts +11 -1
- package/dist/definitions/TabBar/TabBarItem.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +180 -12
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -12
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/icon.d.ts +0 -20
- package/dist/definitions/themes/late-ocean/icon.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tabBar.d.ts +34 -0
- package/dist/definitions/themes/late-ocean/tabBar.d.ts.map +1 -0
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
- package/dist/definitions/typography/utils/getTypographyFamily.d.ts +2 -1
- package/dist/definitions/typography/utils/getTypographyFamily.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +565 -250
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +565 -250
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +456 -140
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +457 -141
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +456 -140
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +457 -141
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +567 -242
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +566 -241
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +179 -36
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +179 -36
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +179 -36
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +179 -36
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +179 -36
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +179 -36
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +179 -36
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +179 -36
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/scripts/codemods/card-modal.js +155 -0
- package/scripts/codemods/fullscreen-modal.js +155 -0
- package/scripts/codemods/navigation-modal.js +155 -0
- package/scripts/{run-transformers.js → run-codemods.js} +30 -32
- package/scripts/transformers/card-modal.js +0 -101
- package/scripts/transformers/fullscreen-modal.js +0 -101
- package/scripts/transformers/navigation-modal.js +0 -101
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/basic.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/basic.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/wrongOrder.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/wrongOrder.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/withExpressions.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/withExpressions.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/withExpressions.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/withExpressions.output.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.input.js +0 -0
- /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.output.js +0 -0
- /package/scripts/{transformers → codemods}/__tests__/card-modal.test.js +0 -0
- /package/scripts/{transformers → codemods}/__tests__/fullscreen-modal.test.js +0 -0
- /package/scripts/{transformers → codemods}/__tests__/navigation-modal.test.js +0 -0
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Transform CardModal from props-based API to children-based API
|
|
4
|
-
// Converts header, body, footer props to nested children in the correct order
|
|
5
|
-
|
|
6
|
-
// Use local jscodeshift instance directly
|
|
7
|
-
const jscodeshift = require('jscodeshift');
|
|
8
|
-
const prettier = require('prettier');
|
|
9
|
-
|
|
10
|
-
module.exports = async function transformer(fileInfo, api) {
|
|
11
|
-
// Use the jscodeshift API to parse the file
|
|
12
|
-
const j = api.jscodeshift || jscodeshift;
|
|
13
|
-
|
|
14
|
-
// Parse the source code of the file
|
|
15
|
-
const root = j(fileInfo.source);
|
|
16
|
-
|
|
17
|
-
// ----------- Start of transformer logic
|
|
18
|
-
|
|
19
|
-
// Find all CardModal JSX elements
|
|
20
|
-
root
|
|
21
|
-
.find(j.JSXElement, {
|
|
22
|
-
openingElement: {
|
|
23
|
-
name: {
|
|
24
|
-
name: 'CardModal',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
.forEach((path) => {
|
|
29
|
-
const element = path.value;
|
|
30
|
-
const { openingElement } = element;
|
|
31
|
-
|
|
32
|
-
// Extract header, body, and footer props
|
|
33
|
-
const getAttributeByName = (attributes, name) => {
|
|
34
|
-
return attributes.find((attr) => attr.type === 'JSXAttribute' && attr.name.name === name);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const headerProp = getAttributeByName(openingElement.attributes, 'header');
|
|
38
|
-
const bodyProp = getAttributeByName(openingElement.attributes, 'body');
|
|
39
|
-
const footerProp = getAttributeByName(openingElement.attributes, 'footer');
|
|
40
|
-
|
|
41
|
-
// If we found any of these props, transform the element
|
|
42
|
-
if (headerProp || bodyProp || footerProp) {
|
|
43
|
-
// Remove the header, body, and footer attributes
|
|
44
|
-
openingElement.attributes = openingElement.attributes.filter((attr) => {
|
|
45
|
-
if (attr.type !== 'JSXAttribute') return true;
|
|
46
|
-
return !['header', 'body', 'footer'].includes(attr.name.name);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Create children array in the correct order: header, body, footer
|
|
50
|
-
const children = [];
|
|
51
|
-
|
|
52
|
-
// Helper function to extract child from prop value
|
|
53
|
-
const extractChild = (propValue) => {
|
|
54
|
-
if (propValue.type === 'JSXExpressionContainer') {
|
|
55
|
-
// Check if the expression is a simple JSX element (not a conditional/complex expression)
|
|
56
|
-
if (propValue.expression.type === 'JSXElement') {
|
|
57
|
-
// For simple JSX elements, use them directly as children
|
|
58
|
-
return propValue.expression;
|
|
59
|
-
}
|
|
60
|
-
// For complex expressions (conditionals, etc.), keep as expression container
|
|
61
|
-
return propValue;
|
|
62
|
-
}
|
|
63
|
-
return propValue;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Add header if it exists
|
|
67
|
-
if (headerProp && headerProp.value) {
|
|
68
|
-
children.push(extractChild(headerProp.value));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Add body if it exists
|
|
72
|
-
if (bodyProp && bodyProp.value) {
|
|
73
|
-
children.push(extractChild(bodyProp.value));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Add footer if it exists
|
|
77
|
-
if (footerProp && footerProp.value) {
|
|
78
|
-
children.push(extractChild(footerProp.value));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Update the element to have children instead of being self-closing
|
|
82
|
-
if (children.length > 0) {
|
|
83
|
-
element.children = children;
|
|
84
|
-
element.closingElement = j.jsxClosingElement(j.jsxIdentifier('CardModal'));
|
|
85
|
-
openingElement.selfClosing = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
// ----------- End of transformer logic
|
|
91
|
-
|
|
92
|
-
// Return the modified source code after transformation
|
|
93
|
-
const output = root.toSource({ quote: 'single' });
|
|
94
|
-
|
|
95
|
-
const prettierConfig = await prettier.resolveConfig(fileInfo.path);
|
|
96
|
-
|
|
97
|
-
return prettier.format(output, {
|
|
98
|
-
...prettierConfig,
|
|
99
|
-
filepath: fileInfo.path,
|
|
100
|
-
});
|
|
101
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Transform FullscreenModal from props-based API to children-based API
|
|
4
|
-
// Converts header, body, footer props to nested children in the correct order
|
|
5
|
-
|
|
6
|
-
// Use local jscodeshift instance directly
|
|
7
|
-
const jscodeshift = require('jscodeshift');
|
|
8
|
-
const prettier = require('prettier');
|
|
9
|
-
|
|
10
|
-
module.exports = async function transformer(fileInfo, api) {
|
|
11
|
-
// Use the jscodeshift API to parse the file
|
|
12
|
-
const j = api.jscodeshift || jscodeshift;
|
|
13
|
-
|
|
14
|
-
// Parse the source code of the file
|
|
15
|
-
const root = j(fileInfo.source);
|
|
16
|
-
|
|
17
|
-
// ----------- Start of transformer logic
|
|
18
|
-
|
|
19
|
-
// Find all FullscreenModal JSX elements
|
|
20
|
-
root
|
|
21
|
-
.find(j.JSXElement, {
|
|
22
|
-
openingElement: {
|
|
23
|
-
name: {
|
|
24
|
-
name: 'FullscreenModal',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
.forEach((path) => {
|
|
29
|
-
const element = path.value;
|
|
30
|
-
const { openingElement } = element;
|
|
31
|
-
|
|
32
|
-
// Extract header, body, and footer props
|
|
33
|
-
const getAttributeByName = (attributes, name) => {
|
|
34
|
-
return attributes.find((attr) => attr.type === 'JSXAttribute' && attr.name.name === name);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const headerProp = getAttributeByName(openingElement.attributes, 'header');
|
|
38
|
-
const bodyProp = getAttributeByName(openingElement.attributes, 'body');
|
|
39
|
-
const footerProp = getAttributeByName(openingElement.attributes, 'footer');
|
|
40
|
-
|
|
41
|
-
// If we found any of these props, transform the element
|
|
42
|
-
if (headerProp || bodyProp || footerProp) {
|
|
43
|
-
// Remove the header, body, and footer attributes
|
|
44
|
-
openingElement.attributes = openingElement.attributes.filter((attr) => {
|
|
45
|
-
if (attr.type !== 'JSXAttribute') return true;
|
|
46
|
-
return !['header', 'body', 'footer'].includes(attr.name.name);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Create children array in the correct order: header, body, footer
|
|
50
|
-
const children = [];
|
|
51
|
-
|
|
52
|
-
// Helper function to extract child from prop value
|
|
53
|
-
const extractChild = (propValue) => {
|
|
54
|
-
if (propValue.type === 'JSXExpressionContainer') {
|
|
55
|
-
// Check if the expression is a simple JSX element (not a conditional/complex expression)
|
|
56
|
-
if (propValue.expression.type === 'JSXElement') {
|
|
57
|
-
// For simple JSX elements, use them directly as children
|
|
58
|
-
return propValue.expression;
|
|
59
|
-
}
|
|
60
|
-
// For complex expressions (conditionals, etc.), keep as expression container
|
|
61
|
-
return propValue;
|
|
62
|
-
}
|
|
63
|
-
return propValue;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Add header if it exists
|
|
67
|
-
if (headerProp && headerProp.value) {
|
|
68
|
-
children.push(extractChild(headerProp.value));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Add body if it exists
|
|
72
|
-
if (bodyProp && bodyProp.value) {
|
|
73
|
-
children.push(extractChild(bodyProp.value));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Add footer if it exists
|
|
77
|
-
if (footerProp && footerProp.value) {
|
|
78
|
-
children.push(extractChild(footerProp.value));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Update the element to have children instead of being self-closing
|
|
82
|
-
if (children.length > 0) {
|
|
83
|
-
element.children = children;
|
|
84
|
-
element.closingElement = j.jsxClosingElement(j.jsxIdentifier('FullscreenModal'));
|
|
85
|
-
openingElement.selfClosing = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
// ----------- End of transformer logic
|
|
91
|
-
|
|
92
|
-
// Return the modified source code after transformation
|
|
93
|
-
const output = root.toSource({ quote: 'single' });
|
|
94
|
-
|
|
95
|
-
const prettierConfig = await prettier.resolveConfig(fileInfo.path);
|
|
96
|
-
|
|
97
|
-
return prettier.format(output, {
|
|
98
|
-
...prettierConfig,
|
|
99
|
-
filepath: fileInfo.path,
|
|
100
|
-
});
|
|
101
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Transform NavigationModal from props-based API to children-based API
|
|
4
|
-
// Converts header, body, footer props to nested children in the correct order
|
|
5
|
-
|
|
6
|
-
// Use local jscodeshift instance directly
|
|
7
|
-
const jscodeshift = require('jscodeshift');
|
|
8
|
-
const prettier = require('prettier');
|
|
9
|
-
|
|
10
|
-
module.exports = async function transformer(fileInfo, api) {
|
|
11
|
-
// Use the jscodeshift API to parse the file
|
|
12
|
-
const j = api.jscodeshift || jscodeshift;
|
|
13
|
-
|
|
14
|
-
// Parse the source code of the file
|
|
15
|
-
const root = j(fileInfo.source);
|
|
16
|
-
|
|
17
|
-
// ----------- Start of transformer logic
|
|
18
|
-
|
|
19
|
-
// Find all NavigationModal JSX elements
|
|
20
|
-
root
|
|
21
|
-
.find(j.JSXElement, {
|
|
22
|
-
openingElement: {
|
|
23
|
-
name: {
|
|
24
|
-
name: 'NavigationModal',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
.forEach((path) => {
|
|
29
|
-
const element = path.value;
|
|
30
|
-
const { openingElement } = element;
|
|
31
|
-
|
|
32
|
-
// Extract header, body, and footer props
|
|
33
|
-
const getAttributeByName = (attributes, name) => {
|
|
34
|
-
return attributes.find((attr) => attr.type === 'JSXAttribute' && attr.name.name === name);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const headerProp = getAttributeByName(openingElement.attributes, 'header');
|
|
38
|
-
const bodyProp = getAttributeByName(openingElement.attributes, 'body');
|
|
39
|
-
const footerProp = getAttributeByName(openingElement.attributes, 'footer');
|
|
40
|
-
|
|
41
|
-
// If we found any of these props, transform the element
|
|
42
|
-
if (headerProp || bodyProp || footerProp) {
|
|
43
|
-
// Remove the header, body, and footer attributes
|
|
44
|
-
openingElement.attributes = openingElement.attributes.filter((attr) => {
|
|
45
|
-
if (attr.type !== 'JSXAttribute') return true;
|
|
46
|
-
return !['header', 'body', 'footer'].includes(attr.name.name);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Create children array in the correct order: header, body, footer
|
|
50
|
-
const children = [];
|
|
51
|
-
|
|
52
|
-
// Helper function to extract child from prop value
|
|
53
|
-
const extractChild = (propValue) => {
|
|
54
|
-
if (propValue.type === 'JSXExpressionContainer') {
|
|
55
|
-
// Check if the expression is a simple JSX element (not a conditional/complex expression)
|
|
56
|
-
if (propValue.expression.type === 'JSXElement') {
|
|
57
|
-
// For simple JSX elements, use them directly as children
|
|
58
|
-
return propValue.expression;
|
|
59
|
-
}
|
|
60
|
-
// For complex expressions (conditionals, etc.), keep as expression container
|
|
61
|
-
return propValue;
|
|
62
|
-
}
|
|
63
|
-
return propValue;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Add header if it exists
|
|
67
|
-
if (headerProp && headerProp.value) {
|
|
68
|
-
children.push(extractChild(headerProp.value));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Add body if it exists
|
|
72
|
-
if (bodyProp && bodyProp.value) {
|
|
73
|
-
children.push(extractChild(bodyProp.value));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Add footer if it exists
|
|
77
|
-
if (footerProp && footerProp.value) {
|
|
78
|
-
children.push(extractChild(footerProp.value));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Update the element to have children instead of being self-closing
|
|
82
|
-
if (children.length > 0) {
|
|
83
|
-
element.children = children;
|
|
84
|
-
element.closingElement = j.jsxClosingElement(j.jsxIdentifier('NavigationModal'));
|
|
85
|
-
openingElement.selfClosing = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
// ----------- End of transformer logic
|
|
91
|
-
|
|
92
|
-
// Return the modified source code after transformation
|
|
93
|
-
const output = root.toSource({ quote: 'single' });
|
|
94
|
-
|
|
95
|
-
const prettierConfig = await prettier.resolveConfig(fileInfo.path);
|
|
96
|
-
|
|
97
|
-
return prettier.format(output, {
|
|
98
|
-
...prettierConfig,
|
|
99
|
-
filepath: fileInfo.path,
|
|
100
|
-
});
|
|
101
|
-
};
|
|
File without changes
|
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.input.js
RENAMED
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.output.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.output.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.input.js
RENAMED
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.output.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.output.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.input.js
RENAMED
|
File without changes
|
/package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.output.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|