@televet/kibble-ui 4.0.0-beta.20 → 4.0.0-beta.21
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/README.md
CHANGED
|
@@ -38,11 +38,7 @@ After the build finishes, look for the file named `stats.html` and open it in th
|
|
|
38
38
|
|
|
39
39
|
## Theme Token Autocompletion
|
|
40
40
|
|
|
41
|
-
To enable theme token autocompletion in your application,
|
|
42
|
-
|
|
43
|
-
### Option 1: Automatic Generation (Recommended)
|
|
44
|
-
|
|
45
|
-
Add the following to your package.json:
|
|
41
|
+
To enable theme token autocompletion in your application, add the following to your package.json:
|
|
46
42
|
|
|
47
43
|
```json
|
|
48
44
|
{
|
|
@@ -54,26 +50,22 @@ Add the following to your package.json:
|
|
|
54
50
|
|
|
55
51
|
This will automatically generate theme types whenever you install or update `@televet/kibble-ui`.
|
|
56
52
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
```tsx
|
|
54
|
+
// You'll get autocompletion for theme tokens like this:
|
|
55
|
+
<Swatch bgColor="background.primary" />
|
|
56
|
+
<Text fontSize="sm" />
|
|
61
57
|
```
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Run the following command after installing or updating `@televet/kibble-ui`:
|
|
59
|
+
If you need to manually generate the types, you can run:
|
|
66
60
|
|
|
67
61
|
```bash
|
|
68
62
|
npx kibble-generate-theme
|
|
69
63
|
```
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
If you need to skip the automatic generation (e.g., in CI environments), you can set the `SKIP_KIBBLE_POSTINSTALL` environment variable:
|
|
72
66
|
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
<Swatch bgColor="background.primary" />
|
|
76
|
-
<Text fontSize="sm" />
|
|
67
|
+
```bash
|
|
68
|
+
SKIP_KIBBLE_POSTINSTALL=1 npm install
|
|
77
69
|
```
|
|
78
70
|
|
|
79
71
|
## TypeScript Path Configuration
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";const i=require("node:fs"),s=require("node:path"),o=()=>{try{const t=s.resolve(process.cwd(),"tsconfig.json");let e;try{e=JSON.parse(i.readFileSync(t,"utf8"))}catch{console.error("⚠️ No tsconfig.json found in the current directory."),process.exit(1)}e.compilerOptions=e.compilerOptions||{},e.compilerOptions.paths=e.compilerOptions.paths||{},e.compilerOptions.paths={...e.compilerOptions.paths,"@televet/kibble-ui
|
|
2
|
+
"use strict";const i=require("node:fs"),s=require("node:path"),o=()=>{try{const t=s.resolve(process.cwd(),"tsconfig.json");let e;try{e=JSON.parse(i.readFileSync(t,"utf8"))}catch{console.error("⚠️ No tsconfig.json found in the current directory."),process.exit(1)}e.compilerOptions=e.compilerOptions||{},e.compilerOptions.paths=e.compilerOptions.paths||{},e.compilerOptions.paths={...e.compilerOptions.paths,"@televet/kibble-ui/*":["./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts"],"@televet/kibble-ui/theme":["./node_modules/@televet/kibble-ui/dist/types/theme/index.d.ts"],"@televet/kibble-ui/theme/*":["./node_modules/@televet/kibble-ui/dist/types/theme/*.d.ts"],"@televet/kibble-ui/hocs/*":["./node_modules/@televet/kibble-ui/dist/types/hocs/*/index.d.ts"],"@televet/kibble-ui/hooks/*":["./node_modules/@televet/kibble-ui/dist/types/hooks/*/index.d.ts"],"@televet/kibble-ui/shared/*":["./node_modules/@televet/kibble-ui/dist/types/shared/*/index.d.ts"],"@televet/kibble-ui":["./node_modules/@televet/kibble-ui/dist/types/index.d.ts"]},i.writeFileSync(t,JSON.stringify(e,null,2)),console.log("✨ Successfully configured TypeScript paths for @televet/kibble-ui")}catch(t){console.error("❌ Failed to configure TypeScript paths:",t),process.exit(1)}};o();
|
|
3
3
|
//# sourceMappingURL=configure-paths.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-paths.cjs","sources":["../../../src/cli/configure-paths.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { readFileSync, writeFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst configureTsConfig = (): void => {\n try {\n const tsconfigPath = resolve(process.cwd(), \"tsconfig.json\");\n let tsconfig;\n\n try {\n tsconfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\"));\n } catch {\n console.error(\"⚠️ No tsconfig.json found in the current directory.\");\n process.exit(1);\n }\n\n // Ensure compilerOptions exists\n tsconfig.compilerOptions = tsconfig.compilerOptions || {};\n\n // Ensure paths exists\n tsconfig.compilerOptions.paths = tsconfig.compilerOptions.paths || {};\n\n // Add our path mappings\n tsconfig.compilerOptions.paths = {\n ...tsconfig.compilerOptions.paths,\n // Direct component imports (e.g., @televet/kibble-ui/Button)\n \"@televet/kibble-ui
|
|
1
|
+
{"version":3,"file":"configure-paths.cjs","sources":["../../../src/cli/configure-paths.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { readFileSync, writeFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst configureTsConfig = (): void => {\n try {\n const tsconfigPath = resolve(process.cwd(), \"tsconfig.json\");\n let tsconfig;\n\n try {\n tsconfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\"));\n } catch {\n console.error(\"⚠️ No tsconfig.json found in the current directory.\");\n process.exit(1);\n }\n\n // Ensure compilerOptions exists\n tsconfig.compilerOptions = tsconfig.compilerOptions || {};\n\n // Ensure paths exists\n tsconfig.compilerOptions.paths = tsconfig.compilerOptions.paths || {};\n\n // Add our path mappings\n tsconfig.compilerOptions.paths = {\n ...tsconfig.compilerOptions.paths,\n // Direct component imports (e.g., @televet/kibble-ui/Button)\n \"@televet/kibble-ui/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts\",\n ],\n // Theme imports\n \"@televet/kibble-ui/theme\": [\n \"./node_modules/@televet/kibble-ui/dist/types/theme/index.d.ts\",\n ],\n \"@televet/kibble-ui/theme/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/theme/*.d.ts\",\n ],\n // Utility imports\n \"@televet/kibble-ui/hocs/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/hocs/*/index.d.ts\",\n ],\n \"@televet/kibble-ui/hooks/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/hooks/*/index.d.ts\",\n ],\n \"@televet/kibble-ui/shared/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/shared/*/index.d.ts\",\n ],\n // Main package import\n \"@televet/kibble-ui\": [\n \"./node_modules/@televet/kibble-ui/dist/types/index.d.ts\",\n ],\n };\n\n // Write back to tsconfig.json with proper formatting\n writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));\n console.log(\n \"✨ Successfully configured TypeScript paths for @televet/kibble-ui\"\n );\n } catch (error) {\n console.error(\"❌ Failed to configure TypeScript paths:\", error);\n process.exit(1);\n }\n};\n\nconfigureTsConfig();\n"],"names":["configureTsConfig","tsconfigPath","resolve","tsconfig","readFileSync","writeFileSync","error"],"mappings":";+DAKMA,EAAoB,IAAY,CAChC,GAAA,CACF,MAAMC,EAAeC,EAAA,QAAQ,QAAQ,IAAA,EAAO,eAAe,EACvD,IAAAC,EAEA,GAAA,CACFA,EAAW,KAAK,MAAMC,EAAa,aAAAH,EAAc,MAAM,CAAC,CAAA,MAClD,CACN,QAAQ,MAAM,qDAAqD,EACnE,QAAQ,KAAK,CAAC,CAAA,CAIPE,EAAA,gBAAkBA,EAAS,iBAAmB,CAAC,EAGxDA,EAAS,gBAAgB,MAAQA,EAAS,gBAAgB,OAAS,CAAC,EAGpEA,EAAS,gBAAgB,MAAQ,CAC/B,GAAGA,EAAS,gBAAgB,MAE5B,uBAAwB,CACtB,sEACF,EAEA,2BAA4B,CAC1B,+DACF,EACA,6BAA8B,CAC5B,2DACF,EAEA,4BAA6B,CAC3B,gEACF,EACA,6BAA8B,CAC5B,iEACF,EACA,8BAA+B,CAC7B,kEACF,EAEA,qBAAsB,CACpB,yDAAA,CAEJ,EAGAE,EAAA,cAAcJ,EAAc,KAAK,UAAUE,EAAU,KAAM,CAAC,CAAC,EACrD,QAAA,IACN,mEACF,QACOG,EAAO,CACN,QAAA,MAAM,0CAA2CA,CAAK,EAC9D,QAAQ,KAAK,CAAC,CAAA,CAElB,EAEAN,EAAkB"}
|
|
@@ -13,20 +13,16 @@ const l = () => {
|
|
|
13
13
|
e.compilerOptions = e.compilerOptions || {}, e.compilerOptions.paths = e.compilerOptions.paths || {}, e.compilerOptions.paths = {
|
|
14
14
|
...e.compilerOptions.paths,
|
|
15
15
|
// Direct component imports (e.g., @televet/kibble-ui/Button)
|
|
16
|
-
"@televet/kibble-ui
|
|
17
|
-
"./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts"
|
|
18
|
-
],
|
|
19
|
-
// Explicit component directory imports (e.g., @televet/kibble-ui/components/Button)
|
|
20
|
-
"@televet/kibble-ui/components/*": [
|
|
16
|
+
"@televet/kibble-ui/*": [
|
|
21
17
|
"./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts"
|
|
22
18
|
],
|
|
23
19
|
// Theme imports
|
|
24
|
-
"@televet/kibble-ui/theme/*": [
|
|
25
|
-
"./node_modules/@televet/kibble-ui/dist/types/theme/*.d.ts"
|
|
26
|
-
],
|
|
27
20
|
"@televet/kibble-ui/theme": [
|
|
28
21
|
"./node_modules/@televet/kibble-ui/dist/types/theme/index.d.ts"
|
|
29
22
|
],
|
|
23
|
+
"@televet/kibble-ui/theme/*": [
|
|
24
|
+
"./node_modules/@televet/kibble-ui/dist/types/theme/*.d.ts"
|
|
25
|
+
],
|
|
30
26
|
// Utility imports
|
|
31
27
|
"@televet/kibble-ui/hocs/*": [
|
|
32
28
|
"./node_modules/@televet/kibble-ui/dist/types/hocs/*/index.d.ts"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-paths.js","sources":["../../../src/cli/configure-paths.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { readFileSync, writeFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst configureTsConfig = (): void => {\n try {\n const tsconfigPath = resolve(process.cwd(), \"tsconfig.json\");\n let tsconfig;\n\n try {\n tsconfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\"));\n } catch {\n console.error(\"⚠️ No tsconfig.json found in the current directory.\");\n process.exit(1);\n }\n\n // Ensure compilerOptions exists\n tsconfig.compilerOptions = tsconfig.compilerOptions || {};\n\n // Ensure paths exists\n tsconfig.compilerOptions.paths = tsconfig.compilerOptions.paths || {};\n\n // Add our path mappings\n tsconfig.compilerOptions.paths = {\n ...tsconfig.compilerOptions.paths,\n // Direct component imports (e.g., @televet/kibble-ui/Button)\n \"@televet/kibble-ui
|
|
1
|
+
{"version":3,"file":"configure-paths.js","sources":["../../../src/cli/configure-paths.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { readFileSync, writeFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst configureTsConfig = (): void => {\n try {\n const tsconfigPath = resolve(process.cwd(), \"tsconfig.json\");\n let tsconfig;\n\n try {\n tsconfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\"));\n } catch {\n console.error(\"⚠️ No tsconfig.json found in the current directory.\");\n process.exit(1);\n }\n\n // Ensure compilerOptions exists\n tsconfig.compilerOptions = tsconfig.compilerOptions || {};\n\n // Ensure paths exists\n tsconfig.compilerOptions.paths = tsconfig.compilerOptions.paths || {};\n\n // Add our path mappings\n tsconfig.compilerOptions.paths = {\n ...tsconfig.compilerOptions.paths,\n // Direct component imports (e.g., @televet/kibble-ui/Button)\n \"@televet/kibble-ui/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts\",\n ],\n // Theme imports\n \"@televet/kibble-ui/theme\": [\n \"./node_modules/@televet/kibble-ui/dist/types/theme/index.d.ts\",\n ],\n \"@televet/kibble-ui/theme/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/theme/*.d.ts\",\n ],\n // Utility imports\n \"@televet/kibble-ui/hocs/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/hocs/*/index.d.ts\",\n ],\n \"@televet/kibble-ui/hooks/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/hooks/*/index.d.ts\",\n ],\n \"@televet/kibble-ui/shared/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/shared/*/index.d.ts\",\n ],\n // Main package import\n \"@televet/kibble-ui\": [\n \"./node_modules/@televet/kibble-ui/dist/types/index.d.ts\",\n ],\n };\n\n // Write back to tsconfig.json with proper formatting\n writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));\n console.log(\n \"✨ Successfully configured TypeScript paths for @televet/kibble-ui\"\n );\n } catch (error) {\n console.error(\"❌ Failed to configure TypeScript paths:\", error);\n process.exit(1);\n }\n};\n\nconfigureTsConfig();\n"],"names":["configureTsConfig","tsconfigPath","resolve","tsconfig","readFileSync","writeFileSync","error"],"mappings":";;;AAKA,MAAMA,IAAoB,MAAY;AAChC,MAAA;AACF,UAAMC,IAAeC,EAAQ,QAAQ,IAAA,GAAO,eAAe;AACvD,QAAAC;AAEA,QAAA;AACF,MAAAA,IAAW,KAAK,MAAMC,EAAaH,GAAc,MAAM,CAAC;AAAA,IAAA,QAClD;AACN,cAAQ,MAAM,qDAAqD,GACnE,QAAQ,KAAK,CAAC;AAAA,IAAA;AAIP,IAAAE,EAAA,kBAAkBA,EAAS,mBAAmB,CAAC,GAGxDA,EAAS,gBAAgB,QAAQA,EAAS,gBAAgB,SAAS,CAAC,GAGpEA,EAAS,gBAAgB,QAAQ;AAAA,MAC/B,GAAGA,EAAS,gBAAgB;AAAA;AAAA,MAE5B,wBAAwB;AAAA,QACtB;AAAA,MACF;AAAA;AAAA,MAEA,4BAA4B;AAAA,QAC1B;AAAA,MACF;AAAA,MACA,8BAA8B;AAAA,QAC5B;AAAA,MACF;AAAA;AAAA,MAEA,6BAA6B;AAAA,QAC3B;AAAA,MACF;AAAA,MACA,8BAA8B;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,+BAA+B;AAAA,QAC7B;AAAA,MACF;AAAA;AAAA,MAEA,sBAAsB;AAAA,QACpB;AAAA,MAAA;AAAA,IAEJ,GAGAE,EAAcJ,GAAc,KAAK,UAAUE,GAAU,MAAM,CAAC,CAAC,GACrD,QAAA;AAAA,MACN;AAAA,IACF;AAAA,WACOG,GAAO;AACN,YAAA,MAAM,2CAA2CA,CAAK,GAC9D,QAAQ,KAAK,CAAC;AAAA,EAAA;AAElB;AAEAN,EAAkB;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@televet/kibble-ui",
|
|
3
3
|
"description": "Kibble Design System by Otto",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.cjs",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"default": "./dist/cjs/index.cjs"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"./*": {
|
|
31
31
|
"import": {
|
|
32
32
|
"types": "./dist/types/components/*/index.d.ts",
|
|
33
33
|
"default": "./dist/esm/components/*/index.js"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"default": "./dist/cjs/components/*/index.cjs"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
"./
|
|
40
|
+
"./components/*": {
|
|
41
41
|
"import": {
|
|
42
42
|
"types": "./dist/types/components/*/index.d.ts",
|
|
43
43
|
"default": "./dist/esm/components/*/index.js"
|