@mistriwork/kit 1.0.0-rc.11 → 1.0.0-rc.13

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 (970) hide show
  1. package/dist/client/actionGrants.d.ts +21 -0
  2. package/dist/client/actionGrants.js +24 -0
  3. package/dist/client/addressMount.d.ts +67 -0
  4. package/dist/client/addressMount.js +136 -0
  5. package/dist/client/app.d.ts +10 -0
  6. package/dist/client/app.js +976 -0
  7. package/dist/client/boot.d.ts +1 -0
  8. package/dist/client/boot.js +37 -0
  9. package/dist/client/brandLook.css +125 -0
  10. package/dist/client/breakdownBatch.d.ts +34 -0
  11. package/dist/client/breakdownBatch.js +115 -0
  12. package/dist/client/bulkActions.d.ts +66 -0
  13. package/dist/client/bulkActions.js +171 -0
  14. package/dist/client/chart.d.ts +20 -0
  15. package/dist/client/chart.js +80 -0
  16. package/dist/client/clauses.d.ts +121 -0
  17. package/dist/client/clauses.js +276 -0
  18. package/dist/client/columns.d.ts +77 -0
  19. package/dist/client/columns.js +102 -0
  20. package/dist/client/components/Accordion.d.ts +26 -0
  21. package/dist/client/components/Accordion.js +44 -0
  22. package/dist/client/components/ApiOperations.d.ts +3 -0
  23. package/dist/client/components/ApiOperations.js +162 -0
  24. package/dist/client/components/AppColumnMenu.d.ts +66 -0
  25. package/dist/client/components/AppColumnMenu.js +59 -0
  26. package/dist/client/components/AppColumnMenuPopups.d.ts +21 -0
  27. package/dist/client/components/AppColumnMenuPopups.js +92 -0
  28. package/dist/client/components/AppFooter.css +17 -0
  29. package/dist/client/components/AppFooter.d.ts +23 -0
  30. package/dist/client/components/AppFooter.js +12 -0
  31. package/dist/client/components/AppIssues.d.ts +4 -0
  32. package/dist/client/components/AppIssues.js +18 -0
  33. package/dist/client/components/AppList.d.ts +20 -0
  34. package/dist/client/components/AppList.js +696 -0
  35. package/dist/client/components/AttachmentList.d.ts +45 -0
  36. package/dist/client/components/AttachmentList.js +178 -0
  37. package/dist/client/components/BoardList.css +9 -0
  38. package/dist/client/components/Breakdown.d.ts +11 -0
  39. package/dist/client/components/Breakdown.js +157 -0
  40. package/dist/client/components/BreakdownRoom.d.ts +4 -0
  41. package/dist/client/components/BreakdownRoom.js +48 -0
  42. package/dist/client/components/CardsList.d.ts +23 -0
  43. package/dist/client/components/CardsList.js +209 -0
  44. package/dist/client/components/Chart.css +165 -0
  45. package/dist/client/components/Chart.d.ts +194 -0
  46. package/dist/client/components/Chart.js +801 -0
  47. package/dist/client/components/ChartFigure.d.ts +82 -0
  48. package/dist/client/components/ChartFigure.js +102 -0
  49. package/dist/client/components/ChartShapes.css +213 -0
  50. package/dist/client/components/ChartShapes.d.ts +63 -0
  51. package/dist/client/components/ChartShapes.js +393 -0
  52. package/dist/client/components/Checklist.css +16 -0
  53. package/dist/client/components/Composer.d.ts +1 -0
  54. package/dist/client/components/Composer.js +331 -0
  55. package/dist/client/components/Content.d.ts +8 -0
  56. package/dist/client/components/Content.js +170 -0
  57. package/dist/client/components/CountedLabel.d.ts +10 -0
  58. package/dist/client/components/CountedLabel.js +26 -0
  59. package/dist/client/components/Crumbs.d.ts +11 -0
  60. package/dist/client/components/Crumbs.js +142 -0
  61. package/dist/client/components/DashboardList.css +7 -0
  62. package/dist/client/components/DashboardList.d.ts +9 -0
  63. package/dist/client/components/DashboardList.js +46 -0
  64. package/dist/client/components/DashboardNote.d.ts +21 -0
  65. package/dist/client/components/DashboardNote.js +22 -0
  66. package/dist/client/components/DateField.css +6 -0
  67. package/dist/client/components/DateField.d.ts +7 -0
  68. package/dist/client/components/DateField.js +27 -0
  69. package/dist/client/components/DefinedFields.d.ts +50 -0
  70. package/dist/client/components/DefinedFields.js +186 -0
  71. package/dist/client/components/DeleteButton.d.ts +30 -0
  72. package/dist/client/components/DeleteButton.js +198 -0
  73. package/dist/client/components/Diagram.d.ts +7 -0
  74. package/dist/client/components/Diagram.js +320 -0
  75. package/dist/client/components/Dressed.d.ts +31 -0
  76. package/dist/client/components/Dressed.js +138 -0
  77. package/dist/client/components/Dropdown.d.ts +14 -0
  78. package/dist/client/components/Dropdown.js +20 -0
  79. package/dist/client/components/EditLayoutButton.d.ts +13 -0
  80. package/dist/client/components/EditLayoutButton.js +7 -0
  81. package/dist/client/components/Editable.d.ts +47 -0
  82. package/dist/client/components/Editable.js +422 -0
  83. package/dist/client/components/ErrorBoundary.d.ts +40 -0
  84. package/dist/client/components/ErrorBoundary.js +41 -0
  85. package/dist/client/components/Export.d.ts +15 -0
  86. package/dist/client/components/Export.js +151 -0
  87. package/dist/client/components/ExportHold.d.ts +18 -0
  88. package/dist/client/components/ExportHold.js +30 -0
  89. package/dist/client/components/FavoriteStar.d.ts +5 -0
  90. package/dist/client/components/FavoriteStar.js +14 -0
  91. package/dist/client/components/FieldArranger.d.ts +29 -0
  92. package/dist/client/components/FieldArranger.js +83 -0
  93. package/dist/client/components/FilePreview.css +20 -0
  94. package/dist/client/components/FilePreview.d.ts +26 -0
  95. package/dist/client/components/FilePreview.js +170 -0
  96. package/dist/client/components/FilterBoxes.d.ts +76 -0
  97. package/dist/client/components/FilterBoxes.js +294 -0
  98. package/dist/client/components/FilterRail.css +100 -0
  99. package/dist/client/components/FilterRail.d.ts +61 -0
  100. package/dist/client/components/FilterRail.js +559 -0
  101. package/dist/client/components/Gallery.d.ts +11 -0
  102. package/dist/client/components/Gallery.js +53 -0
  103. package/dist/client/components/Grid.d.ts +122 -0
  104. package/dist/client/components/Grid.js +1115 -0
  105. package/dist/client/components/GridCellEditor.d.ts +35 -0
  106. package/dist/client/components/GridCellEditor.js +291 -0
  107. package/dist/client/components/GridSelection.d.ts +16 -0
  108. package/dist/client/components/GridSelection.js +28 -0
  109. package/dist/client/components/HelpPanel.d.ts +5 -0
  110. package/dist/client/components/HelpPanel.js +92 -0
  111. package/dist/client/components/History.d.ts +10 -0
  112. package/dist/client/components/History.js +22 -0
  113. package/dist/client/components/Icon.d.ts +31 -0
  114. package/dist/client/components/Icon.js +20 -0
  115. package/dist/client/components/JsonPreview.d.ts +5 -0
  116. package/dist/client/components/JsonPreview.js +25 -0
  117. package/dist/client/components/JsonValue.d.ts +4 -0
  118. package/dist/client/components/JsonValue.js +3 -0
  119. package/dist/client/components/JsonView.css +109 -0
  120. package/dist/client/components/JsonView.d.ts +3 -0
  121. package/dist/client/components/JsonView.js +118 -0
  122. package/dist/client/components/Landing.d.ts +19 -0
  123. package/dist/client/components/Landing.js +55 -0
  124. package/dist/client/components/LandingSurface.css +177 -0
  125. package/dist/client/components/LandingSurface.d.ts +42 -0
  126. package/dist/client/components/LandingSurface.js +108 -0
  127. package/dist/client/components/LayoutBuilder.d.ts +36 -0
  128. package/dist/client/components/LayoutBuilder.js +104 -0
  129. package/dist/client/components/Lightbox.d.ts +29 -0
  130. package/dist/client/components/Lightbox.js +62 -0
  131. package/dist/client/components/ListEmpty.css +13 -0
  132. package/dist/client/components/ListEmpty.d.ts +10 -0
  133. package/dist/client/components/ListEmpty.js +8 -0
  134. package/dist/client/components/ListFilterBar.css +76 -0
  135. package/dist/client/components/ListFilterBar.d.ts +52 -0
  136. package/dist/client/components/ListFilterBar.js +304 -0
  137. package/dist/client/components/LiveNotices.css +105 -0
  138. package/dist/client/components/LiveNotices.d.ts +26 -0
  139. package/dist/client/components/LiveNotices.js +211 -0
  140. package/dist/client/components/MinorMoneyInput.d.ts +26 -0
  141. package/dist/client/components/MinorMoneyInput.js +50 -0
  142. package/dist/client/components/Modal.css +3 -0
  143. package/dist/client/components/MultiStepForm.css +122 -0
  144. package/dist/client/components/MultiStepForm.d.ts +59 -0
  145. package/dist/client/components/MultiStepForm.js +216 -0
  146. package/dist/client/components/NavGlyph.d.ts +14 -0
  147. package/dist/client/components/NavGlyph.js +27 -0
  148. package/dist/client/components/Nested.d.ts +21 -0
  149. package/dist/client/components/Nested.js +86 -0
  150. package/dist/client/components/NewRecord.d.ts +89 -0
  151. package/dist/client/components/NewRecord.js +897 -0
  152. package/dist/client/components/NewRecordButton.d.ts +13 -0
  153. package/dist/client/components/NewRecordButton.js +28 -0
  154. package/dist/client/components/Notes.css +39 -0
  155. package/dist/client/components/Notes.d.ts +59 -0
  156. package/dist/client/components/Notes.js +96 -0
  157. package/dist/client/components/OverflowMenu.d.ts +3 -0
  158. package/dist/client/components/OverflowMenu.js +60 -0
  159. package/dist/client/components/Page.d.ts +52 -0
  160. package/dist/client/components/Page.js +237 -0
  161. package/dist/client/components/PageCurrent.d.ts +38 -0
  162. package/dist/client/components/PageCurrent.js +27 -0
  163. package/dist/client/components/PageEmptyRun.d.ts +18 -0
  164. package/dist/client/components/PageEmptyRun.js +118 -0
  165. package/dist/client/components/PageFields.d.ts +3 -0
  166. package/dist/client/components/PageFields.js +294 -0
  167. package/dist/client/components/PageFlowDiagram.css +193 -0
  168. package/dist/client/components/PageFlowDiagram.d.ts +95 -0
  169. package/dist/client/components/PageFlowDiagram.js +276 -0
  170. package/dist/client/components/PageFlows.css +27 -0
  171. package/dist/client/components/PageFlows.d.ts +54 -0
  172. package/dist/client/components/PageFlows.js +92 -0
  173. package/dist/client/components/PageGroups.d.ts +43 -0
  174. package/dist/client/components/PageGroups.js +123 -0
  175. package/dist/client/components/PageHead.d.ts +28 -0
  176. package/dist/client/components/PageHead.js +279 -0
  177. package/dist/client/components/PageHeadline.d.ts +23 -0
  178. package/dist/client/components/PageHeadline.js +101 -0
  179. package/dist/client/components/PageHistory.d.ts +62 -0
  180. package/dist/client/components/PageHistory.js +160 -0
  181. package/dist/client/components/PageLayout.d.ts +22 -0
  182. package/dist/client/components/PageLayout.js +13 -0
  183. package/dist/client/components/PageMetrics.d.ts +11 -0
  184. package/dist/client/components/PageMetrics.js +252 -0
  185. package/dist/client/components/PageRelated.d.ts +70 -0
  186. package/dist/client/components/PageRelated.js +667 -0
  187. package/dist/client/components/PageRoom.d.ts +37 -0
  188. package/dist/client/components/PageRoom.js +277 -0
  189. package/dist/client/components/PageSectionBox.d.ts +28 -0
  190. package/dist/client/components/PageSectionBox.js +65 -0
  191. package/dist/client/components/PageSections.d.ts +38 -0
  192. package/dist/client/components/PageSections.js +352 -0
  193. package/dist/client/components/PageSkeleton.css +17 -0
  194. package/dist/client/components/PageSkeleton.d.ts +11 -0
  195. package/dist/client/components/PageSkeleton.js +25 -0
  196. package/dist/client/components/PageTimeline.d.ts +2 -0
  197. package/dist/client/components/PageTimeline.js +273 -0
  198. package/dist/client/components/Palette.d.ts +4 -0
  199. package/dist/client/components/Palette.js +176 -0
  200. package/dist/client/components/Peek.d.ts +1 -0
  201. package/dist/client/components/Peek.js +158 -0
  202. package/dist/client/components/PeekPanel.d.ts +16 -0
  203. package/dist/client/components/PeekPanel.js +120 -0
  204. package/dist/client/components/Picker.d.ts +13 -0
  205. package/dist/client/components/Picker.js +33 -0
  206. package/dist/client/components/Prefs.d.ts +3 -0
  207. package/dist/client/components/Prefs.js +121 -0
  208. package/dist/client/components/PresentationSwitch.d.ts +13 -0
  209. package/dist/client/components/PresentationSwitch.js +10 -0
  210. package/dist/client/components/Prompt.d.ts +35 -0
  211. package/dist/client/components/Prompt.js +114 -0
  212. package/dist/client/components/QrCode.css +11 -0
  213. package/dist/client/components/QrCode.d.ts +4 -0
  214. package/dist/client/components/QrCode.js +57 -0
  215. package/dist/client/components/QueueList.css +122 -0
  216. package/dist/client/components/QuickAdd.css +18 -0
  217. package/dist/client/components/QuickAdd.d.ts +11 -0
  218. package/dist/client/components/QuickAdd.js +53 -0
  219. package/dist/client/components/QuickAddOnDemand.d.ts +4 -0
  220. package/dist/client/components/QuickAddOnDemand.js +10 -0
  221. package/dist/client/components/Record.d.ts +36 -0
  222. package/dist/client/components/Record.js +385 -0
  223. package/dist/client/components/RecordGone.d.ts +7 -0
  224. package/dist/client/components/RecordGone.js +22 -0
  225. package/dist/client/components/RecordPicker.d.ts +59 -0
  226. package/dist/client/components/RecordPicker.js +299 -0
  227. package/dist/client/components/RecordSummaries.d.ts +55 -0
  228. package/dist/client/components/RecordSummaries.js +151 -0
  229. package/dist/client/components/RecordTags.d.ts +6 -0
  230. package/dist/client/components/RecordTags.js +119 -0
  231. package/dist/client/components/RecordTrailNav.d.ts +25 -0
  232. package/dist/client/components/RecordTrailNav.js +110 -0
  233. package/dist/client/components/RichText.d.ts +7 -0
  234. package/dist/client/components/RichText.js +82 -0
  235. package/dist/client/components/RichTextEditor.css +202 -0
  236. package/dist/client/components/RichTextEditor.d.ts +33 -0
  237. package/dist/client/components/RichTextEditor.js +348 -0
  238. package/dist/client/components/RichTextField.d.ts +26 -0
  239. package/dist/client/components/RichTextField.js +71 -0
  240. package/dist/client/components/Rooms.d.ts +35 -0
  241. package/dist/client/components/Rooms.js +276 -0
  242. package/dist/client/components/RowActions.d.ts +8 -0
  243. package/dist/client/components/RowActions.js +49 -0
  244. package/dist/client/components/RowHost.d.ts +110 -0
  245. package/dist/client/components/RowHost.js +212 -0
  246. package/dist/client/components/SavedViews.d.ts +25 -0
  247. package/dist/client/components/SavedViews.js +35 -0
  248. package/dist/client/components/SchemaExport.d.ts +15 -0
  249. package/dist/client/components/SchemaExport.js +42 -0
  250. package/dist/client/components/SectionPeriod.css +14 -0
  251. package/dist/client/components/SectionPeriod.d.ts +7 -0
  252. package/dist/client/components/SectionPeriod.js +14 -0
  253. package/dist/client/components/SetFieldDialog.d.ts +12 -0
  254. package/dist/client/components/SetFieldDialog.js +51 -0
  255. package/dist/client/components/Sidebar.d.ts +34 -0
  256. package/dist/client/components/Sidebar.js +398 -0
  257. package/dist/client/components/Skeleton.d.ts +35 -0
  258. package/dist/client/components/Skeleton.js +49 -0
  259. package/dist/client/components/SortMenu.d.ts +20 -0
  260. package/dist/client/components/SortMenu.js +45 -0
  261. package/dist/client/components/SplitListDetail.css +119 -0
  262. package/dist/client/components/SuggestBox.d.ts +29 -0
  263. package/dist/client/components/SuggestBox.js +60 -0
  264. package/dist/client/components/Summary.d.ts +14 -0
  265. package/dist/client/components/Summary.js +93 -0
  266. package/dist/client/components/TableRoom.d.ts +88 -0
  267. package/dist/client/components/TableRoom.js +246 -0
  268. package/dist/client/components/TableView.d.ts +111 -0
  269. package/dist/client/components/TableView.js +324 -0
  270. package/dist/client/components/ThMenu.d.ts +40 -0
  271. package/dist/client/components/ThMenu.js +163 -0
  272. package/dist/client/components/ThemeLab.d.ts +4 -0
  273. package/dist/client/components/ThemeLab.js +67 -0
  274. package/dist/client/components/TimelineSides.css +23 -0
  275. package/dist/client/components/TimelineSides.d.ts +7 -0
  276. package/dist/client/components/TimelineSides.js +9 -0
  277. package/dist/client/components/Tour.d.ts +12 -0
  278. package/dist/client/components/Tour.js +131 -0
  279. package/dist/client/components/Value.d.ts +38 -0
  280. package/dist/client/components/Value.js +172 -0
  281. package/dist/client/components/WorkPanel.d.ts +9 -0
  282. package/dist/client/components/WorkPanel.js +43 -0
  283. package/dist/client/components/WorkflowStatus.d.ts +6 -0
  284. package/dist/client/components/WorkflowStatus.js +44 -0
  285. package/dist/client/components/WriteConfirm.d.ts +4 -0
  286. package/dist/client/components/WriteConfirm.js +27 -0
  287. package/dist/client/components/appColumnMenuModel.d.ts +46 -0
  288. package/dist/client/components/appColumnMenuModel.js +51 -0
  289. package/dist/client/components/appListModel.d.ts +179 -0
  290. package/dist/client/components/appListModel.js +421 -0
  291. package/dist/client/components/appRooms.d.ts +106 -0
  292. package/dist/client/components/appRooms.js +133 -0
  293. package/dist/client/components/autoChart.d.ts +33 -0
  294. package/dist/client/components/autoChart.js +107 -0
  295. package/dist/client/components/avatarPhotos.d.ts +45 -0
  296. package/dist/client/components/avatarPhotos.js +93 -0
  297. package/dist/client/components/besideDetail.d.ts +1 -0
  298. package/dist/client/components/besideDetail.js +10 -0
  299. package/dist/client/components/boardNew.d.ts +2 -0
  300. package/dist/client/components/boardNew.js +8 -0
  301. package/dist/client/components/cardsModel.d.ts +11 -0
  302. package/dist/client/components/cardsModel.js +24 -0
  303. package/dist/client/components/chromeIcons.d.ts +16 -0
  304. package/dist/client/components/chromeIcons.js +16 -0
  305. package/dist/client/components/columnPresentation.d.ts +8 -0
  306. package/dist/client/components/columnPresentation.js +47 -0
  307. package/dist/client/components/componentSlot.d.ts +31 -0
  308. package/dist/client/components/componentSlot.js +76 -0
  309. package/dist/client/components/composerDraft.d.ts +16 -0
  310. package/dist/client/components/composerDraft.js +16 -0
  311. package/dist/client/components/conditionText.d.ts +14 -0
  312. package/dist/client/components/conditionText.js +45 -0
  313. package/dist/client/components/conditionWords.d.ts +37 -0
  314. package/dist/client/components/conditionWords.js +382 -0
  315. package/dist/client/components/crumbSlot.d.ts +14 -0
  316. package/dist/client/components/crumbSlot.js +49 -0
  317. package/dist/client/components/dashboardModel.d.ts +283 -0
  318. package/dist/client/components/dashboardModel.js +415 -0
  319. package/dist/client/components/dashboardParts.d.ts +9 -0
  320. package/dist/client/components/dashboardParts.js +18 -0
  321. package/dist/client/components/diagramModel.d.ts +83 -0
  322. package/dist/client/components/diagramModel.js +211 -0
  323. package/dist/client/components/dueOpen.d.ts +1 -0
  324. package/dist/client/components/dueOpen.js +23 -0
  325. package/dist/client/components/editInteraction.d.ts +20 -0
  326. package/dist/client/components/editInteraction.js +178 -0
  327. package/dist/client/components/favoriteNav.d.ts +6 -0
  328. package/dist/client/components/favoriteNav.js +31 -0
  329. package/dist/client/components/favorites.d.ts +23 -0
  330. package/dist/client/components/favorites.js +86 -0
  331. package/dist/client/components/filePreviewModel.d.ts +18 -0
  332. package/dist/client/components/filePreviewModel.js +21 -0
  333. package/dist/client/components/filterRailModel.d.ts +93 -0
  334. package/dist/client/components/filterRailModel.js +302 -0
  335. package/dist/client/components/formControlsStyle.d.ts +1 -0
  336. package/dist/client/components/formControlsStyle.js +3 -0
  337. package/dist/client/components/formDefaults.d.ts +17 -0
  338. package/dist/client/components/formDefaults.js +128 -0
  339. package/dist/client/components/gridArrange.d.ts +33 -0
  340. package/dist/client/components/gridArrange.js +62 -0
  341. package/dist/client/components/gridCellModel.d.ts +32 -0
  342. package/dist/client/components/gridCellModel.js +42 -0
  343. package/dist/client/components/gridSizing.d.ts +89 -0
  344. package/dist/client/components/gridSizing.js +295 -0
  345. package/dist/client/components/groupMoves.d.ts +44 -0
  346. package/dist/client/components/groupMoves.js +295 -0
  347. package/dist/client/components/groupOrder.d.ts +43 -0
  348. package/dist/client/components/groupOrder.js +63 -0
  349. package/dist/client/components/inputRenderers.d.ts +48 -0
  350. package/dist/client/components/inputRenderers.js +37 -0
  351. package/dist/client/components/intakeStyle.d.ts +2 -0
  352. package/dist/client/components/intakeStyle.js +6 -0
  353. package/dist/client/components/jsonModel.d.ts +98 -0
  354. package/dist/client/components/jsonModel.js +264 -0
  355. package/dist/client/components/listColumn.d.ts +20 -0
  356. package/dist/client/components/listColumn.js +31 -0
  357. package/dist/client/components/listNavigation.d.ts +16 -0
  358. package/dist/client/components/listNavigation.js +14 -0
  359. package/dist/client/components/mentionRows.d.ts +5 -0
  360. package/dist/client/components/mentionRows.js +62 -0
  361. package/dist/client/components/mount.d.ts +55 -0
  362. package/dist/client/components/mount.js +155 -0
  363. package/dist/client/components/myViews.d.ts +54 -0
  364. package/dist/client/components/myViews.js +82 -0
  365. package/dist/client/components/navCounts.d.ts +84 -0
  366. package/dist/client/components/navCounts.js +194 -0
  367. package/dist/client/components/navigationTree.d.ts +52 -0
  368. package/dist/client/components/navigationTree.js +49 -0
  369. package/dist/client/components/newMenuModel.d.ts +27 -0
  370. package/dist/client/components/newMenuModel.js +58 -0
  371. package/dist/client/components/newRecordModel.d.ts +58 -0
  372. package/dist/client/components/newRecordModel.js +232 -0
  373. package/dist/client/components/onDemand.d.ts +30 -0
  374. package/dist/client/components/onDemand.js +121 -0
  375. package/dist/client/components/optimisticMoves.d.ts +21 -0
  376. package/dist/client/components/optimisticMoves.js +145 -0
  377. package/dist/client/components/pageContext.d.ts +154 -0
  378. package/dist/client/components/pageContext.js +47 -0
  379. package/dist/client/components/pageFieldsRead.d.ts +67 -0
  380. package/dist/client/components/pageFieldsRead.js +55 -0
  381. package/dist/client/components/pageModel.d.ts +203 -0
  382. package/dist/client/components/pageModel.js +67 -0
  383. package/dist/client/components/pageStep.d.ts +31 -0
  384. package/dist/client/components/pageStep.js +15 -0
  385. package/dist/client/components/paletteModel.d.ts +9 -0
  386. package/dist/client/components/paletteModel.js +46 -0
  387. package/dist/client/components/pickerStaleness.d.ts +32 -0
  388. package/dist/client/components/pickerStaleness.js +27 -0
  389. package/dist/client/components/placeOrder.d.ts +47 -0
  390. package/dist/client/components/placeOrder.js +71 -0
  391. package/dist/client/components/pointerDrag.d.ts +54 -0
  392. package/dist/client/components/pointerDrag.js +95 -0
  393. package/dist/client/components/presentationFit.d.ts +19 -0
  394. package/dist/client/components/presentationFit.js +32 -0
  395. package/dist/client/components/recordKeys.d.ts +2 -0
  396. package/dist/client/components/recordKeys.js +8 -0
  397. package/dist/client/components/recordSearch.d.ts +31 -0
  398. package/dist/client/components/recordSearch.js +80 -0
  399. package/dist/client/components/recordSurface.d.ts +86 -0
  400. package/dist/client/components/recordSurface.js +267 -0
  401. package/dist/client/components/rowOpens.d.ts +19 -0
  402. package/dist/client/components/rowOpens.js +25 -0
  403. package/dist/client/components/sidebarModel.d.ts +152 -0
  404. package/dist/client/components/sidebarModel.js +372 -0
  405. package/dist/client/components/suggestModel.d.ts +22 -0
  406. package/dist/client/components/suggestModel.js +49 -0
  407. package/dist/client/components/suggestPart.d.ts +4 -0
  408. package/dist/client/components/suggestPart.js +4 -0
  409. package/dist/client/components/textMeasure.d.ts +2 -0
  410. package/dist/client/components/textMeasure.js +35 -0
  411. package/dist/client/components/unknownIcon.d.ts +8 -0
  412. package/dist/client/components/unknownIcon.js +32 -0
  413. package/dist/client/components/useBulkSelection.d.ts +30 -0
  414. package/dist/client/components/useBulkSelection.js +360 -0
  415. package/dist/client/components/useConditionWords.d.ts +17 -0
  416. package/dist/client/components/useConditionWords.js +104 -0
  417. package/dist/client/components/useGridKeyboard.d.ts +32 -0
  418. package/dist/client/components/useGridKeyboard.js +223 -0
  419. package/dist/client/components/useListOrder.d.ts +94 -0
  420. package/dist/client/components/useListOrder.js +294 -0
  421. package/dist/client/components/useMediaQuery.d.ts +10 -0
  422. package/dist/client/components/useMediaQuery.js +45 -0
  423. package/dist/client/components/useMessageLanguage.d.ts +1 -0
  424. package/dist/client/components/useMessageLanguage.js +6 -0
  425. package/dist/client/components/usePins.d.ts +20 -0
  426. package/dist/client/components/usePins.js +66 -0
  427. package/dist/client/components/usePointerDrag.d.ts +72 -0
  428. package/dist/client/components/usePointerDrag.js +553 -0
  429. package/dist/client/components/useRecordInsert.d.ts +42 -0
  430. package/dist/client/components/useRecordInsert.js +145 -0
  431. package/dist/client/components/useRowWindow.d.ts +35 -0
  432. package/dist/client/components/useRowWindow.js +149 -0
  433. package/dist/client/components/useStickyHead.d.ts +17 -0
  434. package/dist/client/components/useStickyHead.js +65 -0
  435. package/dist/client/components/useTabFold.d.ts +32 -0
  436. package/dist/client/components/useTabFold.js +145 -0
  437. package/dist/client/components/valueModel.d.ts +300 -0
  438. package/dist/client/components/valueModel.js +560 -0
  439. package/dist/client/components/valueRenderers.d.ts +36 -0
  440. package/dist/client/components/valueRenderers.js +13 -0
  441. package/dist/client/components/viewLink.d.ts +27 -0
  442. package/dist/client/components/viewLink.js +79 -0
  443. package/dist/client/components/walk.d.ts +14 -0
  444. package/dist/client/components/walk.js +16 -0
  445. package/dist/client/compose.d.ts +8 -0
  446. package/dist/client/compose.js +163 -0
  447. package/dist/client/composedHook.d.ts +20 -0
  448. package/dist/client/composedHook.js +12 -0
  449. package/dist/client/composedReads.d.ts +26 -0
  450. package/dist/client/composedReads.js +183 -0
  451. package/dist/client/composer.css +499 -0
  452. package/dist/client/composer.d.ts +121 -0
  453. package/dist/client/composer.js +1079 -0
  454. package/dist/client/composerEntry.d.ts +1 -0
  455. package/dist/client/composerEntry.js +58 -0
  456. package/dist/client/composerTab.d.ts +6 -0
  457. package/dist/client/composerTab.js +20 -0
  458. package/dist/client/conditions.d.ts +46 -0
  459. package/dist/client/conditions.js +150 -0
  460. package/dist/client/connectionList.d.ts +14 -0
  461. package/dist/client/connectionList.js +149 -0
  462. package/dist/client/connectionScope.d.ts +6 -0
  463. package/dist/client/connectionScope.js +14 -0
  464. package/dist/client/connectionTransition.d.ts +12 -0
  465. package/dist/client/connectionTransition.js +41 -0
  466. package/dist/client/copy/columnMenu/components/AppColumnMenu.d.ts +4 -0
  467. package/dist/client/copy/columnMenu/components/AppColumnMenu.js +6 -0
  468. package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.d.ts +4 -0
  469. package/dist/client/copy/columnMenu/components/AppColumnMenuPopups.js +6 -0
  470. package/dist/client/copy/columnMenu/components/ThMenu.d.ts +35 -0
  471. package/dist/client/copy/columnMenu/components/ThMenu.js +37 -0
  472. package/dist/client/copy/columnMenu/components/appColumnMenuModel.d.ts +10 -0
  473. package/dist/client/copy/columnMenu/components/appColumnMenuModel.js +12 -0
  474. package/dist/client/copy/dashboards/breakdownBatch.d.ts +3 -0
  475. package/dist/client/copy/dashboards/breakdownBatch.js +5 -0
  476. package/dist/client/copy/dashboards/components/Breakdown.d.ts +32 -0
  477. package/dist/client/copy/dashboards/components/Breakdown.js +25 -0
  478. package/dist/client/copy/dashboards/components/BreakdownRoom.d.ts +3 -0
  479. package/dist/client/copy/dashboards/components/BreakdownRoom.js +5 -0
  480. package/dist/client/copy/dashboards/components/Chart.d.ts +26 -0
  481. package/dist/client/copy/dashboards/components/Chart.js +19 -0
  482. package/dist/client/copy/dashboards/components/ChartShapes.d.ts +16 -0
  483. package/dist/client/copy/dashboards/components/ChartShapes.js +12 -0
  484. package/dist/client/copy/dashboards/components/PageMetrics.d.ts +21 -0
  485. package/dist/client/copy/dashboards/components/PageMetrics.js +20 -0
  486. package/dist/client/copy/dashboards/components/SectionPeriod.d.ts +4 -0
  487. package/dist/client/copy/dashboards/components/SectionPeriod.js +6 -0
  488. package/dist/client/copy/dashboards/components/dashboardModel.d.ts +3 -0
  489. package/dist/client/copy/dashboards/components/dashboardModel.js +5 -0
  490. package/dist/client/copy/es.d.ts +11 -0
  491. package/dist/client/copy/es.js +60 -0
  492. package/dist/client/copy/filters/components/FilterBoxes.d.ts +10 -0
  493. package/dist/client/copy/filters/components/FilterBoxes.js +12 -0
  494. package/dist/client/copy/filters/components/FilterRail.d.ts +16 -0
  495. package/dist/client/copy/filters/components/FilterRail.js +18 -0
  496. package/dist/client/copy/filters/components/ListFilterBar.d.ts +9 -0
  497. package/dist/client/copy/filters/components/ListFilterBar.js +11 -0
  498. package/dist/client/copy/filters/components/conditionWords.d.ts +46 -0
  499. package/dist/client/copy/filters/components/conditionWords.js +95 -0
  500. package/dist/client/copy/filters/components/filterRailModel.d.ts +12 -0
  501. package/dist/client/copy/filters/components/filterRailModel.js +14 -0
  502. package/dist/client/copy/forms/components/DateField.d.ts +13 -0
  503. package/dist/client/copy/forms/components/DateField.js +15 -0
  504. package/dist/client/copy/forms/components/MinorMoneyInput.d.ts +4 -0
  505. package/dist/client/copy/forms/components/MinorMoneyInput.js +6 -0
  506. package/dist/client/copy/forms/components/MultiStepForm.d.ts +10 -0
  507. package/dist/client/copy/forms/components/MultiStepForm.js +12 -0
  508. package/dist/client/copy/forms/components/NewRecord.d.ts +29 -0
  509. package/dist/client/copy/forms/components/NewRecord.js +31 -0
  510. package/dist/client/copy/forms/components/NewRecordButton.d.ts +6 -0
  511. package/dist/client/copy/forms/components/NewRecordButton.js +8 -0
  512. package/dist/client/copy/forms/components/Picker.d.ts +4 -0
  513. package/dist/client/copy/forms/components/Picker.js +6 -0
  514. package/dist/client/copy/forms/components/QuickAdd.d.ts +3 -0
  515. package/dist/client/copy/forms/components/QuickAdd.js +5 -0
  516. package/dist/client/copy/forms/components/RecordPicker.d.ts +6 -0
  517. package/dist/client/copy/forms/components/RecordPicker.js +8 -0
  518. package/dist/client/copy/forms/components/RichTextEditor.d.ts +36 -0
  519. package/dist/client/copy/forms/components/RichTextEditor.js +40 -0
  520. package/dist/client/copy/forms/components/RichTextField.d.ts +3 -0
  521. package/dist/client/copy/forms/components/RichTextField.js +5 -0
  522. package/dist/client/copy/forms/components/SetFieldDialog.d.ts +10 -0
  523. package/dist/client/copy/forms/components/SetFieldDialog.js +9 -0
  524. package/dist/client/copy/forms/components/useRecordInsert.d.ts +7 -0
  525. package/dist/client/copy/forms/components/useRecordInsert.js +9 -0
  526. package/dist/client/copy/help/helpContent.d.ts +71 -0
  527. package/dist/client/copy/help/helpContent.js +73 -0
  528. package/dist/client/copy/lists/bulkActions.d.ts +12 -0
  529. package/dist/client/copy/lists/bulkActions.js +14 -0
  530. package/dist/client/copy/lists/components/AppList.d.ts +28 -0
  531. package/dist/client/copy/lists/components/AppList.js +30 -0
  532. package/dist/client/copy/lists/components/CardsList.d.ts +3 -0
  533. package/dist/client/copy/lists/components/CardsList.js +5 -0
  534. package/dist/client/copy/lists/components/Gallery.d.ts +7 -0
  535. package/dist/client/copy/lists/components/Gallery.js +9 -0
  536. package/dist/client/copy/lists/components/Grid.d.ts +30 -0
  537. package/dist/client/copy/lists/components/Grid.js +29 -0
  538. package/dist/client/copy/lists/components/GridCellEditor.d.ts +5 -0
  539. package/dist/client/copy/lists/components/GridCellEditor.js +7 -0
  540. package/dist/client/copy/lists/components/GridSelection.d.ts +4 -0
  541. package/dist/client/copy/lists/components/GridSelection.js +6 -0
  542. package/dist/client/copy/lists/components/Nested.d.ts +7 -0
  543. package/dist/client/copy/lists/components/Nested.js +9 -0
  544. package/dist/client/copy/lists/components/RowActions.d.ts +1 -0
  545. package/dist/client/copy/lists/components/RowActions.js +3 -0
  546. package/dist/client/copy/lists/components/SavedViews.d.ts +5 -0
  547. package/dist/client/copy/lists/components/SavedViews.js +7 -0
  548. package/dist/client/copy/lists/components/SortMenu.d.ts +5 -0
  549. package/dist/client/copy/lists/components/SortMenu.js +7 -0
  550. package/dist/client/copy/lists/components/TableRoom.d.ts +12 -0
  551. package/dist/client/copy/lists/components/TableRoom.js +14 -0
  552. package/dist/client/copy/lists/components/TableView.d.ts +37 -0
  553. package/dist/client/copy/lists/components/TableView.js +39 -0
  554. package/dist/client/copy/lists/components/appListModel.d.ts +6 -0
  555. package/dist/client/copy/lists/components/appListModel.js +5 -0
  556. package/dist/client/copy/lists/components/myViews.d.ts +4 -0
  557. package/dist/client/copy/lists/components/myViews.js +6 -0
  558. package/dist/client/copy/lists/components/placeOrder.d.ts +4 -0
  559. package/dist/client/copy/lists/components/placeOrder.js +6 -0
  560. package/dist/client/copy/lists/components/useBulkSelection.d.ts +20 -0
  561. package/dist/client/copy/lists/components/useBulkSelection.js +16 -0
  562. package/dist/client/copy/lists/components/useListOrder.d.ts +7 -0
  563. package/dist/client/copy/lists/components/useListOrder.js +9 -0
  564. package/dist/client/copy/public/components/appRooms.d.ts +3 -0
  565. package/dist/client/copy/public/components/appRooms.js +5 -0
  566. package/dist/client/copy/record/components/Actions.d.ts +13 -0
  567. package/dist/client/copy/record/components/Actions.js +15 -0
  568. package/dist/client/copy/record/components/AttachmentList.d.ts +23 -0
  569. package/dist/client/copy/record/components/AttachmentList.js +22 -0
  570. package/dist/client/copy/record/components/DeleteButton.d.ts +22 -0
  571. package/dist/client/copy/record/components/DeleteButton.js +24 -0
  572. package/dist/client/copy/record/components/Dressed.d.ts +5 -0
  573. package/dist/client/copy/record/components/Dressed.js +7 -0
  574. package/dist/client/copy/record/components/EditLayoutButton.d.ts +5 -0
  575. package/dist/client/copy/record/components/EditLayoutButton.js +7 -0
  576. package/dist/client/copy/record/components/Editable.d.ts +25 -0
  577. package/dist/client/copy/record/components/Editable.js +24 -0
  578. package/dist/client/copy/record/components/FieldArranger.d.ts +15 -0
  579. package/dist/client/copy/record/components/FieldArranger.js +17 -0
  580. package/dist/client/copy/record/components/FilePreview.d.ts +13 -0
  581. package/dist/client/copy/record/components/FilePreview.js +15 -0
  582. package/dist/client/copy/record/components/JsonPreview.d.ts +3 -0
  583. package/dist/client/copy/record/components/JsonPreview.js +5 -0
  584. package/dist/client/copy/record/components/JsonView.d.ts +12 -0
  585. package/dist/client/copy/record/components/JsonView.js +14 -0
  586. package/dist/client/copy/record/components/LayoutBuilder.d.ts +23 -0
  587. package/dist/client/copy/record/components/LayoutBuilder.js +25 -0
  588. package/dist/client/copy/record/components/Lightbox.d.ts +5 -0
  589. package/dist/client/copy/record/components/Lightbox.js +7 -0
  590. package/dist/client/copy/record/components/LiveNotices.d.ts +33 -0
  591. package/dist/client/copy/record/components/LiveNotices.js +29 -0
  592. package/dist/client/copy/record/components/PageCurrent.d.ts +1 -0
  593. package/dist/client/copy/record/components/PageCurrent.js +3 -0
  594. package/dist/client/copy/record/components/PageEmptyRun.d.ts +3 -0
  595. package/dist/client/copy/record/components/PageEmptyRun.js +5 -0
  596. package/dist/client/copy/record/components/PageFields.d.ts +5 -0
  597. package/dist/client/copy/record/components/PageFields.js +7 -0
  598. package/dist/client/copy/record/components/PageFlowDiagram.d.ts +33 -0
  599. package/dist/client/copy/record/components/PageFlowDiagram.js +37 -0
  600. package/dist/client/copy/record/components/PageFlows.d.ts +20 -0
  601. package/dist/client/copy/record/components/PageFlows.js +22 -0
  602. package/dist/client/copy/record/components/PageGroups.d.ts +12 -0
  603. package/dist/client/copy/record/components/PageGroups.js +14 -0
  604. package/dist/client/copy/record/components/PageHead.d.ts +8 -0
  605. package/dist/client/copy/record/components/PageHead.js +10 -0
  606. package/dist/client/copy/record/components/PageHistory.d.ts +18 -0
  607. package/dist/client/copy/record/components/PageHistory.js +20 -0
  608. package/dist/client/copy/record/components/PageLayout.d.ts +5 -0
  609. package/dist/client/copy/record/components/PageLayout.js +7 -0
  610. package/dist/client/copy/record/components/PageRelated.d.ts +24 -0
  611. package/dist/client/copy/record/components/PageRelated.js +26 -0
  612. package/dist/client/copy/record/components/PageRoom.d.ts +4 -0
  613. package/dist/client/copy/record/components/PageRoom.js +6 -0
  614. package/dist/client/copy/record/components/PageSectionBox.d.ts +6 -0
  615. package/dist/client/copy/record/components/PageSectionBox.js +10 -0
  616. package/dist/client/copy/record/components/PageTimeline.d.ts +9 -0
  617. package/dist/client/copy/record/components/PageTimeline.js +8 -0
  618. package/dist/client/copy/record/components/Peek.d.ts +3 -0
  619. package/dist/client/copy/record/components/Peek.js +5 -0
  620. package/dist/client/copy/record/components/PeekPanel.d.ts +5 -0
  621. package/dist/client/copy/record/components/PeekPanel.js +7 -0
  622. package/dist/client/copy/record/components/QrCode.d.ts +3 -0
  623. package/dist/client/copy/record/components/QrCode.js +5 -0
  624. package/dist/client/copy/record/components/Record.d.ts +19 -0
  625. package/dist/client/copy/record/components/Record.js +21 -0
  626. package/dist/client/copy/record/components/RecordGone.d.ts +4 -0
  627. package/dist/client/copy/record/components/RecordGone.js +6 -0
  628. package/dist/client/copy/record/components/RecordSummaries.d.ts +1 -0
  629. package/dist/client/copy/record/components/RecordSummaries.js +3 -0
  630. package/dist/client/copy/record/components/RecordTags.d.ts +9 -0
  631. package/dist/client/copy/record/components/RecordTags.js +11 -0
  632. package/dist/client/copy/record/components/RecordTrailNav.d.ts +8 -0
  633. package/dist/client/copy/record/components/RecordTrailNav.js +10 -0
  634. package/dist/client/copy/record/components/RichText.d.ts +4 -0
  635. package/dist/client/copy/record/components/RichText.js +6 -0
  636. package/dist/client/copy/record/components/Value.d.ts +4 -0
  637. package/dist/client/copy/record/components/Value.js +6 -0
  638. package/dist/client/copy/record/components/WorkflowStatus.d.ts +7 -0
  639. package/dist/client/copy/record/components/WorkflowStatus.js +9 -0
  640. package/dist/client/copy/record/components/WriteConfirm.d.ts +11 -0
  641. package/dist/client/copy/record/components/WriteConfirm.js +13 -0
  642. package/dist/client/copy/record/components/groupMoves.d.ts +7 -0
  643. package/dist/client/copy/record/components/groupMoves.js +9 -0
  644. package/dist/client/copy/record/components/jsonModel.d.ts +3 -0
  645. package/dist/client/copy/record/components/jsonModel.js +5 -0
  646. package/dist/client/copy/record/components/pageModel.d.ts +5 -0
  647. package/dist/client/copy/record/components/pageModel.js +7 -0
  648. package/dist/client/copy/record/components/recordSurface.d.ts +6 -0
  649. package/dist/client/copy/record/components/recordSurface.js +8 -0
  650. package/dist/client/copy/record/components/valueModel.d.ts +5 -0
  651. package/dist/client/copy/record/components/valueModel.js +7 -0
  652. package/dist/client/copy/record/fileSource.d.ts +3 -0
  653. package/dist/client/copy/record/fileSource.js +5 -0
  654. package/dist/client/copy/record/insert.d.ts +6 -0
  655. package/dist/client/copy/record/insert.js +8 -0
  656. package/dist/client/copy/record/page.d.ts +4 -0
  657. package/dist/client/copy/record/page.js +6 -0
  658. package/dist/client/copy/record/recordEditValidation.d.ts +4 -0
  659. package/dist/client/copy/record/recordEditValidation.js +6 -0
  660. package/dist/client/copy/record/savedPages.d.ts +4 -0
  661. package/dist/client/copy/record/savedPages.js +6 -0
  662. package/dist/client/copy/record/template.d.ts +9 -0
  663. package/dist/client/copy/record/template.js +11 -0
  664. package/dist/client/copy/record/write.d.ts +30 -0
  665. package/dist/client/copy/record/write.js +26 -0
  666. package/dist/client/copy/shell/app.d.ts +27 -0
  667. package/dist/client/copy/shell/app.js +43 -0
  668. package/dist/client/copy/shell/components/AppIssues.d.ts +10 -0
  669. package/dist/client/copy/shell/components/AppIssues.js +9 -0
  670. package/dist/client/copy/shell/components/Crumbs.d.ts +7 -0
  671. package/dist/client/copy/shell/components/Crumbs.js +17 -0
  672. package/dist/client/copy/shell/components/Dropdown.d.ts +3 -0
  673. package/dist/client/copy/shell/components/Dropdown.js +5 -0
  674. package/dist/client/copy/shell/components/ErrorBoundary.d.ts +4 -0
  675. package/dist/client/copy/shell/components/ErrorBoundary.js +6 -0
  676. package/dist/client/copy/shell/components/FavoriteStar.d.ts +4 -0
  677. package/dist/client/copy/shell/components/FavoriteStar.js +6 -0
  678. package/dist/client/copy/shell/components/MobileNavDrawer.d.ts +4 -0
  679. package/dist/client/copy/shell/components/MobileNavDrawer.js +12 -0
  680. package/dist/client/copy/shell/components/OverflowMenu.d.ts +3 -0
  681. package/dist/client/copy/shell/components/OverflowMenu.js +10 -0
  682. package/dist/client/copy/shell/components/Palette.d.ts +15 -0
  683. package/dist/client/copy/shell/components/Palette.js +18 -0
  684. package/dist/client/copy/shell/components/Prefs.d.ts +4 -0
  685. package/dist/client/copy/shell/components/Prefs.js +11 -0
  686. package/dist/client/copy/shell/components/Prompt.d.ts +1 -0
  687. package/dist/client/copy/shell/components/Prompt.js +3 -0
  688. package/dist/client/copy/shell/components/Rooms.d.ts +6 -0
  689. package/dist/client/copy/shell/components/Rooms.js +8 -0
  690. package/dist/client/copy/shell/components/Sidebar.d.ts +7 -0
  691. package/dist/client/copy/shell/components/Sidebar.js +9 -0
  692. package/dist/client/copy/shell/components/Skeleton.d.ts +5 -0
  693. package/dist/client/copy/shell/components/Skeleton.js +7 -0
  694. package/dist/client/copy/shell/components/TopNav.d.ts +4 -0
  695. package/dist/client/copy/shell/components/TopNav.js +12 -0
  696. package/dist/client/copy/shell/components/Tour.d.ts +4 -0
  697. package/dist/client/copy/shell/components/Tour.js +6 -0
  698. package/dist/client/copy/shell/components/newMenuModel.d.ts +3 -0
  699. package/dist/client/copy/shell/components/newMenuModel.js +5 -0
  700. package/dist/client/copy/shell/components/onDemand.d.ts +3 -0
  701. package/dist/client/copy/shell/components/onDemand.js +5 -0
  702. package/dist/client/copy/shell/components/sidebarModel.d.ts +3 -0
  703. package/dist/client/copy/shell/components/sidebarModel.js +5 -0
  704. package/dist/client/copy/shell/connectionList.d.ts +6 -0
  705. package/dist/client/copy/shell/connectionList.js +8 -0
  706. package/dist/client/copy/shell/core.d.ts +16 -0
  707. package/dist/client/copy/shell/core.js +18 -0
  708. package/dist/client/copy/shell/palette.d.ts +6 -0
  709. package/dist/client/copy/shell/palette.js +8 -0
  710. package/dist/client/copy/shell/prompt.d.ts +1 -0
  711. package/dist/client/copy/shell/prompt.js +3 -0
  712. package/dist/client/copy/shell/requestIdentity.d.ts +9 -0
  713. package/dist/client/copy/shell/requestIdentity.js +11 -0
  714. package/dist/client/copy/shell/resourceRequests.d.ts +4 -0
  715. package/dist/client/copy/shell/resourceRequests.js +6 -0
  716. package/dist/client/copy/shell/sessionIdentity.d.ts +11 -0
  717. package/dist/client/copy/shell/sessionIdentity.js +13 -0
  718. package/dist/client/copy/shell/sessionLifecycle.d.ts +5 -0
  719. package/dist/client/copy/shell/sessionLifecycle.js +7 -0
  720. package/dist/client/copy/shell/startup.d.ts +5 -0
  721. package/dist/client/copy/shell/startup.js +7 -0
  722. package/dist/client/copy/shell/theme.d.ts +5 -0
  723. package/dist/client/copy/shell/theme.js +14 -0
  724. package/dist/client/copy/shell/toast.d.ts +3 -0
  725. package/dist/client/copy/shell/toast.js +5 -0
  726. package/dist/client/copy/shell/updateAttempts.d.ts +6 -0
  727. package/dist/client/copy/shell/updateAttempts.js +8 -0
  728. package/dist/client/copy/shell/visualTheme.d.ts +4 -0
  729. package/dist/client/copy/shell/visualTheme.js +6 -0
  730. package/dist/client/copy/workbench/clauses.d.ts +3 -0
  731. package/dist/client/copy/workbench/clauses.js +5 -0
  732. package/dist/client/copy/workbench/components/ApiOperations.d.ts +21 -0
  733. package/dist/client/copy/workbench/components/ApiOperations.js +23 -0
  734. package/dist/client/copy/workbench/components/Composer.d.ts +105 -0
  735. package/dist/client/copy/workbench/components/Composer.js +92 -0
  736. package/dist/client/copy/workbench/components/Diagram.d.ts +56 -0
  737. package/dist/client/copy/workbench/components/Diagram.js +46 -0
  738. package/dist/client/copy/workbench/components/Export.d.ts +26 -0
  739. package/dist/client/copy/workbench/components/Export.js +25 -0
  740. package/dist/client/copy/workbench/components/HelpPanel.d.ts +10 -0
  741. package/dist/client/copy/workbench/components/HelpPanel.js +12 -0
  742. package/dist/client/copy/workbench/components/History.d.ts +11 -0
  743. package/dist/client/copy/workbench/components/History.js +10 -0
  744. package/dist/client/copy/workbench/components/Landing.d.ts +5 -0
  745. package/dist/client/copy/workbench/components/Landing.js +7 -0
  746. package/dist/client/copy/workbench/components/SchemaExport.d.ts +24 -0
  747. package/dist/client/copy/workbench/components/SchemaExport.js +20 -0
  748. package/dist/client/copy/workbench/components/Summary.d.ts +28 -0
  749. package/dist/client/copy/workbench/components/Summary.js +24 -0
  750. package/dist/client/copy/workbench/components/ThemeLab.d.ts +25 -0
  751. package/dist/client/copy/workbench/components/ThemeLab.js +27 -0
  752. package/dist/client/copy/workbench/components/WorkPanel.d.ts +12 -0
  753. package/dist/client/copy/workbench/components/WorkPanel.js +14 -0
  754. package/dist/client/copy/workbench/composer.d.ts +36 -0
  755. package/dist/client/copy/workbench/composer.js +32 -0
  756. package/dist/client/copy/workbench/composerEntry.d.ts +4 -0
  757. package/dist/client/copy/workbench/composerEntry.js +6 -0
  758. package/dist/client/copy/workbench/export.d.ts +8 -0
  759. package/dist/client/copy/workbench/export.js +7 -0
  760. package/dist/client/copy/workbench/filterbar.d.ts +6 -0
  761. package/dist/client/copy/workbench/filterbar.js +8 -0
  762. package/dist/client/copy/workbench/handoff.d.ts +20 -0
  763. package/dist/client/copy/workbench/handoff.js +19 -0
  764. package/dist/client/copy/workbench/help.d.ts +6 -0
  765. package/dist/client/copy/workbench/help.js +8 -0
  766. package/dist/client/copy/workbench/history.d.ts +3 -0
  767. package/dist/client/copy/workbench/history.js +5 -0
  768. package/dist/client/copy/workbench/schemaexport.d.ts +5 -0
  769. package/dist/client/copy/workbench/schemaexport.js +7 -0
  770. package/dist/client/copy/workbench/tour.d.ts +22 -0
  771. package/dist/client/copy/workbench/tour.js +24 -0
  772. package/dist/client/copy/workbench/views.d.ts +6 -0
  773. package/dist/client/copy/workbench/views.js +8 -0
  774. package/dist/client/core.d.ts +327 -0
  775. package/dist/client/core.js +1082 -0
  776. package/dist/client/customThemes.css +43 -0
  777. package/dist/client/dashboard.d.ts +16 -0
  778. package/dist/client/dashboard.js +35 -0
  779. package/dist/client/deeplink.d.ts +64 -0
  780. package/dist/client/deeplink.js +384 -0
  781. package/dist/client/delete.d.ts +8 -0
  782. package/dist/client/delete.js +35 -0
  783. package/dist/client/density.d.ts +8 -0
  784. package/dist/client/density.js +102 -0
  785. package/dist/client/devtoolsEventClient.d.ts +27 -0
  786. package/dist/client/devtoolsEventClient.js +32 -0
  787. package/dist/client/documents.d.ts +9 -0
  788. package/dist/client/documents.js +23 -0
  789. package/dist/client/dom.d.ts +36 -0
  790. package/dist/client/dom.js +232 -0
  791. package/dist/client/draftRecovery.d.ts +19 -0
  792. package/dist/client/draftRecovery.js +56 -0
  793. package/dist/client/export.d.ts +59 -0
  794. package/dist/client/export.js +217 -0
  795. package/dist/client/features.css +2187 -0
  796. package/dist/client/fieldErrors.d.ts +27 -0
  797. package/dist/client/fieldErrors.js +20 -0
  798. package/dist/client/fileSource.d.ts +10 -0
  799. package/dist/client/fileSource.js +115 -0
  800. package/dist/client/filterbar.d.ts +87 -0
  801. package/dist/client/filterbar.js +168 -0
  802. package/dist/client/firstPaint.d.ts +26 -0
  803. package/dist/client/firstPaint.js +102 -0
  804. package/dist/client/fonts/Barlow-OFL.txt +125 -0
  805. package/dist/client/fonts/IBMPlexMono-OFL.txt +104 -0
  806. package/dist/client/fonts/Inter-OFL.txt +92 -0
  807. package/dist/client/fonts/barlow-400.woff2 +0 -0
  808. package/dist/client/fonts/barlow-600.woff2 +0 -0
  809. package/dist/client/fonts/barlow-semi-condensed-700.woff2 +0 -0
  810. package/dist/client/fonts/ibm-plex-mono-400.woff2 +0 -0
  811. package/dist/client/fonts/ibm-plex-mono-500.woff2 +0 -0
  812. package/dist/client/fonts/inter-latin.woff2 +0 -0
  813. package/dist/client/formControls.css +5 -0
  814. package/dist/client/handoff.d.ts +47 -0
  815. package/dist/client/handoff.js +138 -0
  816. package/dist/client/help.css +151 -0
  817. package/dist/client/help.d.ts +20 -0
  818. package/dist/client/help.js +103 -0
  819. package/dist/client/helpContent.d.ts +95 -0
  820. package/dist/client/helpContent.js +661 -0
  821. package/dist/client/history.d.ts +10 -0
  822. package/dist/client/history.js +181 -0
  823. package/dist/client/historyToken.d.ts +18 -0
  824. package/dist/client/historyToken.js +27 -0
  825. package/dist/client/iconWeight.d.ts +16 -0
  826. package/dist/client/iconWeight.js +44 -0
  827. package/dist/client/index.html +244 -0
  828. package/dist/client/insert.d.ts +50 -0
  829. package/dist/client/insert.js +269 -0
  830. package/dist/client/kit.d.ts +7 -0
  831. package/dist/client/kit.js +1 -0
  832. package/dist/client/layoutDraftRecovery.d.ts +8 -0
  833. package/dist/client/layoutDraftRecovery.js +33 -0
  834. package/dist/client/ledgerLook.css +32 -0
  835. package/dist/client/liveReads.d.ts +23 -0
  836. package/dist/client/liveReads.js +38 -0
  837. package/dist/client/liveState.d.ts +94 -0
  838. package/dist/client/liveState.js +212 -0
  839. package/dist/client/locale.d.ts +141 -0
  840. package/dist/client/locale.js +0 -0
  841. package/dist/client/lumenLook.css +1867 -0
  842. package/dist/client/menu.d.ts +49 -0
  843. package/dist/client/menu.js +131 -0
  844. package/dist/client/menuScope.d.ts +6 -0
  845. package/dist/client/menuScope.js +4 -0
  846. package/dist/client/messages.d.ts +240 -0
  847. package/dist/client/messages.js +370 -0
  848. package/dist/client/motionStill.d.ts +1 -0
  849. package/dist/client/motionStill.js +17 -0
  850. package/dist/client/navigationHold.d.ts +37 -0
  851. package/dist/client/navigationHold.js +503 -0
  852. package/dist/client/nested.d.ts +8 -0
  853. package/dist/client/nested.js +26 -0
  854. package/dist/client/ownWrites.d.ts +33 -0
  855. package/dist/client/ownWrites.js +76 -0
  856. package/dist/client/page.css +4052 -0
  857. package/dist/client/page.d.ts +21 -0
  858. package/dist/client/page.js +187 -0
  859. package/dist/client/pagemarks.d.ts +32 -0
  860. package/dist/client/pagemarks.js +98 -0
  861. package/dist/client/palette.d.ts +38 -0
  862. package/dist/client/palette.js +360 -0
  863. package/dist/client/partsLook.css +1047 -0
  864. package/dist/client/peek.d.ts +11 -0
  865. package/dist/client/peek.js +51 -0
  866. package/dist/client/peekpanel.d.ts +26 -0
  867. package/dist/client/peekpanel.js +121 -0
  868. package/dist/client/pendingWork.d.ts +19 -0
  869. package/dist/client/pendingWork.js +36 -0
  870. package/dist/client/pins.d.ts +24 -0
  871. package/dist/client/pins.js +97 -0
  872. package/dist/client/prefs.d.ts +3 -0
  873. package/dist/client/prefs.js +32 -0
  874. package/dist/client/prompt.d.ts +27 -0
  875. package/dist/client/prompt.js +61 -0
  876. package/dist/client/readGathering.d.ts +4 -0
  877. package/dist/client/readGathering.js +23 -0
  878. package/dist/client/recordCompose.d.ts +11 -0
  879. package/dist/client/recordCompose.js +69 -0
  880. package/dist/client/recordDrafts.d.ts +40 -0
  881. package/dist/client/recordDrafts.js +57 -0
  882. package/dist/client/recordEditValidation.d.ts +12 -0
  883. package/dist/client/recordEditValidation.js +52 -0
  884. package/dist/client/recordIntent.d.ts +6 -0
  885. package/dist/client/recordIntent.js +15 -0
  886. package/dist/client/recordPress.d.ts +12 -0
  887. package/dist/client/recordPress.js +84 -0
  888. package/dist/client/recordSource.d.ts +6 -0
  889. package/dist/client/recordSource.js +15 -0
  890. package/dist/client/recordTrail.d.ts +77 -0
  891. package/dist/client/recordTrail.js +101 -0
  892. package/dist/client/recordWriteRefresh.d.ts +74 -0
  893. package/dist/client/recordWriteRefresh.js +284 -0
  894. package/dist/client/relatedRows.d.ts +4 -0
  895. package/dist/client/relatedRows.js +24 -0
  896. package/dist/client/requestIdentity.d.ts +36 -0
  897. package/dist/client/requestIdentity.js +97 -0
  898. package/dist/client/resourceRequests.d.ts +7 -0
  899. package/dist/client/resourceRequests.js +32 -0
  900. package/dist/client/roleLabels.d.ts +7 -0
  901. package/dist/client/roleLabels.js +24 -0
  902. package/dist/client/rowEditing.d.ts +15 -0
  903. package/dist/client/rowEditing.js +36 -0
  904. package/dist/client/sageLook.css +242 -0
  905. package/dist/client/savedPages.d.ts +27 -0
  906. package/dist/client/savedPages.js +135 -0
  907. package/dist/client/schemaexport.d.ts +14 -0
  908. package/dist/client/schemaexport.js +182 -0
  909. package/dist/client/sessionIdentity.d.ts +39 -0
  910. package/dist/client/sessionIdentity.js +255 -0
  911. package/dist/client/sessionLifecycle.d.ts +33 -0
  912. package/dist/client/sessionLifecycle.js +276 -0
  913. package/dist/client/shellHost.d.ts +70 -0
  914. package/dist/client/shellHost.js +92 -0
  915. package/dist/client/shellMain.d.ts +8 -0
  916. package/dist/client/shellMode.d.ts +433 -0
  917. package/dist/client/shellMode.js +68 -0
  918. package/dist/client/shellStart.d.ts +5 -0
  919. package/dist/client/shellStart.js +54 -0
  920. package/dist/client/shells.d.ts +123 -0
  921. package/dist/client/shells.js +1 -0
  922. package/dist/client/sql.css +139 -0
  923. package/dist/client/startup.d.ts +8 -0
  924. package/dist/client/startup.js +85 -0
  925. package/dist/client/startupHold.d.ts +10 -0
  926. package/dist/client/startupHold.js +73 -0
  927. package/dist/client/structure.css +1296 -0
  928. package/dist/client/style.css +3526 -0
  929. package/dist/client/styleImports.d.ts +3 -0
  930. package/dist/client/surfaces.d.ts +18 -0
  931. package/dist/client/surfaces.js +27 -0
  932. package/dist/client/surfacesLook.css +88 -0
  933. package/dist/client/template.d.ts +75 -0
  934. package/dist/client/template.js +403 -0
  935. package/dist/client/theme.d.ts +14 -0
  936. package/dist/client/theme.js +112 -0
  937. package/dist/client/themeFamilies.css +788 -0
  938. package/dist/client/thmenu.d.ts +12 -0
  939. package/dist/client/thmenu.js +94 -0
  940. package/dist/client/toast.d.ts +7 -0
  941. package/dist/client/toast.js +117 -0
  942. package/dist/client/tour.d.ts +8 -0
  943. package/dist/client/tour.js +176 -0
  944. package/dist/client/transport.d.ts +2 -0
  945. package/dist/client/transport.js +13 -0
  946. package/dist/client/typography.d.ts +4 -0
  947. package/dist/client/typography.js +51 -0
  948. package/dist/client/uiBridge.d.ts +57 -0
  949. package/dist/client/uiBridge.js +30 -0
  950. package/dist/client/updateAttempts.d.ts +46 -0
  951. package/dist/client/updateAttempts.js +131 -0
  952. package/dist/client/url.d.ts +74 -0
  953. package/dist/client/url.js +388 -0
  954. package/dist/client/views.d.ts +19 -0
  955. package/dist/client/views.js +133 -0
  956. package/dist/client/visualTheme.d.ts +62 -0
  957. package/dist/client/visualTheme.js +502 -0
  958. package/dist/client/visualThemes.css +421 -0
  959. package/dist/client/workshopLook.css +126 -0
  960. package/dist/client/write.d.ts +103 -0
  961. package/dist/client/write.js +885 -0
  962. package/dist/client/writePaths.d.ts +16 -0
  963. package/dist/client/writePaths.js +35 -0
  964. package/dist/client/yesNoRule.d.ts +12 -0
  965. package/dist/client/yesNoRule.js +39 -0
  966. package/dist/clientFiles.d.ts +11 -4
  967. package/dist/clientFiles.js +16 -12
  968. package/dist/vite.d.ts +136 -0
  969. package/dist/vite.js +571 -0
  970. package/package.json +136 -3
