@televet/kibble-ui 4.0.0-beta.18 → 4.0.0-beta.19

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
@@ -75,3 +75,33 @@ Both options will enable autocompletion for all Kibble UI theme tokens in your c
75
75
  <Swatch bgColor="background.primary" />
76
76
  <Text fontSize="sm" />
77
77
  ```
78
+
79
+ ## TypeScript Path Configuration
80
+
81
+ TypeScript paths for component imports are automatically configured during installation. This enables convenient imports like:
82
+
83
+ ```tsx
84
+ // Import from main package
85
+ import { Button } from "@televet/kibble-ui";
86
+
87
+ // Import specific component
88
+ import { Button } from "@televet/kibble-ui/Button";
89
+
90
+ // Import from theme
91
+ import { system } from "@televet/kibble-ui/theme";
92
+
93
+ // Import hooks
94
+ import { useDebounce } from "@televet/kibble-ui/hooks/useDebounce";
95
+ ```
96
+
97
+ If you need to manually configure the paths, you can run:
98
+
99
+ ```bash
100
+ npx kibble-configure-paths
101
+ ```
102
+
103
+ To skip the automatic configuration in CI environments, set the `SKIP_KIBBLE_POSTINSTALL` environment variable:
104
+
105
+ ```bash
106
+ SKIP_KIBBLE_POSTINSTALL=1 npm install
107
+ ```
@@ -0,0 +1,3 @@
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":["./node_modules/@televet/kibble-ui/dist/types/index.d.ts"],"@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"]},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
+ //# sourceMappingURL=configure-paths.cjs.map
@@ -0,0 +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 \"@televet/kibble-ui\": [\n \"./node_modules/@televet/kibble-ui/dist/types/index.d.ts\",\n ],\n \"@televet/kibble-ui/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts\",\n ],\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 \"@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 };\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,MAC5B,qBAAsB,CACpB,yDACF,EACA,uBAAwB,CACtB,sEACF,EACA,2BAA4B,CAC1B,+DACF,EACA,6BAA8B,CAC5B,2DACF,EACA,4BAA6B,CAC3B,gEACF,EACA,6BAA8B,CAC5B,iEACF,EACA,8BAA+B,CAC7B,kEAAA,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"}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";const n=require("node:child_process"),t=require("node:fs"),s=require("node:path"),r=()=>{try{const e=JSON.parse(t.readFileSync(s.resolve(process.cwd(),"package.json"),"utf8"));return(e.dependencies?.["@televet/kibble-ui"]||e.devDependencies?.["@televet/kibble-ui"])&&e.name!=="@televet/kibble-ui"}catch{return!1}};if(r()&&!process.env.SKIP_KIBBLE_POSTINSTALL)try{console.log("🐕 Kibble UI: Running automatic theme type generation..."),n.execSync("npx kibble-generate-theme",{stdio:"inherit"}),console.log("✨ Kibble UI: Theme types generated successfully!")}catch(e){console.error("❌ Kibble UI: Failed to generate theme types."),console.error(e),process.exit(1)}
2
+ "use strict";const n=require("node:child_process"),i=require("node:fs"),o=require("node:path"),s=()=>{try{const e=JSON.parse(i.readFileSync(o.resolve(process.cwd(),"package.json"),"utf8"));return(e.dependencies?.["@televet/kibble-ui"]||e.devDependencies?.["@televet/kibble-ui"])&&e.name!=="@televet/kibble-ui"}catch{return!1}};if(s()&&!process.env.SKIP_KIBBLE_POSTINSTALL)try{console.log("🐕 Kibble UI: Running automatic theme type generation..."),n.execSync("npx kibble-generate-theme",{stdio:"inherit"}),console.log("✨ Kibble UI: Theme types generated successfully!"),console.log("🐕 Kibble UI: Configuring TypeScript paths..."),n.execSync("npx kibble-configure-paths",{stdio:"inherit"})}catch(e){console.error("❌ Kibble UI: Setup failed."),console.error(e),process.exit(1)}
3
3
  //# sourceMappingURL=postinstall.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"postinstall.cjs","sources":["../../../src/cli/postinstall.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { execSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst isConsumingApp = (): boolean => {\n try {\n const packageJson = JSON.parse(\n readFileSync(resolve(process.cwd(), \"package.json\"), \"utf8\")\n );\n\n // Check if @televet/kibble-ui is a dependency but we're not in the kibble-ui package itself\n return (\n (packageJson.dependencies?.[\"@televet/kibble-ui\"] ||\n packageJson.devDependencies?.[\"@televet/kibble-ui\"]) &&\n packageJson.name !== \"@televet/kibble-ui\"\n );\n } catch {\n return false;\n }\n};\n\n// Only run in consuming applications, not in the library itself or CI environments that set this\nif (isConsumingApp() && !process.env.SKIP_KIBBLE_POSTINSTALL) {\n try {\n console.log(\"🐕 Kibble UI: Running automatic theme type generation...\");\n execSync(\"npx kibble-generate-theme\", { stdio: \"inherit\" });\n console.log(\"✨ Kibble UI: Theme types generated successfully!\");\n } catch (error) {\n console.error(\"❌ Kibble UI: Failed to generate theme types.\");\n console.error(error);\n process.exit(1);\n }\n}\n"],"names":["isConsumingApp","packageJson","readFileSync","resolve","execSync","error"],"mappings":";+FAMMA,EAAiB,IAAe,CAChC,GAAA,CACF,MAAMC,EAAc,KAAK,MACvBC,eAAaC,EAAQ,QAAA,QAAQ,MAAO,cAAc,EAAG,MAAM,CAC7D,EAIG,OAAAF,EAAY,eAAe,oBAAoB,GAC9CA,EAAY,kBAAkB,oBAAoB,IACpDA,EAAY,OAAS,oBAAA,MAEjB,CACC,MAAA,EAAA,CAEX,EAGA,GAAID,KAAoB,CAAC,QAAQ,IAAI,wBAC/B,GAAA,CACF,QAAQ,IAAI,0DAA0D,EACtEI,EAAAA,SAAS,4BAA6B,CAAE,MAAO,SAAA,CAAW,EAC1D,QAAQ,IAAI,kDAAkD,QACvDC,EAAO,CACd,QAAQ,MAAM,8CAA8C,EAC5D,QAAQ,MAAMA,CAAK,EACnB,QAAQ,KAAK,CAAC,CAAA"}
1
+ {"version":3,"file":"postinstall.cjs","sources":["../../../src/cli/postinstall.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { execSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst isConsumingApp = (): boolean => {\n try {\n const packageJson = JSON.parse(\n readFileSync(resolve(process.cwd(), \"package.json\"), \"utf8\")\n );\n\n // Check if @televet/kibble-ui is a dependency but we're not in the kibble-ui package itself\n return (\n (packageJson.dependencies?.[\"@televet/kibble-ui\"] ||\n packageJson.devDependencies?.[\"@televet/kibble-ui\"]) &&\n packageJson.name !== \"@televet/kibble-ui\"\n );\n } catch {\n return false;\n }\n};\n\n// Only run in consuming applications, not in the library itself or CI environments that set this\nif (isConsumingApp() && !process.env.SKIP_KIBBLE_POSTINSTALL) {\n try {\n console.log(\"🐕 Kibble UI: Running automatic theme type generation...\");\n execSync(\"npx kibble-generate-theme\", { stdio: \"inherit\" });\n console.log(\"✨ Kibble UI: Theme types generated successfully!\");\n\n console.log(\"🐕 Kibble UI: Configuring TypeScript paths...\");\n execSync(\"npx kibble-configure-paths\", { stdio: \"inherit\" });\n } catch (error) {\n console.error(\"❌ Kibble UI: Setup failed.\");\n console.error(error);\n process.exit(1);\n }\n}\n"],"names":["isConsumingApp","packageJson","readFileSync","resolve","execSync","error"],"mappings":";+FAMMA,EAAiB,IAAe,CAChC,GAAA,CACF,MAAMC,EAAc,KAAK,MACvBC,eAAaC,EAAQ,QAAA,QAAQ,MAAO,cAAc,EAAG,MAAM,CAC7D,EAIG,OAAAF,EAAY,eAAe,oBAAoB,GAC9CA,EAAY,kBAAkB,oBAAoB,IACpDA,EAAY,OAAS,oBAAA,MAEjB,CACC,MAAA,EAAA,CAEX,EAGA,GAAID,KAAoB,CAAC,QAAQ,IAAI,wBAC/B,GAAA,CACF,QAAQ,IAAI,0DAA0D,EACtEI,EAAAA,SAAS,4BAA6B,CAAE,MAAO,SAAA,CAAW,EAC1D,QAAQ,IAAI,kDAAkD,EAE9D,QAAQ,IAAI,+CAA+C,EAC3DA,EAAAA,SAAS,6BAA8B,CAAE,MAAO,SAAA,CAAW,QACpDC,EAAO,CACd,QAAQ,MAAM,4BAA4B,EAC1C,QAAQ,MAAMA,CAAK,EACnB,QAAQ,KAAK,CAAC,CAAA"}
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync as i, writeFileSync as s } from "node:fs";
3
+ import { resolve as o } from "node:path";
4
+ const l = () => {
5
+ try {
6
+ const t = o(process.cwd(), "tsconfig.json");
7
+ let e;
8
+ try {
9
+ e = JSON.parse(i(t, "utf8"));
10
+ } catch {
11
+ console.error("⚠️ No tsconfig.json found in the current directory."), process.exit(1);
12
+ }
13
+ e.compilerOptions = e.compilerOptions || {}, e.compilerOptions.paths = e.compilerOptions.paths || {}, e.compilerOptions.paths = {
14
+ ...e.compilerOptions.paths,
15
+ "@televet/kibble-ui": [
16
+ "./node_modules/@televet/kibble-ui/dist/types/index.d.ts"
17
+ ],
18
+ "@televet/kibble-ui/*": [
19
+ "./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts"
20
+ ],
21
+ "@televet/kibble-ui/theme": [
22
+ "./node_modules/@televet/kibble-ui/dist/types/theme/index.d.ts"
23
+ ],
24
+ "@televet/kibble-ui/theme/*": [
25
+ "./node_modules/@televet/kibble-ui/dist/types/theme/*.d.ts"
26
+ ],
27
+ "@televet/kibble-ui/hocs/*": [
28
+ "./node_modules/@televet/kibble-ui/dist/types/hocs/*/index.d.ts"
29
+ ],
30
+ "@televet/kibble-ui/hooks/*": [
31
+ "./node_modules/@televet/kibble-ui/dist/types/hooks/*/index.d.ts"
32
+ ],
33
+ "@televet/kibble-ui/shared/*": [
34
+ "./node_modules/@televet/kibble-ui/dist/types/shared/*/index.d.ts"
35
+ ]
36
+ }, s(t, JSON.stringify(e, null, 2)), console.log(
37
+ "✨ Successfully configured TypeScript paths for @televet/kibble-ui"
38
+ );
39
+ } catch (t) {
40
+ console.error("❌ Failed to configure TypeScript paths:", t), process.exit(1);
41
+ }
42
+ };
43
+ l();
44
+ //# sourceMappingURL=configure-paths.js.map
@@ -0,0 +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 \"@televet/kibble-ui\": [\n \"./node_modules/@televet/kibble-ui/dist/types/index.d.ts\",\n ],\n \"@televet/kibble-ui/*\": [\n \"./node_modules/@televet/kibble-ui/dist/types/components/*/index.d.ts\",\n ],\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 \"@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 };\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,MAC5B,sBAAsB;AAAA,QACpB;AAAA,MACF;AAAA,MACA,wBAAwB;AAAA,QACtB;AAAA,MACF;AAAA,MACA,4BAA4B;AAAA,QAC1B;AAAA,MACF;AAAA,MACA,8BAA8B;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,6BAA6B;AAAA,QAC3B;AAAA,MACF;AAAA,MACA,8BAA8B;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,+BAA+B;AAAA,QAC7B;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;"}
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { execSync as t } from "node:child_process";
3
- import { readFileSync as n } from "node:fs";
4
- import { resolve as o } from "node:path";
2
+ import { execSync as n } from "node:child_process";
3
+ import { readFileSync as o } from "node:fs";
4
+ import { resolve as i } from "node:path";
5
5
  const r = () => {
6
6
  try {
7
7
  const e = JSON.parse(
8
- n(o(process.cwd(), "package.json"), "utf8")
8
+ o(i(process.cwd(), "package.json"), "utf8")
9
9
  );
10
10
  return (e.dependencies?.["@televet/kibble-ui"] || e.devDependencies?.["@televet/kibble-ui"]) && e.name !== "@televet/kibble-ui";
11
11
  } catch {
@@ -14,8 +14,8 @@ const r = () => {
14
14
  };
15
15
  if (r() && !process.env.SKIP_KIBBLE_POSTINSTALL)
16
16
  try {
17
- console.log("🐕 Kibble UI: Running automatic theme type generation..."), t("npx kibble-generate-theme", { stdio: "inherit" }), console.log("✨ Kibble UI: Theme types generated successfully!");
17
+ console.log("🐕 Kibble UI: Running automatic theme type generation..."), n("npx kibble-generate-theme", { stdio: "inherit" }), console.log("✨ Kibble UI: Theme types generated successfully!"), console.log("🐕 Kibble UI: Configuring TypeScript paths..."), n("npx kibble-configure-paths", { stdio: "inherit" });
18
18
  } catch (e) {
19
- console.error("❌ Kibble UI: Failed to generate theme types."), console.error(e), process.exit(1);
19
+ console.error("❌ Kibble UI: Setup failed."), console.error(e), process.exit(1);
20
20
  }
21
21
  //# sourceMappingURL=postinstall.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postinstall.js","sources":["../../../src/cli/postinstall.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { execSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst isConsumingApp = (): boolean => {\n try {\n const packageJson = JSON.parse(\n readFileSync(resolve(process.cwd(), \"package.json\"), \"utf8\")\n );\n\n // Check if @televet/kibble-ui is a dependency but we're not in the kibble-ui package itself\n return (\n (packageJson.dependencies?.[\"@televet/kibble-ui\"] ||\n packageJson.devDependencies?.[\"@televet/kibble-ui\"]) &&\n packageJson.name !== \"@televet/kibble-ui\"\n );\n } catch {\n return false;\n }\n};\n\n// Only run in consuming applications, not in the library itself or CI environments that set this\nif (isConsumingApp() && !process.env.SKIP_KIBBLE_POSTINSTALL) {\n try {\n console.log(\"🐕 Kibble UI: Running automatic theme type generation...\");\n execSync(\"npx kibble-generate-theme\", { stdio: \"inherit\" });\n console.log(\"✨ Kibble UI: Theme types generated successfully!\");\n } catch (error) {\n console.error(\"❌ Kibble UI: Failed to generate theme types.\");\n console.error(error);\n process.exit(1);\n }\n}\n"],"names":["isConsumingApp","packageJson","readFileSync","resolve","execSync","error"],"mappings":";;;;AAMA,MAAMA,IAAiB,MAAe;AAChC,MAAA;AACF,UAAMC,IAAc,KAAK;AAAA,MACvBC,EAAaC,EAAQ,QAAQ,OAAO,cAAc,GAAG,MAAM;AAAA,IAC7D;AAIG,YAAAF,EAAY,eAAe,oBAAoB,KAC9CA,EAAY,kBAAkB,oBAAoB,MACpDA,EAAY,SAAS;AAAA,EAAA,QAEjB;AACC,WAAA;AAAA,EAAA;AAEX;AAGA,IAAID,OAAoB,CAAC,QAAQ,IAAI;AAC/B,MAAA;AACF,YAAQ,IAAI,0DAA0D,GACtEI,EAAS,6BAA6B,EAAE,OAAO,UAAA,CAAW,GAC1D,QAAQ,IAAI,kDAAkD;AAAA,WACvDC,GAAO;AACd,YAAQ,MAAM,8CAA8C,GAC5D,QAAQ,MAAMA,CAAK,GACnB,QAAQ,KAAK,CAAC;AAAA,EAAA;"}
1
+ {"version":3,"file":"postinstall.js","sources":["../../../src/cli/postinstall.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { execSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nconst isConsumingApp = (): boolean => {\n try {\n const packageJson = JSON.parse(\n readFileSync(resolve(process.cwd(), \"package.json\"), \"utf8\")\n );\n\n // Check if @televet/kibble-ui is a dependency but we're not in the kibble-ui package itself\n return (\n (packageJson.dependencies?.[\"@televet/kibble-ui\"] ||\n packageJson.devDependencies?.[\"@televet/kibble-ui\"]) &&\n packageJson.name !== \"@televet/kibble-ui\"\n );\n } catch {\n return false;\n }\n};\n\n// Only run in consuming applications, not in the library itself or CI environments that set this\nif (isConsumingApp() && !process.env.SKIP_KIBBLE_POSTINSTALL) {\n try {\n console.log(\"🐕 Kibble UI: Running automatic theme type generation...\");\n execSync(\"npx kibble-generate-theme\", { stdio: \"inherit\" });\n console.log(\"✨ Kibble UI: Theme types generated successfully!\");\n\n console.log(\"🐕 Kibble UI: Configuring TypeScript paths...\");\n execSync(\"npx kibble-configure-paths\", { stdio: \"inherit\" });\n } catch (error) {\n console.error(\"❌ Kibble UI: Setup failed.\");\n console.error(error);\n process.exit(1);\n }\n}\n"],"names":["isConsumingApp","packageJson","readFileSync","resolve","execSync","error"],"mappings":";;;;AAMA,MAAMA,IAAiB,MAAe;AAChC,MAAA;AACF,UAAMC,IAAc,KAAK;AAAA,MACvBC,EAAaC,EAAQ,QAAQ,OAAO,cAAc,GAAG,MAAM;AAAA,IAC7D;AAIG,YAAAF,EAAY,eAAe,oBAAoB,KAC9CA,EAAY,kBAAkB,oBAAoB,MACpDA,EAAY,SAAS;AAAA,EAAA,QAEjB;AACC,WAAA;AAAA,EAAA;AAEX;AAGA,IAAID,OAAoB,CAAC,QAAQ,IAAI;AAC/B,MAAA;AACF,YAAQ,IAAI,0DAA0D,GACtEI,EAAS,6BAA6B,EAAE,OAAO,UAAA,CAAW,GAC1D,QAAQ,IAAI,kDAAkD,GAE9D,QAAQ,IAAI,+CAA+C,GAC3DA,EAAS,8BAA8B,EAAE,OAAO,UAAA,CAAW;AAAA,WACpDC,GAAO;AACd,YAAQ,MAAM,4BAA4B,GAC1C,QAAQ,MAAMA,CAAK,GACnB,QAAQ,KAAK,CAAC;AAAA,EAAA;"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@televet/kibble-ui",
3
3
  "description": "Kibble Design System by Otto",
4
- "version": "4.0.0-beta.18",
4
+ "version": "4.0.0-beta.19",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",
7
7
  "module": "dist/esm/index.js",
8
8
  "types": "dist/types/index.d.ts",
9
9
  "bin": {
10
10
  "kibble-generate-theme": "./dist/esm/cli/generate-theme-types.js",
11
- "kibble-postinstall": "./dist/esm/cli/postinstall.js"
11
+ "kibble-postinstall": "./dist/esm/cli/postinstall.js",
12
+ "kibble-configure-paths": "./dist/esm/cli/configure-paths.js"
12
13
  },
13
14
  "files": [
14
15
  "dist",