theokit 0.2.1 → 0.2.3
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/{agent-events-lSIS9uYs.d.ts → agent-events-B3KNV9ER.d.ts} +1 -1
- package/dist/{app-typed-client-4L4L4BWD.js → app-typed-client-FOWJP534.js} +8 -16
- package/dist/app-typed-client-FOWJP534.js.map +1 -0
- package/dist/{app-typed-client-6PAT6VOL.js → app-typed-client-IMILAGER.js} +8 -16
- package/dist/app-typed-client-IMILAGER.js.map +1 -0
- package/dist/{aws-lambda-PONVF3UX.js → aws-lambda-XYCGZH3I.js} +2 -2
- package/dist/{build-EWZDEDT3.js → build-KRSHWXMJ.js} +9 -8
- package/dist/build-KRSHWXMJ.js.map +1 -0
- package/dist/{bun-DITMZMKL.js → bun-K73TQEWC.js} +2 -2
- package/dist/{chunk-M23FP2AS.js → chunk-64JI5LTO.js} +1 -1
- package/dist/{chunk-M23FP2AS.js.map → chunk-64JI5LTO.js.map} +1 -1
- package/dist/{chunk-OJHO2X7C.js → chunk-CZM6WWWS.js} +1 -1
- package/dist/{chunk-OJHO2X7C.js.map → chunk-CZM6WWWS.js.map} +1 -1
- package/dist/{chunk-TFECHXR5.js → chunk-F7RLPDXW.js} +25 -25
- package/dist/{chunk-TFECHXR5.js.map → chunk-F7RLPDXW.js.map} +1 -1
- package/dist/{chunk-4W447H7M.js → chunk-RIBIAL7A.js} +26 -26
- package/dist/{chunk-4W447H7M.js.map → chunk-RIBIAL7A.js.map} +1 -1
- package/dist/{chunk-C27AZN46.js → chunk-TPCT3MXV.js} +1 -1
- package/dist/{chunk-C27AZN46.js.map → chunk-TPCT3MXV.js.map} +1 -1
- package/dist/{chunk-ZBWROIIO.js → chunk-X4JAX2U3.js} +3 -3
- package/dist/{chunk-ZBWROIIO.js.map → chunk-X4JAX2U3.js.map} +1 -1
- package/dist/{chunk-MG7H3LAW.js → chunk-XP7YXRHO.js} +2 -2
- package/dist/{chunk-Y5KE6YFP.js → chunk-ZJW5FFYJ.js} +3 -3
- package/dist/chunk-ZJW5FFYJ.js.map +1 -0
- package/dist/cli/index.js +7 -7
- package/dist/client/index.d.ts +2 -2
- package/dist/{cloudflare-RBANU3SE.js → cloudflare-LCAOTRYZ.js} +2 -2
- package/dist/{deno-deploy-J7LI6HNL.js → deno-deploy-ZN4RE5HF.js} +2 -2
- package/dist/{dev-74KPI5C5.js → dev-UZJVBUF3.js} +5 -5
- package/dist/{dev-74KPI5C5.js.map → dev-UZJVBUF3.js.map} +1 -1
- package/dist/{dist-R2Q7GVDW.js → dist-E6BL4ZVY.js} +9 -9
- package/dist/dist-E6BL4ZVY.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{info-VM7EK4JC.js → info-FJ4NXKTB.js} +3 -3
- package/dist/{lib-NST3PNZX.js → lib-NL5JXGEB.js} +31 -31
- package/dist/lib-NL5JXGEB.js.map +1 -0
- package/dist/{netlify-IFY6ZGFV.js → netlify-5VQ22Z2P.js} +2 -2
- package/dist/{node-KWZI3CKV.js → node-3APTLGWB.js} +2 -2
- package/dist/{openapi-CBASKC7W.js → openapi-ILYEJ6OR.js} +3 -3
- package/dist/{proper-lockfile-MVKMQGFK.js → proper-lockfile-4Y3DP3RP.js} +27 -27
- package/dist/proper-lockfile-4Y3DP3RP.js.map +1 -0
- package/dist/registry-5QFTLOL2.js +25 -0
- package/dist/{routes-7O4NUDYS.js → routes-IGT42JJO.js} +3 -3
- package/dist/{schema-JAKF23GR.js → schema-VR6YNVLQ.js} +2 -2
- package/dist/server/cost/index.d.ts +1 -1
- package/dist/server/cost/index.js +1 -1
- package/dist/server/index.d.ts +12 -12
- package/dist/server/index.js +5 -5
- package/dist/server/index.js.map +1 -1
- package/dist/{sqlite-vec-54KB4RD3.js → sqlite-vec-ARPNUBWT.js} +2 -2
- package/dist/sqlite-vec-ARPNUBWT.js.map +1 -0
- package/dist/{start-5JTFWF4T.js → start-UX2IPPSH.js} +7 -7
- package/dist/{start-5JTFWF4T.js.map → start-UX2IPPSH.js.map} +1 -1
- package/dist/{static-6PZZBY7G.js → static-TZBVBDTB.js} +2 -2
- package/dist/{upgrade-readiness-Q46KTG2J.js → upgrade-readiness-GUJBCJIS.js} +5 -5
- package/dist/{upgrade-readiness-Q46KTG2J.js.map → upgrade-readiness-GUJBCJIS.js.map} +1 -1
- package/dist/{vercel-RHADE5IP.js → vercel-MWW24ABC.js} +2 -2
- package/dist/vite-plugin/index.d.ts +2 -2
- package/dist/vite-plugin/index.js +2 -2
- package/dist/{vite-plugin-3EQP2JYM.js → vite-plugin-FTYXDKKG.js} +5 -5
- package/package.json +4 -4
- package/dist/app-typed-client-4L4L4BWD.js.map +0 -1
- package/dist/app-typed-client-6PAT6VOL.js.map +0 -1
- package/dist/build-EWZDEDT3.js.map +0 -1
- package/dist/chunk-Y5KE6YFP.js.map +0 -1
- package/dist/dist-R2Q7GVDW.js.map +0 -1
- package/dist/lib-NST3PNZX.js.map +0 -1
- package/dist/proper-lockfile-MVKMQGFK.js.map +0 -1
- package/dist/registry-QGSNLJKJ.js +0 -25
- package/dist/sqlite-vec-54KB4RD3.js.map +0 -1
- /package/dist/{aws-lambda-PONVF3UX.js.map → aws-lambda-XYCGZH3I.js.map} +0 -0
- /package/dist/{bun-DITMZMKL.js.map → bun-K73TQEWC.js.map} +0 -0
- /package/dist/{chunk-MG7H3LAW.js.map → chunk-XP7YXRHO.js.map} +0 -0
- /package/dist/{cloudflare-RBANU3SE.js.map → cloudflare-LCAOTRYZ.js.map} +0 -0
- /package/dist/{deno-deploy-J7LI6HNL.js.map → deno-deploy-ZN4RE5HF.js.map} +0 -0
- /package/dist/{info-VM7EK4JC.js.map → info-FJ4NXKTB.js.map} +0 -0
- /package/dist/{netlify-IFY6ZGFV.js.map → netlify-5VQ22Z2P.js.map} +0 -0
- /package/dist/{node-KWZI3CKV.js.map → node-3APTLGWB.js.map} +0 -0
- /package/dist/{openapi-CBASKC7W.js.map → openapi-ILYEJ6OR.js.map} +0 -0
- /package/dist/{registry-QGSNLJKJ.js.map → registry-5QFTLOL2.js.map} +0 -0
- /package/dist/{routes-7O4NUDYS.js.map → routes-IGT42JJO.js.map} +0 -0
- /package/dist/{schema-JAKF23GR.js.map → schema-VR6YNVLQ.js.map} +0 -0
- /package/dist/{static-6PZZBY7G.js.map → static-TZBVBDTB.js.map} +0 -0
- /package/dist/{vercel-RHADE5IP.js.map → vercel-MWW24ABC.js.map} +0 -0
- /package/dist/{vite-plugin-3EQP2JYM.js.map → vite-plugin-FTYXDKKG.js.map} +0 -0
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
logRequest,
|
|
27
27
|
resolveTransformer,
|
|
28
28
|
sendError
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CZM6WWWS.js";
|
|
30
30
|
import {
|
|
31
31
|
matchRoute,
|
|
32
32
|
scanServerRoutes,
|
|
@@ -110,7 +110,7 @@ function hydrationDataExtractSnippet() {
|
|
|
110
110
|
].join("\n");
|
|
111
111
|
}
|
|
112
112
|
function generateSingleShotEntry(options) {
|
|
113
|
-
const theoUiImport = options.theoUi ? `import { TheoUIProvider } from '@
|
|
113
|
+
const theoUiImport = options.theoUi ? `import { TheoUIProvider } from '@theokit/ui'
|
|
114
114
|
` : "";
|
|
115
115
|
const appTree = buildAppTreeJs(options);
|
|
116
116
|
return [
|
|
@@ -273,7 +273,7 @@ function backCompatRenderer(appTree) {
|
|
|
273
273
|
];
|
|
274
274
|
}
|
|
275
275
|
function generateStreamingEntry(options) {
|
|
276
|
-
const theoUiImport = options.theoUi ? `import { TheoUIProvider } from '@
|
|
276
|
+
const theoUiImport = options.theoUi ? `import { TheoUIProvider } from '@theokit/ui'
|
|
277
277
|
` : "";
|
|
278
278
|
const appTree = buildAppTreeJs(options);
|
|
279
279
|
return [
|
|
@@ -298,13 +298,13 @@ function generateEntryClient(ssr, opts = {}) {
|
|
|
298
298
|
if (opts.theoUi) {
|
|
299
299
|
theoUiImports.push(
|
|
300
300
|
`// T2.2 \u2014 TheoUI CSS auto-injected (config.ui)`,
|
|
301
|
-
`import '@
|
|
301
|
+
`import '@theokit/ui/styles.css'`
|
|
302
302
|
);
|
|
303
303
|
const fontsModule = opts.theoUi.fonts === "cdn" ? "fonts-cdn.css" : "fonts.css";
|
|
304
304
|
theoUiImports.push(
|
|
305
|
-
`import '@
|
|
305
|
+
`import '@theokit/ui/${fontsModule}'`,
|
|
306
306
|
`// T2.3 \u2014 TheoUIProvider auto-wraps RouterProvider`,
|
|
307
|
-
`import { TheoUIProvider } from '@
|
|
307
|
+
`import { TheoUIProvider } from '@theokit/ui'`
|
|
308
308
|
);
|
|
309
309
|
}
|
|
310
310
|
const theme = opts.theoUi?.theme ?? "violet-forge";
|
|
@@ -1051,7 +1051,7 @@ var theoConfigSchema = z.object({
|
|
|
1051
1051
|
logger: z.unknown().optional()
|
|
1052
1052
|
}).optional(),
|
|
1053
1053
|
/** TheoUI auto-wire (T2.1). `false` = opt-out; object = explicit theme/fonts;
|
|
1054
|
-
* undefined = enabled when @
|
|
1054
|
+
* undefined = enabled when @theokit/ui is detected in node_modules. */
|
|
1055
1055
|
ui: z.union([
|
|
1056
1056
|
z.literal(false),
|
|
1057
1057
|
z.object({
|
|
@@ -1092,7 +1092,7 @@ var theoConfigSchema = z.object({
|
|
|
1092
1092
|
/**
|
|
1093
1093
|
* Extra package names to pre-bundle via Vite's `optimizeDeps.include`.
|
|
1094
1094
|
*
|
|
1095
|
-
* Framework auto-includes `@
|
|
1095
|
+
* Framework auto-includes `@theokit/ui` and `lucide-react` when present.
|
|
1096
1096
|
* Apps adding plugin peer-deps that rely on a runtime `import('<pkg>')`
|
|
1097
1097
|
* (dynamic specifier) — e.g. `@theokit/plugin-canvas` consumers
|
|
1098
1098
|
* installing `mermaid` for Mermaid SVG rendering — must declare those
|
|
@@ -1291,7 +1291,7 @@ function isDeclaredInPackageJson(projectRoot) {
|
|
|
1291
1291
|
const raw = readFileSync(join2(projectRoot, "package.json"), "utf-8");
|
|
1292
1292
|
const pkg = JSON.parse(raw);
|
|
1293
1293
|
return Boolean(
|
|
1294
|
-
pkg.dependencies?.["@
|
|
1294
|
+
pkg.dependencies?.["@theokit/ui"] ?? pkg.devDependencies?.["@theokit/ui"] ?? pkg.peerDependencies?.["@theokit/ui"]
|
|
1295
1295
|
);
|
|
1296
1296
|
} catch {
|
|
1297
1297
|
return false;
|
|
@@ -1305,7 +1305,7 @@ function detectTheoUi(projectRoot, rawConfig, resolver = defaultResolver) {
|
|
|
1305
1305
|
if (!isDeclaredInPackageJson(projectRoot)) {
|
|
1306
1306
|
return { enabled: false, config };
|
|
1307
1307
|
}
|
|
1308
|
-
const probes = ["@
|
|
1308
|
+
const probes = ["@theokit/ui/styles.css", "@theokit/ui/fonts.css"];
|
|
1309
1309
|
for (const probe of probes) {
|
|
1310
1310
|
if (resolver(probe, projectRoot)) {
|
|
1311
1311
|
return { enabled: true, config };
|
|
@@ -1416,8 +1416,8 @@ ${SCRIPT_TAG2}`,
|
|
|
1416
1416
|
// src/vite-plugin/inject-stylesheets.ts
|
|
1417
1417
|
var TARGETS = [
|
|
1418
1418
|
{
|
|
1419
|
-
href: "/@id/@
|
|
1420
|
-
packageRoot: "@
|
|
1419
|
+
href: "/@id/@theokit/ui/styles.css",
|
|
1420
|
+
packageRoot: "@theokit/ui"
|
|
1421
1421
|
}
|
|
1422
1422
|
];
|
|
1423
1423
|
function injectStylesheets(html, opts) {
|
|
@@ -1616,18 +1616,18 @@ function normalizePluginReturn(value) {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
async function integrateUseTheoUI(cwd, opts) {
|
|
1618
1618
|
if (opts?.enabled === false) return [];
|
|
1619
|
-
const uiDetect = detectPackage("@
|
|
1619
|
+
const uiDetect = detectPackage("@theokit/ui", cwd);
|
|
1620
1620
|
if (!uiDetect.installed) return [];
|
|
1621
1621
|
if (opts?.consumerTailwindConfig || opts?.consumerPostcssConfig) {
|
|
1622
1622
|
console.info(
|
|
1623
|
-
`[theokit] Detected your tailwind.config / postcss.config \u2014 skipping auto-config. Extend with \`import preset from '@
|
|
1623
|
+
`[theokit] Detected your tailwind.config / postcss.config \u2014 skipping auto-config. Extend with \`import preset from '@theokit/ui/preset'\` to apply UI theme.`
|
|
1624
1624
|
);
|
|
1625
1625
|
return [];
|
|
1626
1626
|
}
|
|
1627
1627
|
const tailwindDetect = detectPackage("@tailwindcss/vite", cwd);
|
|
1628
1628
|
if (!tailwindDetect.installed) {
|
|
1629
1629
|
console.warn(
|
|
1630
|
-
`[theokit] @
|
|
1630
|
+
`[theokit] @theokit/ui detected but @tailwindcss/vite is not installed. Run \`pnpm add -D @tailwindcss/vite\` to enable styling.`
|
|
1631
1631
|
);
|
|
1632
1632
|
return [];
|
|
1633
1633
|
}
|
|
@@ -1648,12 +1648,12 @@ async function integrateUseTheoUI(cwd, opts) {
|
|
|
1648
1648
|
);
|
|
1649
1649
|
return [];
|
|
1650
1650
|
}
|
|
1651
|
-
const uiPkgInstalled = detectPackage("@
|
|
1651
|
+
const uiPkgInstalled = detectPackage("@theokit/ui", cwd);
|
|
1652
1652
|
const uiPkgDir = uiPkgInstalled.resolvedPath ? uiPkgInstalled.resolvedPath.replace(/[\\/]package\.json$/, "") : null;
|
|
1653
1653
|
const uiPluginPath = uiPkgDir ? join4(uiPkgDir, "dist", "vite-plugin.js") : null;
|
|
1654
1654
|
if (!uiPluginPath || !existsSync5(uiPluginPath)) {
|
|
1655
1655
|
console.warn(
|
|
1656
|
-
`[theokit] @
|
|
1656
|
+
`[theokit] @theokit/ui/vite-plugin entry not found at ${String(uiPluginPath)}. Skipping auto-config.`
|
|
1657
1657
|
);
|
|
1658
1658
|
return [];
|
|
1659
1659
|
}
|
|
@@ -1661,7 +1661,7 @@ async function integrateUseTheoUI(cwd, opts) {
|
|
|
1661
1661
|
uiMod = await import(pathToFileURL2(uiPluginPath).href);
|
|
1662
1662
|
} catch (err) {
|
|
1663
1663
|
console.warn(
|
|
1664
|
-
`[theokit] @
|
|
1664
|
+
`[theokit] @theokit/ui/vite-plugin dynamic import failed (${err.message}). Skipping auto-config.`
|
|
1665
1665
|
);
|
|
1666
1666
|
return [];
|
|
1667
1667
|
}
|
|
@@ -1673,7 +1673,7 @@ async function integrateUseTheoUI(cwd, opts) {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
if (typeof uiMod.default !== "function") {
|
|
1675
1675
|
console.warn(
|
|
1676
|
-
`[theokit] @
|
|
1676
|
+
`[theokit] @theokit/ui/vite-plugin does not expose a default-export function. Skipping auto-config.`
|
|
1677
1677
|
);
|
|
1678
1678
|
return [];
|
|
1679
1679
|
}
|
|
@@ -1690,7 +1690,7 @@ async function integrateUseTheoUI(cwd, opts) {
|
|
|
1690
1690
|
tailwind: false
|
|
1691
1691
|
});
|
|
1692
1692
|
} catch (err) {
|
|
1693
|
-
console.warn(`[theokit] @
|
|
1693
|
+
console.warn(`[theokit] @theokit/ui/vite-plugin() threw: ${err.message}`);
|
|
1694
1694
|
return [];
|
|
1695
1695
|
}
|
|
1696
1696
|
const tailwindPlugins = normalizePluginReturn(tailwindPlugin);
|
|
@@ -1701,7 +1701,7 @@ async function integrateUseTheoUI(cwd, opts) {
|
|
|
1701
1701
|
const uiPlugins = normalizePluginReturn(uiPlugin);
|
|
1702
1702
|
if (uiPlugins === null) {
|
|
1703
1703
|
console.warn(
|
|
1704
|
-
`[theokit] @
|
|
1704
|
+
`[theokit] @theokit/ui/vite-plugin returned unexpected shape. Skipping auto-config.`
|
|
1705
1705
|
);
|
|
1706
1706
|
return [];
|
|
1707
1707
|
}
|
|
@@ -1969,7 +1969,7 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
1969
1969
|
})
|
|
1970
1970
|
);
|
|
1971
1971
|
}
|
|
1972
|
-
const { appTypedClientPlugin } = await import("./app-typed-client-
|
|
1972
|
+
const { appTypedClientPlugin } = await import("./app-typed-client-IMILAGER.js");
|
|
1973
1973
|
const appClientPlugin = appTypedClientPlugin({
|
|
1974
1974
|
cwd: projectRoot,
|
|
1975
1975
|
serverDir: resolve6(projectRoot, "server"),
|
|
@@ -1990,8 +1990,8 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
function buildOptimizeDepsInclude(projectRoot, viteOptimizeDeps) {
|
|
1992
1992
|
const include = [];
|
|
1993
|
-
if (existsSync7(resolve6(projectRoot, "node_modules", "@
|
|
1994
|
-
include.push("@
|
|
1993
|
+
if (existsSync7(resolve6(projectRoot, "node_modules", "@theokit", "ui"))) {
|
|
1994
|
+
include.push("@theokit/ui");
|
|
1995
1995
|
}
|
|
1996
1996
|
if (existsSync7(resolve6(projectRoot, "node_modules", "lucide-react"))) {
|
|
1997
1997
|
include.push("lucide-react");
|
|
@@ -2047,7 +2047,7 @@ function theoPlugin(rootOrOptions) {
|
|
|
2047
2047
|
resolvedDistDir = resolved.distDir;
|
|
2048
2048
|
},
|
|
2049
2049
|
// Vite calls this hook (sync return is fine — no awaits left after
|
|
2050
|
-
// the auto-chain moved to theoPluginAsync). The @
|
|
2050
|
+
// the auto-chain moved to theoPluginAsync). The @theokit/ui +
|
|
2051
2051
|
// @tailwindcss/vite auto-chain lives in `theoPluginAsync` because
|
|
2052
2052
|
// Vite drops plugins returned from a child plugin's config() hook.
|
|
2053
2053
|
config() {
|
|
@@ -2284,4 +2284,4 @@ export {
|
|
|
2284
2284
|
theoPluginAsync,
|
|
2285
2285
|
theoPlugin
|
|
2286
2286
|
};
|
|
2287
|
-
//# sourceMappingURL=chunk-
|
|
2287
|
+
//# sourceMappingURL=chunk-RIBIAL7A.js.map
|