theokit 0.72.1 → 0.73.0

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.
Files changed (73) hide show
  1. package/dist/{actions-virtual-module-EAKYEMGF.js → actions-virtual-module-QCDKQ6QD.js} +4 -4
  2. package/dist/adapters/security-headers.d.ts +27 -11
  3. package/dist/adapters/security-headers.js.map +1 -1
  4. package/dist/{agent-VJTZ4DQ7.js → agent-OWJ5A7W5.js} +2 -2
  5. package/dist/{app-typed-client-LHH77QDB.js → app-typed-client-2PTK2SJH.js} +4 -4
  6. package/dist/{aws-lambda-7AZNJGWU.js → aws-lambda-OP2L5RKZ.js} +3 -3
  7. package/dist/{build-23QF5FNQ.js → build-CVP2XU5M.js} +5 -5
  8. package/dist/{bun-NKVHOFSJ.js → bun-CZXHPK2W.js} +4 -4
  9. package/dist/{chunk-V5SSTT3C.js → chunk-C43AHOHI.js} +1 -1
  10. package/dist/chunk-C43AHOHI.js.map +1 -0
  11. package/dist/{chunk-XLSJWKSP.js → chunk-D3M7LPHY.js} +12 -6
  12. package/dist/{chunk-XLSJWKSP.js.map → chunk-D3M7LPHY.js.map} +1 -1
  13. package/dist/{chunk-E2RC367T.js → chunk-EDBQM6RB.js} +3 -3
  14. package/dist/{chunk-QD5X56I3.js → chunk-FNJVSFEC.js} +1 -1
  15. package/dist/chunk-FNJVSFEC.js.map +1 -0
  16. package/dist/{chunk-DKX7LF5Q.js → chunk-HDAILYVM.js} +2 -2
  17. package/dist/{chunk-RE2WE7CD.js → chunk-LOOOB46A.js} +2 -2
  18. package/dist/{chunk-L6UHMWXU.js → chunk-M3DT6EMK.js} +3 -3
  19. package/dist/chunk-M3DT6EMK.js.map +1 -0
  20. package/dist/{chunk-PEL3MJLM.js → chunk-MX63AWEK.js} +1 -1
  21. package/dist/{chunk-PEL3MJLM.js.map → chunk-MX63AWEK.js.map} +1 -1
  22. package/dist/{chunk-IB5VIXLR.js → chunk-R36YNWBU.js} +2 -2
  23. package/dist/{chunk-C5CAL3DX.js → chunk-SEGD3JUC.js} +1 -1
  24. package/dist/chunk-SEGD3JUC.js.map +1 -0
  25. package/dist/{chunk-4EQEJ4PH.js → chunk-WRHT5NAJ.js} +20 -14
  26. package/dist/{chunk-4EQEJ4PH.js.map → chunk-WRHT5NAJ.js.map} +1 -1
  27. package/dist/cli/index.js +6 -6
  28. package/dist/client/index.d.ts +18 -1
  29. package/dist/client/index.js +15 -1
  30. package/dist/client/index.js.map +1 -1
  31. package/dist/{cloudflare-4M4XVNUH.js → cloudflare-2SVRRVV5.js} +3 -3
  32. package/dist/{deno-deploy-IVACZ62D.js → deno-deploy-OK4QFJIZ.js} +4 -4
  33. package/dist/{dev-JDJWMRLH.js → dev-B2IZEVAD.js} +6 -6
  34. package/dist/index.js +1 -1
  35. package/dist/{internal-api-VDYOXOT7.js → internal-api-5Y3MLZH4.js} +4 -4
  36. package/dist/{mcp-WJNCTM7M.js → mcp-GJQIREYC.js} +2 -2
  37. package/dist/{netlify-3HEWV375.js → netlify-IAC53FVZ.js} +3 -3
  38. package/dist/{observability-bootstrap-FP6LMMJE.js → observability-bootstrap-DOWRMADT.js} +2 -2
  39. package/dist/{preview-BARW75PN.js → preview-XBP622HM.js} +3 -3
  40. package/dist/{registry-SDBODRU6.js → registry-L6JG75LY.js} +7 -7
  41. package/dist/{server-boundary-AO6EELRF.js → server-boundary-IFIYNGTA.js} +4 -4
  42. package/dist/{start-4JTYXQQJ.js → start-JGNBTTG2.js} +7 -7
  43. package/dist/{vercel-5PMYEEKF.js → vercel-EHAOKPF7.js} +3 -3
  44. package/dist/vite-plugin/index.js +1 -1
  45. package/dist/{vite-plugin-3ON45MQE.js → vite-plugin-54XIRMKT.js} +6 -6
  46. package/package.json +2 -2
  47. package/dist/chunk-C5CAL3DX.js.map +0 -1
  48. package/dist/chunk-L6UHMWXU.js.map +0 -1
  49. package/dist/chunk-QD5X56I3.js.map +0 -1
  50. package/dist/chunk-V5SSTT3C.js.map +0 -1
  51. /package/dist/{actions-virtual-module-EAKYEMGF.js.map → actions-virtual-module-QCDKQ6QD.js.map} +0 -0
  52. /package/dist/{agent-VJTZ4DQ7.js.map → agent-OWJ5A7W5.js.map} +0 -0
  53. /package/dist/{app-typed-client-LHH77QDB.js.map → app-typed-client-2PTK2SJH.js.map} +0 -0
  54. /package/dist/{aws-lambda-7AZNJGWU.js.map → aws-lambda-OP2L5RKZ.js.map} +0 -0
  55. /package/dist/{build-23QF5FNQ.js.map → build-CVP2XU5M.js.map} +0 -0
  56. /package/dist/{bun-NKVHOFSJ.js.map → bun-CZXHPK2W.js.map} +0 -0
  57. /package/dist/{chunk-E2RC367T.js.map → chunk-EDBQM6RB.js.map} +0 -0
  58. /package/dist/{chunk-DKX7LF5Q.js.map → chunk-HDAILYVM.js.map} +0 -0
  59. /package/dist/{chunk-RE2WE7CD.js.map → chunk-LOOOB46A.js.map} +0 -0
  60. /package/dist/{chunk-IB5VIXLR.js.map → chunk-R36YNWBU.js.map} +0 -0
  61. /package/dist/{cloudflare-4M4XVNUH.js.map → cloudflare-2SVRRVV5.js.map} +0 -0
  62. /package/dist/{deno-deploy-IVACZ62D.js.map → deno-deploy-OK4QFJIZ.js.map} +0 -0
  63. /package/dist/{dev-JDJWMRLH.js.map → dev-B2IZEVAD.js.map} +0 -0
  64. /package/dist/{internal-api-VDYOXOT7.js.map → internal-api-5Y3MLZH4.js.map} +0 -0
  65. /package/dist/{mcp-WJNCTM7M.js.map → mcp-GJQIREYC.js.map} +0 -0
  66. /package/dist/{netlify-3HEWV375.js.map → netlify-IAC53FVZ.js.map} +0 -0
  67. /package/dist/{observability-bootstrap-FP6LMMJE.js.map → observability-bootstrap-DOWRMADT.js.map} +0 -0
  68. /package/dist/{preview-BARW75PN.js.map → preview-XBP622HM.js.map} +0 -0
  69. /package/dist/{registry-SDBODRU6.js.map → registry-L6JG75LY.js.map} +0 -0
  70. /package/dist/{server-boundary-AO6EELRF.js.map → server-boundary-IFIYNGTA.js.map} +0 -0
  71. /package/dist/{start-4JTYXQQJ.js.map → start-JGNBTTG2.js.map} +0 -0
  72. /package/dist/{vercel-5PMYEEKF.js.map → vercel-EHAOKPF7.js.map} +0 -0
  73. /package/dist/{vite-plugin-3ON45MQE.js.map → vite-plugin-54XIRMKT.js.map} +0 -0
