@protobase/ui 0.113.0 → 0.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/app/app.d.ts +4 -1
  3. package/dist/app/app.js +9 -7
  4. package/dist/app/change-confirm/messages.d.ts +2 -2
  5. package/dist/app/charts/messages.d.ts +2 -2
  6. package/dist/app/confirm-sign-in-messages.d.ts +2 -2
  7. package/dist/app/create/messages.d.ts +2 -2
  8. package/dist/app/delete/messages.d.ts +2 -2
  9. package/dist/app/displays/messages.d.ts +2 -2
  10. package/dist/app/displays/virtual-cards.js +1 -0
  11. package/dist/app/embedded-list/messages.d.ts +2 -2
  12. package/dist/app/export/messages.d.ts +2 -2
  13. package/dist/app/field-messages.d.ts +2 -2
  14. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  15. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  16. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  17. package/dist/app/field-types/workflow-status/messages.d.ts +2 -2
  18. package/dist/app/file-viewers/messages.d.ts +2 -2
  19. package/dist/app/first-frame.d.ts +13 -0
  20. package/dist/app/first-frame.js +23 -0
  21. package/dist/app/focus/messages.d.ts +2 -2
  22. package/dist/app/gallery/gallery-layout.d.ts +2 -2
  23. package/dist/app/gallery/messages.d.ts +2 -2
  24. package/dist/app/hand-order/messages.d.ts +2 -2
  25. package/dist/app/import/messages.d.ts +2 -2
  26. package/dist/app/index.html +0 -17
  27. package/dist/app/list-messages.d.ts +2 -2
  28. package/dist/app/main.js +19 -7
  29. package/dist/app/messages.d.ts +2 -2
  30. package/dist/app/pages/messages.d.ts +2 -2
  31. package/dist/app/record-chart/messages.d.ts +2 -2
  32. package/dist/app/record-messages.d.ts +2 -2
  33. package/dist/app/record-mode/shown-layout.d.ts +1 -1
  34. package/dist/app/record-row/messages.d.ts +2 -2
  35. package/dist/app/record-row/record-row.d.ts +3 -2
  36. package/dist/app/record-row/record-row.js +43 -27
  37. package/dist/app/record-row/row-window.d.ts +11 -0
  38. package/dist/app/record-row/row-window.js +15 -2
  39. package/dist/app/refresh-mark.d.ts +2 -1
  40. package/dist/app/refresh-mark.js +3 -1
  41. package/dist/app/related-cards/messages.d.ts +2 -2
  42. package/dist/app/reveal-when-loaded.d.ts +8 -2
  43. package/dist/app/reveal-when-loaded.js +12 -5
  44. package/dist/app/runtime/messages.d.ts +2 -2
  45. package/dist/app/saved/messages.d.ts +2 -2
  46. package/dist/app/searches/messages.d.ts +2 -2
  47. package/dist/app/splash-hold.d.ts +0 -1
  48. package/dist/app/splash-hold.js +1 -1
  49. package/dist/app/start-screen.d.ts +0 -9
  50. package/dist/app/start-screen.js +1 -10
  51. package/dist/app/ui-ready.d.ts +11 -0
  52. package/dist/app/ui-ready.js +12 -0
  53. package/dist/app-shell/app-shell.js +3 -1
  54. package/dist/app-shell/close-sidebar.d.ts +10 -0
  55. package/dist/app-shell/close-sidebar.js +17 -0
  56. package/dist/app-shell/drawer.d.ts +7 -1
  57. package/dist/app-shell/drawer.js +26 -7
  58. package/dist/app-shell/index.d.ts +2 -1
  59. package/dist/app-shell/index.js +2 -1
  60. package/dist/app-shell/messages.d.ts +2 -2
  61. package/dist/app-shell/top-bar.js +4 -4
  62. package/dist/assistant-dock/messages.d.ts +2 -2
  63. package/dist/auth/messages.d.ts +2 -2
  64. package/dist/calls/messages.d.ts +2 -2
  65. package/dist/compact-table/messages.d.ts +2 -2
  66. package/dist/data/query-keys.d.ts +6 -0
  67. package/dist/data/query-keys.js +10 -0
  68. package/dist/data/start-cache/cached-plugins.d.ts +6 -0
  69. package/dist/data/start-cache/cached-plugins.js +10 -0
  70. package/dist/data-grid/column-spec.d.ts +1 -1
  71. package/dist/data-grid/data-grid.js +1 -0
  72. package/dist/data-grid/messages.d.ts +2 -2
  73. package/dist/data-grid/row-source.d.ts +5 -0
  74. package/dist/data-grid/use-paged-rows.d.ts +5 -3
  75. package/dist/data-grid/use-paged-rows.js +21 -6
  76. package/dist/filter-panel/messages.d.ts +2 -2
  77. package/dist/focus-page/messages.d.ts +2 -2
  78. package/dist/index.d.ts +4 -1
  79. package/dist/index.js +4 -1
  80. package/dist/invitations/messages.d.ts +2 -2
  81. package/dist/live/grid-loader.d.ts +1 -0
  82. package/dist/live/grid-loader.js +3 -1
  83. package/dist/live/use-live-rows.js +1 -0
  84. package/dist/mailbox/messages.d.ts +2 -2
  85. package/dist/mocks/customers.d.ts +1 -1
  86. package/dist/mocks/invoices.d.ts +1 -1
  87. package/dist/mocks/orders.d.ts +3 -3
  88. package/dist/notifications/bell/messages.d.ts +2 -2
  89. package/dist/organizations/members-page.js +13 -7
  90. package/dist/organizations/messages.d.ts +2 -2
  91. package/dist/organizations/use-organizations.d.ts +4 -1
  92. package/dist/organizations/use-organizations.js +25 -19
  93. package/dist/package.js +1 -1
  94. package/dist/plugins/plugin-source.d.ts +24 -4
  95. package/dist/plugins/plugin-source.js +48 -14
  96. package/dist/plugins/use-plugin-loads.d.ts +3 -1
  97. package/dist/plugins/use-plugin-loads.js +24 -7
  98. package/dist/primitives/messages.d.ts +2 -2
  99. package/dist/primitives/skeleton.js +1 -0
  100. package/dist/record-view/messages.d.ts +2 -2
  101. package/dist/roles/use-active-role.d.ts +4 -1
  102. package/dist/roles/use-active-role.js +18 -13
  103. package/dist/shell/assets/api-provider-BJJrOoO4.js +2 -0
  104. package/dist/shell/assets/app-VoTi41IN.js +16 -0
  105. package/dist/shell/assets/badge-OU9hb6yQ.js +2 -0
  106. package/dist/shell/assets/checkbox-DFfK432Y.js +2 -0
  107. package/dist/shell/assets/createLucideIcon-DGm8SdFI.js +2 -0
  108. package/dist/shell/assets/display-value-CIH2qfgQ.js +2 -0
  109. package/dist/shell/assets/{field-badge-3QmjR1r3.js → field-badge-DX2Mc_fH.js} +2 -2
  110. package/dist/shell/assets/{graph-view-BcbWbnHO.js → graph-view-CY9LPr0B.js} +2 -2
  111. package/dist/shell/assets/{html-viewer-tGtSpy9M.js → html-viewer-BPGMH_GA.js} +2 -2
  112. package/dist/shell/assets/{in-place-form-B0EkP4B1.js → in-place-form-RWSQGEg4.js} +2 -2
  113. package/dist/shell/assets/index-Bzb-O7ER.js +2 -0
  114. package/dist/shell/assets/index-HnFovy2Q.css +2 -0
  115. package/dist/shell/assets/{intl-cache-bXVNV0Yq.js → intl-cache-D4doUjK1.js} +2 -2
  116. package/dist/shell/assets/{lib-d3-interpolate-Cl0dHO4f.js → lib-d3-interpolate-D3u38iyJ.js} +2 -2
  117. package/dist/shell/assets/{lib-d3-transition-DUHAGQ8z.js → lib-d3-transition-BUpPvFvt.js} +2 -2
  118. package/dist/shell/assets/{lib-d3-zoom-gQh2osrj.js → lib-d3-zoom-BF7SPKNh.js} +2 -2
  119. package/dist/shell/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js → lib-vis.gl-react-maplibre-C7-0xNFC.js} +2 -2
  120. package/dist/shell/assets/{lib-xyflow-react-DGg_5r7u.js → lib-xyflow-react-CKyW7szC.js} +2 -2
  121. package/dist/shell/assets/maplibre-9ViQO48S.js +2 -0
  122. package/dist/shell/assets/{markdown-content-DHKbAJjx.js → markdown-content-DTB9RQDs.js} +2 -2
  123. package/dist/shell/assets/{record-map-nGRmsk6x.js → record-map-CVqCWtfe.js} +2 -2
  124. package/dist/shell/assets/{records-map-D2flyaz3.js → records-map-ClYSxrVR.js} +2 -2
  125. package/dist/shell/assets/{run-trace-view-DfrAPeum.js → run-trace-view-CN16MiXg.js} +2 -2
  126. package/dist/shell/assets/search-picker-BGpvJQRD.js +2 -0
  127. package/dist/shell/assets/shared-protobase-ui-BC8LqGQB.js +2 -0
  128. package/dist/shell/assets/step-catalog-CZY0ZpCC.js +2 -0
  129. package/dist/shell/assets/step-panel-DhD80lsJ.js +2 -0
  130. package/dist/shell/assets/use-app-address-B4Uk3nWy.js +2 -0
  131. package/dist/shell/assets/{use-meta-BqEqOLNe.js → use-meta-D5kYywHm.js} +2 -2
  132. package/dist/shell/assets/{use-sibling-page-CiuiG-Tz.js → use-sibling-page-BJ81HcOP.js} +3 -3
  133. package/dist/shell/assets/value-badge-Dpd8dRqq.js +2 -0
  134. package/dist/shell/assets/{vendor-WWp_xlp2.js → vendor-3etemhgS.js} +4 -4
  135. package/dist/shell/assets/{workflow-canvas-DMP7SDWX.js → workflow-canvas-C1nGpi5w.js} +2 -2
  136. package/dist/shell/assets/{workflow-graph-editor-xpV8_qEl.js → workflow-graph-editor-DAJa4lq6.js} +2 -2
  137. package/dist/shell/assets/workflow-workbench-HramVZEJ.js +4 -0
  138. package/dist/shell/assets/{workflows-Bku4o2su.js → workflows-DlvOln9v.js} +2 -2
  139. package/dist/shell/assets/{workflows-start-kl7rSSay.js → workflows-start-QUKfwFqf.js} +2 -2
  140. package/dist/shell/index.html +16 -19
  141. package/dist/shell/protobase.shell.json +2 -2
  142. package/dist/shell/protobase.sw.js +2 -2
  143. package/dist/shell-source-maps/assets/api-provider-BJJrOoO4.js.map +1 -0
  144. package/dist/shell-source-maps/assets/app-VoTi41IN.js.map +1 -0
  145. package/dist/shell-source-maps/assets/{badge-ChHXC28D.js.map → badge-OU9hb6yQ.js.map} +1 -1
  146. package/dist/shell-source-maps/assets/{checkbox-COOOlJPG.js.map → checkbox-DFfK432Y.js.map} +1 -1
  147. package/dist/shell-source-maps/assets/createLucideIcon-DGm8SdFI.js.map +1 -0
  148. package/dist/shell-source-maps/assets/display-value-CIH2qfgQ.js.map +1 -0
  149. package/dist/shell-source-maps/assets/{field-badge-3QmjR1r3.js.map → field-badge-DX2Mc_fH.js.map} +1 -1
  150. package/dist/shell-source-maps/assets/{graph-view-BcbWbnHO.js.map → graph-view-CY9LPr0B.js.map} +1 -1
  151. package/dist/shell-source-maps/assets/{html-viewer-tGtSpy9M.js.map → html-viewer-BPGMH_GA.js.map} +1 -1
  152. package/dist/shell-source-maps/assets/{in-place-form-B0EkP4B1.js.map → in-place-form-RWSQGEg4.js.map} +1 -1
  153. package/dist/shell-source-maps/assets/index-Bzb-O7ER.js.map +1 -0
  154. package/dist/shell-source-maps/assets/{intl-cache-bXVNV0Yq.js.map → intl-cache-D4doUjK1.js.map} +1 -1
  155. package/dist/shell-source-maps/assets/{lib-d3-interpolate-Cl0dHO4f.js.map → lib-d3-interpolate-D3u38iyJ.js.map} +1 -1
  156. package/dist/shell-source-maps/assets/{lib-d3-transition-DUHAGQ8z.js.map → lib-d3-transition-BUpPvFvt.js.map} +1 -1
  157. package/dist/shell-source-maps/assets/{lib-d3-zoom-gQh2osrj.js.map → lib-d3-zoom-BF7SPKNh.js.map} +1 -1
  158. package/dist/shell-source-maps/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js.map → lib-vis.gl-react-maplibre-C7-0xNFC.js.map} +1 -1
  159. package/dist/shell-source-maps/assets/{lib-xyflow-react-DGg_5r7u.js.map → lib-xyflow-react-CKyW7szC.js.map} +1 -1
  160. package/dist/shell-source-maps/assets/{maplibre-Y7X50Jfk.js.map → maplibre-9ViQO48S.js.map} +1 -1
  161. package/dist/shell-source-maps/assets/{markdown-content-DHKbAJjx.js.map → markdown-content-DTB9RQDs.js.map} +1 -1
  162. package/dist/shell-source-maps/assets/{record-map-nGRmsk6x.js.map → record-map-CVqCWtfe.js.map} +1 -1
  163. package/dist/shell-source-maps/assets/{records-map-D2flyaz3.js.map → records-map-ClYSxrVR.js.map} +1 -1
  164. package/dist/shell-source-maps/assets/{run-trace-view-DfrAPeum.js.map → run-trace-view-CN16MiXg.js.map} +1 -1
  165. package/dist/shell-source-maps/assets/{search-picker-CJcJetBh.js.map → search-picker-BGpvJQRD.js.map} +1 -1
  166. package/dist/shell-source-maps/assets/shared-protobase-ui-BC8LqGQB.js.map +1 -0
  167. package/dist/shell-source-maps/assets/{step-catalog-ZvQOXfSh.js.map → step-catalog-CZY0ZpCC.js.map} +1 -1
  168. package/dist/shell-source-maps/assets/{step-panel-B1yHz7OC.js.map → step-panel-DhD80lsJ.js.map} +1 -1
  169. package/dist/shell-source-maps/assets/{use-app-address-B6k3dkV0.js.map → use-app-address-B4Uk3nWy.js.map} +1 -1
  170. package/dist/shell-source-maps/assets/{use-meta-BqEqOLNe.js.map → use-meta-D5kYywHm.js.map} +1 -1
  171. package/dist/shell-source-maps/assets/{use-sibling-page-CiuiG-Tz.js.map → use-sibling-page-BJ81HcOP.js.map} +1 -1
  172. package/dist/shell-source-maps/assets/{value-badge-BKLV4otJ.js.map → value-badge-Dpd8dRqq.js.map} +1 -1
  173. package/dist/shell-source-maps/assets/{vendor-WWp_xlp2.js.map → vendor-3etemhgS.js.map} +1 -1
  174. package/dist/shell-source-maps/assets/{workflow-canvas-DMP7SDWX.js.map → workflow-canvas-C1nGpi5w.js.map} +1 -1
  175. package/dist/shell-source-maps/assets/{workflow-graph-editor-xpV8_qEl.js.map → workflow-graph-editor-DAJa4lq6.js.map} +1 -1
  176. package/dist/shell-source-maps/assets/{workflow-workbench-Djdd_ODh.js.map → workflow-workbench-HramVZEJ.js.map} +1 -1
  177. package/dist/shell-source-maps/assets/{workflows-Bku4o2su.js.map → workflows-DlvOln9v.js.map} +1 -1
  178. package/dist/shell-source-maps/assets/{workflows-start-kl7rSSay.js.map → workflows-start-QUKfwFqf.js.map} +1 -1
  179. package/dist/status/messages.d.ts +2 -2
  180. package/dist/styles.css +14 -0
  181. package/dist/users/messages.d.ts +2 -2
  182. package/package.json +5 -5
  183. package/dist/app/hold-start-for-first-loads.d.ts +0 -12
  184. package/dist/app/hold-start-for-first-loads.js +0 -43
  185. package/dist/shell/assets/api-provider-CcDtTh0D.js +0 -2
  186. package/dist/shell/assets/app-DG30qs8Q.js +0 -16
  187. package/dist/shell/assets/badge-ChHXC28D.js +0 -2
  188. package/dist/shell/assets/checkbox-COOOlJPG.js +0 -2
  189. package/dist/shell/assets/display-value-fDiKbfJO.js +0 -2
  190. package/dist/shell/assets/index-BkCaPeOq.css +0 -2
  191. package/dist/shell/assets/index-CZ013UoE.js +0 -2
  192. package/dist/shell/assets/maplibre-Y7X50Jfk.js +0 -2
  193. package/dist/shell/assets/messages-ClKBpZlk.js +0 -2
  194. package/dist/shell/assets/search-picker-CJcJetBh.js +0 -2
  195. package/dist/shell/assets/shared-protobase-ui-CVwqj5Cp.js +0 -2
  196. package/dist/shell/assets/step-catalog-ZvQOXfSh.js +0 -2
  197. package/dist/shell/assets/step-panel-B1yHz7OC.js +0 -2
  198. package/dist/shell/assets/use-app-address-B6k3dkV0.js +0 -2
  199. package/dist/shell/assets/value-badge-BKLV4otJ.js +0 -2
  200. package/dist/shell/assets/workflow-workbench-Djdd_ODh.js +0 -4
  201. package/dist/shell-source-maps/assets/api-provider-CcDtTh0D.js.map +0 -1
  202. package/dist/shell-source-maps/assets/app-DG30qs8Q.js.map +0 -1
  203. package/dist/shell-source-maps/assets/display-value-fDiKbfJO.js.map +0 -1
  204. package/dist/shell-source-maps/assets/index-CZ013UoE.js.map +0 -1
  205. package/dist/shell-source-maps/assets/messages-ClKBpZlk.js.map +0 -1
  206. package/dist/shell-source-maps/assets/shared-protobase-ui-CVwqj5Cp.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/import/messages.d.ts
