@recursica/mantine-adapter 0.9.4 → 1.0.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 (55) hide show
  1. package/README.md +275 -292
  2. package/dist/assets/src/components/Accordion/Accordion.css.ts.vanilla-BnZlbbJN.css +31 -0
  3. package/dist/index.d.ts +38 -8
  4. package/dist/mantine-adapter.cjs +94 -0
  5. package/dist/mantine-adapter.cjs.map +1 -0
  6. package/dist/mantine-adapter.css +0 -0
  7. package/dist/mantine-adapter.js +90 -0
  8. package/dist/mantine-adapter.js.map +1 -0
  9. package/package.json +80 -34
  10. package/dist/adapter/generateBorderRadiusType.d.ts +0 -3
  11. package/dist/adapter/generateBorderRadiusType.d.ts.map +0 -1
  12. package/dist/adapter/generateColorTypes.d.ts +0 -6
  13. package/dist/adapter/generateColorTypes.d.ts.map +0 -1
  14. package/dist/adapter/generateIcons.d.ts +0 -8
  15. package/dist/adapter/generateIcons.d.ts.map +0 -1
  16. package/dist/adapter/generateMantineTheme.d.ts +0 -19
  17. package/dist/adapter/generateMantineTheme.d.ts.map +0 -1
  18. package/dist/adapter/generatePrettierignore.d.ts +0 -3
  19. package/dist/adapter/generatePrettierignore.d.ts.map +0 -1
  20. package/dist/adapter/generateRecursicaObject.d.ts +0 -7
  21. package/dist/adapter/generateRecursicaObject.d.ts.map +0 -1
  22. package/dist/adapter/generateRecursicaThemes.d.ts +0 -12
  23. package/dist/adapter/generateRecursicaThemes.d.ts.map +0 -1
  24. package/dist/adapter/generateRecursicaTokens.d.ts +0 -3
  25. package/dist/adapter/generateRecursicaTokens.d.ts.map +0 -1
  26. package/dist/adapter/generateSpacersType.d.ts +0 -3
  27. package/dist/adapter/generateSpacersType.d.ts.map +0 -1
  28. package/dist/adapter/generateUiKit.d.ts +0 -8
  29. package/dist/adapter/generateUiKit.d.ts.map +0 -1
  30. package/dist/adapter/generateVanillaExtractThemes.d.ts +0 -12
  31. package/dist/adapter/generateVanillaExtractThemes.d.ts.map +0 -1
  32. package/dist/adapter/index.d.ts +0 -44
  33. package/dist/adapter/index.d.ts.map +0 -1
  34. package/dist/cli.d.ts +0 -6
  35. package/dist/cli.d.ts.map +0 -1
  36. package/dist/index.d.ts.map +0 -1
  37. package/dist/index.js +0 -921
  38. package/dist/index.js.map +0 -1
  39. package/dist/main.cjs +0 -928
  40. package/dist/main.cjs.map +0 -1
  41. package/dist/main.d.ts +0 -2
  42. package/dist/main.d.ts.map +0 -1
  43. package/dist/main.js +0 -926
  44. package/dist/main.js.map +0 -1
  45. package/dist/shared/processTokens.d.ts +0 -22
  46. package/dist/shared/processTokens.d.ts.map +0 -1
  47. package/dist/types.d.ts +0 -62
  48. package/dist/types.d.ts.map +0 -1
  49. package/dist/utils/fileCheck.d.ts +0 -8
  50. package/dist/utils/fileCheck.d.ts.map +0 -1
  51. package/dist/utils/loadConfig.d.ts +0 -24
  52. package/dist/utils/loadConfig.d.ts.map +0 -1
  53. package/dist/webworker.d.ts +0 -2
  54. package/dist/webworker.d.ts.map +0 -1
  55. package/dist/webworker.js +0 -791