@@ -12,7 +12,7 @@ import {
12
12
  serveMatchedAuxRoute,
13
13
  serveThroughPluginLifecycle,
14
14
  setupSsrDevMiddleware
15
- } from "./chunk-L6UHMWXU.js";
15
+ } from "./chunk-M3DT6EMK.js";
16
16
  import {
17
17
  resolveTheoRootDir
18
18
  } from "./chunk-FDOOBTXJ.js";
@@ -34,7 +34,7 @@ import {
34
34
  mountAgent,
35
35
  readAgentPolicy,
36
36
  writeWebResponseToServerResponse
37
- } from "./chunk-E2RC367T.js";
37
+ } from "./chunk-EDBQM6RB.js";
38
38
  import {
39
39
  getApprovalRegistry,
40
40
  resolveProvider
@@ -44,12 +44,12 @@ import {
44
44
  dispatchControllerRequest,
45
45
  incomingMessageToHandlerRequest,
46
46
  sendError
47
- } from "./chunk-QD5X56I3.js";
47
+ } from "./chunk-FNJVSFEC.js";
48
48
  import {
49
49
  TRACE_HEADER,
50
50
  createObservabilityPluginFromConfig,
51
51
  extractTraceId
52
- } from "./chunk-PEL3MJLM.js";
52
+ } from "./chunk-MX63AWEK.js";
53
53
  import {
54
54
  logRequest
55
55
  } from "./chunk-C27VRUVN.js";