3
3
  export declare const text: {
4
- (id: "create" | "file" | "back" | "download" | "row" | "line" | "rows" | "column" | "saving" | "cancel" | "field" | "failed" | "check" | "update" | "next" | "columns" | "cancelled" | "created" | "updated" | "unreadable" | "summary" | "stopped" | "done" | "reading" | "import" | "importPlural" | "couldNotReadFile" | "couldNotCheck" | "checkRows" | "checking" | "importRows" | "cancelImport" | "fileHint" | "theFile" | "sheet" | "upsert" | "createHint" | "updateHint" | "upsertHint" | "doNotImport" | "whatEachRowDoes" | "findBy" | "chooseField" | "findByHint" | "foundInColumn" | "chooseColumn" | "numbers" | "dates" | "dayFirst" | "monthFirst" | "datesHint" | "requiredMarked" | "emptyInFirstRows" | "fieldFor" | "foundBy" | "pluralFoundBy" | "noColumnFills" | "rowsNotImported" | "rowProblems" | "andMore" | "checkingRows" | "toCreate" | "toUpdate" | "withProblems" | "firstRows" | "problemRows" | "batches" | "stopping" | "rowsSaved" | "skipped" | "notWrittenHint" | "notImportedFile" | "problems" | "notNumber" | "notWholeNumber" | "tooLarge" | "notBoolean" | "notDate" | "hasTime" | "severalValues" | "notOneOf" | "notText" | "nestedValue" | "emptyRequired" | "noneHas" | "severalHave" | "notOneRecord" | "nothingToUpdate" | "fileNotUtf8" | "noSheets" | "missingSheetPart" | "notZip" | "zip64" | "compression" | "notWorkbook" | "noSheetCalled" | "jsonInvalid" | "jsonNotList" | "fromFile" | "tableFromFile" | "newTable" | "noTitle" | "needed" | "nameForm" | "nameReservedWord" | "nameReservedField" | "nameTaken" | "nameTwice" | "noFields" | "typeFor" | "labelFor" | "nameFor" | "decimalSize" | "typesFromCells" | "couldNotMakeTable" | "makeTable" | "openTable" | "labelTooLong", values?: Record<string, MessageValue>): string;
5
- rich(id: "create" | "file" | "back" | "download" | "row" | "line" | "rows" | "column" | "saving" | "cancel" | "field" | "failed" | "check" | "update" | "next" | "columns" | "cancelled" | "created" | "updated" | "unreadable" | "summary" | "stopped" | "done" | "reading" | "import" | "importPlural" | "couldNotReadFile" | "couldNotCheck" | "checkRows" | "checking" | "importRows" | "cancelImport" | "fileHint" | "theFile" | "sheet" | "upsert" | "createHint" | "updateHint" | "upsertHint" | "doNotImport" | "whatEachRowDoes" | "findBy" | "chooseField" | "findByHint" | "foundInColumn" | "chooseColumn" | "numbers" | "dates" | "dayFirst" | "monthFirst" | "datesHint" | "requiredMarked" | "emptyInFirstRows" | "fieldFor" | "foundBy" | "pluralFoundBy" | "noColumnFills" | "rowsNotImported" | "rowProblems" | "andMore" | "checkingRows" | "toCreate" | "toUpdate" | "withProblems" | "firstRows" | "problemRows" | "batches" | "stopping" | "rowsSaved" | "skipped" | "notWrittenHint" | "notImportedFile" | "problems" | "notNumber" | "notWholeNumber" | "tooLarge" | "notBoolean" | "notDate" | "hasTime" | "severalValues" | "notOneOf" | "notText" | "nestedValue" | "emptyRequired" | "noneHas" | "severalHave" | "notOneRecord" | "nothingToUpdate" | "fileNotUtf8" | "noSheets" | "missingSheetPart" | "notZip" | "zip64" | "compression" | "notWorkbook" | "noSheetCalled" | "jsonInvalid" | "jsonNotList" | "fromFile" | "tableFromFile" | "newTable" | "noTitle" | "needed" | "nameForm" | "nameReservedWord" | "nameReservedField" | "nameTaken" | "nameTwice" | "noFields" | "typeFor" | "labelFor" | "nameFor" | "decimalSize" | "typesFromCells" | "couldNotMakeTable" | "makeTable" | "openTable" | "labelTooLong", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "create" | "file" | "back" | "download" | "column" | "saving" | "row" | "line" | "field" | "check" | "failed" | "cancel" | "update" | "next" | "columns" | "rows" | "cancelled" | "done" | "created" | "updated" | "unreadable" | "checking" | "reading" | "upsert" | "import" | "importPlural" | "couldNotReadFile" | "couldNotCheck" | "checkRows" | "importRows" | "cancelImport" | "fileHint" | "theFile" | "sheet" | "createHint" | "updateHint" | "upsertHint" | "doNotImport" | "whatEachRowDoes" | "findBy" | "chooseField" | "findByHint" | "foundInColumn" | "chooseColumn" | "numbers" | "dates" | "dayFirst" | "monthFirst" | "datesHint" | "requiredMarked" | "emptyInFirstRows" | "fieldFor" | "foundBy" | "pluralFoundBy" | "noColumnFills" | "rowsNotImported" | "rowProblems" | "andMore" | "checkingRows" | "toCreate" | "toUpdate" | "withProblems" | "firstRows" | "problemRows" | "batches" | "stopping" | "rowsSaved" | "stopped" | "summary" | "skipped" | "notWrittenHint" | "notImportedFile" | "problems" | "notNumber" | "notWholeNumber" | "tooLarge" | "notBoolean" | "notDate" | "hasTime" | "severalValues" | "notOneOf" | "notText" | "nestedValue" | "emptyRequired" | "noneHas" | "severalHave" | "notOneRecord" | "nothingToUpdate" | "fileNotUtf8" | "noSheets" | "missingSheetPart" | "notZip" | "zip64" | "compression" | "notWorkbook" | "noSheetCalled" | "jsonInvalid" | "jsonNotList" | "fromFile" | "tableFromFile" | "newTable" | "noTitle" | "needed" | "nameForm" | "nameReservedWord" | "nameReservedField" | "nameTaken" | "nameTwice" | "noFields" | "typeFor" | "labelFor" | "nameFor" | "decimalSize" | "typesFromCells" | "couldNotMakeTable" | "makeTable" | "openTable" | "labelTooLong", values?: Record<string, MessageValue>): string;
5
+ rich(id: "create" | "file" | "back" | "download" | "column" | "saving" | "row" | "line" | "field" | "check" | "failed" | "cancel" | "update" | "next" | "columns" | "rows" | "cancelled" | "done" | "created" | "updated" | "unreadable" | "checking" | "reading" | "upsert" | "import" | "importPlural" | "couldNotReadFile" | "couldNotCheck" | "checkRows" | "importRows" | "cancelImport" | "fileHint" | "theFile" | "sheet" | "createHint" | "updateHint" | "upsertHint" | "doNotImport" | "whatEachRowDoes" | "findBy" | "chooseField" | "findByHint" | "foundInColumn" | "chooseColumn" | "numbers" | "dates" | "dayFirst" | "monthFirst" | "datesHint" | "requiredMarked" | "emptyInFirstRows" | "fieldFor" | "foundBy" | "pluralFoundBy" | "noColumnFills" | "rowsNotImported" | "rowProblems" | "andMore" | "checkingRows" | "toCreate" | "toUpdate" | "withProblems" | "firstRows" | "problemRows" | "batches" | "stopping" | "rowsSaved" | "stopped" | "summary" | "skipped" | "notWrittenHint" | "notImportedFile" | "problems" | "notNumber" | "notWholeNumber" | "tooLarge" | "notBoolean" | "notDate" | "hasTime" | "severalValues" | "notOneOf" | "notText" | "nestedValue" | "emptyRequired" | "noneHas" | "severalHave" | "notOneRecord" | "nothingToUpdate" | "fileNotUtf8" | "noSheets" | "missingSheetPart" | "notZip" | "zip64" | "compression" | "notWorkbook" | "noSheetCalled" | "jsonInvalid" | "jsonNotList" | "fromFile" | "tableFromFile" | "newTable" | "noTitle" | "needed" | "nameForm" | "nameReservedWord" | "nameReservedField" | "nameTaken" | "nameTwice" | "noFields" | "typeFor" | "labelFor" | "nameFor" | "decimalSize" | "typesFromCells" | "couldNotMakeTable" | "makeTable" | "openTable" | "labelTooLong", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -64,20 +64,6 @@
64
64
  transform: rotate(360deg);
65
65
  }
66
66
  }