@@ -0,0 +1,31 @@
1
+ .recursica-15e76700 {
2
+ min-width: var(--accordion-size-min-width);
3
+ max-width: var(--accordion-size-max-width);
4
+ padding: var(--dimension-lg);
5
+ padding-bottom: var(--dimension-lg);
6
+ align-items: center;
7
+ }
8
+ .recursica-15e76701 {
9
+ font-family: var(--typography-subtitle-1-normal-font-family);
10
+ font-size: var(--typography-subtitle-1-normal-font-size);
11
+ font-weight: var(--typography-subtitle-1-normal-font-weight);
12
+ line-height: var(--typography-subtitle-1-normal-line-height);
13
+ letter-spacing: var(--typography-subtitle-1-normal-letter-spacing);
14
+ padding: 0;
15
+ }
16
+ .recursica-15e76702 {
17
+ min-width: var(--accordion-size-min-width);
18
+ max-width: var(--accordion-size-max-width);
19
+ border-color: undefined;
20
+ border: 1px solid;
21
+ padding: 0;
22
+ }
23
+ .recursica-15e76703 {
24
+ font-family: var(--typography-body-1-normal-font-family);
25
+ font-size: var(--typography-body-1-normal-font-size);
26
+ font-weight: var(--typography-body-1-normal-font-weight);
27
+ line-height: var(--typography-body-1-normal-line-height);
28
+ letter-spacing: var(--typography-body-1-normal-letter-spacing);
29
+ padding: var(--dimension-lg);
30
+ padding-top: 0;
31
+ }
package/dist/index.d.ts CHANGED
@@ -1,8 +1,38 @@
1
- export { runAdapter } from "./adapter";
2
- export type { Themes, ThemeTokens, RecursicaConfigOverrides, RecursicaConfigIcons, ExportingResult, JsonContentIcons, } from "./types";
3
- export { loadConfig } from "./utils/loadConfig";
4
- export { isFontFamilyToken, isEffectToken, isColorOrFloatToken, capitalize, } from "@recursica/common";
5
- export { ProcessTokens } from "./shared/processTokens";
6
- export { processJsonContent } from "./shared/common";
7
- export { runMain } from "./cli";
8
- //# sourceMappingURL=index.d.ts.map
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { AccordionProps as AccordionProps$1, Accordion as Accordion$1 } from '@mantine/core';
3
+ import React$1 from 'react';
4
+
5
+ type AccordionProps = AccordionProps$1;
6
+ declare const AccordionWrapper: (props: AccordionProps) => react_jsx_runtime.JSX.Element;
7
+ type AccordionComponent = typeof AccordionWrapper & {
8
+ Item: typeof Accordion$1.Item;
9
+ Control: typeof Accordion$1.Control;
10
+ Panel: typeof Accordion$1.Panel;
11
+ };
12
+ declare const Accordion: AccordionComponent;
13
+
14
+ interface ThemeProviderProps {
15
+ currentTheme?: string;
16
+ children: React.ReactNode;
17
+ }
18
+ declare function ThemeProvider({ children, currentTheme }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
19
+
20
+ interface ComboboxItem {
21
+ value: string;
22
+ label: string;
23
+ disabled?: boolean;
24
+ icon?: string;
25
+ onClick?: () => void;
26
+ }
27
+
28
+ type OmitStyles<T> = Omit<T, "style" | "classNames" | "className" | "styles">;
29
+
30
+ /**
31
+ * Helper function for copy text to clipboard
32
+ * @param {string} textToCopy The text string for copying to the clipboard
33
+ * @param {element|node} componentRef The ref of the component that we want to trigger the copy
34
+ */
35
+ declare const copyToClipboard: (textToCopy: string, componentRef: React$1.RefObject<HTMLElement | null>) => Promise<void>;
36
+
37
+ export { Accordion, ThemeProvider, copyToClipboard };
38
+ export type { AccordionProps, ComboboxItem, OmitStyles };
@@ -0,0 +1,94 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var core = require('@mantine/core');
5
+ require('./assets/src/components/Accordion/Accordion.css.ts.vanilla-BnZlbbJN.css');
6
+ var react = require('react');
7
+
8
+ var content = 'recursica-15e76703';
9
+ var control = 'recursica-15e76700';
10
+ var item = 'recursica-15e76702';
11
+ var label = 'recursica-15e76701';
12
+
13
+ var styles = /*#__PURE__*/Object.freeze({
14
+ __proto__: null,
15
+ content: content,
16
+ control: control,
17
+ item: item,
18
+ label: label
19
+ });
20
+
21
+ const AccordionWrapper = (props) => {
22
+ return (jsxRuntime.jsx(core.Accordion, { ...props, classNames: {
23
+ ...styles,
24
+ ...props.classNames,
25
+ } }));
26
+ };
27
+ // Export the main Accordion component with dot notation
28
+ const Accordion = Object.assign(AccordionWrapper, {
29
+ Item: core.Accordion.Item,
30
+ Control: core.Accordion.Control,
31
+ Panel: core.Accordion.Panel,
32
+ });
33
+
34
+ const THEME_DATA_ATTRIBUTE = "data-current-theme";
35
+ function ThemeProvider({ children, currentTheme }) {
36
+ react.useEffect(() => {
37
+ if (!currentTheme)
38
+ return;
39
+ const root = document.documentElement;
40
+ // Get the previously applied theme class from data attribute
41
+ const previousTheme = root.getAttribute(THEME_DATA_ATTRIBUTE);
42
+ // Remove the previous theme class if it exists
43
+ if (previousTheme) {
44
+ root.classList.remove(previousTheme);
45
+ }
46
+ // Apply the new theme class
47
+ root.classList.add(currentTheme);
48
+ // Store the current theme class in the data attribute
49
+ root.setAttribute(THEME_DATA_ATTRIBUTE, currentTheme);
50
+ // Cleanup: remove current theme class and data attribute when component unmounts
51
+ return () => {
52
+ root.classList.remove(currentTheme);
53
+ root.removeAttribute(THEME_DATA_ATTRIBUTE);
54
+ };
55
+ }, [currentTheme]);
56
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
57
+ }
58
+
59
+ /**
60
+ * Helper function for copy text to clipboard
61
+ * @param {string} textToCopy The text string for copying to the clipboard
62
+ * @param {element|node} componentRef The ref of the component that we want to trigger the copy
63
+ */
64
+ const copyToClipboard = (textToCopy, componentRef) => {
65
+ const currentFocus = document.activeElement;
66
+ return new Promise((resolve, reject) => {
67
+ if (componentRef && componentRef.current) {
68
+ const textArea = document.createElement("textarea");
69
+ textArea.readOnly = true;
70
+ textArea.defaultValue = textToCopy;
71
+ componentRef.current.appendChild(textArea);
72
+ textArea.select();
73
+ const wasCopied = document.execCommand("copy");
74
+ componentRef.current.removeChild(textArea);
75
+ if (currentFocus) {
76
+ currentFocus.focus();
77
+ }
78
+ if (wasCopied) {
79
+ resolve();
80
+ }
81
+ else {
82
+ reject(new Error("Failed to copy"));
83
+ }
84
+ }
85
+ else {
86
+ reject(new Error("Copy area reference is not defined"));
87
+ }
88
+ });
89
+ };
90
+
91
+ exports.Accordion = Accordion;
92
+ exports.ThemeProvider = ThemeProvider;
93
+ exports.copyToClipboard = copyToClipboard;
94
+ //# sourceMappingURL=mantine-adapter.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mantine-adapter.cjs","sources":["../src/components/Accordion/Accordion.tsx","../src/components/ThemeProvider/ThemeProvider.tsx","../src/utils/copyToClipboard.ts"],"sourcesContent":["import {\n Accordion as MantineAccordion,\n type AccordionProps as MantineAccordionProps,\n} from \"@mantine/core\";\nimport * as styles from \"./Accordion.css\";\n\n// interface FigmaVariantProps {\n// Open?: boolean;\n// Divider?: boolean;\n// Title?: string;\n// }\n\nexport type AccordionProps = MantineAccordionProps;\n\nconst AccordionWrapper = (props: AccordionProps) => {\n return (\n <MantineAccordion\n {...props}\n classNames={{\n ...styles,\n ...props.classNames,\n }}\n />\n );\n};\n\n// Define the type for our Accordion component with sub-components\ntype AccordionComponent = typeof AccordionWrapper & {\n Item: typeof MantineAccordion.Item;\n Control: typeof MantineAccordion.Control;\n Panel: typeof MantineAccordion.Panel;\n};\n\n// Export the main Accordion component with dot notation\nexport const Accordion: AccordionComponent = Object.assign(AccordionWrapper, {\n Item: MantineAccordion.Item,\n Control: MantineAccordion.Control,\n Panel: MantineAccordion.Panel,\n});\n","import { useEffect } from \"react\";\n\ninterface ThemeProviderProps {\n currentTheme?: string;\n children: React.ReactNode;\n}\n\nconst THEME_DATA_ATTRIBUTE = \"data-current-theme\";\n\nexport function ThemeProvider({ children, currentTheme }: ThemeProviderProps) {\n useEffect(() => {\n if (!currentTheme) return;\n\n const root = document.documentElement;\n\n // Get the previously applied theme class from data attribute\n const previousTheme = root.getAttribute(THEME_DATA_ATTRIBUTE);\n\n // Remove the previous theme class if it exists\n if (previousTheme) {\n root.classList.remove(previousTheme);\n }\n\n // Apply the new theme class\n root.classList.add(currentTheme);\n\n // Store the current theme class in the data attribute\n root.setAttribute(THEME_DATA_ATTRIBUTE, currentTheme);\n\n // Cleanup: remove current theme class and data attribute when component unmounts\n return () => {\n root.classList.remove(currentTheme);\n root.removeAttribute(THEME_DATA_ATTRIBUTE);\n };\n }, [currentTheme]);\n\n return <>{children}</>;\n}\n","import React from \"react\";\n\n/**\n * Helper function for copy text to clipboard\n * @param {string} textToCopy The text string for copying to the clipboard\n * @param {element|node} componentRef The ref of the component that we want to trigger the copy\n */\nconst copyToClipboard = (\n textToCopy: string,\n componentRef: React.RefObject<HTMLElement | null>,\n): Promise<void> => {\n const currentFocus = document.activeElement as HTMLInputElement;\n return new Promise((resolve, reject) => {\n if (componentRef && componentRef.current) {\n const textArea = document.createElement(\"textarea\");\n textArea.readOnly = true;\n textArea.defaultValue = textToCopy;\n componentRef.current.appendChild(textArea);\n textArea.select();\n const wasCopied = document.execCommand(\"copy\");\n componentRef.current.removeChild(textArea);\n if (currentFocus) {\n currentFocus.focus();\n }\n if (wasCopied) {\n resolve();\n } else {\n reject(new Error(\"Failed to copy\"));\n }\n } else {\n reject(new Error(\"Copy area reference is not defined\"));\n }\n });\n};\n\nexport { copyToClipboard };\n"],"names":["_jsx","MantineAccordion","useEffect","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAM,gBAAgB,GAAG,CAAC,KAAqB,KAAI;AACjD,IAAA,QACEA,cAAA,CAACC,cAAgB,OACX,KAAK,EACT,UAAU,EAAE;AACV,YAAA,GAAG,MAAM;YACT,GAAG,KAAK,CAAC,UAAU;AACpB,SAAA,EAAA,CACD;AAEN,CAAC;AASD;MACa,SAAS,GAAuB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAC3E,IAAI,EAAEA,cAAgB,CAAC,IAAI;IAC3B,OAAO,EAAEA,cAAgB,CAAC,OAAO;IACjC,KAAK,EAAEA,cAAgB,CAAC,KAAK;AAC9B,CAAA;;AC/BD,MAAM,oBAAoB,GAAG,oBAAoB;SAEjC,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAsB,EAAA;IAC1EC,eAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,YAAY;YAAE;AAEnB,QAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,eAAe;;QAGrC,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC;;QAG7D,IAAI,aAAa,EAAE;AACjB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;QACtC;;AAGA,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;;AAGhC,QAAA,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,YAAY,CAAC;;AAGrD,QAAA,OAAO,MAAK;AACV,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC;AACnC,YAAA,IAAI,CAAC,eAAe,CAAC,oBAAoB,CAAC;AAC5C,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IAElB,OAAOF,cAAA,CAAAG,mBAAA,EAAA,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAI;AACxB;;ACnCA;;;;AAIG;AACH,MAAM,eAAe,GAAG,CACtB,UAAkB,EAClB,YAAiD,KAChC;AACjB,IAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAiC;IAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,QAAA,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,EAAE;YACxC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC;AACnD,YAAA,QAAQ,CAAC,QAAQ,GAAG,IAAI;AACxB,YAAA,QAAQ,CAAC,YAAY,GAAG,UAAU;AAClC,YAAA,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC1C,QAAQ,CAAC,MAAM,EAAE;YACjB,MAAM,SAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC;AAC9C,YAAA,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC1C,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,KAAK,EAAE;YACtB;YACA,IAAI,SAAS,EAAE;AACb,gBAAA,OAAO,EAAE;YACX;iBAAO;AACL,gBAAA,MAAM,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACrC;QACF;aAAO;AACL,YAAA,MAAM,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACzD;AACF,IAAA,CAAC,CAAC;AACJ;;;;;;"}
File without changes
@@ -0,0 +1,90 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { Accordion as Accordion$1 } from '@mantine/core';
3
+ import './assets/src/components/Accordion/Accordion.css.ts.vanilla-BnZlbbJN.css';
4
+ import { useEffect } from 'react';
5
+
6
+ var content = 'recursica-15e76703';
7
+ var control = 'recursica-15e76700';
8
+ var item = 'recursica-15e76702';
9
+ var label = 'recursica-15e76701';
10
+
11
+ var styles = /*#__PURE__*/Object.freeze({
12
+ __proto__: null,
13
+ content: content,
14
+ control: control,
15
+ item: item,
16
+ label: label
17
+ });
18
+
19
+ const AccordionWrapper = (props) => {
20
+ return (jsx(Accordion$1, { ...props, classNames: {
21
+ ...styles,
22
+ ...props.classNames,
23
+ } }));
24
+ };
25
+ // Export the main Accordion component with dot notation
26
+ const Accordion = Object.assign(AccordionWrapper, {
27
+ Item: Accordion$1.Item,
28
+ Control: Accordion$1.Control,
29
+ Panel: Accordion$1.Panel,
30
+ });
31
+
32
+ const THEME_DATA_ATTRIBUTE = "data-current-theme";
33
+ function ThemeProvider({ children, currentTheme }) {
34
+ useEffect(() => {
35
+ if (!currentTheme)
36
+ return;
37
+ const root = document.documentElement;
38
+ // Get the previously applied theme class from data attribute
39
+ const previousTheme = root.getAttribute(THEME_DATA_ATTRIBUTE);
40
+ // Remove the previous theme class if it exists
41
+ if (previousTheme) {
42
+ root.classList.remove(previousTheme);
43
+ }
44
+ // Apply the new theme class
45
+ root.classList.add(currentTheme);
46
+ // Store the current theme class in the data attribute
47
+ root.setAttribute(THEME_DATA_ATTRIBUTE, currentTheme);
48
+ // Cleanup: remove current theme class and data attribute when component unmounts
49
+ return () => {
50
+ root.classList.remove(currentTheme);
51
+ root.removeAttribute(THEME_DATA_ATTRIBUTE);
52
+ };
53
+ }, [currentTheme]);
54
+ return jsx(Fragment, { children: children });
55
+ }
56
+
57
+ /**
58
+ * Helper function for copy text to clipboard
59
+ * @param {string} textToCopy The text string for copying to the clipboard
60
+ * @param {element|node} componentRef The ref of the component that we want to trigger the copy
61
+ */
62
+ const copyToClipboard = (textToCopy, componentRef) => {
63
+ const currentFocus = document.activeElement;
64
+ return new Promise((resolve, reject) => {
65
+ if (componentRef && componentRef.current) {
66
+ const textArea = document.createElement("textarea");
67
+ textArea.readOnly = true;
68
+ textArea.defaultValue = textToCopy;
69
+ componentRef.current.appendChild(textArea);
70
+ textArea.select();
71
+ const wasCopied = document.execCommand("copy");
72
+ componentRef.current.removeChild(textArea);
73
+ if (currentFocus) {
74
+ currentFocus.focus();
75
+ }
76
+ if (wasCopied) {
77
+ resolve();
78
+ }
79
+ else {
80
+ reject(new Error("Failed to copy"));
81
+ }
82
+ }
83
+ else {
84
+ reject(new Error("Copy area reference is not defined"));
85
+ }
86
+ });
87
+ };
88
+
89
+ export { Accordion, ThemeProvider, copyToClipboard };
90
+ //# sourceMappingURL=mantine-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mantine-adapter.js","sources":["../src/components/Accordion/Accordion.tsx","../src/components/ThemeProvider/ThemeProvider.tsx","../src/utils/copyToClipboard.ts"],"sourcesContent":["import {\n Accordion as MantineAccordion,\n type AccordionProps as MantineAccordionProps,\n} from \"@mantine/core\";\nimport * as styles from \"./Accordion.css\";\n\n// interface FigmaVariantProps {\n// Open?: boolean;\n// Divider?: boolean;\n// Title?: string;\n// }\n\nexport type AccordionProps = MantineAccordionProps;\n\nconst AccordionWrapper = (props: AccordionProps) => {\n return (\n <MantineAccordion\n {...props}\n classNames={{\n ...styles,\n ...props.classNames,\n }}\n />\n );\n};\n\n// Define the type for our Accordion component with sub-components\ntype AccordionComponent = typeof AccordionWrapper & {\n Item: typeof MantineAccordion.Item;\n Control: typeof MantineAccordion.Control;\n Panel: typeof MantineAccordion.Panel;\n};\n\n// Export the main Accordion component with dot notation\nexport const Accordion: AccordionComponent = Object.assign(AccordionWrapper, {\n Item: MantineAccordion.Item,\n Control: MantineAccordion.Control,\n Panel: MantineAccordion.Panel,\n});\n","import { useEffect } from \"react\";\n\ninterface ThemeProviderProps {\n currentTheme?: string;\n children: React.ReactNode;\n}\n\nconst THEME_DATA_ATTRIBUTE = \"data-current-theme\";\n\nexport function ThemeProvider({ children, currentTheme }: ThemeProviderProps) {\n useEffect(() => {\n if (!currentTheme) return;\n\n const root = document.documentElement;\n\n // Get the previously applied theme class from data attribute\n const previousTheme = root.getAttribute(THEME_DATA_ATTRIBUTE);\n\n // Remove the previous theme class if it exists\n if (previousTheme) {\n root.classList.remove(previousTheme);\n }\n\n // Apply the new theme class\n root.classList.add(currentTheme);\n\n // Store the current theme class in the data attribute\n root.setAttribute(THEME_DATA_ATTRIBUTE, currentTheme);\n\n // Cleanup: remove current theme class and data attribute when component unmounts\n return () => {\n root.classList.remove(currentTheme);\n root.removeAttribute(THEME_DATA_ATTRIBUTE);\n };\n }, [currentTheme]);\n\n return <>{children}</>;\n}\n","import React from \"react\";\n\n/**\n * Helper function for copy text to clipboard\n * @param {string} textToCopy The text string for copying to the clipboard\n * @param {element|node} componentRef The ref of the component that we want to trigger the copy\n */\nconst copyToClipboard = (\n textToCopy: string,\n componentRef: React.RefObject<HTMLElement | null>,\n): Promise<void> => {\n const currentFocus = document.activeElement as HTMLInputElement;\n return new Promise((resolve, reject) => {\n if (componentRef && componentRef.current) {\n const textArea = document.createElement(\"textarea\");\n textArea.readOnly = true;\n textArea.defaultValue = textToCopy;\n componentRef.current.appendChild(textArea);\n textArea.select();\n const wasCopied = document.execCommand(\"copy\");\n componentRef.current.removeChild(textArea);\n if (currentFocus) {\n currentFocus.focus();\n }\n if (wasCopied) {\n resolve();\n } else {\n reject(new Error(\"Failed to copy\"));\n }\n } else {\n reject(new Error(\"Copy area reference is not defined\"));\n }\n });\n};\n\nexport { copyToClipboard };\n"],"names":["_jsx","MantineAccordion","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,MAAM,gBAAgB,GAAG,CAAC,KAAqB,KAAI;AACjD,IAAA,QACEA,GAAA,CAACC,WAAgB,OACX,KAAK,EACT,UAAU,EAAE;AACV,YAAA,GAAG,MAAM;YACT,GAAG,KAAK,CAAC,UAAU;AACpB,SAAA,EAAA,CACD;AAEN,CAAC;AASD;MACa,SAAS,GAAuB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAC3E,IAAI,EAAEA,WAAgB,CAAC,IAAI;IAC3B,OAAO,EAAEA,WAAgB,CAAC,OAAO;IACjC,KAAK,EAAEA,WAAgB,CAAC,KAAK;AAC9B,CAAA;;AC/BD,MAAM,oBAAoB,GAAG,oBAAoB;SAEjC,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAsB,EAAA;IAC1E,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,YAAY;YAAE;AAEnB,QAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,eAAe;;QAGrC,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC;;QAG7D,IAAI,aAAa,EAAE;AACjB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;QACtC;;AAGA,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;;AAGhC,QAAA,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,YAAY,CAAC;;AAGrD,QAAA,OAAO,MAAK;AACV,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC;AACnC,YAAA,IAAI,CAAC,eAAe,CAAC,oBAAoB,CAAC;AAC5C,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IAElB,OAAOD,GAAA,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAI;AACxB;;ACnCA;;;;AAIG;AACH,MAAM,eAAe,GAAG,CACtB,UAAkB,EAClB,YAAiD,KAChC;AACjB,IAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAiC;IAC/D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,QAAA,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,EAAE;YACxC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC;AACnD,YAAA,QAAQ,CAAC,QAAQ,GAAG,IAAI;AACxB,YAAA,QAAQ,CAAC,YAAY,GAAG,UAAU;AAClC,YAAA,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC1C,QAAQ,CAAC,MAAM,EAAE;YACjB,MAAM,SAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC;AAC9C,YAAA,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC1C,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,KAAK,EAAE;YACtB;YACA,IAAI,SAAS,EAAE;AACb,gBAAA,OAAO,EAAE;YACX;iBAAO;AACL,gBAAA,MAAM,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACrC;QACF;aAAO;AACL,YAAA,MAAM,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACzD;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@recursica/mantine-adapter",
3
- "description": "Recursica Design Token Adapter - Convert design tokens to code",
4
- "version": "0.9.4",
3
+ "description": "Reusable UI components for Recursica applications based on Mantine 8+",
5
4
  "private": false,
6
- "homepage": "https://github.com/borderux/recursica#readme",
5
+ "homepage": "https://github.com/borderux/recursica/tree/main/packages/mantine-adapter",
7
6
  "author": "hi@borderux.com",
8
7
  "bugs": {
9
8
  "url": "https://github.com/borderux/recursica/issues"
@@ -12,44 +11,91 @@
12
11
  "type": "git",
13
12
  "url": "git+https://github.com/borderux/recursica.git"
14
13
  },
14
+ "version": "1.0.0",
15
15
  "type": "module",
16
- "main": "dist/index.js",
17
- "types": "dist/index.d.ts",
18
- "bin": {
19
- "recursica": "dist/main.cjs"
20
- },
21
- "scripts": {
22
- "build": "rollup -c",
23
- "dev": "rollup -c -w",
24
- "clean": "rm -rf dist"
16
+ "main": "./dist/mantine-adapter.cjs",
17
+ "module": "./dist/mantine-adapter.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/mantine-adapter.js",
23
+ "require": "./dist/mantine-adapter.cjs"
24
+ },
25
+ "./style.css": "./dist/mantine-adapter.css"
25
26
  },
