alinea 1.7.0 → 2.0.0-preview.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 (1383) hide show
  1. package/dist/.init/content/pages/welcome.json +1 -1
  2. package/dist/.init/src/app/(alinea)/api/cms/route.ts +8 -8
  3. package/dist/.init/src/cms.ts +45 -47
  4. package/dist/LICENSES.md +208 -560
  5. package/dist/adapter/core/cms.js +1 -1
  6. package/dist/adapter/core/handler.js +1 -1
  7. package/dist/adapter/core/preview.js +2 -2
  8. package/dist/adapter/core/previewContext.d.ts +1 -1
  9. package/dist/adapter/core/previewContext.js +1 -1
  10. package/dist/adapter/next/cms.d.ts +1 -1
  11. package/dist/adapter/next/cms.js +7 -7
  12. package/dist/adapter/next/context.js +1 -1
  13. package/dist/adapter/next/handler.d.ts +2 -4
  14. package/dist/adapter/next/handler.js +11 -5
  15. package/dist/adapter/next/previews.d.ts +2 -2
  16. package/dist/adapter/next/previews.js +13 -17
  17. package/dist/adapter/next/with-alinea.js +20 -10
  18. package/dist/adapter/vite/plugin.d.ts +2 -0
  19. package/dist/adapter/vite/plugin.js +66 -0
  20. package/dist/backend/Auth.js +1 -1
  21. package/dist/backend/HandleAction.d.ts +1 -0
  22. package/dist/backend/HandleAction.js +2 -1
  23. package/dist/backend/Handler.js +125 -17
  24. package/dist/backend/Previews.d.ts +2 -5
  25. package/dist/backend/api/BasicAuth.d.ts +2 -2
  26. package/dist/backend/api/BasicAuth.js +5 -3
  27. package/dist/backend/api/CreateBackend.d.ts +11 -2
  28. package/dist/backend/api/CreateBackend.js +45 -2502
  29. package/dist/backend/api/DatabaseApi.d.ts +8 -2
  30. package/dist/backend/api/DatabaseApi.js +252 -123
  31. package/dist/backend/api/GithubApi.d.ts +0 -4
  32. package/dist/backend/api/GithubApi.js +11 -7
  33. package/dist/backend/api/OAuth2.d.ts +3 -3
  34. package/dist/backend/api/OAuth2.js +36 -25
  35. package/dist/backend/api/S3Uploads.d.ts +32 -0
  36. package/dist/backend/api/S3Uploads.js +178 -0
  37. package/dist/backend/api/SupabaseUploads.d.ts +28 -0
  38. package/dist/backend/api/SupabaseUploads.js +41 -0
  39. package/dist/backend/api/UploadPaths.d.ts +7 -0
  40. package/dist/backend/api/UploadPaths.js +53 -0
  41. package/dist/backend/api/auth.d.ts +5 -0
  42. package/dist/backend/api/auth.js +15 -0
  43. package/dist/backend/api/database.d.ts +2 -0
  44. package/dist/backend/api/database.js +16 -0
  45. package/dist/backend/api/github.d.ts +3 -0
  46. package/dist/backend/api/github.js +10 -0
  47. package/dist/backend/api/uploads.d.ts +9 -0
  48. package/dist/backend/api/uploads.js +23 -0
  49. package/dist/backend/loader/JsonLoader.js +1 -1
  50. package/dist/backend/resolver/ParsePreview.js +2 -2
  51. package/dist/backend/router/NodeHandler.js +1 -1
  52. package/dist/backend/router/Router.js +32 -6
  53. package/dist/backend/store/GeneratedRelease.js +1 -1
  54. package/dist/backend/store/GeneratedSource.js +1 -1
  55. package/dist/backend/util/ExecGit.js +4 -4
  56. package/dist/backend/util/JWTPreviews.d.ts +3 -3
  57. package/dist/backend/util/JWTPreviews.js +19 -5
  58. package/dist/backend/util/JsonPatch.js +1 -1
  59. package/dist/backend/util/ORM.js +2 -2
  60. package/dist/backend/util/Syncable.js +2 -2
  61. package/dist/backend.d.ts +5 -0
  62. package/dist/backend.js +17 -0
  63. package/dist/bundled.d.ts +8233 -8178
  64. package/dist/chunks/chunk-53DZYORR.js +3705 -0
  65. package/dist/chunks/chunk-7ORQ7BYK.js +1187 -0
  66. package/dist/chunks/chunk-AC4U3IMS.js +205 -0
  67. package/dist/chunks/chunk-BYJRQTFR.js +57 -0
  68. package/dist/chunks/chunk-CQ52GEHY.js +39 -0
  69. package/dist/chunks/chunk-EQ3TDHYD.js +79 -0
  70. package/dist/chunks/chunk-F36YGSHN.js +335 -0
  71. package/dist/chunks/chunk-G6E35DMJ.js +1997 -0
  72. package/dist/chunks/chunk-I4GC3E65.js +170 -0
  73. package/dist/chunks/chunk-I4OYYAX5.js +63 -0
  74. package/dist/chunks/chunk-I7X64JTZ.js +10402 -0
  75. package/dist/chunks/chunk-IWN3T3FL.js +19493 -0
  76. package/dist/chunks/chunk-IYAQC63Y.js +1265 -0
  77. package/dist/chunks/chunk-JFROOUG6.js +6363 -0
  78. package/dist/chunks/chunk-LB3UYTOL.js +95 -0
  79. package/dist/chunks/chunk-LUBOGJCG.js +129 -0
  80. package/dist/chunks/chunk-NWQXN4SB.js +227 -0
  81. package/dist/chunks/chunk-RKDPDEF7.js +160 -0
  82. package/dist/chunks/chunk-SJBZFMQ2.js +2966 -0
  83. package/dist/chunks/chunk-STAJCW4Z.js +322 -0
  84. package/dist/chunks/chunk-TL7ZW6BX.js +17963 -0
  85. package/dist/chunks/chunk-U4VOHNR2.js +210 -0
  86. package/dist/chunks/chunk-U5Z2VE7Z.js +120 -0
  87. package/dist/chunks/chunk-X47OVDF3.js +1974 -0
  88. package/dist/chunks/chunk-Y7XOMJOC.js +791 -0
  89. package/dist/chunks/chunk-YK3OSMDM.js +5473 -0
  90. package/dist/chunks/crypto-UO2XRCJS.js +11 -0
  91. package/dist/cli/Generate.js +9 -4
  92. package/dist/cli/Init.js +1 -1
  93. package/dist/cli/Serve.d.ts +2 -2
  94. package/dist/cli/Serve.js +54 -100
  95. package/dist/cli/bin.js +85 -12
  96. package/dist/cli/build/BuildEmitter.js +1 -1
  97. package/dist/cli/build/BuildOptions.js +1 -1
  98. package/dist/cli/generate/CompileConfig.d.ts +1 -1
  99. package/dist/cli/generate/CompileConfig.js +1 -1
  100. package/dist/cli/generate/CopyStaticFiles.js +2 -1
  101. package/dist/cli/generate/DevDB.js +2 -8
  102. package/dist/cli/generate/FillCache.js +2 -2
  103. package/dist/cli/generate/GenerateDashboard.js +1 -1
  104. package/dist/cli/generate/LoadConfig.js +2 -3
  105. package/dist/cli/serve/CreateLocalServer.d.ts +1 -1
  106. package/dist/cli/serve/CreateLocalServer.js +81 -26
  107. package/dist/cli/serve/DevServer.d.ts +19 -0
  108. package/dist/cli/serve/DevServer.js +134 -0
  109. package/dist/cli/serve/GitHistory.d.ts +1 -2
  110. package/dist/cli/serve/GitHistory.js +15 -2
  111. package/dist/cli/serve/LiveReload.js +1 -1
  112. package/dist/cli/serve/LocalAuth.js +1 -1
  113. package/dist/cli/serve/MemoryDrafts.js +1 -1
  114. package/dist/cli/serve/StartServer.js +1 -1
  115. package/dist/cli/static/init/cms.js +45 -47
  116. package/dist/cli/static/init/next-handler.js +8 -8
  117. package/dist/cli/util/CommitMessage.js +1 -1
  118. package/dist/cli/util/CommitSha.js +1 -1
  119. package/dist/cli/util/Dirname.js +1 -1
  120. package/dist/cli/util/Emitter.js +1 -1
  121. package/dist/cli/util/EnsureEnv.js +1 -1
  122. package/dist/cli/util/EnsureLibs.js +1 -1
  123. package/dist/cli/util/EnsureNode.js +1 -1
  124. package/dist/cli/util/ExternalPlugin.js +595 -486
  125. package/dist/cli/util/FS.js +1 -1
  126. package/dist/cli/util/FindConfigFile.js +1 -1
  127. package/dist/cli/util/ForwardCommand.js +1 -1
  128. package/dist/cli/util/IgnorePlugin.js +1 -1
  129. package/dist/cli/util/PublicDefines.js +1 -1
  130. package/dist/cli/util/Report.js +1 -1
  131. package/dist/cli/util/ViewsPlugin.js +2 -2
  132. package/dist/cli/util/WarnPublicEnv.js +1 -1
  133. package/dist/cli/util/Watcher.js +1 -1
  134. package/dist/cloud/AuthResult.js +1 -1
  135. package/dist/cloud/CloudConfig.d.ts +1 -0
  136. package/dist/cloud/CloudConfig.js +2 -1
  137. package/dist/cloud/CloudRemote.d.ts +10 -4
  138. package/dist/cloud/CloudRemote.js +56 -9
  139. package/dist/components/Breadcrumbs.d.ts +3 -0
  140. package/dist/components/Breadcrumbs.js +42 -0
  141. package/dist/components/Button.d.ts +10 -0
  142. package/dist/components/Button.js +57 -0
  143. package/dist/components/Calendar.d.ts +3 -0
  144. package/dist/components/Calendar.js +94 -0
  145. package/dist/components/Checkbox.d.ts +9 -0
  146. package/dist/components/Checkbox.js +75 -0
  147. package/dist/components/CheckboxGroup.d.ts +6 -0
  148. package/dist/components/CheckboxGroup.js +45 -0
  149. package/dist/components/ColorSwatch.d.ts +2 -0
  150. package/dist/components/ColorSwatch.js +45 -0
  151. package/dist/components/ColorSwatchPicker.d.ts +3 -0
  152. package/dist/components/ColorSwatchPicker.js +66 -0
  153. package/dist/components/ComboBox.d.ts +13 -0
  154. package/dist/components/ComboBox.js +147 -0
  155. package/dist/components/DateField.d.ts +5 -0
  156. package/dist/components/DateField.js +61 -0
  157. package/dist/components/DatePicker.d.ts +5 -0
  158. package/dist/components/DatePicker.js +78 -0
  159. package/dist/components/DateRangePicker.d.ts +5 -0
  160. package/dist/components/DateRangePicker.js +95 -0
  161. package/dist/components/Dialog.d.ts +3 -0
  162. package/dist/components/Dialog.js +43 -0
  163. package/dist/components/Disclosure.d.ts +5 -0
  164. package/dist/components/Disclosure.js +106 -0
  165. package/dist/components/DropZone.d.ts +4 -0
  166. package/dist/components/DropZone.js +41 -0
  167. package/dist/components/FoldIcon.d.ts +6 -0
  168. package/dist/components/FoldIcon.js +31 -0
  169. package/dist/components/Icon.d.ts +7 -0
  170. package/dist/components/Icon.js +40 -0
  171. package/dist/components/Label.d.ts +48 -0
  172. package/dist/components/Label.js +210 -0
  173. package/dist/components/Link.d.ts +5 -0
  174. package/dist/components/Link.js +42 -0
  175. package/dist/components/List.d.ts +99 -0
  176. package/dist/components/List.js +397 -0
  177. package/dist/components/Menu.d.ts +16 -0
  178. package/dist/components/Menu.js +95 -0
  179. package/dist/components/Modal.d.ts +7 -0
  180. package/dist/components/Modal.js +58 -0
  181. package/dist/components/MultipleSelect.d.ts +25 -0
  182. package/dist/components/MultipleSelect.js +278 -0
  183. package/dist/components/NumberField.d.ts +6 -0
  184. package/dist/components/NumberField.js +90 -0
  185. package/dist/components/Popover.d.ts +6 -0
  186. package/dist/components/Popover.js +42 -0
  187. package/dist/components/ProgressCircle.d.ts +6 -0
  188. package/dist/components/ProgressCircle.js +96 -0
  189. package/dist/components/RadioGroup.d.ts +8 -0
  190. package/dist/components/RadioGroup.js +64 -0
  191. package/dist/components/SearchField.d.ts +8 -0
  192. package/dist/components/SearchField.js +86 -0
  193. package/dist/components/Select.d.ts +13 -0
  194. package/dist/components/Select.js +150 -0
  195. package/dist/components/Surface.d.ts +15 -0
  196. package/dist/components/Surface.js +53 -0
  197. package/dist/components/Switch.d.ts +5 -0
  198. package/dist/components/Switch.js +47 -0
  199. package/dist/components/Table.d.ts +14 -0
  200. package/dist/components/Table.js +147 -0
  201. package/dist/components/Tabs.d.ts +13 -0
  202. package/dist/components/Tabs.js +96 -0
  203. package/dist/components/TagGroup.d.ts +10 -0
  204. package/dist/components/TagGroup.js +81 -0
  205. package/dist/components/TextField.d.ts +13 -0
  206. package/dist/components/TextField.js +77 -0
  207. package/dist/components/TimeField.d.ts +5 -0
  208. package/dist/components/TimeField.js +55 -0
  209. package/dist/components/Toggle.d.ts +8 -0
  210. package/dist/components/Toggle.js +61 -0
  211. package/dist/components/Toolbar.d.ts +8 -0
  212. package/dist/components/Toolbar.js +80 -0
  213. package/dist/components/Tooltip.d.ts +7 -0
  214. package/dist/components/Tooltip.js +54 -0
  215. package/dist/components/Tree.d.ts +23 -0
  216. package/dist/components/Tree.js +130 -0
  217. package/dist/components.d.ts +38 -0
  218. package/dist/components.js +39 -0
  219. package/dist/config.js +1 -1
  220. package/dist/core/CMS.js +1 -1
  221. package/dist/core/Client.d.ts +11 -7
  222. package/dist/core/Client.js +53 -10
  223. package/dist/core/Config.d.ts +2 -0
  224. package/dist/core/Config.js +1 -3
  225. package/dist/core/Connection.d.ts +28 -9
  226. package/dist/core/Document.js +10 -8
  227. package/dist/core/Draft.js +1 -1
  228. package/dist/core/Entry.d.ts +6 -0
  229. package/dist/core/Entry.js +16 -1
  230. package/dist/core/EntryFields.d.ts +4 -0
  231. package/dist/core/EntryFields.js +4 -2
  232. package/dist/core/EntryRecord.js +1 -1
  233. package/dist/core/Expr.d.ts +1 -0
  234. package/dist/core/Expr.js +1 -1
  235. package/dist/core/Field.d.ts +46 -5
  236. package/dist/core/Field.js +56 -10
  237. package/dist/core/Graph.d.ts +6 -0
  238. package/dist/core/Graph.js +1 -1
  239. package/dist/core/HttpError.js +1 -1
  240. package/dist/core/Id.js +1 -1
  241. package/dist/core/Infer.d.ts +1 -1
  242. package/dist/core/Internal.js +6 -6
  243. package/dist/core/ListRow.d.ts +10 -0
  244. package/dist/core/ListRow.js +12 -0
  245. package/dist/core/Outcome.js +1 -1
  246. package/dist/core/Page.js +2 -2
  247. package/dist/core/Picker.d.ts +0 -2
  248. package/dist/core/Picker.js +1 -1
  249. package/dist/core/Reference.js +1 -1
  250. package/dist/core/Role.d.ts +3 -0
  251. package/dist/core/Role.js +7 -1
  252. package/dist/core/Root.d.ts +4 -0
  253. package/dist/core/Root.js +7 -2
  254. package/dist/core/Schema.d.ts +0 -2
  255. package/dist/core/Schema.js +2 -16
  256. package/dist/core/Scope.js +1 -1
  257. package/dist/core/Section.js +2 -2
  258. package/dist/core/TextDoc.d.ts +4 -0
  259. package/dist/core/TextDoc.js +3 -1
  260. package/dist/core/Tracker.d.ts +1 -6
  261. package/dist/core/Tracker.js +2 -12
  262. package/dist/core/Trigger.js +1 -1
  263. package/dist/core/Type.d.ts +15 -6
  264. package/dist/core/Type.js +108 -28
  265. package/dist/core/UnionRow.d.ts +11 -0
  266. package/dist/core/UnionRow.js +11 -0
  267. package/dist/core/User.d.ts +7 -1
  268. package/dist/core/User.js +1 -1
  269. package/dist/core/View.js +1 -1
  270. package/dist/core/Workspace.d.ts +4 -1
  271. package/dist/core/Workspace.js +1 -1
  272. package/dist/core/db/CommitRequest.d.ts +2 -0
  273. package/dist/core/db/CommitRequest.js +1 -1
  274. package/dist/core/db/EntryAliases.d.ts +2 -0
  275. package/dist/core/db/EntryAliases.js +28 -0
  276. package/dist/core/db/EntryDB.d.ts +2 -2
  277. package/dist/core/db/EntryDB.js +3 -3
  278. package/dist/core/db/EntryIndex.d.ts +7 -0
  279. package/dist/core/db/EntryIndex.js +168 -26
  280. package/dist/core/db/EntryReference.d.ts +44 -0
  281. package/dist/core/db/EntryReference.js +9 -0
  282. package/dist/core/db/EntryReferenceIndex.d.ts +21 -0
  283. package/dist/core/db/EntryReferenceIndex.js +131 -0
  284. package/dist/core/db/EntryResolver.d.ts +10 -7
  285. package/dist/core/db/EntryResolver.js +90 -35
  286. package/dist/core/db/EntryTransaction.d.ts +1 -1
  287. package/dist/core/db/EntryTransaction.js +395 -57
  288. package/dist/core/db/EntryUrlConflictError.d.ts +11 -0
  289. package/dist/core/db/EntryUrlConflictError.js +16 -0
  290. package/dist/core/db/IndexEvent.d.ts +5 -2
  291. package/dist/core/db/IndexEvent.js +2 -1
  292. package/dist/core/db/LinkResolver.d.ts +1 -1
  293. package/dist/core/db/LinkResolver.js +4 -1
  294. package/dist/core/db/LocalDB.d.ts +4 -2
  295. package/dist/core/db/LocalDB.js +8 -6
  296. package/dist/core/db/Mutation.d.ts +3 -3
  297. package/dist/core/db/Operation.d.ts +8 -3
  298. package/dist/core/db/Operation.js +67 -23
  299. package/dist/core/db/TestDB.d.ts +9 -1
  300. package/dist/core/db/TestDB.js +24 -1
  301. package/dist/core/db/WriteableGraph.d.ts +15 -4
  302. package/dist/core/db/WriteableGraph.js +14 -2
  303. package/dist/core/field/CreateField.d.ts +5 -4
  304. package/dist/core/field/CreateField.js +9 -5
  305. package/dist/core/field/ListField.d.ts +13 -4
  306. package/dist/core/field/ListField.js +146 -13
  307. package/dist/core/field/RecordField.d.ts +5 -3
  308. package/dist/core/field/RecordField.js +58 -2
  309. package/dist/core/field/RichTextField.d.ts +7 -2
  310. package/dist/core/field/RichTextField.js +325 -10
  311. package/dist/core/field/ScalarField.js +9 -7
  312. package/dist/core/field/UnionField.d.ts +2 -3
  313. package/dist/core/field/UnionField.js +61 -12
  314. package/dist/core/media/CreatePreview.browser.js +5 -5
  315. package/dist/core/media/CreatePreview.js +15 -10
  316. package/dist/core/media/IsImage.js +1 -1
  317. package/dist/core/media/MediaAltField.d.ts +9 -0
  318. package/dist/core/media/MediaAltField.js +17 -0
  319. package/dist/core/media/MediaLocation.d.ts +39 -0
  320. package/dist/core/media/MediaLocation.js +55 -2
  321. package/dist/core/media/MediaRoot.d.ts +2 -2
  322. package/dist/core/media/MediaRoot.js +12 -11
  323. package/dist/core/media/MediaTypes.d.ts +21 -15
  324. package/dist/core/media/MediaTypes.js +33 -16
  325. package/dist/core/media/Summary.d.ts +8 -8
  326. package/dist/core/media/Summary.js +1 -1
  327. package/dist/core/media/UploadLimits.d.ts +1 -0
  328. package/dist/core/media/UploadLimits.js +20 -0
  329. package/dist/core/pages/Snippet.js +1 -1
  330. package/dist/core/shape/ListShape.d.ts +1 -47
  331. package/dist/core/shape/ListShape.js +1 -224
  332. package/dist/core/source/CombinedSource.js +1 -1
  333. package/dist/core/source/FSSource.d.ts +3 -2
  334. package/dist/core/source/FSSource.js +25 -12
  335. package/dist/core/source/FilePatch.js +5 -2
  336. package/dist/core/source/GitDelta.js +1 -1
  337. package/dist/core/source/GitUtils.js +1 -1
  338. package/dist/core/source/GithubSource.d.ts +1 -0
  339. package/dist/core/source/GithubSource.js +17 -4
  340. package/dist/core/source/IndexedDBSource.js +23 -11
  341. package/dist/core/source/MemorySource.js +1 -1
  342. package/dist/core/source/ShaMismatchError.js +3 -1
  343. package/dist/core/source/Source.js +1 -1
  344. package/dist/core/source/SourceExport.js +3 -3
  345. package/dist/core/source/Tree.js +1 -1
  346. package/dist/core/source/Utils.js +2 -5
  347. package/dist/core/util/Anchors.d.ts +4 -0
  348. package/dist/core/util/Anchors.js +45 -0
  349. package/dist/core/util/ArrayBuffers.js +1 -1
  350. package/dist/core/util/Assert.js +1 -1
  351. package/dist/core/util/Async.js +1 -1
  352. package/dist/core/util/BufferToBase64.js +1 -1
  353. package/dist/core/util/Callable.js +1 -1
  354. package/dist/core/util/Checks.js +2 -2
  355. package/dist/core/util/CodeGen.js +3 -1
  356. package/dist/core/util/ContentHash.js +1 -1
  357. package/dist/core/util/Debounce.js +1 -1
  358. package/dist/core/util/DeepMap.d.ts +14 -0
  359. package/dist/core/util/DeepMap.js +75 -0
  360. package/dist/core/util/Encoding.js +1 -1
  361. package/dist/core/util/EntryFilenames.d.ts +0 -1
  362. package/dist/core/util/EntryFilenames.js +2 -6
  363. package/dist/core/util/EntryRows.js +1 -1
  364. package/dist/core/util/FractionalIndexing.js +1 -1
  365. package/dist/core/util/GetRandomColor.js +20 -20
  366. package/dist/core/util/Identifiers.js +1 -1
  367. package/dist/core/util/JWT.js +1 -1
  368. package/dist/core/util/Lazy.js +1 -1
  369. package/dist/core/util/LazyRecord.js +1 -1
  370. package/dist/core/util/Logger.js +2 -1
  371. package/dist/core/util/Objects.d.ts +1 -0
  372. package/dist/core/util/Objects.js +5 -1
  373. package/dist/core/util/Paths.js +2 -2
  374. package/dist/core/util/RowId.js +1 -1
  375. package/dist/core/util/Slugs.js +1 -1
  376. package/dist/core/util/Timer.js +1 -1
  377. package/dist/core/util/Types.js +1 -1
  378. package/dist/core/util/Urls.js +1 -1
  379. package/dist/core.d.ts +1 -0
  380. package/dist/core.js +2 -1
  381. package/dist/dashboard/App.css +319 -0
  382. package/dist/dashboard/App.d.ts +8 -8
  383. package/dist/dashboard/App.js +188 -142
  384. package/dist/dashboard/StoryProvider.d.ts +12 -0
  385. package/dist/dashboard/StoryProvider.js +82 -0
  386. package/dist/dashboard/ViewKeys.d.ts +26 -0
  387. package/dist/dashboard/ViewKeys.js +32 -0
  388. package/dist/dashboard/app/AccessDenied.d.ts +5 -0
  389. package/dist/dashboard/app/AccessDenied.js +53 -0
  390. package/dist/dashboard/app/ActivityStatus.d.ts +10 -0
  391. package/dist/dashboard/app/ActivityStatus.js +459 -0
  392. package/dist/dashboard/app/AlineaLogo.d.ts +4 -0
  393. package/dist/dashboard/app/AlineaLogo.js +26 -0
  394. package/dist/dashboard/app/AppShell.d.ts +4 -0
  395. package/dist/dashboard/app/AppShell.js +29 -0
  396. package/dist/dashboard/app/AuthView.d.ts +8 -0
  397. package/dist/dashboard/app/AuthView.js +111 -0
  398. package/dist/dashboard/app/Badge.d.ts +8 -0
  399. package/dist/dashboard/app/Badge.js +42 -0
  400. package/dist/dashboard/app/CompactField.d.ts +14 -0
  401. package/dist/dashboard/app/CompactField.js +178 -0
  402. package/dist/dashboard/app/DashboardErrorBoundary.d.ts +2 -0
  403. package/dist/dashboard/app/DashboardErrorBoundary.js +122 -0
  404. package/dist/dashboard/app/DashboardLayout.d.ts +18 -0
  405. package/dist/dashboard/app/DashboardLayout.js +88 -0
  406. package/dist/dashboard/app/DashboardMeta.d.ts +7 -0
  407. package/dist/dashboard/app/DashboardMeta.js +28 -0
  408. package/dist/dashboard/app/EditorBackButton.d.ts +5 -0
  409. package/dist/dashboard/app/EditorBackButton.js +33 -0
  410. package/dist/dashboard/app/EntryFields.d.ts +21 -0
  411. package/dist/dashboard/app/EntryFields.js +101 -0
  412. package/dist/dashboard/app/EntryHeader.d.ts +15 -0
  413. package/dist/dashboard/app/EntryHeader.js +452 -0
  414. package/dist/dashboard/app/EntryHeaderActions.d.ts +37 -0
  415. package/dist/dashboard/app/EntryHeaderActions.js +71 -0
  416. package/dist/dashboard/app/EntryReferences.d.ts +6 -0
  417. package/dist/dashboard/app/EntryReferences.js +209 -0
  418. package/dist/dashboard/app/EntrySidebar.d.ts +25 -0
  419. package/dist/dashboard/app/EntrySidebar.js +378 -0
  420. package/dist/dashboard/app/EntrySidebarPreview.d.ts +10 -0
  421. package/dist/dashboard/app/EntrySidebarPreview.js +260 -0
  422. package/dist/dashboard/app/EntrySidebarPreview.story.d.ts +1 -0
  423. package/dist/dashboard/app/EntrySidebarToggle.d.ts +6 -0
  424. package/dist/dashboard/app/EntrySidebarToggle.js +29 -0
  425. package/dist/dashboard/app/EntryTranslationBanner.d.ts +7 -0
  426. package/dist/dashboard/app/EntryTranslationBanner.js +60 -0
  427. package/dist/dashboard/app/Explorer.d.ts +41 -0
  428. package/dist/dashboard/app/Explorer.js +804 -0
  429. package/dist/dashboard/app/ExplorerCards.d.ts +12 -0
  430. package/dist/dashboard/app/ExplorerCards.js +389 -0
  431. package/dist/dashboard/app/ExplorerFileCard.d.ts +10 -0
  432. package/dist/dashboard/app/ExplorerFileCard.js +115 -0
  433. package/dist/dashboard/app/ExplorerList.d.ts +9 -0
  434. package/dist/dashboard/app/ExplorerList.js +165 -0
  435. package/dist/dashboard/app/ExplorerModal.d.ts +16 -0
  436. package/dist/dashboard/app/ExplorerModal.js +89 -0
  437. package/dist/dashboard/app/ExplorerPickerContent.d.ts +13 -0
  438. package/dist/dashboard/app/ExplorerPickerContent.js +114 -0
  439. package/dist/dashboard/app/ExplorerTable.d.ts +14 -0
  440. package/dist/dashboard/app/ExplorerTable.js +497 -0
  441. package/dist/dashboard/app/ExternalLinkPicker.d.ts +12 -0
  442. package/dist/dashboard/app/ExternalLinkPicker.js +97 -0
  443. package/dist/dashboard/app/ImagePicker.d.ts +6 -0
  444. package/dist/dashboard/app/ImagePicker.js +145 -0
  445. package/dist/dashboard/app/LinkPicker.d.ts +9 -0
  446. package/dist/dashboard/app/LinkPicker.js +317 -0
  447. package/dist/dashboard/app/LocaleMenu.d.ts +8 -0
  448. package/dist/dashboard/app/LocaleMenu.js +110 -0
  449. package/dist/dashboard/app/LogoShape.d.ts +8 -0
  450. package/dist/dashboard/app/LogoShape.js +60 -0
  451. package/dist/dashboard/app/SidebarTree.d.ts +37 -0
  452. package/dist/dashboard/app/SidebarTree.js +433 -0
  453. package/dist/dashboard/app/StatusBadge.d.ts +6 -0
  454. package/dist/dashboard/app/StatusBadge.js +26 -0
  455. package/dist/dashboard/app/ViewToggle.d.ts +7 -0
  456. package/dist/dashboard/app/ViewToggle.js +27 -0
  457. package/dist/dashboard/app/WorkspaceMenu.d.ts +24 -0
  458. package/dist/dashboard/app/WorkspaceMenu.js +264 -0
  459. package/dist/dashboard/app/WorkspaceMenu.stories.d.ts +5 -0
  460. package/dist/dashboard/app/WorkspaceRoots.d.ts +6 -0
  461. package/dist/dashboard/app/WorkspaceRoots.js +285 -0
  462. package/dist/dashboard/app/editor/FileEditor.d.ts +5 -0
  463. package/dist/dashboard/app/editor/FileEditor.js +190 -0
  464. package/dist/dashboard/app/editor/FilePreview.d.ts +13 -0
  465. package/dist/dashboard/app/editor/FilePreview.js +196 -0
  466. package/dist/dashboard/app/editor/MediaAltField.view.d.ts +5 -0
  467. package/dist/dashboard/app/editor/MediaAltField.view.js +98 -0
  468. package/dist/dashboard/app/modals/CreateEntry.d.ts +1 -0
  469. package/dist/dashboard/app/modals/CreateEntry.js +283 -0
  470. package/dist/dashboard/app/pages/EntryPage.d.ts +11 -0
  471. package/dist/dashboard/app/pages/EntryPage.js +354 -0
  472. package/dist/dashboard/app/pages/RootPage.d.ts +9 -0
  473. package/dist/dashboard/app/pages/RootPage.js +90 -0
  474. package/dist/dashboard/app/pages/UsersPage.d.ts +7 -0
  475. package/dist/dashboard/app/pages/UsersPage.js +552 -0
  476. package/dist/dashboard/app/ui/DashboardModal.d.ts +34 -0
  477. package/dist/dashboard/app/ui/DashboardModal.js +192 -0
  478. package/dist/dashboard/app/ui/Rail.d.ts +18 -0
  479. package/dist/dashboard/app/ui/Rail.js +41 -0
  480. package/dist/dashboard/app/ui/Sidebar.d.ts +15 -0
  481. package/dist/dashboard/app/ui/Sidebar.js +55 -0
  482. package/dist/dashboard/atoms/ReactiveNode.d.ts +41 -0
  483. package/dist/dashboard/atoms/ReactiveNode.js +248 -0
  484. package/dist/dashboard/atoms/activity.d.ts +48 -0
  485. package/dist/dashboard/atoms/activity.js +189 -0
  486. package/dist/dashboard/atoms/auth.d.ts +38 -0
  487. package/dist/dashboard/atoms/auth.js +106 -0
  488. package/dist/dashboard/atoms/config.d.ts +27 -0
  489. package/dist/dashboard/atoms/config.js +49 -0
  490. package/dist/dashboard/atoms/core.d.ts +15 -0
  491. package/dist/dashboard/atoms/core.js +37 -0
  492. package/dist/dashboard/atoms/create.d.ts +13 -0
  493. package/dist/dashboard/atoms/create.js +79 -0
  494. package/dist/dashboard/atoms/dashboard.d.ts +12 -0
  495. package/dist/dashboard/atoms/dashboard.js +71 -0
  496. package/dist/dashboard/atoms/editor.d.ts +80 -0
  497. package/dist/dashboard/atoms/editor.js +132 -0
  498. package/dist/dashboard/atoms/entry.d.ts +223 -0
  499. package/dist/dashboard/atoms/entry.js +609 -0
  500. package/dist/dashboard/atoms/explorer.d.ts +257 -0
  501. package/dist/dashboard/atoms/explorer.js +677 -0
  502. package/dist/dashboard/atoms/graph.d.ts +5 -0
  503. package/dist/dashboard/atoms/graph.js +62 -0
  504. package/dist/dashboard/atoms/link.d.ts +24 -0
  505. package/dist/dashboard/atoms/link.js +82 -0
  506. package/dist/dashboard/atoms/nav.d.ts +47 -0
  507. package/dist/dashboard/atoms/nav.js +220 -0
  508. package/dist/dashboard/atoms/preview.d.ts +4 -0
  509. package/dist/dashboard/atoms/preview.js +10 -0
  510. package/dist/dashboard/atoms/root.d.ts +88 -0
  511. package/dist/dashboard/atoms/root.js +444 -0
  512. package/dist/dashboard/atoms/upload.d.ts +9 -0
  513. package/dist/dashboard/atoms/upload.js +81 -0
  514. package/dist/dashboard/atoms/user.d.ts +9 -0
  515. package/dist/dashboard/atoms/user.js +75 -0
  516. package/dist/dashboard/atoms/utils.d.ts +17 -0
  517. package/dist/dashboard/atoms/utils.js +151 -0
  518. package/dist/dashboard/boot/ActivityEvent.d.ts +44 -0
  519. package/dist/dashboard/boot/ActivityEvent.js +14 -0
  520. package/dist/dashboard/boot/Boot.js +9 -5
  521. package/dist/dashboard/boot/BootDev.js +2 -1
  522. package/dist/dashboard/boot/BootProd.js +1 -1
  523. package/dist/dashboard/boot/DashboardWorker.d.ts +7 -7
  524. package/dist/dashboard/boot/DashboardWorker.js +370 -30
  525. package/dist/dashboard/boot/LoadWorker.js +6 -3
  526. package/dist/dashboard/boot/WorkerDB.d.ts +9 -2
  527. package/dist/dashboard/boot/WorkerDB.js +20 -3
  528. package/dist/dashboard/editor/UseField.d.ts +29 -10
  529. package/dist/dashboard/editor/UseField.js +27 -59
  530. package/dist/dashboard/fixture/cms.d.ts +116 -0
  531. package/dist/dashboard/fixture/cms.js +230 -0
  532. package/dist/dashboard/hook/UseEntryEditor.d.ts +25 -6
  533. package/dist/dashboard/hook/UseEntryEditor.js +34 -12
  534. package/dist/dashboard/hook/UseGraph.d.ts +3 -0
  535. package/dist/dashboard/hook/UseGraph.js +5 -5
  536. package/dist/dashboard/hook/UseLocale.d.ts +4 -1
  537. package/dist/dashboard/hook/UseLocale.js +5 -7
  538. package/dist/dashboard/hook/UseRoot.d.ts +7 -12
  539. package/dist/dashboard/hook/UseRoot.js +8 -5
  540. package/dist/dashboard/hook/UseWorkspace.d.ts +7 -9
  541. package/dist/dashboard/hook/UseWorkspace.js +5 -7
  542. package/dist/dashboard/hooks.d.ts +157 -0
  543. package/dist/dashboard/hooks.js +229 -0
  544. package/dist/dashboard/icons.d.ts +171 -0
  545. package/dist/dashboard/icons.js +2686 -0
  546. package/dist/dashboard/plugins/alineaFixturePlugin.d.ts +2 -0
  547. package/dist/dashboard/plugins/alineaFixturePlugin.js +200 -0
  548. package/dist/dashboard.d.ts +1 -2
  549. package/dist/dashboard.js +6 -2
  550. package/dist/edit.d.ts +1 -1
  551. package/dist/edit.js +2 -4
  552. package/dist/field/check/CheckField.js +3 -3
  553. package/dist/field/check/CheckField.view.d.ts +3 -3
  554. package/dist/field/check/CheckField.view.js +37 -84
  555. package/dist/field/code/CodeField.js +2 -2
  556. package/dist/field/code/CodeField.view.d.ts +21 -3
  557. package/dist/field/code/CodeField.view.js +177 -39
  558. package/dist/field/code/SimpleCodeEditor.d.ts +50 -0
  559. package/dist/field/code/SimpleCodeEditor.js +452 -0
  560. package/dist/field/date/DateField.js +3 -3
  561. package/dist/field/date/DateField.view.d.ts +3 -3
  562. package/dist/field/date/DateField.view.js +26 -26
  563. package/dist/field/hidden/HiddenField.js +2 -2
  564. package/dist/field/hidden/HiddenField.view.js +1 -1
  565. package/dist/field/json/JsonField.js +2 -2
  566. package/dist/field/json/JsonField.view.d.ts +4 -4
  567. package/dist/field/json/JsonField.view.js +53 -76
  568. package/dist/field/link/EntryLink.d.ts +9 -8
  569. package/dist/field/link/EntryLink.js +4 -2
  570. package/dist/field/link/FileLink.d.ts +5 -5
  571. package/dist/field/link/FileLink.js +7 -3
  572. package/dist/field/link/ImageLink.d.ts +4 -2
  573. package/dist/field/link/ImageLink.js +4 -1
  574. package/dist/field/link/Link.d.ts +1 -1
  575. package/dist/field/link/Link.js +1 -1
  576. package/dist/field/link/LinkEditor.d.ts +1 -1
  577. package/dist/field/link/LinkEditor.js +1 -1
  578. package/dist/field/link/LinkField.d.ts +5 -3
  579. package/dist/field/link/LinkField.js +56 -17
  580. package/dist/field/link/LinkField.stories.d.ts +11 -1
  581. package/dist/field/link/LinkField.view.d.ts +8 -10
  582. package/dist/field/link/LinkField.view.js +1444 -362
  583. package/dist/field/link/UrlLink.d.ts +2 -2
  584. package/dist/field/link/UrlLink.js +4 -2
  585. package/dist/field/list/ListField.d.ts +3 -3
  586. package/dist/field/list/ListField.js +5 -6
  587. package/dist/field/list/ListField.stories.d.ts +2 -1
  588. package/dist/field/list/ListField.view.d.ts +15 -7
  589. package/dist/field/list/ListField.view.js +888 -377
  590. package/dist/field/localiser/LocalisedField.view.d.ts +5 -0
  591. package/dist/field/localiser/LocalisedField.view.js +63 -0
  592. package/dist/field/localiser/LocalisedFieldTabs.d.ts +8 -0
  593. package/dist/field/localiser/LocalisedFieldTabs.js +38 -0
  594. package/dist/field/localiser/Localiser.d.ts +25 -0
  595. package/dist/field/localiser/Localiser.js +140 -0
  596. package/dist/field/localiser.d.ts +1 -0
  597. package/dist/field/localiser.js +2 -0
  598. package/dist/field/metadata/MetadataAliases.d.ts +20 -0
  599. package/dist/field/metadata/MetadataAliases.js +22 -0
  600. package/dist/field/metadata/MetadataField.d.ts +31 -8
  601. package/dist/field/metadata/MetadataField.js +127 -11
  602. package/dist/field/metadata/MetadataField.view.d.ts +11 -3
  603. package/dist/field/metadata/MetadataField.view.js +130 -96
  604. package/dist/field/number/NumberField.js +3 -3
  605. package/dist/field/number/NumberField.view.d.ts +3 -3
  606. package/dist/field/number/NumberField.view.js +22 -54
  607. package/dist/field/object/ObjectField.d.ts +1 -1
  608. package/dist/field/object/ObjectField.js +11 -4
  609. package/dist/field/object/ObjectField.view.d.ts +4 -4
  610. package/dist/field/object/ObjectField.view.js +28 -19
  611. package/dist/field/path/PathField.js +3 -3
  612. package/dist/field/path/PathField.view.d.ts +3 -3
  613. package/dist/field/path/PathField.view.js +33 -133
  614. package/dist/field/path/SlugField.d.ts +16 -0
  615. package/dist/field/path/SlugField.js +52 -0
  616. package/dist/field/richtext/Extensions.d.ts +1 -28
  617. package/dist/field/richtext/Extensions.js +2 -4146
  618. package/dist/field/richtext/PickTextAnchor.d.ts +19 -0
  619. package/dist/field/richtext/PickTextAnchor.js +99 -0
  620. package/dist/field/richtext/PickTextLink.d.ts +18 -17
  621. package/dist/field/richtext/PickTextLink.js +133 -88
  622. package/dist/field/richtext/ReferenceLink.d.ts +2 -0
  623. package/dist/field/richtext/ReferenceLink.js +13 -4
  624. package/dist/field/richtext/RichTextBlock.d.ts +11 -0
  625. package/dist/field/richtext/RichTextBlock.js +143 -0
  626. package/dist/field/richtext/RichTextBlockHost.d.ts +13 -0
  627. package/dist/field/richtext/RichTextBlockHost.js +56 -0
  628. package/dist/field/richtext/RichTextBlockValue.d.ts +5 -0
  629. package/dist/field/richtext/RichTextBlockValue.js +34 -0
  630. package/dist/field/richtext/RichTextBlocks.d.ts +16 -0
  631. package/dist/field/richtext/RichTextBlocks.js +40 -0
  632. package/dist/field/richtext/RichTextDocument.d.ts +4 -0
  633. package/dist/field/richtext/RichTextDocument.js +162 -0
  634. package/dist/field/richtext/RichTextExtensions.d.ts +67 -0
  635. package/dist/field/richtext/RichTextExtensions.js +8219 -0
  636. package/dist/field/richtext/RichTextField.d.ts +10 -3
  637. package/dist/field/richtext/RichTextField.js +13 -3
  638. package/dist/field/richtext/RichTextField.story.d.ts +8 -0
  639. package/dist/field/richtext/RichTextField.view.d.ts +11 -5
  640. package/dist/field/richtext/RichTextField.view.js +385 -2447
  641. package/dist/field/richtext/RichTextInsertMenu.d.ts +9 -0
  642. package/dist/field/richtext/RichTextInsertMenu.js +1014 -0
  643. package/dist/field/richtext/RichTextState.d.ts +6 -0
  644. package/dist/field/richtext/RichTextState.js +58 -0
  645. package/dist/field/richtext/RichTextToolbar.d.ts +9 -36
  646. package/dist/field/richtext/RichTextToolbar.js +206 -178
  647. package/dist/field/richtext/Toolbar.d.ts +111 -65
  648. package/dist/field/richtext/Toolbar.js +60 -45
  649. package/dist/field/richtext/extensions/Anchor.d.ts +19 -0
  650. package/dist/field/richtext/extensions/Anchor.js +94 -0
  651. package/dist/field/richtext/extensions/Link.d.ts +3 -13
  652. package/dist/field/richtext/extensions/Link.js +15 -37
  653. package/dist/field/richtext/extensions/Small.d.ts +1 -10
  654. package/dist/field/richtext/extensions/Small.js +7 -19
  655. package/dist/field/select/SelectField.d.ts +15 -4
  656. package/dist/field/select/SelectField.js +17 -2
  657. package/dist/field/select/SelectField.view.d.ts +7 -3
  658. package/dist/field/select/SelectField.view.js +112 -155
  659. package/dist/field/tabs/Tabs.js +3 -2
  660. package/dist/field/tabs/Tabs.view.d.ts +1 -6
  661. package/dist/field/tabs/Tabs.view.js +22 -29
  662. package/dist/field/text/TextField.js +8 -3
  663. package/dist/field/text/TextField.view.d.ts +2 -2
  664. package/dist/field/text/TextField.view.js +40 -60
  665. package/dist/field/time/TimeField.js +3 -3
  666. package/dist/field/time/TimeField.view.d.ts +3 -3
  667. package/dist/field/time/TimeField.view.js +30 -30
  668. package/dist/field/view/View.js +1 -1
  669. package/dist/field/views.d.ts +2 -0
  670. package/dist/field/views.js +65 -0
  671. package/dist/field.d.ts +1 -0
  672. package/dist/field.js +3 -1
  673. package/dist/index.css +7034 -3625
  674. package/dist/index.js +1 -1
  675. package/dist/inter-latin-500-normal-JSHNAZJU.woff2 +0 -0
  676. package/dist/inter-latin-ext-500-normal-5ARINTHO.woff2 +0 -0
  677. package/dist/next.cjs +19 -9
  678. package/dist/next.edge.js +1 -1
  679. package/dist/next.js +1 -1
  680. package/dist/picker/entry/EntryPicker.d.ts +9 -4
  681. package/dist/picker/entry/EntryPicker.js +97 -19
  682. package/dist/picker/entry/EntryReference.d.ts +4 -0
  683. package/dist/picker/entry/EntryReference.js +3 -1
  684. package/dist/picker/url/UrlPicker.js +2 -12
  685. package/dist/preview/ChunkCookieValue.js +1 -1
  686. package/dist/preview/PreviewCookies.js +1 -1
  687. package/dist/preview/PreviewMessage.js +1 -1
  688. package/dist/preview/PreviewPayload.js +237 -10
  689. package/dist/preview/RegisterPreview.js +1 -1
  690. package/dist/preview/react.js +10 -3
  691. package/dist/preview/widget.js +1 -1
  692. package/dist/query.d.ts +116 -92
  693. package/dist/query.js +7 -1
  694. package/dist/types.d.ts +1 -0
  695. package/dist/ui/Link.d.ts +6 -5
  696. package/dist/ui/Link.js +37 -13
  697. package/dist/ui/RichText.d.ts +37 -11
  698. package/dist/ui/RichText.js +81 -44
  699. package/dist/ui/Stack.d.ts +11 -22
  700. package/dist/ui/Stack.js +54 -67
  701. package/dist/ui/icons/IcAlignCenter.d.ts +4 -2
  702. package/dist/ui/icons/IcAlignCenter.js +6 -12
  703. package/dist/ui/icons/IcOutlineGridView.d.ts +3 -2
  704. package/dist/ui/icons/IcOutlineGridView.js +3 -11
  705. package/dist/ui/icons/IcOutlineSettings.d.ts +3 -2
  706. package/dist/ui/icons/IcOutlineSettings.js +3 -11
  707. package/dist/ui/icons/IcRoundAccountTree.d.ts +4 -2
  708. package/dist/ui/icons/IcRoundAccountTree.js +6 -22
  709. package/dist/ui/icons/IcRoundClose.d.ts +4 -2
  710. package/dist/ui/icons/IcRoundClose.js +6 -12
  711. package/dist/ui/icons/IcRoundCode.d.ts +4 -2
  712. package/dist/ui/icons/IcRoundCode.js +6 -12
  713. package/dist/ui/icons/IcRoundDateRange.d.ts +3 -2
  714. package/dist/ui/icons/IcRoundDateRange.js +3 -11
  715. package/dist/ui/icons/IcRoundDelete.d.ts +4 -2
  716. package/dist/ui/icons/IcRoundDelete.js +6 -12
  717. package/dist/ui/icons/IcRoundEdit.d.ts +4 -2
  718. package/dist/ui/icons/IcRoundEdit.js +6 -12
  719. package/dist/ui/icons/IcRoundFormatListNumbered.d.ts +3 -2
  720. package/dist/ui/icons/IcRoundFormatListNumbered.js +3 -11
  721. package/dist/ui/icons/IcRoundLink.d.ts +4 -2
  722. package/dist/ui/icons/IcRoundLink.js +6 -12
  723. package/dist/ui/icons/IcRoundOpenInNew.d.ts +4 -2
  724. package/dist/ui/icons/IcRoundOpenInNew.js +6 -12
  725. package/dist/ui/icons/IcRoundPanorama.d.ts +4 -2
  726. package/dist/ui/icons/IcRoundPanorama.js +6 -6
  727. package/dist/ui/icons/IcRoundRefresh.d.ts +3 -2
  728. package/dist/ui/icons/IcRoundRefresh.js +3 -11
  729. package/dist/ui/icons/IcRoundSave.d.ts +4 -2
  730. package/dist/ui/icons/IcRoundSave.js +6 -22
  731. package/dist/ui/icons/IcRoundSearch.d.ts +4 -2
  732. package/dist/ui/icons/IcRoundSearch.js +6 -12
  733. package/dist/ui/icons/IcRoundShare.d.ts +4 -2
  734. package/dist/ui/icons/IcRoundShare.js +6 -12
  735. package/dist/ui/icons/IcRoundSync.d.ts +4 -2
  736. package/dist/ui/icons/IcRoundSync.js +6 -22
  737. package/dist/ui/icons/MaterialSymbolsDatabase.d.ts +4 -2
  738. package/dist/ui/icons/MaterialSymbolsDatabase.js +6 -22
  739. package/dist/ui/icons/TableInsert.d.ts +4 -2
  740. package/dist/ui/icons/TableInsert.js +6 -12
  741. package/dist/ui/util/ImageBlurUrl.js +1 -1
  742. package/dist/ui.d.ts +0 -8
  743. package/dist/ui.js +0 -8
  744. package/package.json +49 -64
  745. package/dist/backend/router/Proxy.d.ts +0 -1
  746. package/dist/backend/router/Proxy.js +0 -32
  747. package/dist/chunks/chunk-2NTSADJL.js +0 -20
  748. package/dist/chunks/chunk-2STBQ2Y4.js +0 -166
  749. package/dist/chunks/chunk-2X5P2RZV.js +0 -94
  750. package/dist/chunks/chunk-3DIW62EI.js +0 -2900
  751. package/dist/chunks/chunk-3TNMMA3W.js +0 -249
  752. package/dist/chunks/chunk-467JA2PB.js +0 -29
  753. package/dist/chunks/chunk-5LTN67OE.js +0 -51
  754. package/dist/chunks/chunk-76QF5YTJ.js +0 -107
  755. package/dist/chunks/chunk-A5O3N2GS.js +0 -63
  756. package/dist/chunks/chunk-AICQFCVN.js +0 -19
  757. package/dist/chunks/chunk-AJJSW27C.js +0 -728
  758. package/dist/chunks/chunk-C53YJRET.js +0 -112
  759. package/dist/chunks/chunk-CKT37OYJ.js +0 -9
  760. package/dist/chunks/chunk-F2HHHLEQ.js +0 -72
  761. package/dist/chunks/chunk-FKWEJTSK.js +0 -16282
  762. package/dist/chunks/chunk-G2AFWRAD.js +0 -12
  763. package/dist/chunks/chunk-HSIHEWFC.js +0 -101
  764. package/dist/chunks/chunk-I26ZIF6Q.js +0 -360
  765. package/dist/chunks/chunk-JL5K3F7X.js +0 -1116
  766. package/dist/chunks/chunk-NZLE2WMY.js +0 -35
  767. package/dist/chunks/chunk-ORDS5C6Z.js +0 -83
  768. package/dist/chunks/chunk-PNILF4WM.js +0 -251
  769. package/dist/chunks/chunk-QUIANN6B.js +0 -8001
  770. package/dist/chunks/chunk-RSX2DILK.js +0 -335
  771. package/dist/chunks/chunk-SKF4L7JN.js +0 -401
  772. package/dist/chunks/chunk-SOTBYUJY.js +0 -120
  773. package/dist/chunks/chunk-TOJF2G3X.js +0 -96
  774. package/dist/chunks/chunk-TPUTTEHF.js +0 -3002
  775. package/dist/chunks/chunk-VUACWPFC.js +0 -892
  776. package/dist/chunks/chunk-WD7H5L2L.js +0 -168
  777. package/dist/chunks/chunk-WDCPVJJC.js +0 -341
  778. package/dist/chunks/chunk-WJ67RR7S.js +0 -554
  779. package/dist/chunks/chunk-WKC37UOZ.js +0 -143
  780. package/dist/chunks/chunk-WLKPH7JA.js +0 -2786
  781. package/dist/chunks/chunk-YWCPLD22.js +0 -2343
  782. package/dist/chunks/crypto-HZTUU327.js +0 -11
  783. package/dist/cloud/view/CloudAuth.browser.d.ts +0 -2
  784. package/dist/cloud/view/CloudAuth.browser.js +0 -111
  785. package/dist/cloud/view/CloudAuth.d.ts +0 -1
  786. package/dist/cloud/view/CloudAuth.js +0 -9
  787. package/dist/core/Doc.d.ts +0 -11
  788. package/dist/core/Doc.js +0 -44
  789. package/dist/core/Role.test.d.ts +0 -1
  790. package/dist/core/Shape.d.ts +0 -19
  791. package/dist/core/Trigger.test.d.ts +0 -1
  792. package/dist/core/Type.test.d.ts +0 -1
  793. package/dist/core/db/EntryIndex.test.d.ts +0 -1
  794. package/dist/core/db/EntryResolver.test.d.ts +0 -1
  795. package/dist/core/db/LocalDB.test.d.ts +0 -1
  796. package/dist/core/field/RichTextField.test.d.ts +0 -1
  797. package/dist/core/shape/ListShape.test.d.ts +0 -1
  798. package/dist/core/shape/RecordShape.d.ts +0 -26
  799. package/dist/core/shape/RecordShape.js +0 -102
  800. package/dist/core/shape/RecordShape.test.d.ts +0 -1
  801. package/dist/core/shape/RichTextShape.d.ts +0 -75
  802. package/dist/core/shape/RichTextShape.js +0 -435
  803. package/dist/core/shape/RichTextShape.test.d.ts +0 -1
  804. package/dist/core/shape/ScalarShape.d.ts +0 -20
  805. package/dist/core/shape/ScalarShape.js +0 -53
  806. package/dist/core/shape/ScalarShape.test.d.ts +0 -1
  807. package/dist/core/shape/UnionShape.d.ts +0 -34
  808. package/dist/core/shape/UnionShape.js +0 -141
  809. package/dist/core/shape/UnionShape.test.d.ts +0 -1
  810. package/dist/core/source/CombinedSource.test.d.ts +0 -1
  811. package/dist/core/source/FSSource.test.d.ts +0 -1
  812. package/dist/core/source/FilePatch.test.d.ts +0 -1
  813. package/dist/core/source/GitDelta.test.d.ts +0 -1
  814. package/dist/core/source/GitUtils.test.d.ts +0 -1
  815. package/dist/core/source/GithubSource.test.d.ts +0 -1
  816. package/dist/core/source/IndexedDBSource.test.d.ts +0 -1
  817. package/dist/core/source/MemorySource.test.d.ts +0 -1
  818. package/dist/core/source/SourceExport.test.d.ts +0 -1
  819. package/dist/core/source/Tree.test.d.ts +0 -1
  820. package/dist/core/source/Utils.test.d.ts +0 -1
  821. package/dist/core/util/CodeGen.test.d.ts +0 -1
  822. package/dist/core/util/EntryFilenames.test.d.ts +0 -1
  823. package/dist/core/util/JWT.test.d.ts +0 -1
  824. package/dist/core/util/Paths.test.d.ts +0 -1
  825. package/dist/core/util/Slugs.test.d.ts +0 -1
  826. package/dist/dashboard/DashboardNav.d.ts +0 -22
  827. package/dist/dashboard/DashboardNav.js +0 -44
  828. package/dist/dashboard/DashboardProvider.d.ts +0 -16
  829. package/dist/dashboard/DashboardProvider.js +0 -28
  830. package/dist/dashboard/Routes.d.ts +0 -111
  831. package/dist/dashboard/Routes.js +0 -78
  832. package/dist/dashboard/Welcome.d.ts +0 -1
  833. package/dist/dashboard/Welcome.js +0 -21
  834. package/dist/dashboard/atoms/DashboardAtoms.d.ts +0 -18
  835. package/dist/dashboard/atoms/DashboardAtoms.js +0 -86
  836. package/dist/dashboard/atoms/DbAtoms.d.ts +0 -5
  837. package/dist/dashboard/atoms/DbAtoms.js +0 -95
  838. package/dist/dashboard/atoms/Edits.d.ts +0 -31
  839. package/dist/dashboard/atoms/Edits.js +0 -93
  840. package/dist/dashboard/atoms/EntryAtoms.d.ts +0 -34
  841. package/dist/dashboard/atoms/EntryAtoms.js +0 -298
  842. package/dist/dashboard/atoms/EntryEditorAtoms.d.ts +0 -255
  843. package/dist/dashboard/atoms/EntryEditorAtoms.js +0 -629
  844. package/dist/dashboard/atoms/EntrySummaryAtoms.d.ts +0 -21
  845. package/dist/dashboard/atoms/EntrySummaryAtoms.js +0 -58
  846. package/dist/dashboard/atoms/ErrorAtoms.d.ts +0 -4
  847. package/dist/dashboard/atoms/ErrorAtoms.js +0 -18
  848. package/dist/dashboard/atoms/FormAtoms.d.ts +0 -56
  849. package/dist/dashboard/atoms/FormAtoms.js +0 -189
  850. package/dist/dashboard/atoms/LocationAtoms.d.ts +0 -25
  851. package/dist/dashboard/atoms/LocationAtoms.js +0 -104
  852. package/dist/dashboard/atoms/NavigationAtoms.d.ts +0 -38
  853. package/dist/dashboard/atoms/NavigationAtoms.js +0 -124
  854. package/dist/dashboard/atoms/PolicyAtom.d.ts +0 -6
  855. package/dist/dashboard/atoms/PolicyAtom.js +0 -29
  856. package/dist/dashboard/atoms/PreferencesAtoms.d.ts +0 -16
  857. package/dist/dashboard/atoms/PreferencesAtoms.js +0 -53
  858. package/dist/dashboard/atoms/RouterAtoms.d.ts +0 -78
  859. package/dist/dashboard/atoms/RouterAtoms.js +0 -161
  860. package/dist/dashboard/atoms/StyleAtoms.d.ts +0 -1
  861. package/dist/dashboard/atoms/StyleAtoms.js +0 -14
  862. package/dist/dashboard/atoms/YAtom.d.ts +0 -2
  863. package/dist/dashboard/atoms/YAtom.js +0 -24
  864. package/dist/dashboard/editor/DefaultViews.d.ts +0 -19
  865. package/dist/dashboard/editor/DefaultViews.js +0 -52
  866. package/dist/dashboard/editor/InputForm.d.ts +0 -26
  867. package/dist/dashboard/editor/InputForm.js +0 -53
  868. package/dist/dashboard/editor/ViewKeys.d.ts +0 -23
  869. package/dist/dashboard/editor/ViewKeys.js +0 -29
  870. package/dist/dashboard/hook/UseConfig.d.ts +0 -1
  871. package/dist/dashboard/hook/UseConfig.js +0 -12
  872. package/dist/dashboard/hook/UseDashboard.d.ts +0 -1
  873. package/dist/dashboard/hook/UseDashboard.js +0 -12
  874. package/dist/dashboard/hook/UseDb.d.ts +0 -2
  875. package/dist/dashboard/hook/UseDb.js +0 -14
  876. package/dist/dashboard/hook/UseDebounce.d.ts +0 -1
  877. package/dist/dashboard/hook/UseDebounce.js +0 -23
  878. package/dist/dashboard/hook/UseEntryLocation.d.ts +0 -1
  879. package/dist/dashboard/hook/UseEntryLocation.js +0 -12
  880. package/dist/dashboard/hook/UseEntrySummary.d.ts +0 -1
  881. package/dist/dashboard/hook/UseEntrySummary.js +0 -16
  882. package/dist/dashboard/hook/UseExplorer.d.ts +0 -14
  883. package/dist/dashboard/hook/UseExplorer.js +0 -13
  884. package/dist/dashboard/hook/UseFocusList.d.ts +0 -14
  885. package/dist/dashboard/hook/UseFocusList.js +0 -113
  886. package/dist/dashboard/hook/UseNav.d.ts +0 -10
  887. package/dist/dashboard/hook/UseNav.js +0 -12
  888. package/dist/dashboard/hook/UsePolicy.d.ts +0 -1
  889. package/dist/dashboard/hook/UsePolicy.js +0 -14
  890. package/dist/dashboard/hook/UsePreferences.d.ts +0 -6
  891. package/dist/dashboard/hook/UsePreferences.js +0 -30
  892. package/dist/dashboard/hook/UseSession.d.ts +0 -1
  893. package/dist/dashboard/hook/UseSession.js +0 -12
  894. package/dist/dashboard/hook/UseUploads.d.ts +0 -42
  895. package/dist/dashboard/hook/UseUploads.js +0 -91
  896. package/dist/dashboard/pages/ContentView.d.ts +0 -5
  897. package/dist/dashboard/pages/ContentView.js +0 -96
  898. package/dist/dashboard/util/Atoms.d.ts +0 -2
  899. package/dist/dashboard/util/Atoms.js +0 -21
  900. package/dist/dashboard/util/DebounceAtom.d.ts +0 -2
  901. package/dist/dashboard/util/DebounceAtom.js +0 -26
  902. package/dist/dashboard/util/HashRouter.d.ts +0 -1
  903. package/dist/dashboard/util/HashRouter.js +0 -2
  904. package/dist/dashboard/util/Head.d.ts +0 -2
  905. package/dist/dashboard/util/Head.js +0 -10
  906. package/dist/dashboard/util/KeepInView.d.ts +0 -2
  907. package/dist/dashboard/util/KeepInView.js +0 -19
  908. package/dist/dashboard/util/KeepPreviousData.d.ts +0 -9
  909. package/dist/dashboard/util/KeepPreviousData.js +0 -32
  910. package/dist/dashboard/util/Loader.d.ts +0 -17
  911. package/dist/dashboard/util/Loader.js +0 -31
  912. package/dist/dashboard/util/SuspenseBoundary.d.ts +0 -4
  913. package/dist/dashboard/util/SuspenseBoundary.js +0 -23
  914. package/dist/dashboard/util/WithResolvers.d.ts +0 -2
  915. package/dist/dashboard/util/WithResolvers.js +0 -16
  916. package/dist/dashboard/view/AlineaLogo.d.ts +0 -2
  917. package/dist/dashboard/view/AlineaLogo.js +0 -16
  918. package/dist/dashboard/view/Breadcrumbs.d.ts +0 -3
  919. package/dist/dashboard/view/Breadcrumbs.js +0 -33
  920. package/dist/dashboard/view/Create.d.ts +0 -13
  921. package/dist/dashboard/view/Create.js +0 -75
  922. package/dist/dashboard/view/EntryEdit.d.ts +0 -5
  923. package/dist/dashboard/view/EntryEdit.js +0 -222
  924. package/dist/dashboard/view/EntryTree.d.ts +0 -5
  925. package/dist/dashboard/view/EntryTree.js +0 -1463
  926. package/dist/dashboard/view/ErrorBoundary.d.ts +0 -6
  927. package/dist/dashboard/view/ErrorBoundary.js +0 -95
  928. package/dist/dashboard/view/IconButton.d.ts +0 -18
  929. package/dist/dashboard/view/IconButton.js +0 -51
  930. package/dist/dashboard/view/InputLabel.d.ts +0 -36
  931. package/dist/dashboard/view/InputLabel.js +0 -151
  932. package/dist/dashboard/view/MediaExplorer.d.ts +0 -7
  933. package/dist/dashboard/view/MediaExplorer.js +0 -121
  934. package/dist/dashboard/view/Modal.d.ts +0 -8
  935. package/dist/dashboard/view/Modal.js +0 -63
  936. package/dist/dashboard/view/PageHeader.d.ts +0 -5
  937. package/dist/dashboard/view/PageHeader.js +0 -26
  938. package/dist/dashboard/view/Preview.d.ts +0 -3
  939. package/dist/dashboard/view/Preview.js +0 -20
  940. package/dist/dashboard/view/RootOverview.d.ts +0 -5
  941. package/dist/dashboard/view/RootOverview.js +0 -46
  942. package/dist/dashboard/view/SearchBox.d.ts +0 -1
  943. package/dist/dashboard/view/SearchBox.js +0 -126
  944. package/dist/dashboard/view/Sidebar.d.ts +0 -21
  945. package/dist/dashboard/view/Sidebar.js +0 -312
  946. package/dist/dashboard/view/Toolbar.d.ts +0 -9
  947. package/dist/dashboard/view/Toolbar.js +0 -240
  948. package/dist/dashboard/view/Viewport.d.ts +0 -8
  949. package/dist/dashboard/view/Viewport.js +0 -69
  950. package/dist/dashboard/view/WorkspaceLabel.d.ts +0 -7
  951. package/dist/dashboard/view/WorkspaceLabel.js +0 -32
  952. package/dist/dashboard/view/diff/ChangeBox.d.ts +0 -14
  953. package/dist/dashboard/view/diff/ChangeBox.js +0 -36
  954. package/dist/dashboard/view/diff/DiffUtils.d.ts +0 -16
  955. package/dist/dashboard/view/diff/DiffUtils.js +0 -82
  956. package/dist/dashboard/view/diff/DiffUtils.test.d.ts +0 -1
  957. package/dist/dashboard/view/diff/EntryDiff.d.ts +0 -6
  958. package/dist/dashboard/view/diff/EntryDiff.js +0 -45
  959. package/dist/dashboard/view/diff/FieldDiff.d.ts +0 -10
  960. package/dist/dashboard/view/diff/FieldDiff.js +0 -51
  961. package/dist/dashboard/view/diff/FieldsDiff.d.ts +0 -7
  962. package/dist/dashboard/view/diff/FieldsDiff.js +0 -24
  963. package/dist/dashboard/view/diff/ListDiff.d.ts +0 -10
  964. package/dist/dashboard/view/diff/ListDiff.js +0 -32
  965. package/dist/dashboard/view/diff/RichTextDiff.d.ts +0 -11
  966. package/dist/dashboard/view/diff/RichTextDiff.js +0 -94
  967. package/dist/dashboard/view/diff/ScalarDiff.d.ts +0 -5
  968. package/dist/dashboard/view/diff/ScalarDiff.js +0 -1520
  969. package/dist/dashboard/view/entry/EditModeToggle.d.ts +0 -9
  970. package/dist/dashboard/view/entry/EditModeToggle.js +0 -51
  971. package/dist/dashboard/view/entry/EntryHeader.d.ts +0 -5
  972. package/dist/dashboard/view/entry/EntryHeader.js +0 -414
  973. package/dist/dashboard/view/entry/EntryHistory.d.ts +0 -2
  974. package/dist/dashboard/view/entry/EntryHistory.js +0 -78
  975. package/dist/dashboard/view/entry/EntryNotice.d.ts +0 -7
  976. package/dist/dashboard/view/entry/EntryNotice.js +0 -44
  977. package/dist/dashboard/view/entry/EntryPreview.d.ts +0 -10
  978. package/dist/dashboard/view/entry/EntryPreview.js +0 -44
  979. package/dist/dashboard/view/entry/EntrySummary.d.ts +0 -3
  980. package/dist/dashboard/view/entry/EntrySummary.js +0 -75
  981. package/dist/dashboard/view/entry/EntryTitle.d.ts +0 -7
  982. package/dist/dashboard/view/entry/EntryTitle.js +0 -64
  983. package/dist/dashboard/view/entry/FieldToolbar.d.ts +0 -11
  984. package/dist/dashboard/view/entry/FieldToolbar.js +0 -41
  985. package/dist/dashboard/view/entry/LangSwitch.d.ts +0 -7
  986. package/dist/dashboard/view/entry/LangSwitch.js +0 -110
  987. package/dist/dashboard/view/entry/NewEntry.d.ts +0 -4
  988. package/dist/dashboard/view/entry/NewEntry.js +0 -288
  989. package/dist/dashboard/view/entry/RootHeader.d.ts +0 -4
  990. package/dist/dashboard/view/entry/RootHeader.js +0 -61
  991. package/dist/dashboard/view/explorer/Explorer.d.ts +0 -24
  992. package/dist/dashboard/view/explorer/Explorer.js +0 -2230
  993. package/dist/dashboard/view/explorer/ExplorerItem.d.ts +0 -11
  994. package/dist/dashboard/view/explorer/ExplorerItem.js +0 -128
  995. package/dist/dashboard/view/explorer/ExplorerRow.d.ts +0 -15
  996. package/dist/dashboard/view/explorer/ExplorerRow.js +0 -73
  997. package/dist/dashboard/view/media/CardOverview.d.ts +0 -1
  998. package/dist/dashboard/view/media/CardOverview.js +0 -10
  999. package/dist/dashboard/view/media/FileEntry.d.ts +0 -6
  1000. package/dist/dashboard/view/media/FileEntry.js +0 -223
  1001. package/dist/dashboard/view/media/FileSummary.d.ts +0 -3
  1002. package/dist/dashboard/view/media/FileSummary.js +0 -102
  1003. package/dist/dashboard/view/media/FileUploadRow.d.ts +0 -2
  1004. package/dist/dashboard/view/media/FileUploadRow.js +0 -53
  1005. package/dist/dashboard/view/media/FileUploader.d.ts +0 -10
  1006. package/dist/dashboard/view/media/FileUploader.js +0 -151
  1007. package/dist/dashboard/view/media/MediaThumbnail.d.ts +0 -11
  1008. package/dist/dashboard/view/media/MediaThumbnail.js +0 -55
  1009. package/dist/dashboard/view/preview/BrowserPreview.d.ts +0 -12
  1010. package/dist/dashboard/view/preview/BrowserPreview.js +0 -210
  1011. package/dist/dashboard/view/sidebar/SidebarSettings.d.ts +0 -1
  1012. package/dist/dashboard/view/sidebar/SidebarSettings.js +0 -192
  1013. package/dist/field/check/CheckField.stories.d.ts +0 -5
  1014. package/dist/field/code/CodeField.stories.d.ts +0 -5
  1015. package/dist/field/date/DateField.stories.d.ts +0 -5
  1016. package/dist/field/json/JsonField.stories.d.ts +0 -5
  1017. package/dist/field/metadata/MetadataField.stories.d.ts +0 -5
  1018. package/dist/field/number/NumberField.stories.d.ts +0 -5
  1019. package/dist/field/object/ObjectField.stories.d.ts +0 -5
  1020. package/dist/field/path/PathField.stories.d.ts +0 -5
  1021. package/dist/field/richtext/RichText.stories.d.ts +0 -5
  1022. package/dist/field/select/SelectField.stories.d.ts +0 -5
  1023. package/dist/field/tabs/Tabs.stories.d.ts +0 -5
  1024. package/dist/field/text/TextField.stories.d.ts +0 -5
  1025. package/dist/field/time/TimeField.stories.d.ts +0 -5
  1026. package/dist/picker/entry/EntryPicker.browser.d.ts +0 -7
  1027. package/dist/picker/entry/EntryPicker.browser.js +0 -373
  1028. package/dist/picker/entry/EntryPicker.stories.d.ts +0 -2
  1029. package/dist/picker/entry/EntryPickerRow.d.ts +0 -5
  1030. package/dist/picker/entry/EntryPickerRow.js +0 -24
  1031. package/dist/picker/url/UrlPicker.browser.d.ts +0 -6
  1032. package/dist/picker/url/UrlPicker.browser.js +0 -83
  1033. package/dist/picker/url/UrlPicker.stories.d.ts +0 -5
  1034. package/dist/picker/url/UrlPickerRow.d.ts +0 -5
  1035. package/dist/picker/url/UrlPickerRow.js +0 -38
  1036. package/dist/preview/ChunkCookieValue.test.d.ts +0 -1
  1037. package/dist/preview/PreviewPayload.test.d.ts +0 -1
  1038. package/dist/test/EntryFixture.d.ts +0 -30
  1039. package/dist/test/EntryFixture.js +0 -91
  1040. package/dist/test/broken-index.test.d.ts +0 -1
  1041. package/dist/test/cms.d.ts +0 -17
  1042. package/dist/test/cms.js +0 -38
  1043. package/dist/test/drafts.test.d.ts +0 -1
  1044. package/dist/test/example.d.ts +0 -137
  1045. package/dist/test/example.js +0 -230
  1046. package/dist/test/insert-order.test.d.ts +0 -1
  1047. package/dist/test/links.test.d.ts +0 -1
  1048. package/dist/test/locales.test.d.ts +0 -1
  1049. package/dist/test/moves.test.d.ts +0 -1
  1050. package/dist/test/mutate.test.d.ts +0 -1
  1051. package/dist/test/query.test.d.ts +0 -1
  1052. package/dist/test/renames.test.d.ts +0 -1
  1053. package/dist/test/roles.test.d.ts +0 -1
  1054. package/dist/test/schema/DemoHome.d.ts +0 -25
  1055. package/dist/test/schema/DemoHome.js +0 -25
  1056. package/dist/test/schema/DemoRecipe.d.ts +0 -14
  1057. package/dist/test/schema/DemoRecipe.js +0 -22
  1058. package/dist/test/schema/DemoRecipes.d.ts +0 -4
  1059. package/dist/test/schema/DemoRecipes.js +0 -14
  1060. package/dist/test/schema/index.d.ts +0 -3
  1061. package/dist/test/schema/index.js +0 -4
  1062. package/dist/test/seeding.test.d.ts +0 -1
  1063. package/dist/test/shared.test.d.ts +0 -1
  1064. package/dist/test/status.test.d.ts +0 -1
  1065. package/dist/test/uploads.test.d.ts +0 -1
  1066. package/dist/ui/AppBar.d.ts +0 -14
  1067. package/dist/ui/AppBar.js +0 -68
  1068. package/dist/ui/Avatar.d.ts +0 -6
  1069. package/dist/ui/Avatar.js +0 -33
  1070. package/dist/ui/Badge.d.ts +0 -9
  1071. package/dist/ui/Badge.js +0 -44
  1072. package/dist/ui/Button.d.ts +0 -9
  1073. package/dist/ui/Button.js +0 -57
  1074. package/dist/ui/Button.stories.d.ts +0 -6
  1075. package/dist/ui/Chip.d.ts +0 -8
  1076. package/dist/ui/Chip.js +0 -46
  1077. package/dist/ui/DropdownMenu.d.ts +0 -12
  1078. package/dist/ui/DropdownMenu.js +0 -415
  1079. package/dist/ui/Ellipsis.d.ts +0 -2
  1080. package/dist/ui/Ellipsis.js +0 -33
  1081. package/dist/ui/ErrorMessage.d.ts +0 -4
  1082. package/dist/ui/ErrorMessage.js +0 -17
  1083. package/dist/ui/Icon.d.ts +0 -9
  1084. package/dist/ui/Icon.js +0 -41
  1085. package/dist/ui/Lift.d.ts +0 -3
  1086. package/dist/ui/Lift.js +0 -22
  1087. package/dist/ui/Loader.d.ts +0 -8
  1088. package/dist/ui/Loader.js +0 -32
  1089. package/dist/ui/Main.d.ts +0 -12
  1090. package/dist/ui/Main.js +0 -56
  1091. package/dist/ui/Pane.d.ts +0 -9
  1092. package/dist/ui/Pane.js +0 -132
  1093. package/dist/ui/PopoverMenu.d.ts +0 -12
  1094. package/dist/ui/PopoverMenu.js +0 -418
  1095. package/dist/ui/Property.d.ts +0 -1
  1096. package/dist/ui/Property.js +0 -7
  1097. package/dist/ui/Sink.d.ts +0 -9
  1098. package/dist/ui/Sink.js +0 -49
  1099. package/dist/ui/Statusbar.d.ts +0 -15
  1100. package/dist/ui/Statusbar.js +0 -54
  1101. package/dist/ui/Tabs.d.ts +0 -11
  1102. package/dist/ui/Tabs.js +0 -293
  1103. package/dist/ui/TextLabel.d.ts +0 -5
  1104. package/dist/ui/TextLabel.js +0 -10
  1105. package/dist/ui/Typo.d.ts +0 -35
  1106. package/dist/ui/Typo.js +0 -28
  1107. package/dist/ui/UIStory.d.ts +0 -8
  1108. package/dist/ui/branding/FavIcon.d.ts +0 -5
  1109. package/dist/ui/branding/FavIcon.js +0 -56
  1110. package/dist/ui/branding/LogoShape.d.ts +0 -6
  1111. package/dist/ui/branding/LogoShape.js +0 -52
  1112. package/dist/ui/hook/UseAutoHide.d.ts +0 -8
  1113. package/dist/ui/hook/UseAutoHide.js +0 -43
  1114. package/dist/ui/hook/UseColorScheme.d.ts +0 -4
  1115. package/dist/ui/hook/UseColorScheme.js +0 -13
  1116. package/dist/ui/hook/UseContrastColor.d.ts +0 -1
  1117. package/dist/ui/hook/UseContrastColor.js +0 -12
  1118. package/dist/ui/hook/UseElementSize.d.ts +0 -6
  1119. package/dist/ui/hook/UseElementSize.js +0 -52
  1120. package/dist/ui/hook/UseForceUpdate.d.ts +0 -1
  1121. package/dist/ui/hook/UseForceUpdate.js +0 -11
  1122. package/dist/ui/hook/UseHash.d.ts +0 -1
  1123. package/dist/ui/hook/UseHash.js +0 -24
  1124. package/dist/ui/hook/UseInitialEffect.d.ts +0 -2
  1125. package/dist/ui/hook/UseInitialEffect.js +0 -15
  1126. package/dist/ui/hook/UseLocalStorage.d.ts +0 -1
  1127. package/dist/ui/hook/UseLocalStorage.js +0 -36
  1128. package/dist/ui/hook/UseNonInitialEffect.d.ts +0 -2
  1129. package/dist/ui/hook/UseNonInitialEffect.js +0 -17
  1130. package/dist/ui/hook/UseTrigger.d.ts +0 -7
  1131. package/dist/ui/hook/UseTrigger.js +0 -29
  1132. package/dist/ui/icons/IcAlignJustify.d.ts +0 -3
  1133. package/dist/ui/icons/IcAlignJustify.js +0 -18
  1134. package/dist/ui/icons/IcAlignLeft.d.ts +0 -2
  1135. package/dist/ui/icons/IcAlignLeft.js +0 -16
  1136. package/dist/ui/icons/IcAlignRight.d.ts +0 -2
  1137. package/dist/ui/icons/IcAlignRight.js +0 -16
  1138. package/dist/ui/icons/IcBaselineAccountCircle.d.ts +0 -2
  1139. package/dist/ui/icons/IcBaselineAccountCircle.js +0 -26
  1140. package/dist/ui/icons/IcBaselineContentCopy.d.ts +0 -2
  1141. package/dist/ui/icons/IcBaselineContentCopy.js +0 -26
  1142. package/dist/ui/icons/IcBaselineContentPasteGo.d.ts +0 -2
  1143. package/dist/ui/icons/IcBaselineContentPasteGo.js +0 -35
  1144. package/dist/ui/icons/IcBaselineDesktopMac.d.ts +0 -2
  1145. package/dist/ui/icons/IcBaselineDesktopMac.js +0 -16
  1146. package/dist/ui/icons/IcBaselineErrorOutline.d.ts +0 -2
  1147. package/dist/ui/icons/IcBaselineErrorOutline.js +0 -26
  1148. package/dist/ui/icons/IcBaselinePause.d.ts +0 -2
  1149. package/dist/ui/icons/IcBaselinePause.js +0 -20
  1150. package/dist/ui/icons/IcBaselinePhoneIphone.d.ts +0 -2
  1151. package/dist/ui/icons/IcBaselinePhoneIphone.js +0 -16
  1152. package/dist/ui/icons/IcBaselineWifiTethering.d.ts +0 -2
  1153. package/dist/ui/icons/IcBaselineWifiTethering.js +0 -26
  1154. package/dist/ui/icons/IcOutlineArchive.d.ts +0 -2
  1155. package/dist/ui/icons/IcOutlineArchive.js +0 -26
  1156. package/dist/ui/icons/IcOutlineArrowCircleRight.d.ts +0 -2
  1157. package/dist/ui/icons/IcOutlineArrowCircleRight.js +0 -16
  1158. package/dist/ui/icons/IcOutlineAvTimer.d.ts +0 -2
  1159. package/dist/ui/icons/IcOutlineAvTimer.js +0 -26
  1160. package/dist/ui/icons/IcOutlineCloudUpload.d.ts +0 -2
  1161. package/dist/ui/icons/IcOutlineCloudUpload.js +0 -26
  1162. package/dist/ui/icons/IcOutlineDarkMode.d.ts +0 -2
  1163. package/dist/ui/icons/IcOutlineDarkMode.js +0 -16
  1164. package/dist/ui/icons/IcOutlineDescription.d.ts +0 -2
  1165. package/dist/ui/icons/IcOutlineDescription.js +0 -26
  1166. package/dist/ui/icons/IcOutlineDrafts.d.ts +0 -2
  1167. package/dist/ui/icons/IcOutlineDrafts.js +0 -26
  1168. package/dist/ui/icons/IcOutlineFolder.d.ts +0 -2
  1169. package/dist/ui/icons/IcOutlineFolder.js +0 -26
  1170. package/dist/ui/icons/IcOutlineInsertDriveFile.d.ts +0 -2
  1171. package/dist/ui/icons/IcOutlineInsertDriveFile.js +0 -26
  1172. package/dist/ui/icons/IcOutlineKeyboardTab.d.ts +0 -2
  1173. package/dist/ui/icons/IcOutlineKeyboardTab.js +0 -26
  1174. package/dist/ui/icons/IcOutlineLightMode.d.ts +0 -2
  1175. package/dist/ui/icons/IcOutlineLightMode.js +0 -16
  1176. package/dist/ui/icons/IcOutlineList.d.ts +0 -3
  1177. package/dist/ui/icons/IcOutlineList.js +0 -18
  1178. package/dist/ui/icons/IcOutlineLock.d.ts +0 -2
  1179. package/dist/ui/icons/IcOutlineLock.js +0 -26
  1180. package/dist/ui/icons/IcOutlineMoreHoriz.d.ts +0 -3
  1181. package/dist/ui/icons/IcOutlineMoreHoriz.js +0 -18
  1182. package/dist/ui/icons/IcOutlinePreview.d.ts +0 -2
  1183. package/dist/ui/icons/IcOutlinePreview.js +0 -16
  1184. package/dist/ui/icons/IcOutlineRemoveRedEye.d.ts +0 -2
  1185. package/dist/ui/icons/IcOutlineRemoveRedEye.js +0 -26
  1186. package/dist/ui/icons/IcOutlineScreenshot.d.ts +0 -2
  1187. package/dist/ui/icons/IcOutlineScreenshot.js +0 -16
  1188. package/dist/ui/icons/IcOutlineTableRows.d.ts +0 -2
  1189. package/dist/ui/icons/IcOutlineTableRows.js +0 -26
  1190. package/dist/ui/icons/IcRoundAdd.d.ts +0 -2
  1191. package/dist/ui/icons/IcRoundAdd.js +0 -16
  1192. package/dist/ui/icons/IcRoundAddCircle.d.ts +0 -3
  1193. package/dist/ui/icons/IcRoundAddCircle.js +0 -18
  1194. package/dist/ui/icons/IcRoundAddCircleOutline.d.ts +0 -2
  1195. package/dist/ui/icons/IcRoundAddCircleOutline.js +0 -16
  1196. package/dist/ui/icons/IcRoundArchive.d.ts +0 -2
  1197. package/dist/ui/icons/IcRoundArchive.js +0 -16
  1198. package/dist/ui/icons/IcRoundArrowBack.d.ts +0 -2
  1199. package/dist/ui/icons/IcRoundArrowBack.js +0 -16
  1200. package/dist/ui/icons/IcRoundArrowDownward.d.ts +0 -2
  1201. package/dist/ui/icons/IcRoundArrowDownward.js +0 -26
  1202. package/dist/ui/icons/IcRoundArrowDropDown.d.ts +0 -3
  1203. package/dist/ui/icons/IcRoundArrowDropDown.js +0 -18
  1204. package/dist/ui/icons/IcRoundArrowDropDownCircle.d.ts +0 -3
  1205. package/dist/ui/icons/IcRoundArrowDropDownCircle.js +0 -18
  1206. package/dist/ui/icons/IcRoundArrowDropUp.d.ts +0 -3
  1207. package/dist/ui/icons/IcRoundArrowDropUp.js +0 -18
  1208. package/dist/ui/icons/IcRoundArrowForward.d.ts +0 -2
  1209. package/dist/ui/icons/IcRoundArrowForward.js +0 -16
  1210. package/dist/ui/icons/IcRoundArrowUpward.d.ts +0 -2
  1211. package/dist/ui/icons/IcRoundArrowUpward.js +0 -26
  1212. package/dist/ui/icons/IcRoundAttachFile.d.ts +0 -2
  1213. package/dist/ui/icons/IcRoundAttachFile.js +0 -10
  1214. package/dist/ui/icons/IcRoundCheck.d.ts +0 -2
  1215. package/dist/ui/icons/IcRoundCheck.js +0 -16
  1216. package/dist/ui/icons/IcRoundCheckBox.d.ts +0 -2
  1217. package/dist/ui/icons/IcRoundCheckBox.js +0 -16
  1218. package/dist/ui/icons/IcRoundCheckBoxOutlineBlank.d.ts +0 -2
  1219. package/dist/ui/icons/IcRoundCheckBoxOutlineBlank.js +0 -16
  1220. package/dist/ui/icons/IcRoundChevronRight.d.ts +0 -2
  1221. package/dist/ui/icons/IcRoundChevronRight.js +0 -26
  1222. package/dist/ui/icons/IcRoundDescription.d.ts +0 -2
  1223. package/dist/ui/icons/IcRoundDescription.js +0 -26
  1224. package/dist/ui/icons/IcRoundDragHandle.d.ts +0 -3
  1225. package/dist/ui/icons/IcRoundDragHandle.js +0 -18
  1226. package/dist/ui/icons/IcRoundExitToApp.d.ts +0 -2
  1227. package/dist/ui/icons/IcRoundExitToApp.js +0 -26
  1228. package/dist/ui/icons/IcRoundFeed.d.ts +0 -2
  1229. package/dist/ui/icons/IcRoundFeed.js +0 -16
  1230. package/dist/ui/icons/IcRoundFormatBold.d.ts +0 -3
  1231. package/dist/ui/icons/IcRoundFormatBold.js +0 -18
  1232. package/dist/ui/icons/IcRoundFormatClear.d.ts +0 -3
  1233. package/dist/ui/icons/IcRoundFormatClear.js +0 -18
  1234. package/dist/ui/icons/IcRoundFormatItalic.d.ts +0 -3
  1235. package/dist/ui/icons/IcRoundFormatItalic.js +0 -18
  1236. package/dist/ui/icons/IcRoundFormatListBulleted.d.ts +0 -3
  1237. package/dist/ui/icons/IcRoundFormatListBulleted.js +0 -18
  1238. package/dist/ui/icons/IcRoundFormatPaint.d.ts +0 -2
  1239. package/dist/ui/icons/IcRoundFormatPaint.js +0 -10
  1240. package/dist/ui/icons/IcRoundHamburger.d.ts +0 -3
  1241. package/dist/ui/icons/IcRoundHamburger.js +0 -18
  1242. package/dist/ui/icons/IcRoundHdrStrong.d.ts +0 -3
  1243. package/dist/ui/icons/IcRoundHdrStrong.js +0 -18
  1244. package/dist/ui/icons/IcRoundHorizontalRule.d.ts +0 -3
  1245. package/dist/ui/icons/IcRoundHorizontalRule.js +0 -19
  1246. package/dist/ui/icons/IcRoundInsertDriveFile.d.ts +0 -2
  1247. package/dist/ui/icons/IcRoundInsertDriveFile.js +0 -16
  1248. package/dist/ui/icons/IcRoundKeyboardArrowDown.d.ts +0 -2
  1249. package/dist/ui/icons/IcRoundKeyboardArrowDown.js +0 -16
  1250. package/dist/ui/icons/IcRoundKeyboardArrowLeft.d.ts +0 -3
  1251. package/dist/ui/icons/IcRoundKeyboardArrowLeft.js +0 -18
  1252. package/dist/ui/icons/IcRoundKeyboardArrowRight.d.ts +0 -2
  1253. package/dist/ui/icons/IcRoundKeyboardArrowRight.js +0 -16
  1254. package/dist/ui/icons/IcRoundKeyboardArrowUp.d.ts +0 -2
  1255. package/dist/ui/icons/IcRoundKeyboardArrowUp.js +0 -16
  1256. package/dist/ui/icons/IcRoundLanguage.d.ts +0 -2
  1257. package/dist/ui/icons/IcRoundLanguage.js +0 -16
  1258. package/dist/ui/icons/IcRoundLastPage.d.ts +0 -2
  1259. package/dist/ui/icons/IcRoundLastPage.js +0 -26
  1260. package/dist/ui/icons/IcRoundLock.d.ts +0 -3
  1261. package/dist/ui/icons/IcRoundLock.js +0 -18
  1262. package/dist/ui/icons/IcRoundMenu.d.ts +0 -2
  1263. package/dist/ui/icons/IcRoundMenu.js +0 -16
  1264. package/dist/ui/icons/IcRoundMoreHoriz.d.ts +0 -2
  1265. package/dist/ui/icons/IcRoundMoreHoriz.js +0 -16
  1266. package/dist/ui/icons/IcRoundMoreVert.d.ts +0 -2
  1267. package/dist/ui/icons/IcRoundMoreVert.js +0 -26
  1268. package/dist/ui/icons/IcRoundNorthEast.d.ts +0 -2
  1269. package/dist/ui/icons/IcRoundNorthEast.js +0 -16
  1270. package/dist/ui/icons/IcRoundNotes.d.ts +0 -2
  1271. package/dist/ui/icons/IcRoundNotes.js +0 -16
  1272. package/dist/ui/icons/IcRoundNumbers.d.ts +0 -2
  1273. package/dist/ui/icons/IcRoundNumbers.js +0 -16
  1274. package/dist/ui/icons/IcRoundPermMedia.d.ts +0 -2
  1275. package/dist/ui/icons/IcRoundPermMedia.js +0 -25
  1276. package/dist/ui/icons/IcRoundPublish.d.ts +0 -2
  1277. package/dist/ui/icons/IcRoundPublish.js +0 -16
  1278. package/dist/ui/icons/IcRoundPublishedWithChanges.d.ts +0 -2
  1279. package/dist/ui/icons/IcRoundPublishedWithChanges.js +0 -26
  1280. package/dist/ui/icons/IcRoundQuote.d.ts +0 -2
  1281. package/dist/ui/icons/IcRoundQuote.js +0 -16
  1282. package/dist/ui/icons/IcRoundRedo.d.ts +0 -3
  1283. package/dist/ui/icons/IcRoundRedo.js +0 -18
  1284. package/dist/ui/icons/IcRoundRemoveCircleOutline.d.ts +0 -2
  1285. package/dist/ui/icons/IcRoundRemoveCircleOutline.js +0 -16
  1286. package/dist/ui/icons/IcRoundRotateLeft.d.ts +0 -2
  1287. package/dist/ui/icons/IcRoundRotateLeft.js +0 -16
  1288. package/dist/ui/icons/IcRoundSend.d.ts +0 -2
  1289. package/dist/ui/icons/IcRoundSend.js +0 -26
  1290. package/dist/ui/icons/IcRoundSouthWest.d.ts +0 -2
  1291. package/dist/ui/icons/IcRoundSouthWest.js +0 -16
  1292. package/dist/ui/icons/IcRoundSubscript.d.ts +0 -2
  1293. package/dist/ui/icons/IcRoundSubscript.js +0 -26
  1294. package/dist/ui/icons/IcRoundSuperscript.d.ts +0 -2
  1295. package/dist/ui/icons/IcRoundSuperscript.js +0 -26
  1296. package/dist/ui/icons/IcRoundTabletMac.d.ts +0 -2
  1297. package/dist/ui/icons/IcRoundTabletMac.js +0 -16
  1298. package/dist/ui/icons/IcRoundTextFields.d.ts +0 -2
  1299. package/dist/ui/icons/IcRoundTextFields.js +0 -16
  1300. package/dist/ui/icons/IcRoundTranslate.d.ts +0 -2
  1301. package/dist/ui/icons/IcRoundTranslate.js +0 -26
  1302. package/dist/ui/icons/IcRoundUndo.d.ts +0 -3
  1303. package/dist/ui/icons/IcRoundUndo.js +0 -18
  1304. package/dist/ui/icons/IcRoundUnfoldLess.d.ts +0 -2
  1305. package/dist/ui/icons/IcRoundUnfoldLess.js +0 -26
  1306. package/dist/ui/icons/IcRoundUnfoldMore.d.ts +0 -2
  1307. package/dist/ui/icons/IcRoundUnfoldMore.js +0 -16
  1308. package/dist/ui/icons/IcRoundUploadFile.d.ts +0 -3
  1309. package/dist/ui/icons/IcRoundUploadFile.js +0 -18
  1310. package/dist/ui/icons/IcRoundVisibilityOff.d.ts +0 -2
  1311. package/dist/ui/icons/IcRoundVisibilityOff.js +0 -16
  1312. package/dist/ui/icons/IcRoundWarning.d.ts +0 -2
  1313. package/dist/ui/icons/IcRoundWarning.js +0 -16
  1314. package/dist/ui/icons/IcSharpBrightnessMedium.d.ts +0 -2
  1315. package/dist/ui/icons/IcSharpBrightnessMedium.js +0 -16
  1316. package/dist/ui/icons/IcSharpVerticalAlignCenter.d.ts +0 -2
  1317. package/dist/ui/icons/IcSharpVerticalAlignCenter.js +0 -16
  1318. package/dist/ui/icons/IcTwotoneDescription.d.ts +0 -2
  1319. package/dist/ui/icons/IcTwotoneDescription.js +0 -37
  1320. package/dist/ui/icons/IcTwotoneFolder.d.ts +0 -2
  1321. package/dist/ui/icons/IcTwotoneFolder.js +0 -37
  1322. package/dist/ui/icons/IcTwotoneInsertDriveFile.d.ts +0 -2
  1323. package/dist/ui/icons/IcTwotoneInsertDriveFile.js +0 -30
  1324. package/dist/ui/icons/MdiGithub.d.ts +0 -3
  1325. package/dist/ui/icons/MdiGithub.js +0 -18
  1326. package/dist/ui/icons/MdiSourceBranch.d.ts +0 -2
  1327. package/dist/ui/icons/MdiSourceBranch.js +0 -16
  1328. package/dist/ui/icons/MdiTwitterCircle.d.ts +0 -2
  1329. package/dist/ui/icons/MdiTwitterCircle.js +0 -26
  1330. package/dist/ui/icons/MiLayers.d.ts +0 -3
  1331. package/dist/ui/icons/MiLayers.js +0 -16
  1332. package/dist/ui/icons/PhGlobe.d.ts +0 -2
  1333. package/dist/ui/icons/PhGlobe.js +0 -26
  1334. package/dist/ui/icons/RiFlashlightFill.d.ts +0 -2
  1335. package/dist/ui/icons/RiFlashlightFill.js +0 -10
  1336. package/dist/ui/icons/TableDelete.d.ts +0 -2
  1337. package/dist/ui/icons/TableDelete.js +0 -25
  1338. package/dist/ui/icons/TableDeleteColumn.d.ts +0 -2
  1339. package/dist/ui/icons/TableDeleteColumn.js +0 -16
  1340. package/dist/ui/icons/TableDeleteRow.d.ts +0 -2
  1341. package/dist/ui/icons/TableDeleteRow.js +0 -16
  1342. package/dist/ui/icons/TableHeaderCell.d.ts +0 -2
  1343. package/dist/ui/icons/TableHeaderCell.js +0 -16
  1344. package/dist/ui/icons/TableHeaderColumn.d.ts +0 -2
  1345. package/dist/ui/icons/TableHeaderColumn.js +0 -16
  1346. package/dist/ui/icons/TableHeaderRow.d.ts +0 -2
  1347. package/dist/ui/icons/TableHeaderRow.js +0 -16
  1348. package/dist/ui/icons/TableInsertColumnAfter.d.ts +0 -2
  1349. package/dist/ui/icons/TableInsertColumnAfter.js +0 -16
  1350. package/dist/ui/icons/TableInsertColumnBefore.d.ts +0 -2
  1351. package/dist/ui/icons/TableInsertColumnBefore.js +0 -16
  1352. package/dist/ui/icons/TableInsertRowAfter.d.ts +0 -2
  1353. package/dist/ui/icons/TableInsertRowAfter.js +0 -16
  1354. package/dist/ui/icons/TableInsertRowBefore.d.ts +0 -2
  1355. package/dist/ui/icons/TableInsertRowBefore.js +0 -16
  1356. package/dist/ui/icons/TableMergeCells.d.ts +0 -2
  1357. package/dist/ui/icons/TableMergeCells.js +0 -16
  1358. package/dist/ui/icons/TableSplitCell.d.ts +0 -2
  1359. package/dist/ui/icons/TableSplitCell.js +0 -16
  1360. package/dist/ui/util/ContrastColor.d.ts +0 -1
  1361. package/dist/ui/util/ContrastColor.js +0 -17
  1362. package/dist/ui/util/CreateTypo.d.ts +0 -62
  1363. package/dist/ui/util/CreateTypo.js +0 -119
  1364. package/dist/ui/util/Elevation.d.ts +0 -12
  1365. package/dist/ui/util/Elevation.js +0 -20
  1366. package/dist/ui/util/PropsWithAs.d.ts +0 -12
  1367. package/dist/ui/util/PropsWithAs.js +0 -10
  1368. package/dist/ui/util/Slots.d.ts +0 -11
  1369. package/dist/ui/util/Slots.js +0 -50
  1370. package/dist/ui/util/TextareaAutosize.d.ts +0 -2
  1371. package/dist/ui/util/TextareaAutosize.js +0 -40
  1372. package/dist/ui/util/Units.d.ts +0 -1
  1373. package/dist/ui/util/Units.js +0 -7
  1374. package/dist/ui/util/UseId.d.ts +0 -1
  1375. package/dist/ui/util/UseId.js +0 -11
  1376. package/dist/yjs.d.ts +0 -1
  1377. package/dist/yjs.js +0 -206
  1378. /package/dist/{core/Shape.js → chunks/chunk-NUFRM6SI.js} +0 -0
  1379. /package/dist/{backend/Handler.test.d.ts → dashboard/app/EntrySidebarPreview.spec.d.ts} +0 -0
  1380. /package/dist/{backend/router/Router.test.d.ts → dashboard/app/WorkspaceMenu.spec.d.ts} +0 -0
  1381. /package/dist/{cli/Init.test.d.ts → field/link/LinkField.spec.d.ts} +0 -0
  1382. /package/dist/{cli/util/CommitMessage.test.d.ts → field/list/ListField.spec.d.ts} +0 -0
  1383. /package/dist/{core/Config.test.d.ts → field/richtext/RichTextField.spec.d.ts} +0 -0
