@chaibuilder/sdk 2.0.9 → 2.0.11
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/dist/{ChaiThemeFn-Cort9tch.js → chai-theme-helpers-BpnwYsLZ.js} +72 -54
- package/dist/chai-theme-helpers-D2bHv81c.cjs +22 -0
- package/dist/core.cjs +5 -5
- package/dist/core.js +79 -113
- package/dist/fonts/GeistMonoVF.woff +0 -0
- package/dist/fonts/GeistVF.woff +0 -0
- package/dist/{plugin-kUMxtQR5.js → plugin-D56-CF7U.js} +1 -1
- package/dist/plugin-PDQQ8m4D.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +4 -4
- package/dist/render.js +46 -43
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +4 -4
- package/dist/tailwind.js +1 -1
- package/package.json +3 -3
- package/dist/ChaiThemeFn-DQu-2Eh9.cjs +0 -13
- package/dist/plugin-2xcljWGM.cjs +0 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": "Suraj Air",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://chaibuilder.com",
|
|
8
|
-
"version": "2.0.
|
|
8
|
+
"version": "2.0.11",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@chaibuilder/runtime": "2.0.
|
|
56
|
+
"@chaibuilder/runtime": "2.0.5",
|
|
57
57
|
"@types/react": "*",
|
|
58
58
|
"@types/react-dom": "*",
|
|
59
59
|
"jotai": "2.12.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@ai-sdk/react": "^1.2.2",
|
|
73
|
-
"@chaibuilder/runtime": "2.0.
|
|
73
|
+
"@chaibuilder/runtime": "2.0.5",
|
|
74
74
|
"@floating-ui/dom": "1.6.13",
|
|
75
75
|
"@floating-ui/react-dom": "2.1.2",
|
|
76
76
|
"@mhsdesign/jit-browser-tailwindcss": "0.4.2",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("lodash-es");function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const _={fontFamily:{"font-heading":"Inter","font-body":"Inter"},borderRadius:"10px",colors:[{group:"Body",items:{background:["#FFFFFF","#121212"],foreground:["#121212","#FFFFFF"]}},{group:"Primary",items:{primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"]}},{group:"Secondary",items:{secondary:["#F3F4F6","#374151"],"secondary-foreground":["#1F2937","#F9FAFB"]}},{group:"Border, Input & Ring",items:{border:["#E5E7EB","#374151"],input:["#E5E7EB","#374151"],ring:["#2563EB","#3B82F6"]}},{group:"Card",items:{card:["#FFFFFF","#1F2937"],"card-foreground":["#121212","#FFFFFF"]}},{group:"Popover",items:{popover:["#FFFFFF","#1F2937"],"popover-foreground":["#121212","#FFFFFF"]}},{group:"Muted",items:{muted:["#F3F4F6","#374151"],"muted-foreground":["#6B7280","#9CA3AF"]}},{group:"Accent",items:{accent:["#F3F4F6","#374151"],"accent-foreground":["#1F2937","#FFFFFF"]}},{group:"Destructive",items:{destructive:["#DC2626","#EF4444"],"destructive-foreground":["#FFFFFF","#FFFFFF"]}}]};var c={},d={},p;function v(){return p||(p=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function n(t,o){return{handler:t,config:o}}n.withOptions=function(t,o=()=>({})){const u=function(s){return{__options:s,handler:t(s),config:o(s)}};return u.__isOptionsFunction=!0,u.__pluginFunction=t,u.__configFunction=o,u};const r=n}(d)),d}var m;function P(){return m||(m=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});const n=r(v());function r(o){return o&&o.__esModule?o:{default:o}}const t=n.default}(c)),c}var f,y;function C(){if(y)return f;y=1;let e=P();return f=(e.__esModule?e:{default:e}).default,f}var j=C();const E=b(j),O=e=>({fontFamily:e.fontFamily?a.keys(e.fontFamily).reduce((r,t)=>({...r,[t.replace("font-","")]:`var(--${t})`}),{}):{},borderRadius:e.borderRadius?{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}:{},colors:e.colors?a.flatten(e.colors.map(r=>Object.entries(r.items))).reduce((r,[t])=>({...r,[t]:`hsl(var(--${t}))`}),{}):{}});function $(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);let r=parseInt(n[1],16),t=parseInt(n[2],16),o=parseInt(n[3],16);r/=255,t/=255,o/=255;const u=Math.max(r,t,o),s=Math.min(r,t,o);let i,l;const g=(u+s)/2;if(u==s)i=l=0;else{const F=u-s;switch(l=g>.5?F/(2-u-s):F/(u+s),u){case r:i=(t-o)/F+(t<o?6:0);break;case t:i=(o-r)/F+2;break;case o:i=(r-t)/F+4;break}i/=6}return`${Math.round(i*360)} ${Math.round(l*100)}% ${Math.round(g*100)}%`}const k=e=>`:root {
|
|
2
|
-
${e.fontFamily&&Object.entries(e.fontFamily).map(([n,r])=>`--font-${n}: "${r}";`).join(`
|
|
3
|
-
`)}
|
|
4
|
-
${e.borderRadius&&`--radius: ${e.borderRadius};`}
|
|
5
|
-
${e.colors&&Object.entries(e.colors).map(([n,r])=>`--${n}: ${$(r[0])};`).join(`
|
|
6
|
-
`)}
|
|
7
|
-
}
|
|
8
|
-
.dark {
|
|
9
|
-
${e.colors&&Object.entries(e.colors).map(([n,r])=>`--${n}: ${$(r[1])};`).join(`
|
|
10
|
-
`)}
|
|
11
|
-
}`,M=e=>a.isEmpty(e.fontFamily)?"":a.uniq(Object.entries(e.fontFamily).map(([,r])=>r)).map(r=>`<link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${r.replace(/\s+/g,"+")}&display=swap`}">`).join(`
|
|
12
|
-
`),h=e=>a.isEmpty(e.fontFamily)?"":a.uniq(Object.entries(e.fontFamily).map(([,r])=>r)).map(r=>`@import url("${`https://fonts.googleapis.com/css2?family=${r.replace(/\s+/g,"+")}&display=swap`}");`).join(`
|
|
13
|
-
`);exports.defaultThemeOptions=_;exports.getChaiThemeCssVariables=k;exports.getChaiThemeOptions=O;exports.getDefaultExportFromCjs=b;exports.getThemeFontsCSSImport=h;exports.getThemeFontsLinkMarkup=M;exports.plugin=E;
|
package/dist/plugin-2xcljWGM.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./ChaiThemeFn-DQu-2Eh9.cjs"),o=(i=n.defaultThemeOptions)=>({container:{center:!0,padding:"1rem",screens:{"2xl":"1400px"}},...n.getChaiThemeOptions(i)}),r=n.plugin(function({addBase:i,theme:e}){i({"h1,h2,h3,h4,h5,h6":{fontFamily:e("fontFamily.heading")},body:{fontFamily:e("fontFamily.body"),color:e("colors.foreground"),backgroundColor:e("colors.background")}})});exports.chaiBuilderPlugin=r;exports.getChaiBuilderTheme=o;
|