27
+ "files": [
28
+ "dist"
29
+ ],
26
30
  "keywords": [
27
- "design-tokens",
28
- "figma",
31
+ "react",
32
+ "ui",
33
+ "components",
34
+ "typescript",
35
+ "mantine",
29
36
  "recursica",
30
- "theme",
31
- "adapter"
37
+ "design system",
38
+ "design systems"
32
39
  ],
33
- "files": [
34
- "dist/**/*",
35
- "README.md"
36
- ],
37
- "dependencies": {
38
- "@recursica/common": "*",
39
- "typescript": "^5.0.0"
40
+ "scripts": {
41
+ "dev": "npm run storybook",
42
+ "build": "rollup -c",
43
+ "build-storybook": "storybook build -o storybook-static",
44
+ "lint": "eslint .",
45
+ "storybook": "storybook dev -p 6006"
40
46
  },
47
+ "dependencies": {},
41
48
  "devDependencies": {
42
- "@recursica/schemas": "*",
43
- "@rollup/plugin-commonjs": "^28.0.3",
49
+ "@recursica/storybook-template": "*",
50
+ "@vanilla-extract/rollup-plugin": "^1.4.1",
51
+ "@vanilla-extract/vite-plugin": "^5.1.1",
52
+ "@babel/core": "^7.28.4",
53
+ "@babel/preset-react": "^7.27.1",
54
+ "@eslint/js": "^9.25.0",
55
+ "@recursica/official-release": "*",
56
+ "@repo/typescript-config": "*",
57
+ "@rollup/plugin-babel": "^6.0.4",
58
+ "@rollup/plugin-commonjs": "^28.0.6",
44
59
  "@rollup/plugin-json": "^6.1.0",
45
- "@rollup/plugin-node-resolve": "^16.0.1",
46
- "@rollup/plugin-terser": "^0.4.4",
47
- "@rollup/plugin-typescript": "^12.1.2",
48
- "@types/node": "^20.0.0",
49
- "rollup": "^4.42.0"
50
- },
51
- "engines": {
52
- "node": ">=16.0.0"
60
+ "@rollup/plugin-node-resolve": "^16.0.2",
61
+ "@rollup/plugin-typescript": "^12.1.4",
62
+ "@storybook/addon-a11y": "^9.0.8",
63
+ "@storybook/addon-docs": "^9.0.8",
64
+ "@storybook/addon-onboarding": "^9.0.8",
65
+ "@storybook/addon-vitest": "^9.0.8",
66
+ "@storybook/react-vite": "^9.0.8",
67
+ "@svgr/rollup": "^8.1.0",
68
+ "@types/react": "^19.1.2",
69
+ "@types/react-dom": "^19.1.2",
70
+ "@vitejs/plugin-react": "^4.4.1",
71
+ "@vitest/browser": "^3.2.4",
72
+ "@vitest/coverage-v8": "^3.2.4",
73
+ "eslint": "^9.25.0",
74
+ "eslint-plugin-react-hooks": "^5.2.0",
75
+ "eslint-plugin-react-refresh": "^0.4.19",
76
+ "eslint-plugin-storybook": "^9.0.8",
77
+ "globals": "^16.0.0",
78
+ "playwright": "^1.53.0",
79
+ "postcss": "^8.4.40",
80
+ "postcss-preset-mantine": "^1.17.0",
81
+ "rollup": "^4.20.0",
82
+ "rollup-plugin-dts": "^6.2.3",
83
+ "rollup-plugin-postcss": "^4.0.2",
84
+ "sass": "^1.89.2",
85
+ "sirv": "^3.0.2",
86
+ "storybook": "^9.0.8",
87
+ "strip-literal": "^3.0.0",
88
+ "typescript": "~5.8.3",
89
+ "typescript-eslint": "^8.30.1",
90
+ "vite": "^6.3.5",
91
+ "vite-plugin-svgr": "^4.3.0",
92
+ "vitest": "^3.2.4"
53
93
  },
54
- "license": "MIT"
94
+ "peerDependencies": {
95
+ "@mantine/core": ">=8.0.0",
96
+ "@mantine/dates": ">=8.0.0",
97
+ "@mantine/hooks": ">=8.0.0",
98
+ "react": ">=16.8.0",
99
+ "react-dom": ">=16.8.0"
100
+ }
55
101
  }