67
- /* A host's snapshot of the page shown last (start-screen.ts), in place of the spinner, inert, until the app draws */
68
- #pb-snapshot {
69
- position: absolute;
70
- inset: 0;
71
- overflow: hidden;
72
- pointer-events: none;
73
- user-select: none;
74
- }
75
- #pb-snapshot:empty {
76
- display: none;
77
- }
78
- #pb-start:has(#pb-snapshot:not(:empty)) svg {
79
- display: none;
80
- }
81
67
  /* A start that failed: index.html's own words, as the app's translations never loaded */
82
68
  #pb-start [role='alert'] {
83
69
  display: flex;
@@ -107,7 +93,6 @@
107
93
  <!-- As tall as the screen shows, browser toolbars aside, so a page that fills it, such as a map, keeps the bottom bar in view. The page reaches under the status bar and the home indicator, which the shell's bars keep clear of; the sides keep clear of the notch. -->
108
94
  <div id="root" class="h-dvh" style="padding-left: var(--pb-safe-left); padding-right: var(--pb-safe-right)"></div>
109
95
  <div id="pb-start" aria-hidden="true">
110
- <div id="pb-snapshot"></div>
111
96
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-6.219-8.56" /></svg>
112
97
  <div role="alert" hidden>
113
98
  <p style="margin: 0">The app did not load. Check your connection, then try again.</p>
