@alecsibilia/ui-kit 0.0.0-stage → 0.1.0-alpha.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 (283) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +201 -0
  3. package/README.md +233 -2
  4. package/bin/ui-kit.js +12 -0
  5. package/dist/alchemy/app.d.ts +34 -0
  6. package/dist/alchemy/app.js +88 -0
  7. package/dist/alchemy/index.d.ts +11 -0
  8. package/dist/alchemy/index.js +11 -0
  9. package/dist/alchemy/live-rooms.d.ts +21 -0
  10. package/dist/alchemy/live-rooms.js +31 -0
  11. package/dist/alchemy/migrations.d.ts +28 -0
  12. package/dist/alchemy/migrations.js +56 -0
  13. package/dist/alchemy/stage.d.ts +20 -0
  14. package/dist/alchemy/stage.js +20 -0
  15. package/dist/alchemy/wrangler-config.d.ts +76 -0
  16. package/dist/alchemy/wrangler-config.js +82 -0
  17. package/dist/build/app-modules.d.ts +11 -0
  18. package/dist/build/app-modules.js +40 -0
  19. package/dist/build/check.d.ts +4 -0
  20. package/dist/build/check.js +170 -0
  21. package/dist/build/cli.d.ts +1 -0
  22. package/dist/build/cli.js +79 -0
  23. package/dist/build/feature.d.ts +8 -0
  24. package/dist/build/feature.js +24 -0
  25. package/dist/build/index.d.ts +13 -0
  26. package/dist/build/index.js +13 -0
  27. package/dist/build/measure-cpu.d.ts +2 -0
  28. package/dist/build/measure-cpu.js +196 -0
  29. package/dist/build/prerender.d.ts +5 -0
  30. package/dist/build/prerender.js +109 -0
  31. package/dist/build/preview.d.ts +7 -0
  32. package/dist/build/preview.js +41 -0
  33. package/dist/build/seo-files.d.ts +27 -0
  34. package/dist/build/seo-files.js +24 -0
  35. package/dist/client/head-swap.d.ts +45 -0
  36. package/dist/client/head-swap.js +183 -0
  37. package/dist/client/hydration-pass.d.ts +56 -0
  38. package/dist/client/hydration-pass.js +186 -0
  39. package/dist/client/hydration-reset.d.ts +82 -0
  40. package/dist/client/hydration-reset.js +154 -0
  41. package/dist/client/index.d.ts +37 -0
  42. package/dist/client/index.js +65 -0
  43. package/dist/client/nav-client.d.ts +35 -0
  44. package/dist/client/nav-client.js +371 -0
  45. package/dist/live/collab/doc-provider.d.ts +74 -0
  46. package/dist/live/collab/doc-provider.js +412 -0
  47. package/dist/live/collab/index.d.ts +51 -0
  48. package/dist/live/collab/index.jsx +142 -0
  49. package/dist/live/collab-status.d.ts +25 -0
  50. package/dist/live/collab-status.js +17 -0
  51. package/dist/live/cursors/cursor-engine.d.ts +57 -0
  52. package/dist/live/cursors/cursor-engine.js +243 -0
  53. package/dist/live/cursors/index.d.ts +46 -0
  54. package/dist/live/cursors/index.jsx +110 -0
  55. package/dist/live/declaration.d.ts +113 -0
  56. package/dist/live/declaration.js +94 -0
  57. package/dist/live/index.d.ts +8 -0
  58. package/dist/live/index.js +8 -0
  59. package/dist/live/protocol.d.ts +224 -0
  60. package/dist/live/protocol.js +272 -0
  61. package/dist/live/server/doc-store.d.ts +68 -0
  62. package/dist/live/server/doc-store.js +187 -0
  63. package/dist/live/server/index.d.ts +60 -0
  64. package/dist/live/server/index.js +77 -0
  65. package/dist/live/server/room-presence.d.ts +24 -0
  66. package/dist/live/server/room-presence.js +123 -0
  67. package/dist/live/server/room-sockets.d.ts +65 -0
  68. package/dist/live/server/room-sockets.js +97 -0
  69. package/dist/live/server/room.d.ts +20 -0
  70. package/dist/live/server/room.js +348 -0
  71. package/dist/live/server/route.d.ts +56 -0
  72. package/dist/live/server/route.js +159 -0
  73. package/dist/live/server/types.d.ts +163 -0
  74. package/dist/live/server/types.js +2 -0
  75. package/dist/logic/agent-actions.d.ts +133 -0
  76. package/dist/logic/agent-actions.js +150 -0
  77. package/dist/logic/command-types.d.ts +53 -0
  78. package/dist/logic/command-types.js +0 -0
  79. package/dist/logic/dev.d.ts +9 -0
  80. package/dist/logic/dev.js +10 -0
  81. package/dist/logic/draft-rebase.d.ts +59 -0
  82. package/dist/logic/draft-rebase.js +71 -0
  83. package/dist/logic/form-state.d.ts +105 -0
  84. package/dist/logic/form-state.js +93 -0
  85. package/dist/logic/head.d.ts +145 -0
  86. package/dist/logic/head.js +140 -0
  87. package/dist/logic/index.d.ts +27 -0
  88. package/dist/logic/index.js +25 -0
  89. package/dist/logic/island-def.d.ts +89 -0
  90. package/dist/logic/island-def.js +59 -0
  91. package/dist/logic/kit-commands.d.ts +104 -0
  92. package/dist/logic/kit-commands.js +72 -0
  93. package/dist/logic/kit-errors.d.ts +25 -0
  94. package/dist/logic/kit-errors.js +6 -0
  95. package/dist/logic/listen.d.ts +99 -0
  96. package/dist/logic/listen.js +92 -0
  97. package/dist/logic/mutation-def.d.ts +65 -0
  98. package/dist/logic/mutation-def.js +43 -0
  99. package/dist/logic/navigation-data.d.ts +50 -0
  100. package/dist/logic/navigation-data.js +55 -0
  101. package/dist/logic/navigation-policy.d.ts +74 -0
  102. package/dist/logic/navigation-policy.js +127 -0
  103. package/dist/logic/page-model-def.d.ts +108 -0
  104. package/dist/logic/page-model-def.js +31 -0
  105. package/dist/logic/path.d.ts +31 -0
  106. package/dist/logic/path.js +48 -0
  107. package/dist/logic/query-def.d.ts +56 -0
  108. package/dist/logic/query-def.js +37 -0
  109. package/dist/logic/query-key.d.ts +24 -0
  110. package/dist/logic/query-key.js +35 -0
  111. package/dist/logic/query-types.d.ts +28 -0
  112. package/dist/logic/query-types.js +2 -0
  113. package/dist/logic/resources.d.ts +163 -0
  114. package/dist/logic/resources.js +62 -0
  115. package/dist/logic/result.d.ts +30 -0
  116. package/dist/logic/result.js +23 -0
  117. package/dist/logic/route-model.d.ts +139 -0
  118. package/dist/logic/route-model.js +207 -0
  119. package/dist/logic/route-params.d.ts +80 -0
  120. package/dist/logic/route-params.js +114 -0
  121. package/dist/logic/route-table.d.ts +308 -0
  122. package/dist/logic/route-table.js +206 -0
  123. package/dist/logic/seo.d.ts +61 -0
  124. package/dist/logic/seo.js +101 -0
  125. package/dist/logic/site.d.ts +12 -0
  126. package/dist/logic/site.js +0 -0
  127. package/dist/logic/subscriptions.d.ts +177 -0
  128. package/dist/logic/subscriptions.js +152 -0
  129. package/dist/render/index.d.ts +32 -0
  130. package/dist/render/index.js +52 -0
  131. package/dist/runtime/island-wake.d.ts +38 -0
  132. package/dist/runtime/island-wake.js +147 -0
  133. package/dist/runtime/query-scope.d.ts +224 -0
  134. package/dist/runtime/query-scope.js +222 -0
  135. package/dist/runtime/room-hub.d.ts +107 -0
  136. package/dist/runtime/room-hub.js +307 -0
  137. package/dist/runtime/subscription-runner.d.ts +71 -0
  138. package/dist/runtime/subscription-runner.js +240 -0
  139. package/dist/server/bindings.d.ts +41 -0
  140. package/dist/server/bindings.js +74 -0
  141. package/dist/server/browser.d.ts +9 -0
  142. package/dist/server/browser.js +9 -0
  143. package/dist/server/edge-cache.d.ts +28 -0
  144. package/dist/server/edge-cache.js +35 -0
  145. package/dist/server/errors.d.ts +45 -0
  146. package/dist/server/errors.js +36 -0
  147. package/dist/server/form-actions-setup.d.ts +1 -0
  148. package/dist/server/form-actions-setup.js +15 -0
  149. package/dist/server/form-actions.d.ts +121 -0
  150. package/dist/server/form-actions.js +211 -0
  151. package/dist/server/index.d.ts +36 -0
  152. package/dist/server/index.js +35 -0
  153. package/dist/server/inputs.d.ts +45 -0
  154. package/dist/server/inputs.js +77 -0
  155. package/dist/server/rate-limit.d.ts +29 -0
  156. package/dist/server/rate-limit.js +32 -0
  157. package/dist/server/read-cache.d.ts +74 -0
  158. package/dist/server/read-cache.js +58 -0
  159. package/dist/server/request-info.d.ts +17 -0
  160. package/dist/server/request-info.js +11 -0
  161. package/dist/server/request.d.ts +52 -0
  162. package/dist/server/request.js +73 -0
  163. package/dist/server/response-cookies.d.ts +23 -0
  164. package/dist/server/response-cookies.js +24 -0
  165. package/dist/server/run-effect.d.ts +42 -0
  166. package/dist/server/run-effect.js +92 -0
  167. package/dist/server/run.d.ts +63 -0
  168. package/dist/server/run.js +66 -0
  169. package/dist/server/session.d.ts +125 -0
  170. package/dist/server/session.js +247 -0
  171. package/dist/test/fake-bindings.d.ts +32 -0
  172. package/dist/test/fake-bindings.js +108 -0
  173. package/dist/test/fake-room.d.ts +66 -0
  174. package/dist/test/fake-room.js +216 -0
  175. package/dist/test/index.d.ts +19 -0
  176. package/dist/test/index.js +44 -0
  177. package/dist/test/probe.d.ts +11 -0
  178. package/dist/test/probe.js +11 -0
  179. package/dist/test/solid-jsx.d.ts +23 -0
  180. package/dist/test/solid-jsx.js +28 -0
  181. package/dist/test/solid-preload.d.ts +1 -0
  182. package/dist/test/solid-preload.js +29 -0
  183. package/dist/ui/code-editor/index.d.ts +21 -0
  184. package/dist/ui/code-editor/index.jsx +286 -0
  185. package/dist/ui/collab-text/index.d.ts +29 -0
  186. package/dist/ui/collab-text/index.jsx +96 -0
  187. package/dist/ui/components/controls.d.ts +69 -0
  188. package/dist/ui/components/controls.jsx +81 -0
  189. package/dist/ui/components/feedback.d.ts +26 -0
  190. package/dist/ui/components/feedback.jsx +80 -0
  191. package/dist/ui/components/layout.d.ts +74 -0
  192. package/dist/ui/components/layout.jsx +146 -0
  193. package/dist/ui/components/lists.d.ts +69 -0
  194. package/dist/ui/components/lists.jsx +133 -0
  195. package/dist/ui/components/navigation.d.ts +73 -0
  196. package/dist/ui/components/navigation.jsx +112 -0
  197. package/dist/ui/components/text.d.ts +34 -0
  198. package/dist/ui/components/text.jsx +163 -0
  199. package/dist/ui/index.d.ts +7 -0
  200. package/dist/ui/index.js +7 -0
  201. package/dist/ui/jsx-runtime.d.ts +19 -0
  202. package/dist/ui/jsx-runtime.js +0 -0
  203. package/dist/ui/list-keys.d.ts +31 -0
  204. package/dist/ui/list-keys.js +45 -0
  205. package/dist/ui/styles/base.css +38 -0
  206. package/dist/ui/styles/components.css +608 -0
  207. package/dist/ui/styles/tokens.css +27 -0
  208. package/dist/ui/styles/transitions.css +23 -0
  209. package/dist/ui/styles/workbench.css +428 -0
  210. package/dist/ui/styles.css +9 -0
  211. package/dist/view/agent-actions-view.d.ts +30 -0
  212. package/dist/view/agent-actions-view.js +27 -0
  213. package/dist/view/agent-surface.d.ts +42 -0
  214. package/dist/view/agent-surface.js +123 -0
  215. package/dist/view/app-scope.d.ts +51 -0
  216. package/dist/view/app-scope.js +75 -0
  217. package/dist/view/boundary.d.ts +18 -0
  218. package/dist/view/boundary.jsx +26 -0
  219. package/dist/view/command-runner.d.ts +16 -0
  220. package/dist/view/command-runner.js +245 -0
  221. package/dist/view/form.d.ts +82 -0
  222. package/dist/view/form.jsx +109 -0
  223. package/dist/view/head-view.d.ts +31 -0
  224. package/dist/view/head-view.js +46 -0
  225. package/dist/view/index.d.ts +41 -0
  226. package/dist/view/index.js +40 -0
  227. package/dist/view/island-root.d.ts +30 -0
  228. package/dist/view/island-root.js +36 -0
  229. package/dist/view/island.d.ts +102 -0
  230. package/dist/view/island.jsx +154 -0
  231. package/dist/view/match.d.ts +41 -0
  232. package/dist/view/match.js +111 -0
  233. package/dist/view/model.d.ts +92 -0
  234. package/dist/view/model.js +162 -0
  235. package/dist/view/navigation-head.d.ts +29 -0
  236. package/dist/view/navigation-head.jsx +38 -0
  237. package/dist/view/page-model.d.ts +46 -0
  238. package/dist/view/page-model.js +146 -0
  239. package/dist/view/query-effects.d.ts +87 -0
  240. package/dist/view/query-effects.js +147 -0
  241. package/dist/view/query-ok.d.ts +45 -0
  242. package/dist/view/query-ok.js +96 -0
  243. package/dist/view/query.d.ts +115 -0
  244. package/dist/view/query.jsx +179 -0
  245. package/dist/view/result-view.d.ts +14 -0
  246. package/dist/view/result-view.jsx +15 -0
  247. package/dist/view/route-pages.d.ts +43 -0
  248. package/dist/view/route-pages.js +59 -0
  249. package/dist/view/router.d.ts +44 -0
  250. package/dist/view/router.js +123 -0
  251. package/dist/vite/dev-middleware.d.ts +12 -0
  252. package/dist/vite/dev-middleware.js +39 -0
  253. package/dist/vite/dev-objects.d.ts +25 -0
  254. package/dist/vite/dev-objects.js +127 -0
  255. package/dist/vite/dev-platform.d.ts +19 -0
  256. package/dist/vite/dev-platform.js +77 -0
  257. package/dist/vite/dev-seo-files.d.ts +11 -0
  258. package/dist/vite/dev-seo-files.js +40 -0
  259. package/dist/vite/index.d.ts +53 -0
  260. package/dist/vite/index.js +148 -0
  261. package/dist/vite/local-config.d.ts +34 -0
  262. package/dist/vite/local-config.js +72 -0
  263. package/dist/vite/worker-build.d.ts +24 -0
  264. package/dist/vite/worker-build.js +84 -0
  265. package/dist/worker/create-worker.d.ts +52 -0
  266. package/dist/worker/create-worker.js +90 -0
  267. package/dist/worker/index.d.ts +12 -0
  268. package/dist/worker/index.js +12 -0
  269. package/dist/worker/page-routes.d.ts +88 -0
  270. package/dist/worker/page-routes.js +100 -0
  271. package/dist/worker/page-status.d.ts +41 -0
  272. package/dist/worker/page-status.js +23 -0
  273. package/dist/worker/request-prelude.d.ts +69 -0
  274. package/dist/worker/request-prelude.js +107 -0
  275. package/dist/worker/security.d.ts +76 -0
  276. package/dist/worker/security.js +137 -0
  277. package/dist/worker/server-app.d.ts +54 -0
  278. package/dist/worker/server-app.js +76 -0
  279. package/guards/browser-only.js +5 -0
  280. package/guards/node-only.js +6 -0
  281. package/guards/server-only.js +5 -0
  282. package/migrations/0001-sessions.sql +22 -0
  283. package/package.json +233 -5
