@calibrate-ds/generator-react 0.1.4 → 0.1.6
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/LICENSE +201 -0
- package/dist/components/generate-component-css.d.ts +8 -1
- package/dist/components/generate-component-css.d.ts.map +1 -1
- package/dist/components/generate-component-css.js +36 -5
- package/dist/components/generate-component-css.js.map +1 -1
- package/dist/components/generate-component-file.d.ts.map +1 -1
- package/dist/components/generate-component-file.js +71 -12
- package/dist/components/generate-component-file.js.map +1 -1
- package/dist/components/generate-types-file.d.ts.map +1 -1
- package/dist/components/generate-types-file.js +47 -15
- package/dist/components/generate-types-file.js.map +1 -1
- package/dist/components/icon-svg.d.ts +30 -0
- package/dist/components/icon-svg.d.ts.map +1 -0
- package/dist/components/icon-svg.js +111 -0
- package/dist/components/icon-svg.js.map +1 -0
- package/dist/components/layout-jsx.js +41 -1
- package/dist/components/layout-jsx.js.map +1 -1
- package/dist/components/token-reverse-lookup.d.ts +31 -0
- package/dist/components/token-reverse-lookup.d.ts.map +1 -0
- package/dist/components/token-reverse-lookup.js +109 -0
- package/dist/components/token-reverse-lookup.js.map +1 -0
- package/dist/components/write-components.d.ts.map +1 -1
- package/dist/components/write-components.js +114 -3
- package/dist/components/write-components.js.map +1 -1
- package/dist/tokens/generate-token-file-content.d.ts.map +1 -1
- package/dist/tokens/generate-token-file-content.js +6 -2
- package/dist/tokens/generate-token-file-content.js.map +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-token-file-content.d.ts","sourceRoot":"","sources":["../../src/tokens/generate-token-file-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-token-file-content.d.ts","sourceRoot":"","sources":["../../src/tokens/generate-token-file-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlE;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,CA2B5E"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { formatCollectionImportName } from "../components/token-helpers.js";
|
|
1
2
|
/**
|
|
2
3
|
* Generates TypeScript constant file content for a Token Collection.
|
|
3
4
|
*/
|
|
4
5
|
export function generateTokenFileContent(collection) {
|
|
5
|
-
|
|
6
|
+
// Single source of truth for the export identifier — components import the same name
|
|
7
|
+
// via formatCollectionImportName, so any divergence here would surface as a TS error
|
|
8
|
+
// on every consumer file. See packages/generators/react/src/components/token-helpers.ts.
|
|
9
|
+
const exportIdent = `${formatCollectionImportName(collection.name)}Tokens`;
|
|
6
10
|
let tokensContent = "";
|
|
7
11
|
for (const t of collection.tokens) {
|
|
8
12
|
// We output only the default mode explicitly initially for a clean shape based on the canonical value
|
|
@@ -20,7 +24,7 @@ export function generateTokenFileContent(collection) {
|
|
|
20
24
|
* Do not edit. This file is auto-generated by Calibrate.
|
|
21
25
|
*/
|
|
22
26
|
|
|
23
|
-
export const ${
|
|
27
|
+
export const ${exportIdent} = {${tokensContent}
|
|
24
28
|
} as const;
|
|
25
29
|
`;
|
|
26
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-token-file-content.js","sourceRoot":"","sources":["../../src/tokens/generate-token-file-content.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-token-file-content.js","sourceRoot":"","sources":["../../src/tokens/generate-token-file-content.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,UAA2B;IAClE,qFAAqF;IACrF,qFAAqF;IACrF,yFAAyF;IACzF,MAAM,WAAW,GAAG,GAAG,0BAA0B,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;IAE3E,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,CAAC,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;QAClC,sGAAsG;QACtG,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC5E,aAAa,IAAI;KAChB,CAAC,CAAC,IAAI;WACA,CAAC,CAAC,EAAE;aACF,CAAC,CAAC,IAAI;aACN,CAAC,CAAC,IAAI;aACN,SAAS;KACjB,CAAC;IACJ,CAAC;IAED,OAAO;8BACqB,UAAU,CAAC,IAAI;;;;eAI9B,WAAW,OAAO,aAAa;;CAE7C,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calibrate-ds/generator-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"license": "Apache-2.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
@@ -19,8 +20,8 @@
|
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
22
|
"react": "^19.0.0",
|
|
22
|
-
"@calibrate-ds/
|
|
23
|
-
"@calibrate-ds/
|
|
23
|
+
"@calibrate-ds/core": "^0.1.6",
|
|
24
|
+
"@calibrate-ds/shared-types": "^0.1.6"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"typescript": "^5.7.3",
|