@@ -132,8 +117,6 @@
132
117
  // A stylesheet or an image that does not load leaves the app to start
133
118
  if (event && event.type === 'error' && event.target !== window && event.target.tagName !== 'SCRIPT') return
134
119
  stop()
135
- var snapshot = document.getElementById('pb-snapshot')
136
- if (snapshot) snapshot.remove()
137
120
  start.removeAttribute('aria-hidden')
138
121
  start.querySelector('svg').remove()
139
122
  start.querySelector('[role="alert"]').hidden = false
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/app/list-messages.d.ts
3
3
  export declare const text: {
4
- (id: "search" | "sort" | "clearSearch" | "delete" | "created" | "searchPlural" | "noList" | "filters" | "filtersCount" | "newRecord" | "export" | "openRecord" | "exportCount" | "deleteCount" | "actionCount" | "dragToSort" | "unreadableFilter" | "couldNotLoadRows" | "noMatchSearch" | "noMatchFilters" | "noMatch" | "noneYet" | "clearFilters", values?: Record<string, MessageValue>): string;
5
- rich(id: "search" | "sort" | "clearSearch" | "delete" | "created" | "searchPlural" | "noList" | "filters" | "filtersCount" | "newRecord" | "export" | "openRecord" | "exportCount" | "deleteCount" | "actionCount" | "dragToSort" | "unreadableFilter" | "couldNotLoadRows" | "noMatchSearch" | "noMatchFilters" | "noMatch" | "noneYet" | "clearFilters", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "sort" | "search" | "clearSearch" | "delete" | "filters" | "created" | "deleteCount" | "couldNotLoadRows" | "export" | "searchPlural" | "noList" | "filtersCount" | "newRecord" | "openRecord" | "exportCount" | "actionCount" | "dragToSort" | "unreadableFilter" | "noMatchSearch" | "noMatchFilters" | "noMatch" | "noneYet" | "clearFilters", values?: Record<string, MessageValue>): string;
5
+ rich(id: "sort" | "search" | "clearSearch" | "delete" | "filters" | "created" | "deleteCount" | "couldNotLoadRows" | "export" | "searchPlural" | "noList" | "filtersCount" | "newRecord" | "openRecord" | "exportCount" | "actionCount" | "dragToSort" | "unreadableFilter" | "noMatchSearch" | "noMatchFilters" | "noMatch" | "noneYet" | "clearFilters", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
package/dist/app/main.js CHANGED
@@ -3,8 +3,13 @@ import { restorePage } from "./live-update/kept-page.js";
3
3
  import { browserLocale } from "../locale/active-locale.js";
4
4
  import { nativeBridgeOf } from "./native-auth-fetch.js";
5
5
  import { uiFromModule } from "./pages/ui-from-module.js";
6
+ import { browserLoader } from "../plugins/load-plugin.js";
7
+ import { createPluginSource, preloadPlugins } from "../plugins/plugin-source.js";
8
+ import { pluginWaitMs } from "../plugins/use-plugin-loads.js";
6
9
  import { App } from "./app.js";
10
+ import { judgesFirstFrame, showFirstFrame } from "./first-frame.js";
7
11
  import { listenForPresses } from "../lib/press-feedback.js";
12
+ import { cachedPlugins } from "../data/start-cache/cached-plugins.js";
8
13
  import { openStartCache } from "../data/start-cache/open-start-cache.js";
9
14
  import { showKeyboardAccessoryBar } from "./native-keyboard.js";
10
15
  import { applyNativeTextSize } from "./native-text-size.js";
@@ -27,11 +32,18 @@ if (nativeBridge) {
27
32
  const storage = guarded(() => window.sessionStorage, void 0);
28
33
  if (storage) restorePage(storage, window.history);
29
34
  }
30
- openStartCache().then((startCache) => createRoot(root).render(/* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsx(App, {
31
- baseUrl: `${pageApiOrigin() ?? ""}/api/v1`,
32
- ui: uiFromModule(projectUi),
33
- locale: browserLocale(),
34
- nativeBridge,
35
- startCache
36
- }) })));
35
+ const plugins = createPluginSource(browserLoader);
36
+ openStartCache().then(async (startCache) => {
37
+ await preloadPlugins(plugins, cachedPlugins(startCache), pluginWaitMs);
38
+ const app = /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsx(App, {
39
+ baseUrl: `${pageApiOrigin() ?? ""}/api/v1`,
40
+ ui: uiFromModule(projectUi),
41
+ locale: browserLocale(),
42
+ nativeBridge,
43
+ startCache,
44
+ pluginSource: plugins
45
+ }) });
46
+ if (judgesFirstFrame(window)) return showFirstFrame(root, app);
47
+ createRoot(root).render(app);
48
+ });
37
49
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/app/messages.d.ts
3
3
  export declare const text: {
4
- (id: "open" | "pages" | "replace" | "account" | "reload" | "noMatches" | "loading" | "notFound" | "refreshing" | "assistant" | "noAnswer" | "admin" | "cannotReach" | "tryAgain" | "leave" | "remove" | "new" | "fileMissing" | "hr" | "average" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "noPage" | "operationFailed" | "nothingSaved" | "loadingRecord" | "noComponent" | "choose" | "noValue" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "show" | "hide" | "couldNotShow" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values?: Record<string, MessageValue>): string;
5
- rich(id: "open" | "pages" | "replace" | "account" | "reload" | "noMatches" | "loading" | "notFound" | "refreshing" | "assistant" | "noAnswer" | "admin" | "cannotReach" | "tryAgain" | "leave" | "remove" | "new" | "fileMissing" | "hr" | "average" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "noPage" | "operationFailed" | "nothingSaved" | "loadingRecord" | "noComponent" | "choose" | "noValue" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "show" | "hide" | "couldNotShow" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "pages" | "open" | "replace" | "reload" | "leave" | "account" | "remove" | "refreshing" | "noMatches" | "loading" | "new" | "fileMissing" | "assistant" | "noAnswer" | "admin" | "cannotReach" | "tryAgain" | "notFound" | "hr" | "show" | "noValue" | "noComponent" | "couldNotShow" | "noPage" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "operationFailed" | "nothingSaved" | "loadingRecord" | "choose" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "average" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "hide" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values?: Record<string, MessageValue>): string;
5
+ rich(id: "pages" | "open" | "replace" | "reload" | "leave" | "account" | "remove" | "refreshing" | "noMatches" | "loading" | "new" | "fileMissing" | "assistant" | "noAnswer" | "admin" | "cannotReach" | "tryAgain" | "notFound" | "hr" | "show" | "noValue" | "noComponent" | "couldNotShow" | "noPage" | "signInPolicy" | "noResource" | "somethingWentWrong" | "adminsOnly" | "onlyAdminPolicy" | "ownersOnly" | "onlyOwners" | "chooseResource" | "pickFromSidebar" | "nothingHere" | "operationFailed" | "nothingSaved" | "loadingRecord" | "choose" | "chooseFileFor" | "notUploaded" | "uploadingLabel" | "uploading" | "dropFile" | "chooseFile" | "average" | "sales" | "crm" | "catalog" | "inventory" | "tables" | "searchPlural" | "couldNotLoadOptions" | "refreshFailed" | "leaveTitle" | "leaveDescription" | "leaveInputLost" | "stay" | "reloadTitle" | "reloadDraftKept" | "reloadInputLost" | "keepEditing" | "hide" | "setNewValue" | "signInRefused" | "loadingFrom" | "restWorks" | "staffSession" | "staffSignedIn" | "stopStaffSession" | "openLabel" | "opensNewTab", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/pages/messages.d.ts
3
3
  export declare const text: {
4
- (id: "number" | "tabs" | "create" | "couldNotLoad" | "saved" | "notFound" | "save" | "cancel" | "failed" | "couldNotDraw" | "required" | "nothingYet" | "done" | "noPage" | "noComponent" | "wholeNumber" | "notSaved" | "somethingWrong" | "settings" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "dateFormat" | "atMost" | "tickEvery" | "nothingToTick" | "forRecords" | "timelineRange" | "timelineNow" | "timelinePoint", values?: Record<string, MessageValue>): string;
5
- rich(id: "number" | "tabs" | "create" | "couldNotLoad" | "saved" | "notFound" | "save" | "cancel" | "failed" | "couldNotDraw" | "required" | "nothingYet" | "done" | "noPage" | "noComponent" | "wholeNumber" | "notSaved" | "somethingWrong" | "settings" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "dateFormat" | "atMost" | "tickEvery" | "nothingToTick" | "forRecords" | "timelineRange" | "timelineNow" | "timelinePoint", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "number" | "create" | "saved" | "failed" | "tabs" | "couldNotLoad" | "save" | "cancel" | "couldNotDraw" | "required" | "done" | "notFound" | "somethingWrong" | "noComponent" | "nothingYet" | "settings" | "notSaved" | "noPage" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "wholeNumber" | "dateFormat" | "atMost" | "tickEvery" | "nothingToTick" | "forRecords" | "timelineRange" | "timelineNow" | "timelinePoint", values?: Record<string, MessageValue>): string;
5
+ rich(id: "number" | "create" | "saved" | "failed" | "tabs" | "couldNotLoad" | "save" | "cancel" | "couldNotDraw" | "required" | "done" | "notFound" | "somethingWrong" | "noComponent" | "nothingYet" | "settings" | "notSaved" | "noPage" | "noTab" | "unknownBlock" | "needsRecord" | "cannotChange" | "cannotDelete" | "doesNotApply" | "noHandler" | "noInputComponent" | "doneOn" | "refusedOn" | "noAction" | "loadMore" | "timelineCut" | "couldNotCount" | "wholeNumber" | "dateFormat" | "atMost" | "tickEvery" | "nothingToTick" | "forRecords" | "timelineRange" | "timelineNow" | "timelinePoint", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/record-chart/messages.d.ts
3
3
  export declare const text: {
4
- (id: "day" | "hour" | "couldNotLoad" | "week" | "maximum" | "range" | "average" | "measure" | "noSamples", values?: Record<string, MessageValue>): string;
5
- rich(id: "day" | "hour" | "couldNotLoad" | "week" | "maximum" | "range" | "average" | "measure" | "noSamples", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "couldNotLoad" | "day" | "hour" | "maximum" | "week" | "range" | "average" | "measure" | "noSamples", values?: Record<string, MessageValue>): string;
5
+ rich(id: "couldNotLoad" | "day" | "hour" | "maximum" | "week" | "range" | "average" | "measure" | "noSamples", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/app/record-messages.d.ts
3
3
  export declare const text: {
4
- (id: "edit" | "justNow" | "loading" | "couldNotLoad" | "fetching" | "saved" | "save" | "cancel" | "couldNotSave" | "history" | "comments" | "delete" | "details" | "summary" | "nothingYet" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "notSaved" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "discard" | "unsavedRestored" | "keep" | "savingSubject" | "subjectSaved" | "changedBySomeoneElse" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values?: Record<string, MessageValue>): string;
5
- rich(id: "edit" | "justNow" | "loading" | "couldNotLoad" | "fetching" | "saved" | "save" | "cancel" | "couldNotSave" | "history" | "comments" | "delete" | "details" | "summary" | "nothingYet" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "notSaved" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "discard" | "unsavedRestored" | "keep" | "savingSubject" | "subjectSaved" | "changedBySomeoneElse" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "edit" | "fetching" | "saved" | "history" | "comments" | "loading" | "couldNotLoad" | "save" | "cancel" | "couldNotSave" | "delete" | "justNow" | "details" | "nothingYet" | "notSaved" | "keep" | "discard" | "summary" | "changedBySomeoneElse" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "unsavedRestored" | "savingSubject" | "subjectSaved" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values?: Record<string, MessageValue>): string;
5
+ rich(id: "edit" | "fetching" | "saved" | "history" | "comments" | "loading" | "couldNotLoad" | "save" | "cancel" | "couldNotSave" | "delete" | "justNow" | "details" | "nothingYet" | "notSaved" | "keep" | "discard" | "summary" | "changedBySomeoneElse" | "lineNumber" | "noRecord" | "openingElsewhere" | "someoneElse" | "unsavedChanges" | "linesChanged" | "linesReloaded" | "unsavedKept" | "continueEditing" | "unsavedRestored" | "savingSubject" | "subjectSaved" | "recordActions" | "relatedRecords" | "lineField" | "tooManyLines", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { CustomSectionModel, LayoutItemModel } from "@protobase/schema";
2
2
  //#region src/app/record-mode/shown-layout.d.ts
3
- export declare const whenOf: (item: LayoutItemModel) => "always" | (string & {}) | "editing" | "reading" | undefined;
3
+ export declare const whenOf: (item: LayoutItemModel) => "always" | (string & {}) | "reading" | "editing" | undefined;
4
4
  /** The items with a record condition in `when`, those inside tabs, groups and fallbacks too, whose conditions the page evaluates: a group before its items. */
5
5
  export declare const conditionalItems: (items: LayoutItemModel[]) => LayoutItemModel[];
6
6
  /** A shown custom section: `fallbackAt` holds each shown fallback item's place in the whole fallback. */
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/record-row/messages.d.ts
3
3
  export declare const text: {
4
- (id: "couldNotLoad" | "viewAll" | "new" | "noneYet" | "noneMatch" | "couldNotLoadYour", values?: Record<string, MessageValue>): string;
5
- rich(id: "couldNotLoad" | "viewAll" | "new" | "noneYet" | "noneMatch" | "couldNotLoadYour", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "couldNotLoad" | "viewAll" | "new" | "noneMatch" | "noneYet" | "couldNotLoadYour", values?: Record<string, MessageValue>): string;
5
+ rich(id: "couldNotLoad" | "viewAll" | "new" | "noneMatch" | "noneYet" | "couldNotLoadYour", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -18,8 +18,9 @@ type RecordRowProps = {
18
18
  };
19
19
  /**
20
20
  * Records as the cards of their list, in a `SnapRow`: only the cards near the view are drawn, and the records are loaded
21
- * through the list API in pages as the row scrolls to them. Each card links to its record. Every record has its place,
22
- * an empty one until it is drawn, so the row snaps to any card, also one a fast swipe reaches before it is drawn.
21
+ * through the list API in pages as the row scrolls to them. Each card links to its record. Every record near the view has
22
+ * its place, an empty one until it is drawn, so the row snaps to a card a fast swipe reaches before it is drawn; the
23
+ * records further away stand together in a spacer at each end, so a row of a large list draws a few hundred elements.
23
24
  */
24
25
  export declare const RecordRow: ({ model, view, display, source, label, isNew }: RecordRowProps) => import("react").JSX.Element;
25
26
  //#endregion
@@ -4,14 +4,23 @@ import { SnapRow } from "../../primitives/snap-row.js";
4
4
  import { useSnapScroll } from "../../primitives/use-snap-scroll.js";
5
5
  import { usePagedRows } from "../../data-grid/use-paged-rows.js";
6
6
  import { RecordCard } from "../displays/record-card.js";
7
- import { rowWindow } from "./row-window.js";
7
+ import { rowPlaces, rowSpan, rowWindow } from "./row-window.js";
8
8
  import { text } from "./messages.js";
9
- import { jsx } from "react/jsx-runtime";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/app/record-row/record-row.tsx
11
+ const Spacer = ({ count }) => /* @__PURE__ */ jsx("li", {
12
+ "aria-hidden": true,
13
+ style: {
14
+ width: rowSpan(count),
15
+ minWidth: 0,
16
+ scrollSnapAlign: "none"
17
+ }
18
+ });
11
19
  /**
12
20
  * Records as the cards of their list, in a `SnapRow`: only the cards near the view are drawn, and the records are loaded
13
- * through the list API in pages as the row scrolls to them. Each card links to its record. Every record has its place,
14
- * an empty one until it is drawn, so the row snaps to any card, also one a fast swipe reaches before it is drawn.
21
+ * through the list API in pages as the row scrolls to them. Each card links to its record. Every record near the view has
22
+ * its place, an empty one until it is drawn, so the row snaps to a card a fast swipe reaches before it is drawn; the
23
+ * records further away stand together in a spacer at each end, so a row of a large list draws a few hundred elements.
15
24
  */
16
25
  const RecordRow = ({ model, view, display, source, label, isNew }) => {
17
26
  const { total } = source;
@@ -21,38 +30,45 @@ const RecordRow = ({ model, view, display, source, label, isNew }) => {
21
30
  return `${start}-${end}`;
22
31
  });
23
32
  const { start, end } = shown(scroll.view);
33
+ const places = rowPlaces(start, end, total);
24
34
  const getRow = usePagedRows({
25
35
  total,
26
36
  rowAt: source.rowAt,
27
37
  loadRows: source.loadRows,
38
+ cachedRows: source.cachedRows,
28
39
  revision: source.revision,
29
40
  latencyMs: 0
30
41
  }, start, Math.max(start, end - 1));
31
- return /* @__PURE__ */ jsx(SnapRow, {
42
+ return /* @__PURE__ */ jsxs(SnapRow, {
32
43
  scroll,
33
44
  label,
34
- children: Array.from({ length: total }, (_, index) => {
35
- if (index < start || index >= end) return /* @__PURE__ */ jsx("li", { "aria-hidden": true }, `place-${index}`);
36
- const loaded = getRow(index);
37
- if (!loaded) return /* @__PURE__ */ jsx("li", {
38
- "aria-hidden": true,
39
- children: /* @__PURE__ */ jsx(Skeleton, { className: "h-full min-h-24 rounded-lg" })
40
- }, `skeleton-${index}`);
41
- const row = displayRow(model, loaded);
42
- return /* @__PURE__ */ jsx("li", {
43
- "aria-posinset": index + 1,
44
- "aria-setsize": total,
45
- className: "grid grid-cols-[minmax(0,1fr)]",
46
- children: /* @__PURE__ */ jsx(RecordCard, {
47
- model,
48
- view,
49
- display,
50
- row,
51
- swipe: false,
52
- mark: isNew?.(row) ? text("new") : void 0
53
- })
54
- }, row.key);
55
- })
45
+ children: [
46
+ places.from > 0 && /* @__PURE__ */ jsx(Spacer, { count: places.from }),
47
+ Array.from({ length: places.to - places.from }, (_, offset) => {
48
+ const index = places.from + offset;
49
+ if (index < start || index >= end) return /* @__PURE__ */ jsx("li", { "aria-hidden": true }, `place-${index}`);
50
+ const loaded = getRow(index);
51
+ if (!loaded) return /* @__PURE__ */ jsx("li", {
52
+ "aria-hidden": true,
53
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-full min-h-24 rounded-lg" })
54
+ }, `skeleton-${index}`);
55
+ const row = displayRow(model, loaded);
56
+ return /* @__PURE__ */ jsx("li", {
57
+ "aria-posinset": index + 1,
58
+ "aria-setsize": total,
59
+ className: "grid grid-cols-[minmax(0,1fr)]",
60
+ children: /* @__PURE__ */ jsx(RecordCard, {
61
+ model,
62
+ view,
63
+ display,
64
+ row,
65
+ swipe: false,
66
+ mark: isNew?.(row) ? text("new") : void 0
67
+ })
68
+ }, row.key);
69
+ }),
70
+ places.to < total && /* @__PURE__ */ jsx(Spacer, { count: total - places.to })
71
+ ]
56
72
  });
57
73
  };
58
74
  //#endregion
@@ -8,4 +8,15 @@ export declare const rowWindow: (scrollLeft: number, width: number, total: numbe
8
8
  start: number;
9
9
  end: number;
10
10
  };
11
+ /**
12
+ * The cards of a row of `total` that have a place of their own while `start` up to `end` are drawn: those and
13
+ * `placesAround` more on each side. The rest stand together in one spacer at each end (`rowSpan`), so a row of a hundred
14
+ * thousand records draws a few hundred elements, not one for each.
15
+ */
16
+ export declare const rowPlaces: (start: number, end: number, total: number) => {
17
+ from: number;
18
+ to: number;
19
+ };
20
+ /** The width of `count` cards of a row and the gaps between them, as a `SnapRow` sizes its cards, for a spacer that stands in for them. */
21
+ export declare const rowSpan: (count: number) => string;
11
22
  //#endregion
@@ -1,4 +1,4 @@
1
- import "../../primitives/snap-row-width.js";
1
+ import { snapRowGap } from "../../primitives/snap-row-width.js";
2
2
  //#region src/app/record-row/row-window.ts
3
3
  /** The gap after a card of a record row, in pixels. */
4
4
  const rowCardGap = 12;
@@ -18,5 +18,18 @@ const rowWindow = (scrollLeft, width, total) => {
18
18
  end: Math.min(total, last + overscan)
19
19
  };
20
20
  };
21
+ /** How many cards beyond the drawn ones keep a place of their own, which a swipe snaps to before it is drawn. */
22
+ const placesAround = 50;
23
+ /**
24
+ * The cards of a row of `total` that have a place of their own while `start` up to `end` are drawn: those and
25
+ * `placesAround` more on each side. The rest stand together in one spacer at each end (`rowSpan`), so a row of a hundred
26
+ * thousand records draws a few hundred elements, not one for each.
27
+ */
28
+ const rowPlaces = (start, end, total) => ({
29
+ from: Math.max(0, start - placesAround),
30
+ to: Math.min(total, end + placesAround)
31
+ });
32
+ /** The width of `count` cards of a row and the gaps between them, as a `SnapRow` sizes its cards, for a spacer that stands in for them. */
33
+ const rowSpan = (count) => `calc(${count} * (min(256px, 100%) + ${snapRowGap}) - ${snapRowGap})`;
21
34
  //#endregion
22
- export { rowWindow };
35
+ export { rowPlaces, rowSpan, rowWindow };
@@ -2,7 +2,8 @@
2
2
  /**
3
3
  * Beside the page's title while the page shows data from the start cache: a small spinner while it refreshes, blank for
4
4
  * its first 180 ms, or a warning, in the same spot, once the refresh failed and the cached data stays. One status region
5
- * says which, so a screen reader hears when the refresh failed.
5
+ * says which, so a screen reader hears when the refresh failed. It is the one thing a refresh shows: the page itself
6
+ * stays as it was drawn (`data-fetching` names it so).
6
7
  */
7
8
  export declare const RefreshMark: ({ failed }: {
8
9
  failed: boolean;
@@ -8,9 +8,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  /**
9
9
  * Beside the page's title while the page shows data from the start cache: a small spinner while it refreshes, blank for
10
10
  * its first 180 ms, or a warning, in the same spot, once the refresh failed and the cached data stays. One status region
11
- * says which, so a screen reader hears when the refresh failed.
11
+ * says which, so a screen reader hears when the refresh failed. It is the one thing a refresh shows: the page itself
12
+ * stays as it was drawn (`data-fetching` names it so).
12
13
  */
13
14
  const RefreshMark = ({ failed }) => /* @__PURE__ */ jsxs("span", {
15
+ "data-fetching": true,
14
16
  className: "inline-flex items-center text-muted-foreground",
15
17
  children: [/* @__PURE__ */ jsx("span", {
16
18
  role: "status",
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/related-cards/messages.d.ts
3
3
  export declare const text: {
4
- (id: "open" | "couldNotLoad" | "showMore" | "left" | "nothingYet" | "add" | "showLess", values?: Record<string, MessageValue>): string;
5
- rich(id: "open" | "couldNotLoad" | "showMore" | "left" | "nothingYet" | "add" | "showLess", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "open" | "left" | "couldNotLoad" | "add" | "showMore" | "nothingYet" | "showLess", values?: Record<string, MessageValue>): string;
5
+ rich(id: "open" | "left" | "couldNotLoad" | "add" | "showMore" | "nothingYet" | "showLess", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,13 +1,19 @@
1
1
  import { ReactNode } from "react";
2
+ import { Query } from "@tanstack/react-query";
2
3
  //#region src/app/reveal-when-loaded.d.ts
3
4
  /** How long a page waits at most for its first data before it shows what it has. */
4
5
  export declare const revealWaitMs = 2000;
6
+ /**
7
+ * Whether the page is the one the app starts with from the start cache: the client holds restored answers and has
8
+ * fetched nothing of its own yet. A page opened later waits for its data as before.
9
+ */
10
+ export declare const startsFromCache: (queries: readonly Pick<Query, "state">[], startedAt: number) => boolean;
5
11
  /**
6
12
  * Draws a page out of sight until the data it asks for when it opens has come, with a skeleton over it meanwhile, so its
7
13
  * parts appear together where they stay instead of each moving the others as it loads. Data asked for in turn, such as
8
14
  * a band shown only when a count has come, is waited for too. It shows what it has after `revealWaitMs` at most, and
9
- * once shown it stays shown: later loads draw in place. Data the page already holds is not waited for, so a page drawn
10
- * from the start cache shows at once.
15
+ * once shown it stays shown: later loads draw in place. Data the page already holds is not waited for, and a page the
16
+ * app starts with from the start cache is shown in its first frame, drawn from what the cache holds.
11
17
  */
12
18
  export declare const RevealWhenLoaded: ({ children }: {
13
19
  children: ReactNode;
@@ -1,7 +1,8 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import { Skeleton } from "../primitives/skeleton.js";
3
3
  import { text } from "./messages.js";
4
- import { useEffect, useState } from "react";
4
+ import { ClientStartContext, isRestored } from "../data/start-cache/restored-state.js";
5
+ import { useContext, useEffect, useState } from "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { useIsFetching, useQueryClient } from "@tanstack/react-query";
7
8
  //#region src/app/reveal-when-loaded.tsx
@@ -12,16 +13,22 @@ const firstLoad = {
12
13
  predicate: (query) => query.state.data === void 0
13
14
  };
14
15
  /**
16
+ * Whether the page is the one the app starts with from the start cache: the client holds restored answers and has
17
+ * fetched nothing of its own yet. A page opened later waits for its data as before.
18
+ */
19
+ const startsFromCache = (queries, startedAt) => queries.some((query) => isRestored(query.state, startedAt)) && !queries.some((query) => query.state.dataUpdatedAt >= startedAt);
20
+ /**
15
21
  * Draws a page out of sight until the data it asks for when it opens has come, with a skeleton over it meanwhile, so its
16
22
  * parts appear together where they stay instead of each moving the others as it loads. Data asked for in turn, such as
17
23
  * a band shown only when a count has come, is waited for too. It shows what it has after `revealWaitMs` at most, and
18
- * once shown it stays shown: later loads draw in place. Data the page already holds is not waited for, so a page drawn
19
- * from the start cache shows at once.
24
+ * once shown it stays shown: later loads draw in place. Data the page already holds is not waited for, and a page the
25
+ * app starts with from the start cache is shown in its first frame, drawn from what the cache holds.
20
26
  */
21
27
  const RevealWhenLoaded = ({ children }) => {
22
28
  const client = useQueryClient();
29
+ const startedAt = useContext(ClientStartContext);
23
30
  const fetching = useIsFetching(firstLoad);
24
- const [shown, setShown] = useState(false);
31
+ const [shown, setShown] = useState(() => startsFromCache(client.getQueryCache().getAll(), startedAt));
25
32
  useEffect(() => {
26
33
  if (shown) return;
27
34
  const latest = setTimeout(() => setShown(true), revealWaitMs);
@@ -57,4 +64,4 @@ const PageSkeleton = () => /* @__PURE__ */ jsxs("div", {
57
64
  ]
58
65
  });
59
66
  //#endregion
60
- export { RevealWhenLoaded, revealWaitMs };
67
+ export { RevealWhenLoaded, revealWaitMs, startsFromCache };
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/runtime/messages.d.ts
3
3
  export declare const text: {
4
- (id: "failed" | "update" | "close" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "succeeded" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values?: Record<string, MessageValue>): string;
5
- rich(id: "failed" | "update" | "close" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "succeeded" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "close" | "failed" | "update" | "succeeded" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values?: Record<string, MessageValue>): string;
5
+ rich(id: "close" | "failed" | "update" | "succeeded" | "immediate" | "weekly" | "scheduled" | "manual" | "job" | "build" | "updatingNow" | "started" | "nextOn" | "unchanged" | "alreadyLatest" | "onlyAdmin" | "couldNotStart" | "runtimeUpdate" | "updating" | "updateNow" | "currentVersion" | "latestVersion" | "checkFailed" | "updateAvailable", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/saved/messages.d.ts
3
3
  export declare const text: {
4
- (id: "couldNotSave" | "noneYet" | "somethingWrong" | "couldNotLoadYour" | "favorite" | "couldNotTakeOff", values?: Record<string, MessageValue>): string;
5
- rich(id: "couldNotSave" | "noneYet" | "somethingWrong" | "couldNotLoadYour" | "favorite" | "couldNotTakeOff", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "couldNotSave" | "somethingWrong" | "noneYet" | "couldNotLoadYour" | "favorite" | "couldNotTakeOff", values?: Record<string, MessageValue>): string;
5
+ rich(id: "couldNotSave" | "somethingWrong" | "noneYet" | "couldNotLoadYour" | "favorite" | "couldNotTakeOff", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../../locale/messages.js";
2
2
  //#region src/app/searches/messages.d.ts
3
3
  export declare const text: {
4
- (id: "changed" | "more" | "viewAll" | "saved" | "notFound" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "removed" | "deleteTitle" | "off" | "on" | "noResource" | "filters" | "unreadableFilter" | "noneYet" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "couldNotChange" | "couldNotLoadYour" | "couldNotTakeOff" | "saveSearch" | "saveAsNew" | "updateName" | "updateNameQuestion" | "updateNounQuestion" | "couldNotRename" | "renameTitle" | "noSavedYet" | "asMany" | "fewer" | "added" | "filterChanges" | "addedRemoved" | "noRecordsDiff" | "searchSaved" | "openPlural" | "searchUpdated" | "couldNotUpdate" | "noNew", values?: Record<string, MessageValue>): string;
5
- rich(id: "changed" | "more" | "viewAll" | "saved" | "notFound" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "removed" | "deleteTitle" | "off" | "on" | "noResource" | "filters" | "unreadableFilter" | "noneYet" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "couldNotChange" | "couldNotLoadYour" | "couldNotTakeOff" | "saveSearch" | "saveAsNew" | "updateName" | "updateNameQuestion" | "updateNounQuestion" | "couldNotRename" | "renameTitle" | "noSavedYet" | "asMany" | "fewer" | "added" | "filterChanges" | "addedRemoved" | "noRecordsDiff" | "searchSaved" | "openPlural" | "searchUpdated" | "couldNotUpdate" | "noNew", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "saved" | "changed" | "removed" | "more" | "viewAll" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "filters" | "notFound" | "deleteTitle" | "off" | "on" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "couldNotChange" | "noResource" | "unreadableFilter" | "noneYet" | "couldNotLoadYour" | "couldNotTakeOff" | "saveSearch" | "saveAsNew" | "updateName" | "updateNameQuestion" | "updateNounQuestion" | "couldNotRename" | "renameTitle" | "noSavedYet" | "asMany" | "fewer" | "added" | "filterChanges" | "addedRemoved" | "noRecordsDiff" | "searchSaved" | "openPlural" | "searchUpdated" | "couldNotUpdate" | "noNew", values?: Record<string, MessageValue>): string;
5
+ rich(id: "saved" | "changed" | "removed" | "more" | "viewAll" | "save" | "cancel" | "couldNotSave" | "optional" | "update" | "filters" | "notFound" | "deleteTitle" | "off" | "on" | "noPlural" | "somethingWrong" | "noneMatch" | "firstOf" | "couldNotChange" | "noResource" | "unreadableFilter" | "noneYet" | "couldNotLoadYour" | "couldNotTakeOff" | "saveSearch" | "saveAsNew" | "updateName" | "updateNameQuestion" | "updateNounQuestion" | "couldNotRename" | "renameTitle" | "noSavedYet" | "asMany" | "fewer" | "added" | "filterChanges" | "addedRemoved" | "noRecordsDiff" | "searchSaved" | "openPlural" | "searchUpdated" | "couldNotUpdate" | "noNew", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -13,7 +13,6 @@ export type SplashHold = {
13
13
  * effects, so the splash stays up from the auth check through `/meta` to the plugins without a gap.
14
14
  */
15
15
  export declare const createSplashHold: (hide: () => void) => SplashHold;
16
- export declare const SplashHoldContext: import("react").Context<SplashHold | undefined>;
17
16
  export declare const SplashHoldProvider: ({ value, children }: {
18
17
  value: SplashHold;
19
18
  children: ReactNode;
@@ -44,4 +44,4 @@ const HoldSplash = () => {
44
44
  return null;
45
45
  };
46
46
  //#endregion
47
- export { HoldSplash, SplashHoldContext, SplashHoldProvider, createSplashHold };
47
+ export { HoldSplash, SplashHoldProvider, createSplashHold };
@@ -1,15 +1,6 @@
1
1
  //#region src/app/start-screen.d.ts
2
2
  /** The id of the start screen index.html draws over the app until it has drawn its first page. */
3
3
  export declare const startScreenId = "pb-start";
4
- /**
5
- * The empty element on the start screen a host may fill, as it serves index.html, with the markup of the page the app
6
- * showed last, for example the official app on a switch back to a workspace. It then shows in place of the spinner,
7
- * inert, until the app has drawn its first page with its first data, so the screen changes once. A plain string
8
- * replace of exactly this text fills it; with nothing in it the start is as before.
9
- */
10
- export declare const snapshotPlaceholder = "<div id=\"pb-snapshot\"></div>";
11
- /** Whether the start screen shows a host's snapshot (`snapshotPlaceholder` filled). */
12
- export declare const startsFromSnapshot: (document: Pick<Document, "getElementById">) => boolean;
13
4
  /** The event the app fires at the start screen as it takes it away, which ends index.html's watch for a failed start. */
14
5
  export declare const startScreenHandOff = "pb-start-hand-off";
15
6
  /**
@@ -1,15 +1,6 @@
1
1
  //#region src/app/start-screen.ts
2
2
  /** The id of the start screen index.html draws over the app until it has drawn its first page. */
3
3
  const startScreenId = "pb-start";
4
- /**
5
- * The empty element on the start screen a host may fill, as it serves index.html, with the markup of the page the app
6
- * showed last, for example the official app on a switch back to a workspace. It then shows in place of the spinner,
7
- * inert, until the app has drawn its first page with its first data, so the screen changes once. A plain string
8
- * replace of exactly this text fills it; with nothing in it the start is as before.
9
- */
10
- const snapshotPlaceholder = "<div id=\"pb-snapshot\"></div>";
11
- /** Whether the start screen shows a host's snapshot (`snapshotPlaceholder` filled). */
12
- const startsFromSnapshot = (document) => (document.getElementById("pb-snapshot")?.childNodes.length ?? 0) > 0;
13
4
  /** The event the app fires at the start screen as it takes it away, which ends index.html's watch for a failed start. */
14
5
  const startScreenHandOff = "pb-start-hand-off";
15
6
  /**
@@ -24,4 +15,4 @@ const removeStartScreen = (document) => {
24
15
  start.remove();
25
16
  };
26
17
  //#endregion
27
- export { removeStartScreen, snapshotPlaceholder, startScreenHandOff, startScreenId, startsFromSnapshot };
18
+ export { removeStartScreen, startScreenHandOff, startScreenId };