@@ -0,0 +1,1974 @@
1
+ import {
2
+ BatchQuery,
3
+ Builder,
4
+ Column,
5
+ Functions,
6
+ JsonColumn,
7
+ and,
8
+ asc,
9
+ boolean,
10
+ column,
11
+ columnConfig,
12
+ eq,
13
+ formatColumn,
14
+ gt,
15
+ integer,
16
+ isNotNull,
17
+ isNull,
18
+ like,
19
+ not,
20
+ oid,
21
+ or,
22
+ primaryKeyColumns,
23
+ table,
24
+ text,
25
+ when
26
+ } from "./chunk-G6E35DMJ.js";
27
+ import {
28
+ Sql,
29
+ getCreate,
30
+ getData,
31
+ getDrop,
32
+ getQuery,
33
+ getResolver,
34
+ getSelection,
35
+ getSql,
36
+ getTable,
37
+ hasQuery,
38
+ hasSelection,
39
+ input,
40
+ internalResolver,
41
+ sql
42
+ } from "./chunk-NWQXN4SB.js";
43
+ import {
44
+ __export
45
+ } from "./chunk-CQ52GEHY.js";
46
+
47
+ // node_modules/rado/dist/driver.js
48
+ var driver_exports = {};
49
+ __export(driver_exports, {
50
+ "@electric-sql/pglite": () => connect8,
51
+ "@libsql/client": () => connect4,
52
+ "@neondatabase/serverless": () => connect7,
53
+ "@vercel/postgres": () => connect7,
54
+ "better-sqlite3": () => connect,
55
+ "bun:sqlite": () => connect2,
56
+ d1: () => connect3,
57
+ mysql2: () => connect5,
58
+ "node:sqlite": () => connect6,
59
+ pg: () => connect7,
60
+ "sql.js": () => connect9
61
+ });
62
+
63
+ // node_modules/rado/dist/universal/functions.js
64
+ var insertId = sql.universal({
65
+ sqlite: Functions.last_insert_rowid(),
66
+ postgres: Functions.lastval(),
67
+ mysql: Functions.last_insert_id()
68
+ }).mapWith(Number);
69
+ function concat(...slices) {
70
+ return sql.universal({
71
+ mysql: Functions.concat(...slices),
72
+ default: sql.join(
73
+ slices.map((slice) => input(slice)),
74
+ sql` || `
75
+ )
76
+ });
77
+ }
78
+
79
+ // node_modules/rado/dist/universal/transactions.js
80
+ function txGenerator(create) {
81
+ function run(tx) {
82
+ const iter = create(tx);
83
+ const next = (inner) => {
84
+ if (inner instanceof Promise)
85
+ return inner.then(iter.next.bind(iter)).catch(iter.throw.bind(iter)).then(handle);
86
+ try {
87
+ return handle(iter.next(inner));
88
+ } catch (err) {
89
+ return handle(iter.throw(err));
90
+ }
91
+ };
92
+ const handle = ({ done, value }) => {
93
+ if (done) return value;
94
+ return next(typeof value === "function" ? tx.transaction(value) : value);
95
+ };
96
+ return next();
97
+ }
98
+ return Object.assign(run, {
99
+ *[Symbol.iterator]() {
100
+ return yield run;
101
+ }
102
+ });
103
+ }
104
+
105
+ // node_modules/rado/dist/core/expr/Aggregate.js
106
+ function count(input2) {
107
+ return Functions.count(input2 ?? sql`*`).mapWith(Number);
108
+ }
109
+
110
+ // node_modules/rado/dist/core/Resolver.js
111
+ var Resolver = class {
112
+ #driver;
113
+ #dialect;
114
+ constructor(driver, dialect) {
115
+ this.#driver = driver;
116
+ this.#dialect = dialect;
117
+ }
118
+ toSQL(query) {
119
+ const emitter = this.#dialect.emit(query);
120
+ return { sql: emitter.sql, params: emitter.bind() };
121
+ }
122
+ prepare(query, name) {
123
+ const isSelection = hasSelection(query);
124
+ const mapRow = isSelection ? getSelection(query).mapRow : void 0;
125
+ const emitter = this.#dialect.emit(query);
126
+ const stmt = this.#driver.prepare(emitter.sql, {
127
+ isSelection,
128
+ name
129
+ });
130
+ return new PreparedStatement(emitter, stmt, mapRow, this.#driver);
131
+ }
132
+ batch(queries) {
133
+ return new Batch(
134
+ this.#driver,
135
+ queries.map((query) => {
136
+ const isSelection = hasSelection(query);
137
+ const mapRow = isSelection ? getSelection(query).mapRow : void 0;
138
+ const emitter = this.#dialect.emit(query);
139
+ return { sql: emitter.sql, params: emitter.bind(), isSelection, mapRow };
140
+ })
141
+ );
142
+ }
143
+ };
144
+ var Batch = class {
145
+ #driver;
146
+ #queries;
147
+ constructor(driver, queries) {
148
+ this.#driver = driver;
149
+ this.#queries = queries;
150
+ }
151
+ #transform = (results) => {
152
+ const ctx = {
153
+ values: void 0,
154
+ index: 0,
155
+ specs: this.#driver
156
+ };
157
+ for (let i = 0; i < this.#queries.length; i++) {
158
+ const { mapRow } = this.#queries[i];
159
+ if (!mapRow) continue;
160
+ const rows = results[i];
161
+ for (let j = 0; j < results[i].length; j++) {
162
+ ctx.values = rows[j];
163
+ ctx.index = 0;
164
+ rows[j] = mapRow(ctx);
165
+ }
166
+ }
167
+ return results;
168
+ };
169
+ execute() {
170
+ const results = this.#driver.batch(this.#queries);
171
+ if (results instanceof Promise) return results.then(this.#transform);
172
+ return this.#transform(results);
173
+ }
174
+ };
175
+ var PreparedStatement = class {
176
+ #emitter;
177
+ #stmt;
178
+ #mapRow;
179
+ #specs;
180
+ constructor(emitter, stmt, mapRow, specs) {
181
+ this.#emitter = emitter;
182
+ this.#stmt = stmt;
183
+ this.#mapRow = mapRow;
184
+ this.#specs = specs;
185
+ }
186
+ #transform = (rows) => {
187
+ if (!this.#mapRow) return rows;
188
+ const ctx = {
189
+ values: void 0,
190
+ index: 0,
191
+ specs: this.#specs
192
+ };
193
+ for (let i = 0; i < rows.length; i++) {
194
+ ctx.values = rows[i];
195
+ ctx.index = 0;
196
+ rows[i] = this.#mapRow(ctx);
197
+ }
198
+ return rows;
199
+ };
200
+ all(inputs) {
201
+ const rows = this.#stmt.values(this.#emitter.bind(inputs));
202
+ if (rows instanceof Promise) return rows.then(this.#transform);
203
+ return this.#transform(rows);
204
+ }
205
+ get(inputs) {
206
+ const rows = this.all(inputs);
207
+ if (rows instanceof Promise) return rows.then((rows2) => rows2[0]);
208
+ return rows[0];
209
+ }
210
+ run(inputs) {
211
+ return this.#stmt.run(this.#emitter.bind(inputs));
212
+ }
213
+ async execute(inputs) {
214
+ return this.all(inputs);
215
+ }
216
+ free() {
217
+ this.#stmt.free();
218
+ }
219
+ };
220
+
221
+ // node_modules/rado/dist/core/Database.js
222
+ var Database = class extends Builder {
223
+ driver;
224
+ dialect;
225
+ diff;
226
+ [internalResolver];
227
+ constructor(driver, dialect, diff) {
228
+ const resolver = new Resolver(driver, dialect);
229
+ super({ resolver });
230
+ this[internalResolver] = resolver;
231
+ this.driver = driver;
232
+ this.dialect = dialect;
233
+ this.diff = diff;
234
+ }
235
+ close() {
236
+ return this.driver.close();
237
+ }
238
+ [Symbol.dispose]() {
239
+ this.close();
240
+ }
241
+ async [Symbol.asyncDispose]() {
242
+ return this.close();
243
+ }
244
+ create(...createables) {
245
+ return new BatchQuery(getResolver(this), createables.flatMap(getCreate));
246
+ }
247
+ drop(...droppables) {
248
+ return new BatchQuery(getResolver(this), droppables.flatMap(getDrop));
249
+ }
250
+ run(input2) {
251
+ const sql2 = this.dialect.inline(input2);
252
+ return this.driver.exec(sql2);
253
+ }
254
+ get(input2) {
255
+ const emitter = this.dialect.emit(input2);
256
+ return this.driver.prepare(emitter.sql).get(emitter.bind());
257
+ }
258
+ all(input2) {
259
+ const emitter = this.dialect.emit(input2);
260
+ return this.driver.prepare(emitter.sql).all(emitter.bind());
261
+ }
262
+ migrate(...tables) {
263
+ if (this.dialect.runtime === "mysql" && tables.length > 1) {
264
+ const run = async () => {
265
+ for (const table2 of tables) await this.migrate(table2);
266
+ };
267
+ return run();
268
+ }
269
+ const computeDiff = this.diff;
270
+ return this.transaction(
271
+ txGenerator(function* (tx) {
272
+ for (const table2 of tables) {
273
+ const diff = yield* computeDiff(table2);
274
+ if (diff.length > 0) yield* tx.batch(diff.map(sql.unsafe));
275
+ }
276
+ })
277
+ );
278
+ }
279
+ batch(queries) {
280
+ return new BatchQuery(getResolver(this), queries);
281
+ }
282
+ execute(input2) {
283
+ const inner = getSql(input2);
284
+ const emitter = this.dialect.emit(inner.inlineValues());
285
+ if (emitter.hasParams) throw new Error("Query has parameters");
286
+ return this.driver.exec(emitter.sql);
287
+ }
288
+ refreshMaterializedView(view) {
289
+ return this.execute(sql`refresh materialized view ${view}`);
290
+ }
291
+ transaction(run, options = {}) {
292
+ return this.driver.transaction(
293
+ (inner) => {
294
+ const tx = new Transaction(inner, this.dialect, this.diff);
295
+ return run(tx);
296
+ },
297
+ { async: run.constructor.name === "AsyncFunction", ...options }
298
+ );
299
+ }
300
+ $count(source, condition) {
301
+ return this.select(count()).from(source).where(condition).$first();
302
+ }
303
+ };
304
+ var Rollback = class extends Error {
305
+ constructor(data) {
306
+ super("Rollback");
307
+ this.data = data;
308
+ }
309
+ data;
310
+ };
311
+ var Transaction = class extends Database {
312
+ rollback(data) {
313
+ throw new Rollback(data);
314
+ }
315
+ };
316
+ var SyncDatabase = class extends Database {
317
+ };
318
+ var AsyncDatabase = class extends Database {
319
+ };
320
+
321
+ // node_modules/rado/dist/sqlite/columns.js
322
+ function boolean2(name) {
323
+ return new Column({
324
+ name,
325
+ type: column.integer(),
326
+ mapFromDriverValue(value) {
327
+ return value === 1;
328
+ },
329
+ mapToDriverValue(value) {
330
+ return value ? 1 : 0;
331
+ }
332
+ });
333
+ }
334
+ function integer2(...args) {
335
+ const { name, options } = columnConfig(args);
336
+ if (options?.mode === "timestamp" || options?.mode === "timestamp_ms") {
337
+ const scale = options.mode === "timestamp" ? 1e3 : 1;
338
+ return new Column({
339
+ name,
340
+ type: column.integer(),
341
+ mapFromDriverValue(value) {
342
+ if (value === null) return null;
343
+ return new Date(value * scale);
344
+ },
345
+ mapToDriverValue(value) {
346
+ return Math.floor(value.getTime() / scale);
347
+ }
348
+ });
349
+ }
350
+ if (options?.mode === "boolean") return boolean2();
351
+ return new Column({ name, type: column.integer() });
352
+ }
353
+ function text2(...args) {
354
+ const { name, options } = columnConfig(args);
355
+ if (options?.mode === "json")
356
+ return new JsonColumn({
357
+ name,
358
+ type: column.text(options?.length),
359
+ mapToDriverValue(value) {
360
+ return JSON.stringify(value);
361
+ },
362
+ mapFromDriverValue(value) {
363
+ return JSON.parse(value);
364
+ }
365
+ });
366
+ return new Column({ name, type: column.text(options?.length) });
367
+ }
368
+
369
+ // node_modules/rado/dist/core/Dialect.js
370
+ var Dialect = class {
371
+ runtime;
372
+ #createEmitter;
373
+ constructor(runtime, createEmitter) {
374
+ this.runtime = runtime;
375
+ this.#createEmitter = createEmitter;
376
+ }
377
+ emit = (input2) => {
378
+ const sql2 = hasQuery(input2) ? getQuery(input2) : getSql(input2);
379
+ const emitter = new this.#createEmitter(this.runtime);
380
+ sql2.emit(emitter);
381
+ return emitter;
382
+ };
383
+ inline = (input2) => {
384
+ const sql2 = hasQuery(input2) ? getQuery(input2) : getSql(input2);
385
+ const emitter = new this.#createEmitter(this.runtime);
386
+ sql2.inlineValues().emit(emitter);
387
+ return emitter.sql;
388
+ };
389
+ };
390
+
391
+ // node_modules/rado/dist/core/Param.js
392
+ var NamedParam = class {
393
+ constructor(name) {
394
+ this.name = name;
395
+ }
396
+ name;
397
+ };
398
+ var ValueParam = class {
399
+ constructor(value) {
400
+ this.value = value;
401
+ }
402
+ value;
403
+ };
404
+
405
+ // node_modules/rado/dist/core/Emitter.js
406
+ var Emitter = class {
407
+ #runtime;
408
+ sql = "";
409
+ params = [];
410
+ constructor(runtime) {
411
+ this.#runtime = runtime;
412
+ }
413
+ get hasParams() {
414
+ return this.params.length > 0;
415
+ }
416
+ bind(inputs) {
417
+ return this.params.map((param) => {
418
+ if (param instanceof ValueParam) return this.processValue(param.value);
419
+ if (inputs && param.name in inputs)
420
+ return this.processValue(inputs[param.name]);
421
+ throw new Error(`Missing input for named parameter: ${param.name}`);
422
+ });
423
+ }
424
+ processValue(value) {
425
+ return value;
426
+ }
427
+ emitIdentifierOrSelf(value) {
428
+ if (value === Sql.SELF_TARGET) {
429
+ if (!this.#selfName) throw new Error("Self target not defined");
430
+ this.emitIdentifier(this.#selfName);
431
+ } else {
432
+ this.emitIdentifier(value);
433
+ }
434
+ }
435
+ emitUnsafe(value) {
436
+ this.sql += value;
437
+ }
438
+ #selfName;
439
+ emitSelf(inner, name) {
440
+ this.#selfName = name;
441
+ inner.emit(this);
442
+ this.#selfName = void 0;
443
+ }
444
+ #inlineFields = false;
445
+ inlineFields(inner, withTableName) {
446
+ const previous = this.#inlineFields;
447
+ this.#inlineFields = !withTableName;
448
+ inner.emit(this);
449
+ this.#inlineFields = previous;
450
+ }
451
+ #inlineValues = false;
452
+ inlineValues(inner) {
453
+ const previous = this.#inlineValues;
454
+ this.#inlineValues = true;
455
+ inner.emit(this);
456
+ this.#inlineValues = previous;
457
+ }
458
+ emitField({ targetName, fieldName }) {
459
+ if (this.#inlineFields) return this.emitIdentifier(fieldName);
460
+ this.emitIdentifierOrSelf(targetName);
461
+ this.emitUnsafe(".");
462
+ this.emitIdentifier(fieldName);
463
+ }
464
+ emitValueOrInline(value) {
465
+ if (this.#inlineValues) this.emitInline(value);
466
+ else this.emitValue(value);
467
+ }
468
+ emitUniversal(runtimes) {
469
+ const sql2 = runtimes[this.#runtime] ?? runtimes.default;
470
+ if (!sql2) throw new Error("Unsupported runtime");
471
+ getSql(sql2).emit(this);
472
+ }
473
+ };
474
+
475
+ // node_modules/rado/dist/sqlite/dialect.js
476
+ var DOUBLE_QUOTE = '"';
477
+ var ESCAPE_DOUBLE_QUOTE = '""';
478
+ var MATCH_DOUBLE_QUOTE = /"/g;
479
+ var SINGLE_QUOTE = "'";
480
+ var ESCAPE_SINGLE_QUOTE = "''";
481
+ var MATCH_SINGLE_QUOTE = /'/g;
482
+ var sqliteDialect = new Dialect(
483
+ "sqlite",
484
+ class extends Emitter {
485
+ processValue(value) {
486
+ return typeof value === "boolean" ? value ? 1 : 0 : value;
487
+ }
488
+ emitValue(value) {
489
+ this.params.push(new ValueParam(value));
490
+ this.sql += "?";
491
+ }
492
+ emitPlaceholder(name) {
493
+ this.params.push(new NamedParam(name));
494
+ this.sql += "?";
495
+ }
496
+ emitJsonPath({ target, asSql, segments }) {
497
+ target.emit(this);
498
+ this.sql += asSql ? "->>" : "->";
499
+ this.sql += this.quoteString(
500
+ `$${segments.map(
501
+ (p) => typeof p === "number" ? `[${p}]` : `.${JSON.stringify(p)}`
502
+ ).join("")}`
503
+ );
504
+ }
505
+ emitInline(value) {
506
+ if (value === null || value === void 0) return this.sql += "null";
507
+ if (typeof value === "number") return this.sql += value;
508
+ if (typeof value === "string")
509
+ return this.sql += this.quoteString(value);
510
+ if (typeof value === "boolean") return this.sql += value ? "1" : "0";
511
+ this.sql += `json(${this.quoteString(JSON.stringify(value))})`;
512
+ }
513
+ emitIdentifier(identifier) {
514
+ this.sql += DOUBLE_QUOTE + identifier.replace(MATCH_DOUBLE_QUOTE, ESCAPE_DOUBLE_QUOTE) + DOUBLE_QUOTE;
515
+ }
516
+ quoteString(input2) {
517
+ return SINGLE_QUOTE + input2.replace(MATCH_SINGLE_QUOTE, ESCAPE_SINGLE_QUOTE) + SINGLE_QUOTE;
518
+ }
519
+ }
520
+ );
521
+
522
+ // node_modules/rado/dist/sqlite/diff.js
523
+ var TableInfo = table("TableInfo", {
524
+ cid: integer2().notNull(),
525
+ name: text2().notNull(),
526
+ type: text2().notNull(),
527
+ notnull: boolean2().notNull(),
528
+ dflt_value: text2(),
529
+ pk: integer2().notNull()
530
+ });
531
+ var SqliteMaster = table("SqliteMaster", {
532
+ type: text2().notNull(),
533
+ name: text2().notNull(),
534
+ tbl_name: text2().notNull(),
535
+ rootpage: integer2().notNull(),
536
+ sql: text2().notNull()
537
+ });
538
+ var inline = (sql2) => sqliteDialect.inline(sql2);
539
+ var sqliteDiff = (targetTable) => {
540
+ return txGenerator(function* (tx) {
541
+ const tableApi = getTable(targetTable);
542
+ const columnInfo = yield* tx.select(TableInfo).from(sql`pragma_table_info(${sql.inline(tableApi.name)}) as "TableInfo"`);
543
+ if (columnInfo.length === 0) return tableApi.create().map(inline);
544
+ const indexInfo = yield* tx.select(SqliteMaster).from(sql`sqlite_master as "SqliteMaster"`).where(
545
+ eq(SqliteMaster.tbl_name, tableApi.name),
546
+ eq(SqliteMaster.type, "index")
547
+ );
548
+ const hasSinglePrimaryKey = columnInfo.reduce((acc, column2) => acc + column2.pk, 0) === 1;
549
+ const localColumns = new Map(
550
+ columnInfo.map((column2) => {
551
+ return [
552
+ column2.name,
553
+ inline(
554
+ formatColumn({
555
+ type: sql.unsafe(column2.type.toLowerCase()),
556
+ notNull: column2.notnull,
557
+ primary: hasSinglePrimaryKey && column2.pk === 1,
558
+ defaultValue: column2.dflt_value !== null ? sql.unsafe(column2.dflt_value) : void 0
559
+ })
560
+ )
561
+ ];
562
+ })
563
+ );
564
+ const schemaColumns = new Map(
565
+ Object.entries(tableApi.columns).map(([name, column2]) => {
566
+ const columnApi = getData(column2);
567
+ return [columnApi.name ?? name, inline(formatColumn(columnApi))];
568
+ })
569
+ );
570
+ const localIndexes = new Map(
571
+ indexInfo.filter((index) => !index.name.startsWith("sqlite_autoindex_")).map((index) => [index.name, index.sql])
572
+ );
573
+ const schemaIndexes = new Map(
574
+ Object.entries(tableApi.indexes()).map(([name, index]) => {
575
+ const indexApi = getData(index);
576
+ return [name, inline(indexApi.toSql(tableApi.name, name, false))];
577
+ })
578
+ );
579
+ const stmts = [];
580
+ const columnNames = /* @__PURE__ */ new Set([
581
+ ...localColumns.keys(),
582
+ ...schemaColumns.keys()
583
+ ]);
584
+ for (const columnName of columnNames) {
585
+ const localInstruction = localColumns.get(columnName);
586
+ const schemaInstruction = schemaColumns.get(columnName);
587
+ if (!schemaInstruction) {
588
+ stmts.push(
589
+ sql.query({
590
+ alterTable: sql.identifier(tableApi.name),
591
+ dropColumn: sql.identifier(columnName)
592
+ })
593
+ );
594
+ } else if (!localInstruction) {
595
+ stmts.push(
596
+ sql.query({
597
+ alterTable: sql.identifier(tableApi.name),
598
+ addColumn: [
599
+ sql.identifier(columnName),
600
+ sql.unsafe(schemaInstruction)
601
+ ]
602
+ })
603
+ );
604
+ } else if (localInstruction !== schemaInstruction) {
605
+ return recreate();
606
+ }
607
+ }
608
+ const indexNames = /* @__PURE__ */ new Set([
609
+ ...localIndexes.keys(),
610
+ ...schemaIndexes.keys()
611
+ ]);
612
+ for (const indexName of indexNames) {
613
+ const localInstruction = localIndexes.get(indexName);
614
+ const schemaInstruction = schemaIndexes.get(indexName);
615
+ const dropLocal = sql.query({
616
+ dropIndex: sql.identifier(indexName)
617
+ });
618
+ if (!schemaInstruction) {
619
+ stmts.unshift(dropLocal);
620
+ } else if (schemaInstruction && !localInstruction) {
621
+ stmts.push(sql.unsafe(schemaInstruction));
622
+ } else if (schemaInstruction && localInstruction !== schemaInstruction) {
623
+ stmts.unshift(dropLocal);
624
+ stmts.push(sql.unsafe(schemaInstruction));
625
+ }
626
+ }
627
+ try {
628
+ yield* txGenerator(function* (sp) {
629
+ yield* sp.batch(stmts);
630
+ const [tableInfo] = yield* sp.select(SqliteMaster.sql).from(sql`sqlite_master as "SqliteMaster"`).where(
631
+ eq(SqliteMaster.tbl_name, tableApi.name),
632
+ eq(SqliteMaster.type, "table")
633
+ );
634
+ sp.rollback(tableInfo);
635
+ });
636
+ } catch (err) {
637
+ if (!(err instanceof Rollback)) throw err;
638
+ const localInstruction = err.data;
639
+ const schemaInstruction = inline(tableApi.createTable());
640
+ const stripStmt = (q) => q.slice("create table ".length);
641
+ if (stripStmt(localInstruction) !== stripStmt(schemaInstruction)) {
642
+ return recreate();
643
+ }
644
+ }
645
+ return stmts.map(inline);
646
+ function recreate() {
647
+ const tempName = `new_${tableApi.name}`;
648
+ const tempTable = table(tempName, tableApi.columns);
649
+ const missingColumns = new Set(
650
+ Array.from(columnNames).filter((name) => !localColumns.has(name))
651
+ );
652
+ const selection = Object.fromEntries(
653
+ Object.entries(tableApi.columns).map(([name, column2]) => {
654
+ const columnApi = getData(column2);
655
+ const key = columnApi.name ?? name;
656
+ if (missingColumns.has(key))
657
+ return [name, columnApi.defaultValue ?? sql`null`];
658
+ return [name, targetTable[name]];
659
+ })
660
+ );
661
+ return [
662
+ // Create a new temporary table with the new definition
663
+ tableApi.createTable(tempName),
664
+ // Copy the data from the old table to the new table
665
+ getQuery(
666
+ tx.insert(tempTable).select(tx.select(selection).from(targetTable))
667
+ ),
668
+ // Drop the old table
669
+ sql.query({ dropTable: sql.identifier(tableApi.name) }),
670
+ // Rename the temporary table to the old table name
671
+ sql.query({
672
+ alterTable: sql.identifier(tempName),
673
+ renameTo: sql.identifier(tableApi.name)
674
+ }),
675
+ // Create missing indexes
676
+ ...tableApi.createIndexes()
677
+ ].map(inline);
678
+ }
679
+ });
680
+ };
681
+
682
+ // node_modules/rado/dist/sqlite/transactions.js
683
+ var locks = /* @__PURE__ */ new WeakMap();
684
+ function execTransaction(driver, depth, wrap, run, options) {
685
+ const needsLock = options.async;
686
+ const behavior = options.behavior ?? "deferred";
687
+ if (!needsLock) return transact();
688
+ let trigger;
689
+ const lock = new Promise((resolve) => trigger = resolve);
690
+ const current = Promise.resolve(locks.get(driver));
691
+ locks.set(driver, lock);
692
+ return current.then(transact).finally(trigger);
693
+ function transact() {
694
+ try {
695
+ driver.exec(depth > 0 ? `savepoint d${depth}` : `begin ${behavior}`);
696
+ const result = run(wrap(depth + 1));
697
+ if (result instanceof Promise) return result.then(release, rollback);
698
+ return release(result);
699
+ } catch (error) {
700
+ return rollback(error);
701
+ }
702
+ }
703
+ function release(result) {
704
+ driver.exec(depth > 0 ? `release d${depth}` : "commit");
705
+ return result;
706
+ }
707
+ function rollback(error) {
708
+ driver.exec(depth > 0 ? `rollback to d${depth}` : "rollback");
709
+ throw error;
710
+ }
711
+ }
712
+
713
+ // node_modules/rado/dist/driver/better-sqlite3.js
714
+ var PreparedStatement2 = class {
715
+ constructor(stmt, isSelection) {
716
+ this.stmt = stmt;
717
+ this.isSelection = isSelection;
718
+ }
719
+ stmt;
720
+ isSelection;
721
+ all(params) {
722
+ return this.stmt.all(...params);
723
+ }
724
+ run(params) {
725
+ return this.stmt.run(...params);
726
+ }
727
+ get(params) {
728
+ return this.stmt.get(...params);
729
+ }
730
+ values(params) {
731
+ if (this.isSelection)
732
+ return this.stmt.raw(true).all(...params);
733
+ this.stmt.run(...params);
734
+ return [];
735
+ }
736
+ free() {
737
+ }
738
+ };
739
+ var BetterSqlite3Driver = class _BetterSqlite3Driver {
740
+ constructor(client, depth = 0) {
741
+ this.client = client;
742
+ this.depth = depth;
743
+ }
744
+ client;
745
+ depth;
746
+ parsesJson = false;
747
+ supportsTransactions = true;
748
+ exec(query) {
749
+ this.client.exec(query);
750
+ }
751
+ close() {
752
+ this.client.close();
753
+ }
754
+ prepare(sql2, options) {
755
+ return new PreparedStatement2(
756
+ this.client.prepare(sql2),
757
+ options?.isSelection ?? false
758
+ );
759
+ }
760
+ batch(queries) {
761
+ return this.transaction(
762
+ (tx) => queries.map(
763
+ ({ sql: sql2, params, isSelection }) => tx.prepare(sql2, { isSelection }).values(params)
764
+ ),
765
+ {}
766
+ );
767
+ }
768
+ transaction(run, options) {
769
+ return execTransaction(
770
+ this,
771
+ this.depth,
772
+ (depth) => new _BetterSqlite3Driver(this.client, depth),
773
+ run,
774
+ options
775
+ );
776
+ }
777
+ };
778
+ function connect(db) {
779
+ return new SyncDatabase(
780
+ new BetterSqlite3Driver(db),
781
+ sqliteDialect,
782
+ sqliteDiff
783
+ );
784
+ }
785
+
786
+ // node_modules/rado/dist/driver/bun-sqlite.js
787
+ var PreparedStatement3 = class {
788
+ constructor(stmt, isSelection) {
789
+ this.stmt = stmt;
790
+ this.isSelection = isSelection;
791
+ }
792
+ stmt;
793
+ isSelection;
794
+ all(params) {
795
+ return this.stmt.all(...params);
796
+ }
797
+ run(params) {
798
+ return this.stmt.run(...params);
799
+ }
800
+ get(params) {
801
+ return this.stmt.get(...params);
802
+ }
803
+ values(params) {
804
+ if (!this.isSelection) {
805
+ this.stmt.run(...params);
806
+ return [];
807
+ }
808
+ return this.stmt.values(...params);
809
+ }
810
+ free() {
811
+ this.stmt.finalize();
812
+ }
813
+ };
814
+ var BunSqliteDriver = class _BunSqliteDriver {
815
+ constructor(client, depth = 0) {
816
+ this.client = client;
817
+ this.depth = depth;
818
+ }
819
+ client;
820
+ depth;
821
+ parsesJson = false;
822
+ supportsTransactions = true;
823
+ exec(query) {
824
+ this.client.exec(query);
825
+ }
826
+ close() {
827
+ this.client.close();
828
+ }
829
+ prepare(sql2, options) {
830
+ return new PreparedStatement3(
831
+ this.client.prepare(sql2),
832
+ options?.isSelection ?? false
833
+ );
834
+ }
835
+ batch(queries) {
836
+ return this.transaction((tx) => {
837
+ return queries.map(
838
+ ({ sql: sql2, params, isSelection }) => tx.prepare(sql2, { isSelection }).values(params)
839
+ );
840
+ }, {});
841
+ }
842
+ transaction(run, options) {
843
+ return execTransaction(
844
+ this,
845
+ this.depth,
846
+ (depth) => new _BunSqliteDriver(this.client, depth),
847
+ run,
848
+ options
849
+ );
850
+ }
851
+ };
852
+ function connect2(db) {
853
+ return new SyncDatabase(new BunSqliteDriver(db), sqliteDialect, sqliteDiff);
854
+ }
855
+
856
+ // node_modules/rado/dist/driver/d1.js
857
+ var PreparedStatement4 = class {
858
+ constructor(stmt, isSelection) {
859
+ this.stmt = stmt;
860
+ this.isSelection = isSelection;
861
+ }
862
+ stmt;
863
+ isSelection;
864
+ async all(params) {
865
+ return this.stmt.bind(...params).all().then(({ results }) => results);
866
+ }
867
+ async run(params) {
868
+ const results = await this.stmt.bind(...params).run();
869
+ }
870
+ async get(params) {
871
+ return this.stmt.bind(...params).first();
872
+ }
873
+ async values(params) {
874
+ if (this.isSelection) return this.stmt.bind(...params).raw();
875
+ await this.stmt.bind(...params).run();
876
+ return [];
877
+ }
878
+ free() {
879
+ }
880
+ };
881
+ var D1Driver = class {
882
+ constructor(client) {
883
+ this.client = client;
884
+ }
885
+ client;
886
+ parsesJson = false;
887
+ supportsTransactions = false;
888
+ async exec(query) {
889
+ await this.client.exec(query);
890
+ }
891
+ prepare(sql2, options) {
892
+ return new PreparedStatement4(
893
+ this.client.prepare(sql2),
894
+ options?.isSelection ?? false
895
+ );
896
+ }
897
+ async close() {
898
+ }
899
+ async batch(queries) {
900
+ const stmts = queries.map(
901
+ ({ sql: sql2, params }) => this.client.prepare(sql2).bind(...params)
902
+ );
903
+ const rows = await this.client.batch(stmts);
904
+ return rows.map((row, index) => {
905
+ const isSelection = queries[index]?.isSelection;
906
+ if (!isSelection) return [];
907
+ return row.results.map(Object.values);
908
+ });
909
+ }
910
+ async transaction() {
911
+ throw new Error("Transactions are not supported in D1");
912
+ }
913
+ };
914
+ function connect3(client) {
915
+ return new AsyncDatabase(new D1Driver(client), sqliteDialect, sqliteDiff);
916
+ }
917
+
918
+ // node_modules/rado/dist/driver/libsql.js
919
+ var PreparedStatement5 = class {
920
+ constructor(client, sql2) {
921
+ this.client = client;
922
+ this.sql = sql2;
923
+ }
924
+ client;
925
+ sql;
926
+ async all(params) {
927
+ const result = await this.client.execute({ sql: this.sql, args: params });
928
+ return result.rows;
929
+ }
930
+ async run(params) {
931
+ const result = await this.client.execute({ sql: this.sql, args: params });
932
+ }
933
+ async get(params) {
934
+ return (await this.all(params))[0] ?? null;
935
+ }
936
+ async values(params) {
937
+ const result = await this.client.execute({ sql: this.sql, args: params });
938
+ return result.rows;
939
+ }
940
+ free() {
941
+ }
942
+ };
943
+ var LibSQLClient = class _LibSQLClient {
944
+ constructor(client, depth = 0) {
945
+ this.client = client;
946
+ this.depth = depth;
947
+ }
948
+ client;
949
+ depth;
950
+ parsesJson = false;
951
+ supportsTransactions = true;
952
+ async exec(query) {
953
+ await this.client.execute(query);
954
+ }
955
+ prepare(sql2, options) {
956
+ return new PreparedStatement5(this.client, sql2);
957
+ }
958
+ async close() {
959
+ if ("close" in this.client) return this.client.close();
960
+ }
961
+ async batch(queries) {
962
+ const stmts = queries.map(({ sql: sql2, params }) => {
963
+ return { sql: sql2, args: params };
964
+ });
965
+ const rows = await this.client.batch(stmts);
966
+ return rows.map((row) => row.rows);
967
+ }
968
+ async transaction(run, options) {
969
+ const client = "transaction" in this.client ? await this.client.transaction() : this.client;
970
+ const driver = new _LibSQLClient(client, this.depth + 1);
971
+ if (this.depth > 0) await client.execute(`savepoint d${this.depth}`);
972
+ try {
973
+ const result = await run(driver);
974
+ if (this.depth > 0)
975
+ await client.execute(`release savepoint d${this.depth}`);
976
+ else await client.commit();
977
+ return result;
978
+ } catch (error) {
979
+ if (this.depth > 0)
980
+ await client.execute(`rollback to savepoint d${this.depth}`);
981
+ else await client.rollback();
982
+ throw error;
983
+ } finally {
984
+ if (this.depth === 0) client.close();
985
+ }
986
+ }
987
+ };
988
+ function connect4(client) {
989
+ return new AsyncDatabase(new LibSQLClient(client), sqliteDialect, sqliteDiff);
990
+ }
991
+
992
+ // node_modules/rado/dist/mysql/dialect.js
993
+ var BACKTICK = "`";
994
+ var ESCAPE_BACKTICK = "``";
995
+ var MATCH_BACKTICK = /`/g;
996
+ var ESCAPE_BACKSLASH = "\\\\";
997
+ var MATCH_BACKSLASH = /\\/g;
998
+ var SINGLE_QUOTE2 = "'";
999
+ var ESCAPE_SINGLE_QUOTE2 = "''";
1000
+ var MATCH_SINGLE_QUOTE2 = /'/g;
1001
+ var mysqlDialect = new Dialect(
1002
+ "mysql",
1003
+ class extends Emitter {
1004
+ runtime = "mysql";
1005
+ emitValue(value) {
1006
+ this.params.push(new ValueParam(value));
1007
+ this.sql += "?";
1008
+ }
1009
+ emitPlaceholder(name) {
1010
+ this.params.push(new NamedParam(name));
1011
+ this.sql += "?";
1012
+ }
1013
+ emitJsonPath({ target, asSql, segments }) {
1014
+ target.emit(this);
1015
+ this.sql += asSql ? "->>" : "->";
1016
+ this.sql += this.quoteString(
1017
+ `$${segments.map(
1018
+ (p) => typeof p === "number" ? `[${p}]` : `.${JSON.stringify(p)}`
1019
+ ).join("")}`
1020
+ );
1021
+ }
1022
+ emitInline(value) {
1023
+ if (value === null || value === void 0) return this.sql += "null";
1024
+ if (typeof value === "number" || typeof value === "boolean")
1025
+ return this.sql += value;
1026
+ if (typeof value === "string")
1027
+ return this.sql += this.quoteString(value);
1028
+ this.sql += this.quoteString(JSON.stringify(value));
1029
+ }
1030
+ quoteString(input2) {
1031
+ return SINGLE_QUOTE2 + input2.replace(MATCH_BACKSLASH, ESCAPE_BACKSLASH).replace(MATCH_SINGLE_QUOTE2, ESCAPE_SINGLE_QUOTE2) + SINGLE_QUOTE2;
1032
+ }
1033
+ emitIdentifier(identifier) {
1034
+ this.sql += BACKTICK + identifier.replace(MATCH_BACKTICK, ESCAPE_BACKTICK) + BACKTICK;
1035
+ }
1036
+ }
1037
+ );
1038
+
1039
+ // node_modules/rado/dist/core/Schema.js
1040
+ function schema(schemaName) {
1041
+ return {
1042
+ table(tableName, columns, config) {
1043
+ return table(tableName, columns, config, schemaName);
1044
+ }
1045
+ };
1046
+ }
1047
+
1048
+ // node_modules/rado/dist/mysql/columns.js
1049
+ function integer3(name) {
1050
+ return new Column({ name, type: column.integer() });
1051
+ }
1052
+ function text3(name) {
1053
+ return new Column({ name, type: column.text() });
1054
+ }
1055
+
1056
+ // node_modules/rado/dist/mysql/diff.js
1057
+ var ns = schema("information_schema");
1058
+ var Information = ns.table("columns", {
1059
+ table_name: text3().notNull(),
1060
+ column_name: text3().notNull(),
1061
+ column_type: text3().notNull(),
1062
+ is_nullable: text3().notNull(),
1063
+ column_default: text3(),
1064
+ extra: text3().notNull(),
1065
+ table_schema: text3().notNull()
1066
+ });
1067
+ var Statistics = ns.table("statistics", {
1068
+ table_name: text3().notNull(),
1069
+ column_name: text3().notNull(),
1070
+ index_name: text3().notNull(),
1071
+ non_unique: integer3().notNull(),
1072
+ seq_in_index: integer3().notNull(),
1073
+ table_schema: text3().notNull()
1074
+ });
1075
+ var TableConstraints = ns.table("table_constraints", {
1076
+ constraint_name: text3().notNull(),
1077
+ table_name: text3().notNull(),
1078
+ constraint_type: text3().notNull(),
1079
+ table_schema: text3().notNull()
1080
+ });
1081
+ var inline2 = (sql2) => mysqlDialect.inline(sql2);
1082
+ var mysqlDiff = (hasTable) => {
1083
+ return txGenerator(function* (tx) {
1084
+ const tableApi = getTable(hasTable);
1085
+ const stmts = [];
1086
+ const columnInfo = yield* tx.select({
1087
+ name: Information.column_name,
1088
+ type: Information.column_type,
1089
+ notNull: eq(Information.is_nullable, "NO"),
1090
+ defaultValue: Information.column_default,
1091
+ extra: Information.extra
1092
+ }).from(Information).where(
1093
+ eq(Information.table_name, tableApi.name),
1094
+ eq(Information.table_schema, sql`database()`)
1095
+ );
1096
+ if (columnInfo.length === 0) return tableApi.create().map(inline2);
1097
+ const indexInfo = yield* tx.select({
1098
+ index_name: Statistics.index_name,
1099
+ column_name: Statistics.column_name,
1100
+ non_unique: Statistics.non_unique,
1101
+ seq_in_index: Statistics.seq_in_index
1102
+ }).from(Statistics).where(
1103
+ eq(Statistics.table_name, tableApi.name),
1104
+ eq(Statistics.table_schema, sql`database()`)
1105
+ ).orderBy(Statistics.index_name, Statistics.seq_in_index);
1106
+ const indexMap = /* @__PURE__ */ new Map();
1107
+ for (const index of indexInfo) {
1108
+ if (!indexMap.has(index.index_name)) {
1109
+ indexMap.set(index.index_name, []);
1110
+ }
1111
+ indexMap.get(index.index_name).push(index.column_name);
1112
+ }
1113
+ const localColumns = new Map(
1114
+ columnInfo.map((column2) => {
1115
+ let type = column2.type.toLowerCase();
1116
+ const isAutoIncrement = column2.extra.toLowerCase().includes("auto_increment");
1117
+ if (isAutoIncrement) {
1118
+ if (type.includes("bigint")) type = "bigserial";
1119
+ else if (type.includes("smallint")) type = "smallserial";
1120
+ else type = "serial";
1121
+ }
1122
+ return [
1123
+ column2.name,
1124
+ {
1125
+ type: sql.unsafe(type),
1126
+ notNull: column2.notNull && !isAutoIncrement,
1127
+ nullable: !column2.notNull,
1128
+ defaultValue: column2.defaultValue && !isAutoIncrement ? sql.unsafe(column2.defaultValue) : void 0
1129
+ }
1130
+ ];
1131
+ })
1132
+ );
1133
+ const primaryKeys = primaryKeyColumns(tableApi);
1134
+ const schemaColumns = new Map(
1135
+ Object.entries(tableApi.columns).map(([name, column2]) => {
1136
+ const columnApi = getData(column2);
1137
+ const columnName = columnApi.name ?? name;
1138
+ return [
1139
+ columnName,
1140
+ {
1141
+ ...columnApi,
1142
+ nullable: !columnApi.notNull && !primaryKeys.has(columnName)
1143
+ }
1144
+ ];
1145
+ })
1146
+ );
1147
+ const columnNames = /* @__PURE__ */ new Set([
1148
+ ...localColumns.keys(),
1149
+ ...schemaColumns.keys()
1150
+ ]);
1151
+ for (const columnName of columnNames) {
1152
+ const alterTable = sql.identifier(tableApi.name);
1153
+ const column2 = sql.identifier(columnName);
1154
+ const localInstruction = localColumns.get(columnName);
1155
+ const schemaInstruction = schemaColumns.get(columnName);
1156
+ if (!schemaInstruction) {
1157
+ stmts.push(
1158
+ sql.query({
1159
+ alterTable,
1160
+ dropColumn: column2
1161
+ })
1162
+ );
1163
+ } else if (!localInstruction) {
1164
+ stmts.push(
1165
+ sql.query({
1166
+ alterTable,
1167
+ addColumn: [column2, formatColumn(schemaInstruction)]
1168
+ })
1169
+ );
1170
+ } else {
1171
+ if (inline2(localInstruction.type) !== inline2(schemaInstruction.type)) {
1172
+ stmts.push(
1173
+ sql.query({
1174
+ alterTable,
1175
+ modifyColumn: [column2, schemaInstruction.type]
1176
+ })
1177
+ );
1178
+ }
1179
+ if (Boolean(localInstruction.nullable) !== Boolean(schemaInstruction.nullable)) {
1180
+ stmts.push(
1181
+ sql.query({
1182
+ alterTable,
1183
+ modifyColumn: [
1184
+ column2,
1185
+ schemaInstruction.nullable ? sql`${schemaInstruction.type} null` : sql`${schemaInstruction.type} not null`
1186
+ ]
1187
+ })
1188
+ );
1189
+ }
1190
+ const localDefault = localInstruction.defaultValue;
1191
+ const schemaDefault = schemaInstruction.defaultValue;
1192
+ const localDefaultStr = localDefault && inline2(localDefault);
1193
+ const schemaDefaultStr = schemaDefault && inline2(schemaDefault);
1194
+ if (localDefaultStr !== schemaDefaultStr) {
1195
+ stmts.push(
1196
+ sql.query({
1197
+ alterTable,
1198
+ alterColumn: [
1199
+ column2,
1200
+ schemaDefault ? sql`set default ${schemaDefault}` : sql`drop default`
1201
+ ]
1202
+ })
1203
+ );
1204
+ }
1205
+ }
1206
+ }
1207
+ const localIndexes = new Map(
1208
+ Array.from(indexMap.entries()).filter(([name]) => name !== "PRIMARY").map(([name, columns]) => {
1209
+ return [
1210
+ name,
1211
+ sql`index ${sql.identifier(name)} (${sql.join(columns.map(sql.identifier), sql`, `)})`
1212
+ ];
1213
+ })
1214
+ );
1215
+ const schemaIndexes = new Map(
1216
+ Object.entries(tableApi.indexes()).map(([name, index]) => {
1217
+ const indexApi = getData(index);
1218
+ return [name, indexApi.toSql(tableApi.name, name, false)];
1219
+ })
1220
+ );
1221
+ const indexNames = /* @__PURE__ */ new Set([
1222
+ ...localIndexes.keys(),
1223
+ ...schemaIndexes.keys()
1224
+ ]);
1225
+ for (const indexName of indexNames) {
1226
+ const localInstruction = localIndexes.get(indexName);
1227
+ const schemaInstruction = schemaIndexes.get(indexName);
1228
+ if (!schemaInstruction) {
1229
+ stmts.unshift(
1230
+ sql.query({
1231
+ alterTable: sql.identifier(tableApi.name),
1232
+ dropIndex: sql.identifier(indexName)
1233
+ })
1234
+ );
1235
+ } else if (!localInstruction) {
1236
+ stmts.push(schemaInstruction);
1237
+ } else if (inline2(localInstruction) !== inline2(schemaInstruction)) {
1238
+ if (indexName === "PRIMARY") {
1239
+ stmts.unshift(
1240
+ sql.query({
1241
+ alterTable: sql.identifier(tableApi.name),
1242
+ dropPrimaryKey: true
1243
+ })
1244
+ );
1245
+ stmts.push(schemaInstruction);
1246
+ } else {
1247
+ stmts.unshift(
1248
+ sql.query({
1249
+ alterTable: sql.identifier(tableApi.name),
1250
+ dropIndex: sql.identifier(indexName)
1251
+ })
1252
+ );
1253
+ stmts.push(schemaInstruction);
1254
+ }
1255
+ }
1256
+ }
1257
+ return stmts.map(inline2);
1258
+ });
1259
+ };
1260
+
1261
+ // node_modules/rado/dist/mysql/transactions.js
1262
+ function startTransaction(options) {
1263
+ return [
1264
+ "start transaction",
1265
+ options.withConsistentSnapshot && "with consistent snapshot",
1266
+ options.accessMode
1267
+ ].filter(Boolean).join(" ");
1268
+ }
1269
+ function setTransaction(options) {
1270
+ if (!options.isolationLevel) return;
1271
+ return [
1272
+ "set transaction",
1273
+ options.isolationLevel && `isolation level ${options.isolationLevel}`
1274
+ ].filter(Boolean).join(" ");
1275
+ }
1276
+
1277
+ // node_modules/rado/dist/driver/mysql2.js
1278
+ var PreparedStatement6 = class {
1279
+ constructor(client, sql2, isSelection, name) {
1280
+ this.client = client;
1281
+ this.sql = sql2;
1282
+ this.isSelection = isSelection;
1283
+ this.name = name;
1284
+ }
1285
+ client;
1286
+ sql;
1287
+ isSelection;
1288
+ name;
1289
+ #transformParam = (param) => {
1290
+ if (param instanceof Uint8Array) return Buffer.from(param);
1291
+ return param;
1292
+ };
1293
+ all(params) {
1294
+ return this.client.query(this.sql, params.map(this.#transformParam)).then((res) => res[0]);
1295
+ }
1296
+ async run(params) {
1297
+ await this.client.query(this.sql, params.map(this.#transformParam));
1298
+ }
1299
+ get(params) {
1300
+ return this.all(params).then((rows) => rows[0] ?? null);
1301
+ }
1302
+ values(params) {
1303
+ if (!this.isSelection) return this.run(params).then(() => []);
1304
+ return this.client.query({
1305
+ sql: this.sql,
1306
+ values: params.map(this.#transformParam),
1307
+ rowsAsArray: true
1308
+ }).then((res) => res[0]);
1309
+ }
1310
+ free() {
1311
+ }
1312
+ };
1313
+ var Mysql2Driver = class _Mysql2Driver {
1314
+ constructor(client, depth = 0) {
1315
+ this.client = client;
1316
+ this.depth = depth;
1317
+ }
1318
+ client;
1319
+ depth;
1320
+ parsesJson = true;
1321
+ supportsTransactions = true;
1322
+ async exec(query) {
1323
+ await this.client.query(query);
1324
+ }
1325
+ prepare(sql2, options) {
1326
+ return new PreparedStatement6(
1327
+ this.client,
1328
+ sql2,
1329
+ options?.isSelection ?? false,
1330
+ options?.name
1331
+ );
1332
+ }
1333
+ async close() {
1334
+ if ("end" in this.client) return this.client.end();
1335
+ }
1336
+ async batch(queries) {
1337
+ const transact = async (tx) => {
1338
+ const results = [];
1339
+ for (const { sql: sql2, params, isSelection } of queries)
1340
+ results.push(await tx.prepare(sql2, { isSelection }).values(params));
1341
+ return results;
1342
+ };
1343
+ if (this.depth > 0) return transact(this);
1344
+ return this.transaction(transact, {});
1345
+ }
1346
+ async transaction(run, options) {
1347
+ const client = isPool(this.client) ? await this.client.getConnection() : this.client;
1348
+ const driver = new _Mysql2Driver(client, this.depth + 1);
1349
+ try {
1350
+ await client.query(
1351
+ this.depth > 0 ? `savepoint d${this.depth}` : startTransaction(options)
1352
+ );
1353
+ if (this.depth === 0) {
1354
+ const setOptions = setTransaction(options);
1355
+ if (setOptions) await client.query(setOptions);
1356
+ }
1357
+ const result = await run(driver);
1358
+ await client.query(
1359
+ this.depth > 0 ? `release savepoint d${this.depth}` : "commit"
1360
+ );
1361
+ return result;
1362
+ } catch (error) {
1363
+ await client.query(
1364
+ this.depth > 0 ? `rollback to savepoint d${this.depth}` : "rollback"
1365
+ );
1366
+ throw error;
1367
+ } finally {
1368
+ if (isPool(this.client))
1369
+ this.client.releaseConnection(client);
1370
+ }
1371
+ }
1372
+ };
1373
+ function isPool(client) {
1374
+ return "getConnection" in client;
1375
+ }
1376
+ function connect5(client) {
1377
+ return new AsyncDatabase(
1378
+ new Mysql2Driver("promise" in client ? client.promise() : client),
1379
+ mysqlDialect,
1380
+ mysqlDiff
1381
+ );
1382
+ }
1383
+
1384
+ // node_modules/rado/dist/driver/node-sqlite.js
1385
+ var PreparedStatement7 = class {
1386
+ constructor(stmt, isSelection) {
1387
+ this.stmt = stmt;
1388
+ this.isSelection = isSelection;
1389
+ }
1390
+ stmt;
1391
+ isSelection;
1392
+ all(params) {
1393
+ return this.stmt.all(...params);
1394
+ }
1395
+ run(params) {
1396
+ this.stmt.run(...params);
1397
+ }
1398
+ get(params) {
1399
+ return this.stmt.get(...params);
1400
+ }
1401
+ values(params) {
1402
+ if (!this.isSelection) {
1403
+ this.stmt.run(...params);
1404
+ return [];
1405
+ }
1406
+ this.stmt.setReturnArrays(true);
1407
+ try {
1408
+ return this.stmt.all(...params);
1409
+ } finally {
1410
+ this.stmt.setReturnArrays(false);
1411
+ }
1412
+ }
1413
+ free() {
1414
+ }
1415
+ };
1416
+ var NodeSqliteDriver = class _NodeSqliteDriver {
1417
+ constructor(client, depth = 0) {
1418
+ this.client = client;
1419
+ this.depth = depth;
1420
+ }
1421
+ client;
1422
+ depth;
1423
+ parsesJson = false;
1424
+ supportsTransactions = true;
1425
+ exec(query) {
1426
+ this.client.exec(query);
1427
+ }
1428
+ close() {
1429
+ this.client.close();
1430
+ }
1431
+ prepare(sql2, options) {
1432
+ return new PreparedStatement7(
1433
+ this.client.prepare(sql2),
1434
+ options?.isSelection ?? false
1435
+ );
1436
+ }
1437
+ batch(queries) {
1438
+ return this.transaction(
1439
+ (tx) => queries.map(
1440
+ ({ sql: sql2, params, isSelection }) => tx.prepare(sql2, { isSelection }).values(params)
1441
+ ),
1442
+ {}
1443
+ );
1444
+ }
1445
+ transaction(run, options) {
1446
+ return execTransaction(
1447
+ this,
1448
+ this.depth,
1449
+ (depth) => new _NodeSqliteDriver(this.client, depth),
1450
+ run,
1451
+ options
1452
+ );
1453
+ }
1454
+ };
1455
+ function connect6(db) {
1456
+ return new SyncDatabase(new NodeSqliteDriver(db), sqliteDialect, sqliteDiff);
1457
+ }
1458
+
1459
+ // node_modules/rado/dist/postgres/dialect.js
1460
+ var DOUBLE_QUOTE2 = '"';
1461
+ var ESCAPE_DOUBLE_QUOTE2 = '""';
1462
+ var MATCH_DOUBLE_QUOTE2 = /"/g;
1463
+ var SINGLE_QUOTE3 = "'";
1464
+ var ESCAPE_SINGLE_QUOTE3 = "''";
1465
+ var MATCH_SINGLE_QUOTE3 = /'/g;
1466
+ var postgresDialect = new Dialect(
1467
+ "postgres",
1468
+ class extends Emitter {
1469
+ runtime = "postgres";
1470
+ emitValue(value) {
1471
+ this.params.push(new ValueParam(value));
1472
+ this.sql += `$${this.params.length}`;
1473
+ }
1474
+ emitPlaceholder(name) {
1475
+ this.params.push(new NamedParam(name));
1476
+ this.sql += `$${this.params.length}`;
1477
+ }
1478
+ emitJsonPath({ target, asSql, segments }) {
1479
+ target.emit(this);
1480
+ for (let i = 0; i < segments.length; i++) {
1481
+ const access = segments[i];
1482
+ if (i <= segments.length - 2) this.sql += "->";
1483
+ else if (i === segments.length - 1) this.sql += asSql ? "->>" : "->";
1484
+ if (typeof access === "number") this.sql += access;
1485
+ else this.sql += this.quoteString(access);
1486
+ }
1487
+ }
1488
+ emitInline(value) {
1489
+ if (value === null || value === void 0) return this.sql += "null";
1490
+ if (typeof value === "number" || typeof value === "boolean")
1491
+ return this.sql += value;
1492
+ if (typeof value === "string")
1493
+ return this.sql += this.quoteString(value);
1494
+ this.sql += this.quoteString(JSON.stringify(value));
1495
+ }
1496
+ quoteString(input2) {
1497
+ return SINGLE_QUOTE3 + input2.replace(MATCH_SINGLE_QUOTE3, ESCAPE_SINGLE_QUOTE3) + SINGLE_QUOTE3;
1498
+ }
1499
+ emitIdentifier(identifier) {
1500
+ this.sql += DOUBLE_QUOTE2 + identifier.replace(MATCH_DOUBLE_QUOTE2, ESCAPE_DOUBLE_QUOTE2) + DOUBLE_QUOTE2;
1501
+ }
1502
+ }
1503
+ );
1504
+
1505
+ // node_modules/rado/dist/postgres/diff.js
1506
+ var Attr = table("pg_attribute", {
1507
+ name: text("attname").notNull(),
1508
+ typId: oid("atttypid").notNull(),
1509
+ typMod: integer("atttypmod").notNull(),
1510
+ notNull: boolean("attnotnull").notNull(),
1511
+ relId: oid("attrelid").notNull(),
1512
+ isDropped: boolean("attisdropped").notNull(),
1513
+ num: integer("attnum").notNull(),
1514
+ identity: text("attidentity"),
1515
+ hasDef: boolean("atthasdef").notNull()
1516
+ });
1517
+ var Class = table("pg_class", {
1518
+ oid: oid().notNull(),
1519
+ relname: text().notNull(),
1520
+ relnamespace: oid().notNull()
1521
+ });
1522
+ var Namespace = table("pg_namespace", {
1523
+ oid: oid().notNull(),
1524
+ name: text("nspname").notNull()
1525
+ });
1526
+ var Type = table("pg_type", {
1527
+ oid: oid().notNull(),
1528
+ name: text("typname").notNull()
1529
+ });
1530
+ var AttrDef = table("pg_attrdef", {
1531
+ relId: oid("adrelid").notNull(),
1532
+ num: integer("adnum").notNull(),
1533
+ bin: text("adbin").notNull()
1534
+ });
1535
+ var inline3 = (sql2) => postgresDialect.inline(sql2);
1536
+ var columnType = sql`pg_catalog.format_type(${Attr.typId}, ${Attr.typMod})`;
1537
+ var columnDefaultValue = when(
1538
+ [Attr.hasDef, sql`pg_catalog.pg_get_expr(${AttrDef.bin}, ${AttrDef.relId})`],
1539
+ null
1540
+ );
1541
+ var identity = when(
1542
+ [eq(Attr.identity, "a"), sql`'generated always as identity'`],
1543
+ [eq(Attr.identity, "d"), sql`'generated by default as identity'`],
1544
+ null
1545
+ );
1546
+ var postgresDiff = (hasTable) => {
1547
+ return txGenerator(function* (tx) {
1548
+ const tableApi = getTable(hasTable);
1549
+ const def = tx.select({
1550
+ table_name: Class.relname,
1551
+ name: Attr.name,
1552
+ type: columnType,
1553
+ notNull: Attr.notNull,
1554
+ defaultValue: columnDefaultValue,
1555
+ identity,
1556
+ schema_name: Namespace.name
1557
+ }).from(Class).innerJoin(Namespace, eq(Namespace.oid, Class.relnamespace)).innerJoin(Attr, and(gt(Attr.num, 0), eq(Attr.relId, Class.oid))).innerJoin(Type, eq(Attr.typId, Type.oid)).leftJoin(
1558
+ AttrDef,
1559
+ and(eq(Attr.relId, AttrDef.relId), eq(Attr.num, AttrDef.num))
1560
+ ).where(eq(Class.relname, tableApi.name)).orderBy(asc(Attr.num)).as("def");
1561
+ const mapSequenceType = when(
1562
+ def.type,
1563
+ ["integer", "serial"],
1564
+ ["smallint", "smallserial"],
1565
+ ["bigint", "bigserial"],
1566
+ def.type
1567
+ );
1568
+ const isSequence = like(def.defaultValue, "nextval(%_seq%");
1569
+ const type = concat(
1570
+ when([isSequence, mapSequenceType], def.type),
1571
+ when(
1572
+ [isNotNull(def.identity), concat(" ", def.identity).inlineValues()],
1573
+ ""
1574
+ )
1575
+ ).inlineValues();
1576
+ const isNumeric = or(
1577
+ eq(def.type, "integer"),
1578
+ eq(def.type, "smallint"),
1579
+ eq(def.type, "bigint")
1580
+ );
1581
+ const isNumericSequence = and(isSequence, isNumeric);
1582
+ const defaultValue = when(
1583
+ [
1584
+ and(isNotNull(def.defaultValue), not(isNumericSequence)),
1585
+ def.defaultValue
1586
+ ],
1587
+ ""
1588
+ );
1589
+ const columnInfo = yield* tx.select({
1590
+ name: def.name,
1591
+ type,
1592
+ notNull: and(def.notNull, isNull(def.identity)),
1593
+ defaultValue
1594
+ }).from(def);
1595
+ if (columnInfo.length === 0) return tableApi.create().map(inline3);
1596
+ const localColumns = new Map(
1597
+ columnInfo.map((column2) => {
1598
+ return [
1599
+ column2.name,
1600
+ {
1601
+ type: sql.unsafe(column2.type.toLowerCase()),
1602
+ notNull: column2.notNull,
1603
+ nullable: !column2.notNull,
1604
+ defaultValue: column2.defaultValue ? sql.unsafe(column2.defaultValue) : void 0
1605
+ }
1606
+ ];
1607
+ })
1608
+ );
1609
+ const primaryKeys = primaryKeyColumns(tableApi);
1610
+ const schemaColumns = new Map(
1611
+ Object.entries(tableApi.columns).map(([name, column2]) => {
1612
+ const columnApi = getData(column2);
1613
+ const columnName = columnApi.name ?? name;
1614
+ return [
1615
+ columnName,
1616
+ {
1617
+ ...columnApi,
1618
+ nullable: !columnApi.notNull && !primaryKeys.has(columnName)
1619
+ }
1620
+ ];
1621
+ })
1622
+ );
1623
+ const stmts = [];
1624
+ const columnNames = /* @__PURE__ */ new Set([
1625
+ ...localColumns.keys(),
1626
+ ...schemaColumns.keys()
1627
+ ]);
1628
+ for (const columnName of columnNames) {
1629
+ const alterTable = sql.identifier(tableApi.name);
1630
+ const column2 = sql.identifier(columnName);
1631
+ const localInstruction = localColumns.get(columnName);
1632
+ const schemaInstruction = schemaColumns.get(columnName);
1633
+ if (!schemaInstruction) {
1634
+ stmts.push(
1635
+ sql.query({
1636
+ alterTable,
1637
+ dropColumn: column2
1638
+ })
1639
+ );
1640
+ } else if (!localInstruction) {
1641
+ stmts.push(
1642
+ sql.query({
1643
+ alterTable,
1644
+ addColumn: [column2, formatColumn(schemaInstruction)]
1645
+ })
1646
+ );
1647
+ } else {
1648
+ if (inline3(localInstruction.type) !== inline3(schemaInstruction.type)) {
1649
+ stmts.push(
1650
+ sql.query({
1651
+ alterTable,
1652
+ alterColumn: [column2, sql`type ${schemaInstruction.type}`]
1653
+ })
1654
+ );
1655
+ }
1656
+ if (Boolean(localInstruction.nullable) !== Boolean(schemaInstruction.nullable)) {
1657
+ stmts.push(
1658
+ sql.query({
1659
+ alterTable,
1660
+ alterColumn: [
1661
+ column2,
1662
+ schemaInstruction.nullable ? sql`drop not null` : sql`set not null`
1663
+ ]
1664
+ })
1665
+ );
1666
+ }
1667
+ const localDefault = localInstruction.defaultValue;
1668
+ const schemaDefault = schemaInstruction.defaultValue;
1669
+ const localDefaultStr = localDefault && inline3(localDefault);
1670
+ const schemaDefaultStr = schemaDefault && inline3(schemaDefault);
1671
+ if (localDefaultStr !== schemaDefaultStr) {
1672
+ stmts.push(
1673
+ sql.query({
1674
+ alterTable,
1675
+ alterColumn: [
1676
+ column2,
1677
+ schemaDefault ? sql`set default ${schemaDefault}` : sql`drop default`
1678
+ ]
1679
+ })
1680
+ );
1681
+ }
1682
+ }
1683
+ }
1684
+ return stmts.map(inline3);
1685
+ });
1686
+ };
1687
+
1688
+ // node_modules/rado/dist/postgres/transactions.js
1689
+ function setTransaction2(options) {
1690
+ return [
1691
+ "set transaction",
1692
+ options.isolationLevel && `isolation level ${options.isolationLevel}`,
1693
+ options.accessMode,
1694
+ options.deferrable ? "deferrable" : "not deferrable"
1695
+ ].filter(Boolean).join(" ");
1696
+ }
1697
+
1698
+ // node_modules/rado/dist/driver/pg.js
1699
+ function isPool2(client) {
1700
+ return "connect" in client && "totalCount" in client && "idleCount" in client && "waitingCount" in client;
1701
+ }
1702
+ async function acquireClient(client, depth) {
1703
+ if (depth > 0 || !isPool2(client)) return { client };
1704
+ const acquired = await client.connect();
1705
+ return {
1706
+ client: acquired,
1707
+ release: () => acquired.release()
1708
+ };
1709
+ }
1710
+ var PreparedStatement8 = class {
1711
+ constructor(client, sql2, name) {
1712
+ this.client = client;
1713
+ this.sql = sql2;
1714
+ this.name = name;
1715
+ }
1716
+ client;
1717
+ sql;
1718
+ name;
1719
+ all(params) {
1720
+ return this.client.query({
1721
+ name: this.name,
1722
+ text: this.sql,
1723
+ values: params
1724
+ }).then((res) => res.rows);
1725
+ }
1726
+ async run(params) {
1727
+ await this.client.query(
1728
+ {
1729
+ name: this.name,
1730
+ text: this.sql,
1731
+ values: params
1732
+ },
1733
+ params
1734
+ );
1735
+ }
1736
+ get(params) {
1737
+ return this.all(params).then((rows) => rows[0] ?? null);
1738
+ }
1739
+ values(params) {
1740
+ return this.client.query({
1741
+ name: this.name,
1742
+ text: this.sql,
1743
+ values: params,
1744
+ rowMode: "array"
1745
+ }).then((res) => res.rows);
1746
+ }
1747
+ free() {
1748
+ }
1749
+ };
1750
+ var PgDriver = class _PgDriver {
1751
+ constructor(client, depth = 0) {
1752
+ this.client = client;
1753
+ this.depth = depth;
1754
+ }
1755
+ client;
1756
+ depth;
1757
+ parsesJson = true;
1758
+ supportsTransactions = true;
1759
+ async exec(query) {
1760
+ await this.client.query(query);
1761
+ }
1762
+ prepare(sql2, options) {
1763
+ return new PreparedStatement8(this.client, sql2, options?.name);
1764
+ }
1765
+ async close() {
1766
+ if (this.depth > 0) throw new Error("Cannot close a transaction");
1767
+ if ("release" in this.client) return this.client.release();
1768
+ if ("end" in this.client) return this.client.end();
1769
+ }
1770
+ async batch(queries) {
1771
+ return this.transaction(async (tx) => {
1772
+ const results = [];
1773
+ for (const { sql: sql2, params } of queries)
1774
+ results.push(await tx.prepare(sql2).values(params));
1775
+ return results;
1776
+ }, {});
1777
+ }
1778
+ async transaction(run, options) {
1779
+ const { client, release } = await acquireClient(this.client, this.depth);
1780
+ try {
1781
+ await client.query(this.depth > 0 ? `savepoint d${this.depth}` : "begin");
1782
+ if (this.depth === 0) await client.query(setTransaction2(options));
1783
+ const result = await run(new _PgDriver(client, this.depth + 1));
1784
+ await client.query(
1785
+ this.depth > 0 ? `release savepoint d${this.depth}` : "commit"
1786
+ );
1787
+ return result;
1788
+ } catch (error) {
1789
+ await client.query(
1790
+ this.depth > 0 ? `rollback to savepoint d${this.depth}` : "rollback"
1791
+ );
1792
+ throw error;
1793
+ } finally {
1794
+ release?.();
1795
+ }
1796
+ }
1797
+ };
1798
+ function connect7(client) {
1799
+ return new AsyncDatabase(
1800
+ new PgDriver(client),
1801
+ postgresDialect,
1802
+ postgresDiff
1803
+ );
1804
+ }
1805
+
1806
+ // node_modules/rado/dist/driver/pglite.js
1807
+ var RAW_DATE_TIME_PARSERS = {
1808
+ 20: (value) => value,
1809
+ // int8 / bigint (e.g. count(*))
1810
+ 1082: (value) => value,
1811
+ // date
1812
+ 1114: (value) => value,
1813
+ // timestamp
1814
+ 1184: (value) => value
1815
+ // timestamptz
1816
+ };
1817
+ var PreparedStatement9 = class {
1818
+ constructor(client, sql2) {
1819
+ this.client = client;
1820
+ this.sql = sql2;
1821
+ }
1822
+ client;
1823
+ sql;
1824
+ all(params) {
1825
+ return this.client.query(this.sql, params, {
1826
+ rowMode: "object",
1827
+ parsers: RAW_DATE_TIME_PARSERS
1828
+ }).then((res) => res.rows);
1829
+ }
1830
+ async run(params) {
1831
+ await this.client.query(this.sql, params, {
1832
+ rowMode: "array",
1833
+ parsers: RAW_DATE_TIME_PARSERS
1834
+ });
1835
+ }
1836
+ get(params) {
1837
+ return this.all(params).then((rows) => rows[0] ?? null);
1838
+ }
1839
+ values(params) {
1840
+ return this.client.query(this.sql, params, {
1841
+ rowMode: "array",
1842
+ parsers: RAW_DATE_TIME_PARSERS
1843
+ }).then((res) => res.rows);
1844
+ }
1845
+ free() {
1846
+ }
1847
+ };
1848
+ var PGliteDriver = class _PGliteDriver {
1849
+ constructor(client, depth = 0) {
1850
+ this.client = client;
1851
+ this.depth = depth;
1852
+ }
1853
+ client;
1854
+ depth;
1855
+ parsesJson = true;
1856
+ supportsTransactions = true;
1857
+ async exec(query) {
1858
+ await this.client.exec(query);
1859
+ }
1860
+ close() {
1861
+ if ("close" in this.client) return this.client.close();
1862
+ throw new Error("Cannot close a transaction");
1863
+ }
1864
+ prepare(sql2) {
1865
+ return new PreparedStatement9(this.client, sql2);
1866
+ }
1867
+ async batch(queries) {
1868
+ const transact = async (tx) => {
1869
+ const results = [];
1870
+ for (const { sql: sql2, params } of queries)
1871
+ results.push(await tx.prepare(sql2).values(params));
1872
+ return results;
1873
+ };
1874
+ if (this.depth > 0) return transact(this);
1875
+ return this.transaction(transact, {});
1876
+ }
1877
+ async transaction(run, options) {
1878
+ if (this.depth === 0 && "transaction" in this.client)
1879
+ return this.client.transaction(async (tx) => {
1880
+ await tx.query(setTransaction2(options));
1881
+ return run(new _PGliteDriver(tx, this.depth + 1));
1882
+ });
1883
+ await this.exec(`savepoint d${this.depth}`);
1884
+ try {
1885
+ const result = await run(new _PGliteDriver(this.client, this.depth + 1));
1886
+ await this.exec(`release d${this.depth}`);
1887
+ return result;
1888
+ } catch (error) {
1889
+ await this.exec(`rollback to d${this.depth}`);
1890
+ throw error;
1891
+ }
1892
+ }
1893
+ };
1894
+ function connect8(db) {
1895
+ return new AsyncDatabase(new PGliteDriver(db), postgresDialect, postgresDiff);
1896
+ }
1897
+
1898
+ // node_modules/rado/dist/driver/sql.js.js
1899
+ var PreparedStatement10 = class {
1900
+ constructor(client, stmt) {
1901
+ this.client = client;
1902
+ this.stmt = stmt;
1903
+ }
1904
+ client;
1905
+ stmt;
1906
+ *iterate(params) {
1907
+ this.stmt.bind(params);
1908
+ while (this.stmt.step()) yield this.stmt.getAsObject();
1909
+ this.stmt.reset();
1910
+ }
1911
+ *iterateValues(params) {
1912
+ this.stmt.bind(params);
1913
+ while (this.stmt.step()) yield this.stmt.get();
1914
+ this.stmt.reset();
1915
+ }
1916
+ all(params) {
1917
+ return Array.from(this.iterate(params));
1918
+ }
1919
+ run(params) {
1920
+ this.stmt.run(params);
1921
+ this.stmt.reset();
1922
+ return { rowsAffected: this.client.getRowsModified() };
1923
+ }
1924
+ get(params) {
1925
+ return this.all(params)[0] ?? null;
1926
+ }
1927
+ values(params) {
1928
+ return Array.from(this.iterateValues(params));
1929
+ }
1930
+ free() {
1931
+ this.stmt.free();
1932
+ }
1933
+ };
1934
+ var SqlJsDriver = class _SqlJsDriver {
1935
+ constructor(client, depth = 0) {
1936
+ this.client = client;
1937
+ this.depth = depth;
1938
+ }
1939
+ client;
1940
+ depth;
1941
+ parsesJson = false;
1942
+ supportsTransactions = true;
1943
+ exec(query) {
1944
+ this.client.exec(query);
1945
+ }
1946
+ close() {
1947
+ this.client.close();
1948
+ }
1949
+ prepare(sql2) {
1950
+ return new PreparedStatement10(this.client, this.client.prepare(sql2));
1951
+ }
1952
+ batch(queries) {
1953
+ return this.transaction(
1954
+ (tx) => queries.map(({ sql: sql2, params }) => tx.prepare(sql2).values(params)),
1955
+ {}
1956
+ );
1957
+ }
1958
+ transaction(run, options) {
1959
+ return execTransaction(
1960
+ this,
1961
+ this.depth,
1962
+ (depth) => new _SqlJsDriver(this.client, depth),
1963
+ run,
1964
+ options
1965
+ );
1966
+ }
1967
+ };
1968
+ function connect9(db) {
1969
+ return new SyncDatabase(new SqlJsDriver(db), sqliteDialect, sqliteDiff);
1970
+ }
1971
+
1972
+ export {
1973
+ driver_exports
1974
+ };