@@ -1468,15 +1468,19 @@ function buildAppTreeJs(options) {
1468
1468
  const theme = options.theoUi?.theme ?? "violet-forge";
1469
1469
  if (options.theoUi) {
1470
1470
  return [
1471
- `React.createElement(TheoUIProvider, { theme: { defaultTheme: '${theme}' } },`,
1472
- ` React.createElement(Suspense, { fallback: null },`,
1473
- ` React.createElement(StaticRouterProvider, { router, context, hydrate: false })`,
1471
+ `React.createElement(NonceProvider, { nonce: options.nonce },`,
1472
+ ` React.createElement(TheoUIProvider, { theme: { defaultTheme: '${theme}' } },`,
1473
+ ` React.createElement(Suspense, { fallback: null },`,
1474
+ ` React.createElement(StaticRouterProvider, { router, context, hydrate: false })`,
1475
+ ` )`,
1474
1476
  ` )`,
1475
1477
  ` )`
1476
1478
  ].join("\n");
1477
1479
  }
1478
- return `React.createElement(Suspense, { fallback: null },
1479
- React.createElement(StaticRouterProvider, { router, context, hydrate: false })
1480
+ return `React.createElement(NonceProvider, { nonce: options.nonce },
1481
+ React.createElement(Suspense, { fallback: null },
1482
+ React.createElement(StaticRouterProvider, { router, context, hydrate: false })
1483
+ )
1480
1484
  )`;
1481
1485
  }
1482
1486
  function hydrationDataExtractSnippet() {
@@ -1498,6 +1502,7 @@ function generateSingleShotEntry(options) {
1498
1502
  `import { createStaticHandler, createStaticRouter, StaticRouterProvider, matchRoutes } from 'react-router'`,
1499
1503
  `import { PassThrough } from 'node:stream'`,
1500
1504
  `import { routes, __theoPreloadMap, __theoPreloadPathsFor } from '/@theo/route-manifest'`,
1505
+ `import { NonceProvider } from 'theokit/client'`,
1501
1506
  theoUiImport,
1502
1507
  `export async function render(url, options = {}) {`,
1503
1508
  // Resolve the matched pages BEFORE rendering.
@@ -1787,6 +1792,7 @@ function generateStreamingEntry(options) {
1787
1792
  `import { renderToPipeableStream, renderToReadableStream } from 'react-dom/server'`,
1788
1793
  `import { createStaticHandler, createStaticRouter, StaticRouterProvider, matchRoutes } from 'react-router'`,
1789
1794
  `import { routes, __theoPreloadMap, __theoPreloadPathsFor } from '/@theo/route-manifest'`,
1795
+ `import { NonceProvider } from 'theokit/client'`,
1790
1796
  theoUiImport,
1791
1797
  ``,
1792
1798
  ...streamingDocumentHelpers(),
@@ -2195,19 +2201,19 @@ async function theoPluginAsync(rootOrOptions) {
2195
2201
  }
2196
2202
  const { assetsMapPlugin } = await import("./assets-map-BMQASQHW.js");
2197
2203
  const assetsMap = assetsMapPlugin({ appDir: resolve5(projectRoot, options.appDir ?? "app") });
2198
- const { appTypedClientPlugin } = await import("./app-typed-client-LHH77QDB.js");
2204
+ const { appTypedClientPlugin } = await import("./app-typed-client-2PTK2SJH.js");
2199
2205
  const appClientPlugin = appTypedClientPlugin({
2200
2206
  cwd: projectRoot,
2201
2207
  serverDir: serverDirAbs,
2202
2208
  distDir: resolve5(projectRoot, ".theokit")
2203
2209
  });
2204
- const { actionsVirtualModule } = await import("./actions-virtual-module-EAKYEMGF.js");
2210
+ const { actionsVirtualModule } = await import("./actions-virtual-module-QCDKQ6QD.js");
2205
2211
  const actionsPlugin = actionsVirtualModule({
2206
2212
  serverDir: serverDirAbs,
2207
2213
  distDir: resolve5(projectRoot, ".theokit")
2208
2214
  });
2209
2215
  const { agentsTypedClientPlugin } = await import("./agents-typed-client-D4OA2TXB.js");
2210
- const { generateManifest } = await import("./internal-api-VDYOXOT7.js");
2216
+ const { generateManifest } = await import("./internal-api-5Y3MLZH4.js");
2211
2217
  const agentsClientPlugin = agentsTypedClientPlugin({
2212
2218
  projectRoot,
2213
2219
  agentsDir: agentsDirName,
@@ -2224,7 +2230,7 @@ async function theoPluginAsync(rootOrOptions) {
2224
2230
  const controllerTransformPlugin = controllerSwcTransformPlugin({
2225
2231
  serverDir: serverDirAbs
2226
2232
  });
2227
- const { serverOnlyImportBoundary } = await import("./server-boundary-AO6EELRF.js");
2233
+ const { serverOnlyImportBoundary } = await import("./server-boundary-IFIYNGTA.js");
2228
2234
  const serverBoundaryPlugin = serverOnlyImportBoundary({
2229
2235
  projectRoot,
2230
2236
  serverDir: serverDirAbs
@@ -2400,4 +2406,4 @@ export {
2400
2406
  theoPluginAsync,
2401
2407
  theoPlugin
2402
2408
  };
2403
- //# sourceMappingURL=chunk-4EQEJ4PH.js.map
2409
+ //# sourceMappingURL=chunk-WRHT5NAJ.js.map