@@ -0,0 +1,976 @@
1
+ /**
2
+ * The kit's shell: the walk, the content pane, the address, the menu, the
3
+ * palette and the keys every page shares, and dispatch to a view. It names
4
+ * neither product: a product's main (appShell.js, workbenchShell.js) calls
5
+ * `boot` with its chrome and, for the Workbench, its tools — the kit's shell
6
+ * API, shells.ts.
7
+ *
8
+ * Loaded by a main once who-am-I has said this page is an App or a database
9
+ * to browse, rather than a public page (publicSurface.js) — so a sign-in
10
+ * screen or a public form never downloads it. Its first paint is this chunk
11
+ * and the entry, fetched together (the server names both in the page): the
12
+ * App framework's chrome (appnav.js) rides in the same chunk, and the
13
+ * Workbench's page names the Workbench's chunk beside them.
14
+ *
15
+ * Everything here is wiring. The views live in their own files and reach the
16
+ * shared state through core.js.
17
+ */
18
+ import { createElement } from 'react';
19
+ import { mount, queryClient, unmount, unmountAll } from './components/mount.js';
20
+ import { requireTenantSelection, sessionIdentity, tenantLeaseActive } from './sessionIdentity.js';
21
+ import { configureSessionLifecycle, invalidateSession, startSessionMonitoring } from './sessionLifecycle.js';
22
+ import { Content, holdHome, homeIsHeld, noticeOnContent, setKnownPages } from './components/Content.js';
23
+ import { setListNavigation } from './components/listNavigation.js';
24
+ import { viewLink } from './components/viewLink.js';
25
+ import { Sidebar, moveSidebar, openSidebarChoice } from './components/Sidebar.js';
26
+ import { setSidebarFilter } from './components/sidebarModel.js';
27
+ import { $, allowMutationExit, api, backTo, connectionChanged, currentEntry, el, findTable, go, invalidateNavigation, pageView, render, setPaintHold, state, toast, } from './core.js';
28
+ import { afterPaint, beforePaint, installNavigationHold } from './navigationHold.js';
29
+ import { setStartupProbe } from './startupHold.js';
30
+ import { initWriteMode, prepareEditingExit } from './write.js';
31
+ import { bootstrapRequestIdentity, initConnections, refreshConnections, syncConnectionControls } from './connectionList.js';
32
+ import { RuntimeMetadataError, UnknownAppError } from './requestIdentity.js';
33
+ import { beginConnectionTransition } from './connectionTransition.js';
34
+ import { initTour } from './tour.js';
35
+ import { canManageConnections, canUseDatabaseTools } from './connectionScope.js';
36
+ import { effectiveTheme, themeLabel, toggleTheme } from './theme.js';
37
+ import { finishStartup } from './startup.js';
38
+ import { allowSync, applyHash, connectionFromHash, readAddress, resolveLabels, syncHash, toHash, whileApplying } from './url.js';
39
+ import { initMenu, addMenuItem, setMenuGroup, setMenuMode } from './menu.js';
40
+ import { ask } from './prompt.js';
41
+ import { onDemand } from './components/onDemand.js';
42
+ import { forgetPages, pagesFor, prefetchPages, recordPageId, whenPagesChange } from './page.js';
43
+ import { listenForRecordPresses, prefetchRecordPage } from './recordPress.js';
44
+ import { installShell, shell } from './shellMode.js';
45
+ import { onLanguagePicked, subscribeMessages } from './messages.js';
46
+ import { applyDensity } from './density.js';
47
+ import { applyTypography } from './typography.js';
48
+ import { openPrefs } from './prefs.js';
49
+ import { loadTemplates } from './template.js';
50
+ import { initPeek } from './peek.js';
51
+ import { initPalette, initSidebarToggle, openPalette } from './palette.js';
52
+ import { registerSurface } from './surfaces.js';
53
+ import { OverflowMenu } from './components/OverflowMenu.js';
54
+ /* Imported for its side effect: composerEntry.js attaches the composer's
55
+ entry point, the way history.js does, and loads the composer when a view
56
+ opens. Loading it from a stylesheet's onload worked, but a script that
57
+ runs because a CSS file finished downloading is a dependency nobody would
58
+ guess from reading either file. */
59
+ import './composerEntry.js';
60
+ import { say } from './copy/shell/app.js';
61
+ import { arrivedPlacement, herePath, hereSearch, shown, shownUnplaced } from './addressMount.js';
62
+ import { addHostListener, navReplace, navState, onNavigate, sayBrandName, setTabTitle, shellBody, shellQuery, shellQueryAll, } from './shellHost.js';
63
+ /* The product this page runs, installed by its main (`boot`): its chrome,
64
+ and the Workbench's tools where it is the Workbench. */
65
+ /** @type {import('./shells.js').ShellChrome} */
66
+ let chrome = /** @type {any} */ (null);
67
+ /** @type {import('./shells.js').ShellTools | undefined} */
68
+ let offeredTools;
69
+ /* The tools once started, for the brand pass and the menu's places; null
70
+ before the Workbench's first paint, and always in an App. */
71
+ /** @type {import('./shells.js').ShellTools | null} */
72
+ let tools = null;
73
+ function startTools() {
74
+ if (offeredTools && !tools) {
75
+ tools = offeredTools;
76
+ offeredTools.start(kit);
77
+ }
78
+ }
79
+ /**
80
+ * What the page says when no connection opened: the Workbench's welcome, with
81
+ * what is listed, where it manages connections; anywhere else the product's
82
+ * own screen — no App by the name asked for, or why it is not served
83
+ * (appUnavailable.js).
84
+ * @param {any[]} listed
85
+ * @param {UnknownAppError} [unknown]
86
+ * @param {string} [unavailable]
87
+ */
88
+ function showUnopened(listed, unknown = undefined, unavailable = undefined) {
89
+ if (unknown || !canManageConnections() || !offeredTools)
90
+ chrome.unavailable(unknown, unavailable);
91
+ else
92
+ offeredTools.showWelcome(listed);
93
+ }
94
+ /* React list surfaces may be mounted outside Content (for example in a record
95
+ dialog), so the shell supplies their one navigation capability at boot. */
96
+ setListNavigation(viewLink);
97
+ registerSurface('overflowMenu', OverflowMenu);
98
+ /* The palette is drawn the first time ⌘K or Search asks for it; it arrives whole (palette.js awaits it). */
99
+ registerSurface('palette', onDemand(() => import('./components/Palette.js'), 'Palette', { quiet: true }));
100
+ registerSurface('composer', onDemand(() => import('./components/Composer.js'), 'Composer'));
101
+ /* Authoring dialogs, loaded the first time one opens: most readers never do. */
102
+ const ThemeLab = onDemand(() => import('./components/ThemeLab.js'), 'ThemeLab', { quiet: true });
103
+ /* ---------- dispatch ---------- */
104
+ /**
105
+ * Back to the schema, from anywhere.
106
+ *
107
+ * At module scope because the trail needs it as well as the wordmark — see
108
+ * the root crumb in `breadcrumb`.
109
+ */
110
+ function goHome() {
111
+ if (!allowMutationExit())
112
+ return;
113
+ invalidateNavigation();
114
+ state.stack = [];
115
+ state.page = 0;
116
+ $('query').value = '';
117
+ render();
118
+ }
119
+ function showWorkspaceOpening() {
120
+ const status = el('p', { class: 'workspace-opening', role: 'status' });
121
+ $('content').replaceChildren(status);
122
+ // Mount the live region before its words; never retain the previous tenant's content.
123
+ requestAnimationFrame(() => {
124
+ if (status.isConnected)
125
+ status.textContent = say('openingWorkspace');
126
+ });
127
+ }
128
+ async function clearSurface(me) {
129
+ chrome.retire?.(me);
130
+ chrome.navigationReady?.(false);
131
+ shellBody().classList.add('tenant-pending');
132
+ $('content').hidden = true;
133
+ beginConnectionTransition();
134
+ invalidateNavigation();
135
+ state.schema = null;
136
+ state.stack = [];
137
+ state.canWrite = false;
138
+ state.page = 0;
139
+ $('query').value = '';
140
+ $('table-filter').value = '';
141
+ unmountAll(shellQuery('.account-host'));
142
+ forgetPages();
143
+ setKnownPages([]);
144
+ // mount.tsx defers root disposal so React can remove its portals itself.
145
+ await Promise.resolve();
146
+ shellQueryAll('.tenant-control-host').forEach((host) => host.remove());
147
+ $('errors').replaceChildren();
148
+ $('errors').hidden = true;
149
+ $('explain').textContent = '';
150
+ $('explain-pane').hidden = true;
151
+ $('toast').replaceChildren();
152
+ $('toast').hidden = true;
153
+ showWorkspaceOpening();
154
+ $('content').hidden = false;
155
+ navReplace(shown(`/${encodeURIComponent(state.activeConnection)}`));
156
+ await chrome.showAccount?.(me, kit);
157
+ }
158
+ async function rebuildSurface(me) {
159
+ const owner = sessionIdentity(), transition = beginConnectionTransition();
160
+ try {
161
+ // The new context's schema, runtime, App and pages together, as at start.
162
+ const appLoaded = chrome.loadNav();
163
+ prefetchPages();
164
+ const [schema] = await Promise.all([api('/api/schema'), refreshConnections()]);
165
+ if (sessionIdentity() !== owner)
166
+ return;
167
+ state.schema = schema;
168
+ await Promise.all([loadTemplates(), tools?.loadStores(), appLoaded]);
169
+ if (sessionIdentity() !== owner)
170
+ return;
171
+ unmount($('content'));
172
+ await Promise.resolve();
173
+ if (sessionIdentity() !== owner)
174
+ return;
175
+ $('content').replaceChildren();
176
+ // A tenant switch goes home on purpose (goHome below), so nothing is held.
177
+ holdHome(false);
178
+ mount($('content'), createElement(Content, { onHome: goHome }));
179
+ shellBody().classList.remove('tenant-pending');
180
+ initMenu();
181
+ applyBrand();
182
+ renderTableList();
183
+ initWriteMode();
184
+ void chrome.loadFilters?.();
185
+ void registerPages();
186
+ connectionChanged();
187
+ goHome();
188
+ chrome.navigationReady?.(true);
189
+ await chrome.showAccount?.(me, kit);
190
+ }
191
+ finally {
192
+ transition.finish();
193
+ }
194
+ }
195
+ /* What the shells call back into (shells.ts `KitShell`). */
196
+ let businessRetired = false;
197
+ /** @type {import('./shells.js').KitShell} */
198
+ const kit = {
199
+ goHome,
200
+ showWorkspaceOpening,
201
+ clearSurface,
202
+ rebuildSurface,
203
+ retired: () => businessRetired,
204
+ retire: () => {
205
+ businessRetired = true;
206
+ },
207
+ };
208
+ /* Which row paint is current, for the one branch that answers asynchronously. */
209
+ let rowPaint = 0;
210
+ /* ---------- sidebar ---------- */
211
+ /**
212
+ * Move focus into the panel beside the list.
213
+ *
214
+ * The first thing worth landing on rather than the first focusable thing:
215
+ * a column header or a row, not the breadcrumb you just came through. If the
216
+ * panel has nothing to focus, the container itself takes it, so the keyboard
217
+ * is at least on the right side of the page.
218
+ */
219
+ function focusContent() {
220
+ const content = $('content');
221
+ const target = content.querySelector('tbody tr, .th-sort, .related-item, .field-group-head') ?? content;
222
+ if (target === content)
223
+ content.tabIndex = -1;
224
+ if (target instanceof HTMLElement)
225
+ target.focus({ preventScroll: true });
226
+ target.scrollIntoView?.({ block: 'nearest' });
227
+ }
228
+ function renderTableList(filterText = '') {
229
+ const list = $('table-list');
230
+ const appMode = shell().inApp();
231
+ const filterInput = $('table-filter');
232
+ const filterLabel = appMode ? say('filterMenu') : say('filterTables');
233
+ filterInput.placeholder = `${filterLabel}\u2026`;
234
+ filterInput.setAttribute('aria-label', filterLabel);
235
+ list.closest('nav')?.setAttribute('aria-label', appMode ? say('appMenu') : say('common.tables2'));
236
+ $('topnav').setAttribute('aria-label', say('appMenu'));
237
+ /* The product decides where its menu stands (an App's appChrome.js): the
238
+ side list, a strip under the header, or a phone's drawer. */
239
+ const sideList = chrome.menu();
240
+ /* The list is a component (components/Sidebar.tsx) drawn into the `ul`; the
241
+ filter text and the keyboard's cursor are its store. Drawn again on
242
+ every call rather than left to redraw itself, because the app, the
243
+ mode and the schema are read at draw time and the callers here are
244
+ the places that know they changed. */
245
+ setSidebarFilter(filterText);
246
+ if (!sideList) {
247
+ unmount(list);
248
+ return;
249
+ }
250
+ mount(list, createElement(Sidebar, { host: list }));
251
+ }
252
+ /**
253
+ * The shell's own words that the page's HTML or a one-time pass wrote: the
254
+ * skip link, the wordmark's title, a visitor's Sign in. Said again whenever
255
+ * the language changes, since a visitor's language arrives with the App's
256
+ * payload — after the shell has drawn — and a reader may pick another.
257
+ */
258
+ function sayShellWords() {
259
+ const skip = shellQuery('.skip-link');
260
+ if (skip)
261
+ skip.textContent = say('skipToContent');
262
+ const app = shell().inApp() ? shell().app() : undefined;
263
+ $('home-button')?.setAttribute('title', app ? say('brandHome', { app: app.name }) : say('backToTheSchema'));
264
+ const signIn = shellQuery('.account-sign-in');
265
+ if (signIn)
266
+ signIn.textContent = say('common.signIn');
267
+ }
268
+ subscribeMessages(sayShellWords);
269
+ /**
270
+ * The shell answers to the app when one is running: the brand in the top bar
271
+ * and the tab's title carry its name, and hand back to tablewalk when the
272
+ * connection has no app.
273
+ */
274
+ function applyBrand() {
275
+ const app = shell().app();
276
+ const inApp = shell().inApp();
277
+ sayBrandName(shellQuery('.brand-name'), app ? app.name : 'tablewalk', app?.shortName);
278
+ sayShellWords();
279
+ setTabTitle(say('common.documentTitle', { title: app ? app.name : state.schema.label }));
280
+ chrome.brand();
281
+ /* The class is the seam the stylesheet hides explorer chrome behind, the
282
+ way `first-run` already does. The app's colours ride the same switch. */
283
+ shellBody().classList.toggle('app-mode', inApp);
284
+ shellBody().classList.toggle('app-bound', !canManageConnections());
285
+ $('sql-toggle').hidden = !canUseDatabaseTools();
286
+ $('search-button').classList.toggle('tn-search', inApp);
287
+ syncConnectionControls();
288
+ setMenuMode(inApp ? 'app' : 'workbench');
289
+ tools?.brand();
290
+ chrome.dress();
291
+ setMenuGroup(say('authoring'), app ? [] : [{ label: say('themeLab'), category: say('authoring'), onSelect: () => void ask(ThemeLab, {}) }]);
292
+ setMenuGroup(say('appSettings'), chrome.settings?.() ?? []);
293
+ /* The reader's own settings — density, list sizes — live in one dialog,
294
+ reachable from here and from ⌘K, and apply the moment they change.
295
+ Density itself is applied on every brand pass so a fresh boot honours
296
+ the stored choice before anyone opens anything. */
297
+ applyDensity();
298
+ applyTypography();
299
+ setMenuGroup(say('viewMenu'), [
300
+ {
301
+ label: () => say('preferences'),
302
+ category: () => say('preferences.title'),
303
+ detail: () => say('appearanceAndListSettings'),
304
+ onSelect: openPrefs,
305
+ },
306
+ ]);
307
+ }
308
+ /**
309
+ * Every page this connection has, as one command each.
310
+ *
311
+ * Registered rather than given a nav item: a database with one page does not
312
+ * deserve a permanent tab, and one with nine cannot fit them. `addMenuItem`
313
+ * puts each in the overflow menu and in ⌘K from a single registration, which
314
+ * is where someone looks for "the customer page" anyway.
315
+ */
316
+ let pagesRegistration = 0;
317
+ async function registerPages() {
318
+ const registration = ++pagesRegistration;
319
+ const connection = state.activeConnection;
320
+ const schema = state.schema;
321
+ const isCurrent = () => registration === pagesRegistration && connection === state.activeConnection && schema === state.schema;
322
+ setKnownPages([]);
323
+ setMenuGroup(say('pages'), []);
324
+ try {
325
+ /* `onSelect` and `detail`, which is what the registry reads. It had been
326
+ `run` and `hint` — names nothing on the other side of this call knows —
327
+ so every page in ⌘K and in the overflow menu threw on click and did
328
+ nothing visible. The one command group built from data was the one
329
+ group nobody could use. */
330
+ const pages = await pagesFor();
331
+ if (!isCurrent())
332
+ return;
333
+ setKnownPages(pages.filter((p) => !p.error));
334
+ /* The home screen is drawn before this arrives — it is the first paint —
335
+ so it is drawn again once the pages are known. Only there: anywhere
336
+ else the reader is looking at something, and redrawing it under them
337
+ to add a list they cannot see is worse than the wait. */
338
+ if (!currentEntry())
339
+ render();
340
+ setMenuGroup(say('pages'), pages.map((page) => ({
341
+ scope: 'workbench',
342
+ category: say('pages'),
343
+ label: page.name,
344
+ detail: page.error ? page.error : say('one', { base: page.base }),
345
+ onSelect: () => {
346
+ if (!isCurrent())
347
+ return;
348
+ if (page.error) {
349
+ toast(page.error, 'error');
350
+ return;
351
+ }
352
+ go(pageView(page.id, page.base), 'reset');
353
+ },
354
+ })), 'page');
355
+ }
356
+ catch {
357
+ /* A connection whose pages cannot be read is a connection with no pages
358
+ in the menu. It is not a reason to stop starting up. */
359
+ }
360
+ }
361
+ /* ---------- a save, followed ---------- */
362
+ /**
363
+ * The App again after a save (appLive.ts), drawn where the reader stands.
364
+ * The walk is kept, so the address, the open record and the trail are, and
365
+ * the pane keeps its scroll (a paint of the same entry, navigationHold.ts).
366
+ * The room itself is drawn again rather than kept: a record's surface is
367
+ * fenced to the App it opened under (recordSurface.ts), because its grants
368
+ * and actions were that App's, so its unsent edits go with it. A save that
369
+ * changed which App this is, or left none, is a different page: that one is
370
+ * loaded whole.
371
+ */
372
+ async function reloadAppInPlace() {
373
+ const before = shell().app();
374
+ if (!(await chrome.reloadNav?.()))
375
+ return;
376
+ const after = shell().app();
377
+ if (!before || !after || before.id !== after.id) {
378
+ window.location.reload();
379
+ return;
380
+ }
381
+ // The App's pages are its own; the menu is rebuilt from them (whenPagesChange).
382
+ forgetPages();
383
+ void queryClient.invalidateQueries();
384
+ applyBrand();
385
+ renderTableList($('table-filter').value);
386
+ state.navMode = 'replace';
387
+ render();
388
+ }
389
+ /* Only where the server says it watches the App's source (appChrome.js). */
390
+ const followSaves = () => chrome.followSaves?.(reloadAppInPlace);
391
+ /* ---------- boot ---------- */
392
+ /**
393
+ * Switch connection, then rebuild the trail from the link.
394
+ *
395
+ * The order is the point: the hash is parsed only after the new schema has
396
+ * arrived, because a trail into another database names tables this one does
397
+ * not have and would parse to nothing.
398
+ */
399
+ async function switchAndRestore(id, hash) {
400
+ const transition = beginConnectionTransition();
401
+ try {
402
+ const schema = canManageConnections()
403
+ ? (await api('/api/connections/select', { id })).schema
404
+ : await api(`/api/schema?app=${encodeURIComponent(id)}`);
405
+ if (!transition.isCurrent())
406
+ return;
407
+ state.schema = schema;
408
+ state.activeConnection = id;
409
+ /* The picker names this tab's connection, not the server's idea of an
410
+ active one. A link into one database with the sidebar naming another is
411
+ the interface disagreeing with itself about where you are — and now
412
+ that every request carries its own connection, the server's active is
413
+ not this tab's answer to anything. */
414
+ void refreshConnections();
415
+ /* Layouts, saved pages, SQL and the app manifest are stored per
416
+ connection, so the new connection's are pulled before anything is
417
+ drawn with them — and before the menu is rebuilt, which reads the
418
+ saved-pages mirror. In parallel: four independent round trips in a
419
+ row was a whole extra beat of sidebar-blank per deep link. */
420
+ await Promise.all([loadTemplates(), tools?.loadStores(), chrome.loadNav()]);
421
+ if (!transition.isCurrent())
422
+ return;
423
+ // Un-awaited on purpose: a warm cache, not a gate on first paint.
424
+ void chrome.loadFilters?.();
425
+ // A different database has different pages.
426
+ void registerPages();
427
+ /* Same signal the picker sends, so a deep link into another database
428
+ rebuilds the long-lived surfaces the way a switch does. */
429
+ connectionChanged();
430
+ renderTableList();
431
+ /* A list said in words (`/thread/board?tab=…`) is read against the
432
+ App just loaded, as applyHash reads one on the connection already open. */
433
+ const parsed = readAddress(hash, (t) => findTable(t) ?? state.schema.tables.find((x) => x.name === t));
434
+ holdHome(false);
435
+ whileApplying(() => {
436
+ state.stack = parsed?.stack ?? [];
437
+ state.page = 0;
438
+ state.navMode = 'replace';
439
+ render();
440
+ });
441
+ /* Written explicitly, after the suppressed render. Boot renders once
442
+ before the link is applied and stamps the *previous* connection into
443
+ the address bar; without this the URL keeps claiming a database the
444
+ page is no longer showing, and copying it hands someone the wrong
445
+ link. */
446
+ /* Open the address gate here, not in boot: on a cold deep link into
447
+ another database the boot deliberately left it shut so that no render
448
+ between then and now could stamp the outgoing connection into the bar.
449
+ Now the target is loaded and current, so its address is the right one
450
+ to write. Idempotent for the picker/popstate callers, where it is
451
+ already open. */
452
+ allowSync();
453
+ state.navMode = 'replace';
454
+ syncHash();
455
+ $('db-label').textContent = `${schema.label} · ${schema.dialect}`;
456
+ applyBrand();
457
+ followSaves();
458
+ if (parsed?.stack.length)
459
+ void resolveLabels(parsed.stack, (t) => findTable(t));
460
+ }
461
+ catch (err) {
462
+ if (!transition.isCurrent())
463
+ return;
464
+ // Finish loading whichever schema remains after a failed overlapping switch.
465
+ await state.onSwitched?.(transition.isCurrent);
466
+ if (!transition.isCurrent())
467
+ return;
468
+ connectionChanged();
469
+ /* A dead end otherwise.
470
+
471
+ A bookmarked link naming a connection that has since been removed used
472
+ to render this message and stop, on a page whose only way forward was
473
+ editing the URL by hand — while the database the session *is* connected
474
+ to sat there, loaded and unreachable. The fallback is made out loud
475
+ instead: say which link failed, then show the connection we do have.
476
+ Silently substituting it would be the other error, and the worse one. */
477
+ const said = el('p', {
478
+ class: 'note',
479
+ text: say('showingInstead', { message: err.message, label: state.schema?.label ?? say('theCurrentDatabase') }),
480
+ });
481
+ if (!state.schema) {
482
+ $('content').replaceChildren(said);
483
+ return;
484
+ }
485
+ state.stack = [];
486
+ state.page = 0;
487
+ holdHome(false);
488
+ allowSync();
489
+ state.navMode = 'replace';
490
+ render();
491
+ syncHash();
492
+ // Above the landing page rather than instead of it: the reason and the
493
+ // way forward want to be on screen together.
494
+ noticeOnContent(said.textContent);
495
+ }
496
+ finally {
497
+ transition.finish();
498
+ }
499
+ }
500
+ /**
501
+ * The rest of boot, from who-am-I's answer, for the product whose main
502
+ * asked it (shells.ts `ShellProduct`): that main drew whatever its product
503
+ * shows before the shell (an App's public pages, its sign-in).
504
+ * @param {Record<string, any>} me
505
+ * @param {unknown} landingAt where the address landed (publicRoutes.js `landingRoute`), which the App's chrome reads
506
+ * @param {import('./shells.js').ShellProduct} installed
507
+ */
508
+ export async function boot(me, landingAt, installed) {
509
+ chrome = installed.chrome;
510
+ offeredTools = installed.tools;
511
+ /* The shell's answers to the kit (shellMode.ts), named before anything
512
+ asks: the product's (an App's words, openers and tenant, appnav.js; the
513
+ Workbench's glance), and the walk's page resolver and read-ahead. The
514
+ Workbench's tools name their own Undo when they start (workbench.js). */
515
+ installShell({
516
+ ...chrome.answers,
517
+ resolvePage: recordPageId,
518
+ prefetchRecord: prefetchRecordPage,
519
+ });
520
+ chrome.start?.(me);
521
+ await chrome.loadTenancy?.(me);
522
+ configureSessionLifecycle({
523
+ onReload: () => window.location.reload(),
524
+ ...chrome.lifecycle?.(me, kit),
525
+ onLock: (reason) => {
526
+ chrome.retire?.(me);
527
+ beginConnectionTransition();
528
+ invalidateNavigation();
529
+ state.schema = null;
530
+ state.stack = [];
531
+ state.canWrite = false;
532
+ state.activeConnection = null;
533
+ state.connections = [];
534
+ unmountAll();
535
+ shellBody().classList.add('session-locked', 'signed-out');
536
+ const titles = {
537
+ expired: say('sessionExpired'),
538
+ 'signed-out': say('signedOut'),
539
+ 'account-changed': say('accountChanged'),
540
+ 'other-tab': say('accountChanged'),
541
+ unavailable: say('sessionUnavailable'),
542
+ };
543
+ const reload = el('button', { type: 'button', text: say('common.reload'), onclick: () => window.location.reload() });
544
+ const lock = el('section', { id: 'session-lock', role: 'alertdialog', 'aria-modal': 'true', 'aria-labelledby': 'session-lock-title' }, [el('h1', { id: 'session-lock-title', text: titles[reason] }), el('p', { text: say('reloadToVerifyYourSession') }), reload]);
545
+ for (const child of shellBody().children)
546
+ child.setAttribute('inert', '');
547
+ shellBody().append(lock);
548
+ // React must remove its portals before their DOM parents disappear.
549
+ queueMicrotask(() => {
550
+ for (const child of [...shellBody().children])
551
+ if (child !== lock)
552
+ child.remove();
553
+ });
554
+ finishStartup();
555
+ reload.focus();
556
+ },
557
+ });
558
+ addHostListener(document, 'keydown', (event) => {
559
+ if (sessionIdentity().mode === 'locked')
560
+ event.stopImmediatePropagation();
561
+ else if (sessionIdentity().tenant && !tenantLeaseActive())
562
+ event.stopImmediatePropagation();
563
+ else if (sessionIdentity().tenantRequired &&
564
+ !sessionIdentity().tenant &&
565
+ !(event.target instanceof Element && event.target.closest('.tenant-chooser, .account-host, [role="dialog"], [role="menu"]')))
566
+ event.stopImmediatePropagation();
567
+ }, true);
568
+ /* Captured before anything can render. The first paint calls syncHash and
569
+ would otherwise overwrite the incoming link with the empty state — the
570
+ deep link would be destroyed a few milliseconds before being read. */
571
+ /* The path: the app routes by path, and a fragment is not an address. */
572
+ /* Read in the inside form (addressMount.js): the App's id first, whatever
573
+ the bar says of its mount and the base path. */
574
+ let incoming = herePath();
575
+ let incomingLocation = herePath() + hereSearch() + window.location.hash;
576
+ let tenantIncoming;
577
+ const requestedApp = connectionFromHash(incoming);
578
+ if (me.signedIn)
579
+ startSessionMonitoring();
580
+ const signedInStart = chrome.signedInStart?.(me, landingAt) ?? null;
581
+ if (signedInStart) {
582
+ incoming = signedInStart;
583
+ incomingLocation = incoming;
584
+ navReplace(shown(incoming));
585
+ }
586
+ if (me.tenant === true) {
587
+ /* The tenant chooser comes first, in the App's look (appChrome.js). */
588
+ const chosen = (await chrome.chooseTenant?.(me, requestedApp, incomingLocation, kit)) ?? null;
589
+ if (!chosen)
590
+ return;
591
+ ({ incoming, tenantIncoming } = chosen);
592
+ }
593
+ try {
594
+ await bootstrapRequestIdentity(connectionFromHash(incoming));
595
+ if (businessRetired)
596
+ return;
597
+ if (me.signedIn && state.activeConnection !== me.appId) {
598
+ invalidateSession('account-changed');
599
+ return;
600
+ }
601
+ }
602
+ catch (err) {
603
+ if (businessRetired || sessionIdentity().mode === 'locked')
604
+ return;
605
+ if (err.status === 401 && err.signIn)
606
+ return;
607
+ if (err instanceof RuntimeMetadataError)
608
+ throw err;
609
+ /* A tenant's public address that names no tenant: one 404, which says
610
+ nothing of any tenant, and a sentence that blames no database. */
611
+ if (err.status === 404 && !me.signedIn && arrivedPlacement()) {
612
+ // In the App's own look and under its name, as the tenant chooser is: never the database browser's.
613
+ chrome.wearLook?.(me, me.look ?? me.signIn?.look);
614
+ chrome.noWorkspace?.(typeof me.appName === 'string' ? me.appName : me.appId, shownUnplaced(`/${encodeURIComponent(me.appId)}/sign-in`));
615
+ return;
616
+ }
617
+ // Offline metadata cannot authorize the database browser's setup wizard.
618
+ /* A server that is up and says why it is not serving the App — reloading
619
+ it, or waiting for a restart — is not a database it could not reach. */
620
+ showUnopened([], err instanceof UnknownAppError ? err : undefined, err.status === 503 && typeof err.message === 'string' && err.message ? err.message : undefined);
621
+ return;
622
+ }
623
+ /* The schema, the App and its pages depend on the connection the runtime
624
+ just named, not on each other: asked together, rather than each after the
625
+ last answer. The App's load never throws; the pages are adopted by the
626
+ page cache when it is first asked (page.js). */
627
+ const appLoaded = chrome.loadNav();
628
+ prefetchPages();
629
+ try {
630
+ state.schema = await api('/api/schema');
631
+ if (businessRetired) {
632
+ state.schema = null;
633
+ return;
634
+ }
635
+ }
636
+ catch (err) {
637
+ if (businessRetired || sessionIdentity().mode === 'locked')
638
+ return;
639
+ /* A 409 here means there is no connection to read a schema *from*, which
640
+ is a screen rather than an error — and its message, "No connection is
641
+ open.", is true, unhelpful, and the last thing a first-time reader
642
+ should meet.
643
+
644
+ Asked this way round rather than by checking the connection list first,
645
+ which is what this did: that put a second request in front of every
646
+ ordinary load to answer a question only the empty case ever asks. The
647
+ failure already carries the answer. */
648
+ if (err.status === 401 && err.signIn)
649
+ return;
650
+ if (err.status === 409) {
651
+ /* Unconditionally, and with whatever is listed. A 409 here means no
652
+ connection is *open* — which covers both an empty server and one
653
+ whose only connection failed to open. The second used to fall
654
+ through to "Could not read the schema: No connection is open.",
655
+ a true sentence with nothing to click. */
656
+ showUnopened((await offeredTools?.listConnections()) ?? []);
657
+ return;
658
+ }
659
+ $('content').replaceChildren(el('p', { class: 'note', text: say('couldNotReadTheSchema', { message: err.message }) }));
660
+ return;
661
+ }
662
+ const content = $('content');
663
+ /* The ··· menu's button, before anything looks for it — the app-issues
664
+ badge sits beside it. Its commands register below and are read when it
665
+ opens. */
666
+ initMenu();
667
+ $('db-label').textContent = `${state.schema.label} · ${state.schema.dialect}`;
668
+ await appLoaded;
669
+ if (businessRetired || sessionIdentity().mode === 'locked')
670
+ return;
671
+ /* The Workbench's tools are started before it paints. */
672
+ startTools();
673
+ /* The content pane is one component tree from here on, driven by the
674
+ walk (components/Content.tsx): every render() is a paint of it. Mounted only
675
+ once the schema is known, because the landing reads it — and once the App
676
+ is, as rebuildTenantSurface mounts it. A first paint that had not yet heard
677
+ of the App drew the Workbench's landing behind the startup veil, and so
678
+ fetched the schema diagram's chunk for a reader who would never see it. */
679
+ content.replaceChildren();
680
+ /* Held before the tree mounts: from here to applying the address, every
681
+ await is a chance for React to commit an empty walk as home (Content.tsx
682
+ holdHome). A bare `/{app}` is held too, and drawn by the same paint. */
683
+ holdHome(Boolean(connectionFromHash(incoming)));
684
+ /* A paint that starts the room over keeps the screen it leaves until the
685
+ new room is complete (navigationHold.ts). The walk's top entry says
686
+ whether it is a step to a new place, which starts at the top. */
687
+ const reads = {
688
+ busy: () => queryClient.isFetching() > 0,
689
+ watch: (changed) => queryClient.getQueryCache().subscribe(changed),
690
+ };
691
+ installNavigationHold(content, reads);
692
+ /* And the first page is revealed complete the same way (startupHold.ts). */
693
+ setStartupProbe(reads);
694
+ /* An App's list keeps its room through a refinement now, as the Workbench's
695
+ table does (Content.tsx), so only a room started over is held. */
696
+ setPaintHold({
697
+ before: (roomChanged) => beforePaint(roomChanged, currentEntry(), state.stack.length),
698
+ after: () => afterPaint(currentEntry(), state.stack.length),
699
+ });
700
+ /* A press on a record begins reading its page, so the hold is short (recordCompose.ts). */
701
+ listenForRecordPresses();
702
+ mount(content, createElement(Content, { onHome: goHome }));
703
+ shellBody().classList.remove('tenant-pending');
704
+ applyBrand();
705
+ void chrome.showAccount?.(me, kit);
706
+ renderTableList();
707
+ initWriteMode();
708
+ tools?.menu('editing');
709
+ initPalette();
710
+ initPeek();
711
+ /* Registered here rather than on a connection switch, which is where it
712
+ used to be — so on an ordinary boot nothing was listening, and a page
713
+ built in the builder did not appear in the menu or in ⌘K until the tab
714
+ was reloaded. The one place that runs on every start is this one. */
715
+ whenPagesChange(() => void registerPages());
716
+ initSidebarToggle();
717
+ // Only remount navigation on a breakpoint crossing; record editors keep their owner.
718
+ chrome.compactNavigation?.addEventListener('change', () => {
719
+ if (!businessRetired && sessionIdentity().mode !== 'locked')
720
+ renderTableList($('table-filter').value);
721
+ });
722
+ // The theme bench moved the menu (themeBench.ts): the shell is drawn again around the same room.
723
+ chrome.whenMenuMoves?.(() => {
724
+ if (!businessRetired && sessionIdentity().mode !== 'locked')
725
+ renderTableList($('table-filter').value);
726
+ });
727
+ /* The SQL pane and the Workbench's Undo, whose menu names the last edit at once; an App has neither. */
728
+ tools?.menu('sql');
729
+ /* Connections first, then the per-connection stores, then the first
730
+ render. The stores are keyed by connection id, and loading them before
731
+ `initConnections` has named one filed everything under a connection
732
+ called nothing — templates got away with it because every browser that
733
+ saved one also mirrored it locally under the right key; the pages file
734
+ restore was the first reader with no local copy to fall back on. */
735
+ await initConnections(async (isCurrent = () => true) => {
736
+ /* The picker's switch is a full arrival in another database: its
737
+ per-connection stores, its app (or none), its dress. Without this
738
+ the previous connection's app-mode chrome and theme survived the
739
+ switch — a database with no app wearing another app's clothes. */
740
+ await Promise.all([loadTemplates(), tools?.loadStores(), chrome.loadNav()]);
741
+ if (!isCurrent() || businessRetired || sessionIdentity().mode === 'locked')
742
+ return;
743
+ void chrome.loadFilters?.();
744
+ void registerPages();
745
+ applyBrand();
746
+ renderTableList($('table-filter').value);
747
+ followSaves();
748
+ });
749
+ if (businessRetired)
750
+ return;
751
+ await Promise.all([loadTemplates(), tools?.loadStores()]);
752
+ if (businessRetired || sessionIdentity().mode === 'locked')
753
+ return;
754
+ // Un-awaited on purpose: a warm cache, not a gate on first paint.
755
+ void chrome.loadFilters?.();
756
+ /* After the saved-pages mirror is filled, or the menu and ⌘K are built
757
+ from an empty list and a page restored from the file is invisible until
758
+ something else rebuilds them. */
759
+ void registerPages();
760
+ /* A link present on load wins over the default view: someone arriving from
761
+ a pasted link should land where the link points, not on the schema.
762
+
763
+ The empty state is painted only when there is no link to honour. It used
764
+ to be painted unconditionally, first, which meant a deep link spent a
765
+ moment showing the *active* connection's landing page — and that paint
766
+ wrote its own address into the bar over the link that had not been read
767
+ yet. `allowSync` keeps the bar shut until this is done either way. */
768
+ const linked = Boolean(connectionFromHash(incoming));
769
+ if (!linked)
770
+ render();
771
+ let restoring;
772
+ /* With its search: a public list's address says its question there. */
773
+ const restored = applyHash(tenantIncoming ?? incoming + hereSearch(), {
774
+ findTableById: (id) => findTable(id) ?? state.schema.tables.find((t) => t.name === id),
775
+ selectConnection: (connection, path) => {
776
+ restoring = switchAndRestore(connection, path);
777
+ return restoring;
778
+ },
779
+ });
780
+ /* `'switching'` means applyHash handed off to an async connection switch.
781
+ That switch owns *both* the render and opening the address gate
782
+ (`switchAndRestore` calls `allowSync`), so the boot does neither here.
783
+ Opening the gate now would let any render that lands mid-switch — a
784
+ pages-change rebuild is the one that bit — write the OUTGOING connection
785
+ into the bar for a frame, which is the cold-tab `/demo` leak. */
786
+ if (restored !== 'switching') {
787
+ holdHome(false);
788
+ allowSync();
789
+ if (restored || linked)
790
+ render();
791
+ }
792
+ if (restoring)
793
+ await restoring;
794
+ if (businessRetired || sessionIdentity().mode === 'locked')
795
+ return;
796
+ /* A switch another one overtook never applied this address; whatever it
797
+ led to is where the reader is, so the hold ends with boot regardless. */
798
+ if (restoring && homeIsHeld()) {
799
+ holdHome(false);
800
+ render();
801
+ }
802
+ /* Last, and after the first render: every stop measures an element that has
803
+ to exist, and the menu item it registers should sit below the ones the
804
+ features added rather than above them. */
805
+ initTour();
806
+ followSaves();
807
+ /* A reader's language pick, where the server says the App's words: asked again in their words, where they stand. */
808
+ onLanguagePicked(() => void reloadAppInPlace());
809
+ /* The skip link lands on the pane itself, not a row in it: Tab goes on
810
+ from the top of the room. Its fragment is not followed, because a
811
+ fragment navigation fires `popstate` below. */
812
+ shellQuery('.skip-link')?.addEventListener('click', (event) => {
813
+ event.preventDefault();
814
+ const content = $('content');
815
+ content.tabIndex = -1;
816
+ content.focus({ preventScroll: true });
817
+ content.scrollIntoView?.({ block: 'start' });
818
+ });
819
+ /* `popstate`, because the address is written with pushState and a path:
820
+ Back and Forward fire this, and a hash listener would never hear them
821
+ again. */
822
+ onNavigate(() => {
823
+ if (businessRetired || sessionIdentity().mode === 'locked')
824
+ return;
825
+ if (!allowMutationExit()) {
826
+ navReplace(shown(toHash()));
827
+ return;
828
+ }
829
+ if (sessionIdentity().tenantRequired) {
830
+ chrome.followHistory?.(herePath() + hereSearch() + window.location.hash, {
831
+ currentHref: toHash,
832
+ replace: (href) => navReplace(shown(href)),
833
+ /* The walk rides in history state (url.js); the address is the one thing on screen. */
834
+ apply: (href) => {
835
+ const trail = navState()?.trail;
836
+ applyHash(typeof trail === 'string' ? trail : href, {
837
+ findTableById: (id) => findTable(id),
838
+ selectConnection: switchAndRestore,
839
+ walk: typeof trail === 'string',
840
+ });
841
+ },
842
+ canLeave: async () => {
843
+ if (!allowMutationExit())
844
+ return false;
845
+ return prepareEditingExit();
846
+ },
847
+ reload: () => window.location.reload(),
848
+ invalid: () => {
849
+ toast(say('thisTenantLinkIsInvalid'), 'error');
850
+ },
851
+ });
852
+ return;
853
+ }
854
+ /* An App's address is the one thing on screen; the walk that reached it
855
+ rides in history state (url.js), so Back returns to the list and its
856
+ crumbs, not to a page that forgot where it came from. */
857
+ const trail = navState()?.trail;
858
+ applyHash(typeof trail === 'string' ? trail : herePath() + hereSearch(), {
859
+ findTableById: (id) => findTable(id) ?? state.schema.tables.find((t) => t.name === id),
860
+ selectConnection: switchAndRestore,
861
+ walk: typeof trail === 'string',
862
+ });
863
+ });
864
+ chrome.navigationReady?.(true);
865
+ void chrome.showAccount?.(me, kit);
866
+ const filterInput = $('table-filter');
867
+ filterInput.addEventListener('input', () => renderTableList(filterInput.value));
868
+ /* Filtering to one table and then having to reach for the mouse is the
869
+ kind of small friction that makes a tool feel unfinished. Typing narrows,
870
+ arrows choose, Enter opens — and with a single match, Enter alone is
871
+ enough. */
872
+ /* Bound on the whole sidebar rather than on the filter field.
873
+
874
+ Arrows only worked while the field had focus, so clicking a table and
875
+ then pressing Down scrolled the page instead of moving to the next
876
+ table — the list looked keyboard-navigable and was not, which is worse
877
+ than not offering it. */
878
+ shellQuery('.sidebar').addEventListener('keydown', (e) => {
879
+ if (!(e instanceof KeyboardEvent) || e.defaultPrevented)
880
+ return;
881
+ const list = $('table-list');
882
+ if (e.key === 'ArrowDown') {
883
+ e.preventDefault();
884
+ moveSidebar(1, list, filterInput);
885
+ }
886
+ else if (e.key === 'ArrowUp') {
887
+ e.preventDefault();
888
+ moveSidebar(-1, list, filterInput);
889
+ }
890
+ else if (e.key === 'ArrowRight' && e.target !== filterInput) {
891
+ /* Rightwards is where the table you highlighted is. The list chooses
892
+ what to show; the panel is where you then work, and reaching it
893
+ should not mean going back to the mouse. */
894
+ e.preventDefault();
895
+ focusContent();
896
+ }
897
+ else if (e.key === 'Enter' && e.target === filterInput) {
898
+ e.preventDefault();
899
+ // No explicit highlight means "the obvious one": the only match, or
900
+ // the first of several. Enter commits: a push, so the table you chose
901
+ // is a place you can come back to, unlike the ones you skimmed past.
902
+ if (openSidebarChoice()) {
903
+ if (!shell().inApp() && window.matchMedia('(max-width: 600px)').matches) {
904
+ const collapse = shellQuery('.sidebar-collapse');
905
+ if (collapse instanceof HTMLButtonElement)
906
+ collapse.click();
907
+ }
908
+ filterInput.blur();
909
+ }
910
+ }
911
+ else if (e.key === 'Escape' && e.target === filterInput) {
912
+ if (filterInput.value) {
913
+ // First Escape clears the filter, a second leaves the field. Clearing
914
+ // and blurring together loses the list you were about to pick from.
915
+ e.preventDefault();
916
+ e.stopPropagation();
917
+ filterInput.value = '';
918
+ renderTableList('');
919
+ }
920
+ else {
921
+ filterInput.blur();
922
+ }
923
+ }
924
+ });
925
+ /* The schema diagram is reachable at any time, not only from the empty
926
+ state — it is how you re-orient after walking somewhere unfamiliar. */
927
+ $('search-button').addEventListener('click', () => openPalette());
928
+ // The wordmark is the one thing every web app makes a home link, and not
929
+ // doing it is a small surprise on every page.
930
+ $('home-button').addEventListener('click', goHome);
931
+ tools?.menu('schema');
932
+ /* App mode is a commitment: once launched, the app is the product and
933
+ the explorer waits behind one deliberate gesture — this menu item and
934
+ the w key, not a standing rung of chrome. The label reads by mode. */
935
+ /* Registers its own menu item, so it lands between Schema and Connections —
936
+ next to the other "what is this database" answer rather than at the end. */
937
+ chrome.initHelp();
938
+ tools?.menu('undo');
939
+ addMenuItem({
940
+ /* System is an explicit preference; this shortcut always flips the visible mode. */
941
+ label: () => say('darkMode'),
942
+ category: () => say('preferences.title'),
943
+ checked: () => effectiveTheme() === 'dark',
944
+ detail: () => themeLabel(),
945
+ onSelect: () => {
946
+ toggleTheme();
947
+ render();
948
+ },
949
+ });
950
+ tools?.menu('tools');
951
+ addHostListener(document, 'keydown', (e) => {
952
+ /* The query bar's own keys (Escape, `/`, `t`) are the Workbench's (workbench.js). */
953
+ const active = document.activeElement;
954
+ const typing = /input|textarea/i.test(active?.tagName ?? '') || active?.getAttribute?.('contenteditable') === 'true';
955
+ /* And not while something is open over the page.
956
+
957
+ These are single-key shortcuts on the document, so they fired through
958
+ any surface that did not stop them: Backspace with the focus on a
959
+ dialog's button walked the trail *behind* the modal, which then closed
960
+ onto a different record than the one it was opened from. A dialog is
961
+ modal by definition; the page under it is not taking keys. */
962
+ const covered = Boolean(active?.closest?.('[role="dialog"], dialog[open], .pb, .help-panel, .palette, .conn-manager'));
963
+ if (covered)
964
+ return;
965
+ // Backspace-as-back is a habit from file browsers, but only when the
966
+ // caret is not in a text field.
967
+ if (!typing && (e.key === 'Backspace' || (e.key === '[' && e.metaKey)) && state.stack.length > 1) {
968
+ e.preventDefault();
969
+ backTo(state.stack.length - 2);
970
+ }
971
+ if (e.key === 'h' && !typing && !e.metaKey && !e.ctrlKey) {
972
+ e.preventDefault();
973
+ goHome();
974
+ }
975
+ });
976
+ }