@@ -0,0 +1,76 @@
1
+ import { Effect } from 'effect';
2
+ import { classifyPath, DEFAULT_SIGN_IN, signInLocation, } from './page-routes.js';
3
+ import { pageStatus } from './page-status.js';
4
+ import { prepareRequest } from './request-prelude.js';
5
+ import { DEFAULT_SESSIONS_CRON, } from '../logic/resources.js';
6
+ import { bindingsOf } from '../server/bindings.js';
7
+ /** Declares the app's server side (returns it unchanged, typed). */
8
+ export function defineServerApp(app) {
9
+ return app;
10
+ }
11
+ /** Expired sessions removed per cleanup batch. */
12
+ export const SESSION_CLEANUP_BATCH = 500;
13
+ /** Most cleanup batches per cron run. */
14
+ export const SESSION_CLEANUP_MAX_BATCHES = 20;
15
+ /**
16
+ * Classifies a request, runs the prelude (session, auth redirect, form
17
+ * flash) and the page status probe.
18
+ */
19
+ export async function prepareAppRequest(app, request, env) {
20
+ const url = new URL(request.url);
21
+ const kind = classifyPath(app.routes, url.pathname, request.method);
22
+ const database = app.sessions?.database;
23
+ const bindings = bindingsOf(app.resources);
24
+ const signIn = app.signIn ?? DEFAULT_SIGN_IN;
25
+ const prelude = await prepareRequest({
26
+ request,
27
+ kind,
28
+ nowMs: Date.now(),
29
+ sessions: app.sessions,
30
+ db: () => {
31
+ if (database === undefined)
32
+ throw new Error('no sessions database');
33
+ // The lazy env checks that the binding is a D1 database.
34
+ return Reflect.get(bindings.lazy(env), database);
35
+ },
36
+ signInLocation: (target) => signInLocation(app.routes, signIn, target),
37
+ });
38
+ const status = prelude._tag === 'Respond'
39
+ ? 200
40
+ : await pageStatus({
41
+ kind,
42
+ url: request.url,
43
+ routes: app.routes,
44
+ probes: app.status,
45
+ run: (program) => app.runner.runWithEnv(env, program),
46
+ });
47
+ return { kind, prelude, status };
48
+ }
49
+ /**
50
+ * The Worker's `scheduled`: the sessions cleanup on its cron (expired
51
+ * sessions in bounded batches) and the app's own jobs on theirs.
52
+ */
53
+ export async function runScheduled(app, cron, env) {
54
+ const sessions = app.sessions;
55
+ const sessionsCron = app.resources.sessions
56
+ ? (app.resources.sessions.cron ?? DEFAULT_SESSIONS_CRON)
57
+ : undefined;
58
+ if (sessions && cron === sessionsCron) {
59
+ const result = await app.runner.runWithEnv(env, Effect.gen(function* () {
60
+ let total = 0;
61
+ for (let batch = 0; batch < SESSION_CLEANUP_MAX_BATCHES; batch += 1) {
62
+ const removed = yield* sessions.purgeExpired(SESSION_CLEANUP_BATCH);
63
+ total += removed;
64
+ if (removed < SESSION_CLEANUP_BATCH)
65
+ break;
66
+ }
67
+ return total;
68
+ }));
69
+ if (result._tag === 'Ok')
70
+ console.info(`[cron] removed ${result.value} expired sessions`);
71
+ }
72
+ for (const job of app.jobs ?? []) {
73
+ if (job.cron === cron)
74
+ await job.run(env);
75
+ }
76
+ }
@@ -0,0 +1,5 @@
1
+ // The kit's browser-only subpaths resolve here in a workerd bundle
2
+ // (`exports` condition `workerd`), so a wrong-side import fails the build.
3
+ throw new Error(
4
+ '@alecsibilia/ui-kit: a browser-only subpath was imported into a Worker bundle'
5
+ )
@@ -0,0 +1,6 @@
1
+ // The kit's build-time subpaths (`/vite`, `/build`, `/alchemy`, `/test`)
2
+ // resolve here in a browser or Worker bundle, so a wrong-side import fails
3
+ // the build.
4
+ throw new Error(
5
+ '@alecsibilia/ui-kit: a build-time (Node or Bun) subpath was imported into a browser or Worker bundle'
6
+ )
@@ -0,0 +1,5 @@
1
+ // The kit's server-only subpaths resolve here in a browser bundle
2
+ // (`exports` condition `browser`), so a wrong-side import fails the build.
3
+ throw new Error(
4
+ '@alecsibilia/ui-kit: a server-only subpath was imported into a browser bundle'
5
+ )
@@ -0,0 +1,22 @@
1
+ -- The kit's sessions (`@alecsibilia/ui-kit/server`, `createSessions`): an
2
+ -- opaque session cookie backed by D1. The kit owns only this table; users
3
+ -- are the app's (no foreign key: the app's user lookup decides who a
4
+ -- session belongs to). Applied by `uiKitApp` and the local tooling before
5
+ -- the app's own migrations, as `0000-ui-kit-0001-sessions.sql`.
6
+ --
7
+ -- One row per signed-in browser. `session_id` is the SHA-256 (hex) of the
8
+ -- random token in the cookie, so a leaked table can't be replayed as
9
+ -- cookies. Expiry is server-side (`expires_at`, ISO-8601 UTC); the cookie's
10
+ -- Max-Age only mirrors it. Reads never write: a session is not extended on
11
+ -- use.
12
+ CREATE TABLE sessions (
13
+ session_id TEXT PRIMARY KEY,
14
+ user_id TEXT NOT NULL,
15
+ created_at TEXT NOT NULL,
16
+ expires_at TEXT NOT NULL
17
+ );
18
+
19
+ CREATE INDEX sessions_user_id ON sessions (user_id);
20
+
21
+ -- The expired-session cleanup scans by expiry, oldest first.
22
+ CREATE INDEX sessions_expires_at ON sessions (expires_at);
package/package.json CHANGED
@@ -1,6 +1,234 @@
1
1
  {
2
- "name": "@alecsibilia/ui-kit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@alecsibilia/ui-kit",
3
+ "description": "A UI kit for Cloudflare Workers apps on Solid 2 and Effect 4: Foldkit-style models, islands, live rooms, and the Worker, Vite and Alchemy plumbing",
4
+ "version": "0.1.0-alpha.0",
5
+ "license": "Apache-2.0",
6
+ "author": "Alec Sibilia <sibilia.alec@gmail.com>",
7
+ "homepage": "https://github.com/asibilia/luca-framework/tree/main/packages/ui-kit#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/asibilia/luca-framework/issues"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/asibilia/luca-framework.git",
14
+ "directory": "packages/ui-kit"
15
+ },
16
+ "type": "module",
17
+ "sideEffects": [
18
+ "**/*.css",
19
+ "./src/server/form-actions-setup.ts",
20
+ "./dist/server/form-actions-setup.js"
21
+ ],
22
+ "exports": {
23
+ "./logic": {
24
+ "types": "./dist/logic/index.d.ts",
25
+ "default": "./dist/logic/index.js"
26
+ },
27
+ "./view": {
28
+ "types": "./dist/view/index.d.ts",
29
+ "default": "./dist/view/index.js"
30
+ },
31
+ "./ui": {
32
+ "types": "./dist/ui/index.d.ts",
33
+ "default": "./dist/ui/index.js"
34
+ },
35
+ "./ui/jsx-runtime": {
36
+ "types": "./dist/ui/jsx-runtime.d.ts",
37
+ "default": "./dist/ui/jsx-runtime.js"
38
+ },
39
+ "./ui/jsx-dev-runtime": {
40
+ "types": "./dist/ui/jsx-runtime.d.ts",
41
+ "default": "./dist/ui/jsx-runtime.js"
42
+ },
43
+ "./ui/code-editor": {
44
+ "types": "./dist/ui/code-editor/index.d.ts",
45
+ "workerd": "./guards/browser-only.js",
46
+ "default": "./dist/ui/code-editor/index.jsx"
47
+ },
48
+ "./ui/collab-text": {
49
+ "types": "./dist/ui/collab-text/index.d.ts",
50
+ "workerd": "./guards/browser-only.js",
51
+ "default": "./dist/ui/collab-text/index.jsx"
52
+ },
53
+ "./client": {
54
+ "types": "./dist/client/index.d.ts",
55
+ "workerd": "./guards/browser-only.js",
56
+ "default": "./dist/client/index.js"
57
+ },
58
+ "./render": {
59
+ "types": "./dist/render/index.d.ts",
60
+ "workerd": "./dist/render/index.js",
61
+ "browser": "./guards/server-only.js",
62
+ "default": "./dist/render/index.js"
63
+ },
64
+ "./server": {
65
+ "types": "./dist/server/index.d.ts",
66
+ "workerd": "./dist/server/index.js",
67
+ "browser": "./dist/server/browser.js",
68
+ "default": "./dist/server/index.js"
69
+ },
70
+ "./server/form-actions-setup": {
71
+ "types": "./dist/server/form-actions-setup.d.ts",
72
+ "workerd": "./dist/server/form-actions-setup.js",
73
+ "browser": "./guards/server-only.js",
74
+ "default": "./dist/server/form-actions-setup.js"
75
+ },
76
+ "./live": {
77
+ "types": "./dist/live/index.d.ts",
78
+ "default": "./dist/live/index.js"
79
+ },
80
+ "./live/server": {
81
+ "types": "./dist/live/server/index.d.ts",
82
+ "workerd": "./dist/live/server/index.js",
83
+ "browser": "./guards/server-only.js",
84
+ "default": "./dist/live/server/index.js"
85
+ },
86
+ "./live/cursors": {
87
+ "types": "./dist/live/cursors/index.d.ts",
88
+ "workerd": "./guards/browser-only.js",
89
+ "default": "./dist/live/cursors/index.jsx"
90
+ },
91
+ "./live/collab": {
92
+ "types": "./dist/live/collab/index.d.ts",
93
+ "workerd": "./guards/browser-only.js",
94
+ "default": "./dist/live/collab/index.jsx"
95
+ },
96
+ "./worker": {
97
+ "types": "./dist/worker/index.d.ts",
98
+ "workerd": "./dist/worker/index.js",
99
+ "browser": "./guards/server-only.js",
100
+ "default": "./dist/worker/index.js"
101
+ },
102
+ "./vite": {
103
+ "types": "./dist/vite/index.d.ts",
104
+ "workerd": "./guards/node-only.js",
105
+ "browser": "./guards/node-only.js",
106
+ "default": "./dist/vite/index.js"
107
+ },
108
+ "./build": {
109
+ "types": "./dist/build/index.d.ts",
110
+ "workerd": "./guards/node-only.js",
111
+ "browser": "./guards/node-only.js",
112
+ "default": "./dist/build/index.js"
113
+ },
114
+ "./alchemy": {
115
+ "types": "./dist/alchemy/index.d.ts",
116
+ "workerd": "./guards/node-only.js",
117
+ "browser": "./guards/node-only.js",
118
+ "default": "./dist/alchemy/index.js"
119
+ },
120
+ "./test": {
121
+ "types": "./dist/test/index.d.ts",
122
+ "workerd": "./guards/node-only.js",
123
+ "browser": "./guards/node-only.js",
124
+ "default": "./dist/test/index.js"
125
+ },
126
+ "./test/probe": {
127
+ "types": "./dist/test/probe.d.ts",
128
+ "workerd": "./guards/browser-only.js",
129
+ "default": "./dist/test/probe.js"
130
+ },
131
+ "./test/solid-preload": {
132
+ "types": "./dist/test/solid-preload.d.ts",
133
+ "workerd": "./guards/node-only.js",
134
+ "browser": "./guards/node-only.js",
135
+ "default": "./dist/test/solid-preload.js"
136
+ },
137
+ "./ui/styles.css": "./dist/ui/styles.css",
138
+ "./migrations/*": "./migrations/*",
139
+ "./package.json": "./package.json"
140
+ },
141
+ "bin": {
142
+ "ui-kit": "./bin/ui-kit.js"
143
+ },
144
+ "files": [
145
+ "dist/",
146
+ "guards/",
147
+ "bin/",
148
+ "migrations/",
149
+ "README.md",
150
+ "LICENSE",
151
+ "CHANGELOG.md"
152
+ ],
153
+ "scripts": {
154
+ "build": "bun scripts/build.ts",
155
+ "check:pack": "bun scripts/check-pack.ts",
156
+ "check:structure": "bun scripts/check-structure.ts",
157
+ "prepack": "bun scripts/build.ts --pack",
158
+ "postpack": "bun scripts/build.ts --unpack",
159
+ "test": "bun test",
160
+ "typecheck": "bunx --bun tsc --noEmit -p ."
161
+ },
162
+ "dependencies": {
163
+ "@codemirror/commands": "6.11.2",
164
+ "@codemirror/lang-javascript": "6.2.5",
165
+ "@codemirror/language": "6.13.1",
166
+ "@codemirror/state": "6.7.6",
167
+ "@codemirror/view": "6.44.2",
168
+ "@lezer/highlight": "1.2.5",
169
+ "lib0": "0.2.120",
170
+ "y-codemirror.next": "0.3.6",
171
+ "y-protocols": "1.0.7",
172
+ "yjs": "13.6.33"
173
+ },
174
+ "peerDependencies": {
175
+ "@alchemy.run/cloudflare": "2.0.0-beta.87",
176
+ "@effect/platform-node": "4.1.7",
177
+ "@solidjs/compiler": "2.0.3",
178
+ "@solidjs/vite-plugin": "3.0.1",
179
+ "@solidjs/web": "2.0.4",
180
+ "alchemy": "2.0.0-beta.87",
181
+ "effect": "4.2.0",
182
+ "solid-js": "2.0.4",
183
+ "vite": "^8.4.1",
184
+ "wrangler": "4.158.0"
185
+ },
186
+ "peerDependenciesMeta": {
187
+ "@alchemy.run/cloudflare": {
188
+ "optional": true
189
+ },
190
+ "@effect/platform-node": {
191
+ "optional": true
192
+ },
193
+ "@solidjs/compiler": {
194
+ "optional": true
195
+ },
196
+ "@solidjs/vite-plugin": {
197
+ "optional": true
198
+ },
199
+ "alchemy": {
200
+ "optional": true
201
+ },
202
+ "vite": {
203
+ "optional": true
204
+ },
205
+ "wrangler": {
206
+ "optional": true
207
+ }
208
+ },
209
+ "devDependencies": {
210
+ "@alchemy.run/cloudflare": "2.0.0-beta.87",
211
+ "@effect/platform-node": "4.1.7",
212
+ "@solidjs/compiler": "2.0.3",
213
+ "@solidjs/vite-plugin": "3.0.1",
214
+ "@solidjs/web": "2.0.4",
215
+ "@types/bun": "latest",
216
+ "alchemy": "2.0.0-beta.87",
217
+ "effect": "4.2.0",
218
+ "solid-js": "2.0.4",
219
+ "typescript": "7.0.2",
220
+ "vite": "8.4.1",
221
+ "wrangler": "4.158.0"
222
+ },
223
+ "publishConfig": {
224
+ "access": "public"
225
+ },
226
+ "keywords": [
227
+ "cloudflare-workers",
228
+ "effect",
229
+ "foldkit",
230
+ "islands",
231
+ "solid",
232
+ "ui-kit"
233
+ ]
234
+ }