@@ -1,3 +0,0 @@
1
- import { ExportingResult } from "../types";
2
- export declare function generateBorderRadiusType(borderRadius: string[], outputPath: string): ExportingResult;
3
- //# sourceMappingURL=generateBorderRadiusType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateBorderRadiusType.d.ts","sourceRoot":"","sources":["../../adapter/generateBorderRadiusType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EAAE,EACtB,UAAU,EAAE,MAAM,GACjB,eAAe,CAYjB"}
@@ -1,6 +0,0 @@
1
- export declare function generateColorsType(colorTokens: string[], outputPath: string): {
2
- content: string;
3
- path: string;
4
- filename: string;
5
- };
6
- //# sourceMappingURL=generateColorTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateColorTypes.d.ts","sourceRoot":"","sources":["../../adapter/generateColorTypes.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM;;;;EAQ3E"}
@@ -1,8 +0,0 @@
1
- import { ExportingResult, RecursicaConfigIcons } from "../types";
2
- export interface GenerateIconsOutput {
3
- exportedIcons: ExportingResult[];
4
- iconExports: ExportingResult;
5
- iconResourceMap: ExportingResult;
6
- }
7
- export declare function generateIcons(icons: Record<string, string>, srcPath: string, config: RecursicaConfigIcons | undefined): GenerateIconsOutput;
8
- //# sourceMappingURL=generateIcons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateIcons.d.ts","sourceRoot":"","sources":["../../adapter/generateIcons.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjE,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,oBAAoB,GAAG,SAAS,GACvC,mBAAmB,CAwErB"}
@@ -1,19 +0,0 @@
1
- import type { ThemeTokens, ContractTokens, ExportingProps, MantineThemeOverride, ExportingResult } from "../types";
2
- interface ContractTokensObject {
3
- tokens: ContractTokens;
4
- filename: string;
5
- }
6
- interface GenerateMantineThemeParams {
7
- mantineThemeOverride: MantineThemeOverride | undefined;
8
- tokens: ThemeTokens;
9
- breakpoints: Record<string, string>;
10
- contractTokens: ContractTokensObject;
11
- exportingProps: ExportingProps;
12
- }
13
- export interface GenerateMantineThemeOutput {
14
- mantineTheme: ExportingResult;
15
- postCss: ExportingResult;
16
- }
17
- export declare function generateMantineTheme({ mantineThemeOverride, tokens, breakpoints, contractTokens: { tokens: contractTokens, filename: contractFilename }, exportingProps: { outputPath, project, rootPath }, }: GenerateMantineThemeParams): GenerateMantineThemeOutput;
18
- export {};
19
- //# sourceMappingURL=generateMantineTheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateMantineTheme.d.ts","sourceRoot":"","sources":["../../adapter/generateMantineTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB,UAAU,oBAAoB;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,0BAA0B;IAClC,oBAAoB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACvD,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,cAAc,EAAE,oBAAoB,CAAC;IACrC,cAAc,EAAE,cAAc,CAAC;CAChC;AAeD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,cAAc,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EACtE,cAAc,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,GAClD,EAAE,0BAA0B,GAAG,0BAA0B,CA4FzD"}
@@ -1,3 +0,0 @@
1
- import { ExportingResult } from "../types";
2
- export declare function generatePrettierignore(): ExportingResult;
3
- //# sourceMappingURL=generatePrettierignore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generatePrettierignore.d.ts","sourceRoot":"","sources":["../../adapter/generatePrettierignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,sBAAsB,IAAI,eAAe,CAWxD"}
@@ -1,7 +0,0 @@
1
- import type { RecursicaConfiguration } from "@recursica/schemas";
2
- export declare function createRecursicaObject(project: RecursicaConfiguration["project"], outputPath: string): {
3
- content: string;
4
- path: string;
5
- filename: string;
6
- };
7
- //# sourceMappingURL=generateRecursicaObject.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateRecursicaObject.d.ts","sourceRoot":"","sources":["../../adapter/generateRecursicaObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,EAC1C,UAAU,EAAE,MAAM;;;;EAwBnB"}
@@ -1,12 +0,0 @@
1
- import type { ExportingResult, Themes } from "../types";
2
- interface GenerateRecursicaThemesParams {
3
- outputPath: string;
4
- themes: Themes;
5
- }
6
- /**
7
- * Generates the RecursicaThemes.ts file that contains the THEMES constant
8
- * based on the theme dictionary
9
- */
10
- export declare function generateRecursicaThemes({ outputPath, themes, }: GenerateRecursicaThemesParams): ExportingResult;
11
- export {};
12
- //# sourceMappingURL=generateRecursicaThemes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateRecursicaThemes.d.ts","sourceRoot":"","sources":["../../adapter/generateRecursicaThemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGxD,UAAU,6BAA6B;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,UAAU,EACV,MAAM,GACP,EAAE,6BAA6B,GAAG,eAAe,CAsCjD"}
@@ -1,3 +0,0 @@
1
- import type { ThemeTokens, ExportingProps, ExportingResult } from "../types";
2
- export declare function generateRecursicaTokens(baseTokens: ThemeTokens, { outputPath, project }: ExportingProps): ExportingResult;
3
- //# sourceMappingURL=generateRecursicaTokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateRecursicaTokens.d.ts","sourceRoot":"","sources":["../../adapter/generateRecursicaTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG7E,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,WAAW,EACvB,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GACtC,eAAe,CAmBjB"}
@@ -1,3 +0,0 @@
1
- import { ExportingResult } from "../types";
2
- export declare function generateSpacersType(spacerTokens: string[], outputPath: string): ExportingResult;
3
- //# sourceMappingURL=generateSpacersType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateSpacersType.d.ts","sourceRoot":"","sources":["../../adapter/generateSpacersType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EAAE,EACtB,UAAU,EAAE,MAAM,GACjB,eAAe,CASjB"}
@@ -1,8 +0,0 @@
1
- import type { ThemeTokens, ExportingProps, ExportingResult } from "../types";
2
- interface GenerateUiKitParams {
3
- recursicaTokensFilename: string;
4
- themeContractFilename: string;
5
- }
6
- export declare function generateUiKit(uiKit: ThemeTokens, { recursicaTokensFilename, themeContractFilename }: GenerateUiKitParams, { outputPath, project }: ExportingProps): ExportingResult;
7
- export {};
8
- //# sourceMappingURL=generateUiKit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateUiKit.d.ts","sourceRoot":"","sources":["../../adapter/generateUiKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EAEd,eAAe,EAChB,MAAM,UAAU,CAAC;AAIlB,UAAU,mBAAmB;IAC3B,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,EAAE,mBAAmB,EACvE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GACtC,eAAe,CAwBjB"}
@@ -1,12 +0,0 @@
1
- import type { Themes, ExportingProps, ValueToken, ContractTokens, ThemeTokens, ExportingResult } from "../types";
2
- export declare function parseValue(value: ValueToken | string, recursicaTokens: string): string;
3
- export interface VanillaExtractThemesOutput {
4
- themesFileContent: ExportingResult;
5
- vanillaExtractThemes: ExportingResult[];
6
- availableThemes: ExportingResult;
7
- themeContract: ExportingResult;
8
- contractTokens: ContractTokens;
9
- typeDefinitions: ExportingResult;
10
- }
11
- export declare function generateVanillaExtractThemes(tokens: ThemeTokens, themes: Themes, recursicaTokensFilename: string, { outputPath, project }: ExportingProps): VanillaExtractThemesOutput;
12
- //# sourceMappingURL=generateVanillaExtractThemes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateVanillaExtractThemes.d.ts","sourceRoot":"","sources":["../../adapter/generateVanillaExtractThemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,UAAU,EACV,cAAc,EACd,WAAW,EACX,eAAe,EAChB,MAAM,UAAU,CAAC;AAOlB,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,GAAG,MAAM,EAC1B,eAAe,EAAE,MAAM,UAaxB;AAiCD,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,eAAe,CAAC;IACnC,oBAAoB,EAAE,eAAe,EAAE,CAAC;IACxC,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,eAAe,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,EACd,uBAAuB,EAAE,MAAM,EAC/B,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GACtC,0BAA0B,CA8H5B"}
@@ -1,44 +0,0 @@
1
- import type { RecursicaConfigOverrides, RecursicaConfigIcons, ExportingResult } from "../types";
2
- import { VanillaExtractThemesOutput } from "./generateVanillaExtractThemes";
3
- import { GenerateMantineThemeOutput } from "./generateMantineTheme";
4
- import { GenerateIconsOutput } from "./generateIcons";
5
- import { ProcessTokens } from "../shared/processTokens";
6
- import type { RecursicaConfiguration } from "@recursica/schemas";
7
- interface GenerateThemeFileParams {
8
- overrides: RecursicaConfigOverrides | undefined;
9
- rootPath: string;
10
- srcPath: string;
11
- project: RecursicaConfiguration["project"];
12
- icons: Record<string, string>;
13
- iconsConfig: RecursicaConfigIcons | undefined;
14
- processTokens: ProcessTokens;
15
- }
16
- /**
17
- * Generates Mantine theme files including:
18
- * - Generic theme file with base theme and createColorToken function
19
- * - Individual theme files for each theme variant
20
- * - CSS variables file
21
- * - Type declarations for theme colors
22
- * - Index file exporting all themes
23
- *
24
- * @param srcPath - Path to the source directory for type declarations
25
- * @param tokens - Base theme tokens
26
- * @param themes - Theme variants
27
- * @param project - Project name
28
- */
29
- interface RunAdapterOutput {
30
- recursicaTokens: ExportingResult;
31
- vanillaExtractThemes: VanillaExtractThemesOutput;
32
- mantineTheme: GenerateMantineThemeOutput;
33
- uiKitObject: ExportingResult;
34
- recursicaObject: ExportingResult;
35
- colorsType: ExportingResult;
36
- spacersType: ExportingResult;
37
- borderRadiusType: ExportingResult;
38
- iconsObject: GenerateIconsOutput | undefined;
39
- recursicaThemes: ExportingResult;
40
- prettierignore: ExportingResult;
41
- }
42
- export declare function runAdapter({ rootPath, overrides, srcPath, project, icons, iconsConfig, processTokens, }: GenerateThemeFileParams): RunAdapterOutput;
43
- export {};
44
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAEL,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAiB,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAIrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,UAAU,uBAAuB;IAC/B,SAAS,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,UAAU,gBAAgB;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,oBAAoB,EAAE,0BAA0B,CAAC;IACjD,YAAY,EAAE,0BAA0B,CAAC;IACzC,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,eAAe,CAAC;IAC5B,WAAW,EAAE,eAAe,CAAC;IAC7B,gBAAgB,EAAE,eAAe,CAAC;IAClC,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC7C,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,eAAe,CAAC;CACjC;AACD,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,GACd,EAAE,uBAAuB,GAAG,gBAAgB,CA6E5C"}
package/dist/cli.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * Main CLI function that can be called programmatically
3
- * This is the same logic as main.ts but exported as a function
4
- */
5
- export declare function runMain(): Promise<void>;
6
- //# sourceMappingURL=cli.d.ts.map