@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.
Files changed (79) hide show
  1. package/CHANGELOG.md +6 -4
  2. package/dist/definitions/TabBar/TabBar.d.ts +6 -4
  3. package/dist/definitions/TabBar/TabBar.d.ts.map +1 -1
  4. package/dist/definitions/TabBar/TabBarItem.d.ts +11 -1
  5. package/dist/definitions/TabBar/TabBarItem.d.ts.map +1 -1
  6. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +180 -12
  7. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  8. package/dist/definitions/themes/default.d.ts +1 -12
  9. package/dist/definitions/themes/default.d.ts.map +1 -1
  10. package/dist/definitions/themes/late-ocean/icon.d.ts +0 -20
  11. package/dist/definitions/themes/late-ocean/icon.d.ts.map +1 -1
  12. package/dist/definitions/themes/late-ocean/tabBar.d.ts +34 -0
  13. package/dist/definitions/themes/late-ocean/tabBar.d.ts.map +1 -0
  14. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  15. package/dist/definitions/typography/TypographyIcon.d.ts.map +1 -1
  16. package/dist/definitions/typography/utils/getTypographyFamily.d.ts +2 -1
  17. package/dist/definitions/typography/utils/getTypographyFamily.d.ts.map +1 -1
  18. package/dist/index-metro.es.android.js +565 -250
  19. package/dist/index-metro.es.android.js.map +1 -1
  20. package/dist/index-metro.es.ios.js +565 -250
  21. package/dist/index-metro.es.ios.js.map +1 -1
  22. package/dist/index-node-22.17.cjs.js +456 -140
  23. package/dist/index-node-22.17.cjs.js.map +1 -1
  24. package/dist/index-node-22.17.cjs.web.js +457 -141
  25. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  26. package/dist/index-node-22.17.es.mjs +456 -140
  27. package/dist/index-node-22.17.es.mjs.map +1 -1
  28. package/dist/index-node-22.17.es.web.mjs +457 -141
  29. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  30. package/dist/index.es.js +567 -242
  31. package/dist/index.es.js.map +1 -1
  32. package/dist/index.es.web.js +566 -241
  33. package/dist/index.es.web.js.map +1 -1
  34. package/dist/linaria-themes-metro.es.android.js +179 -36
  35. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  36. package/dist/linaria-themes-metro.es.ios.js +179 -36
  37. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  38. package/dist/linaria-themes-node-22.17.cjs.js +179 -36
  39. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  40. package/dist/linaria-themes-node-22.17.cjs.web.js +179 -36
  41. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  42. package/dist/linaria-themes-node-22.17.es.mjs +179 -36
  43. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  44. package/dist/linaria-themes-node-22.17.es.web.mjs +179 -36
  45. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  46. package/dist/linaria-themes.es.js +179 -36
  47. package/dist/linaria-themes.es.js.map +1 -1
  48. package/dist/linaria-themes.es.web.js +179 -36
  49. package/dist/linaria-themes.es.web.js.map +1 -1
  50. package/dist/tsbuildinfo +1 -1
  51. package/package.json +2 -2
  52. package/scripts/codemods/card-modal.js +155 -0
  53. package/scripts/codemods/fullscreen-modal.js +155 -0
  54. package/scripts/codemods/navigation-modal.js +155 -0
  55. package/scripts/{run-transformers.js → run-codemods.js} +30 -32
  56. package/scripts/transformers/card-modal.js +0 -101
  57. package/scripts/transformers/fullscreen-modal.js +0 -101
  58. package/scripts/transformers/navigation-modal.js +0 -101
  59. /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/basic.input.js +0 -0
  60. /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/basic.output.js +0 -0
  61. /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.input.js +0 -0
  62. /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/withExpressions.output.js +0 -0
  63. /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/wrongOrder.input.js +0 -0
  64. /package/scripts/{transformers → codemods}/__testfixtures__/card-modal/wrongOrder.output.js +0 -0
  65. /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.input.js +0 -0
  66. /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/basic.output.js +0 -0
  67. /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/withExpressions.input.js +0 -0
  68. /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/withExpressions.output.js +0 -0
  69. /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.input.js +0 -0
  70. /package/scripts/{transformers → codemods}/__testfixtures__/fullscreen-modal/wrongOrder.output.js +0 -0
  71. /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.input.js +0 -0
  72. /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/basic.output.js +0 -0
  73. /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/withExpressions.input.js +0 -0
  74. /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/withExpressions.output.js +0 -0
  75. /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.input.js +0 -0
  76. /package/scripts/{transformers → codemods}/__testfixtures__/navigation-modal/wrongOrder.output.js +0 -0
  77. /package/scripts/{transformers → codemods}/__tests__/card-modal.test.js +0 -0
  78. /package/scripts/{transformers → codemods}/__tests__/fullscreen-modal.test.js +0 -0
  79. /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
- };