alinea 2.0.0-preview.5 → 2.0.0-preview.7

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 (124) hide show
  1. package/dist/.init/content/pages/welcome.json +1 -1
  2. package/dist/LICENSES.md +144 -144
  3. package/dist/adapter/next/previews.js +0 -2
  4. package/dist/backend/api/GithubApi.js +16 -7
  5. package/dist/bundled.d.ts +18 -8
  6. package/dist/chunks/{chunk-A6M3PNJT.js → chunk-6P4UVRPH.js} +1 -1
  7. package/dist/chunks/{chunk-O7XWTMCB.js → chunk-D6RGFNUW.js} +73 -72
  8. package/dist/chunks/{chunk-VXZM6V4P.js → chunk-OFEKTDRF.js} +41 -41
  9. package/dist/cli/Generate.js +2 -1
  10. package/dist/cli/Serve.js +1 -1
  11. package/dist/cli/bin.js +1 -1
  12. package/dist/cli/generate/FillCache.d.ts +1 -1
  13. package/dist/cli/generate/FillCache.js +20 -9
  14. package/dist/cli/serve/DevServer.js +1 -0
  15. package/dist/cli/util/Emitter.js +1 -1
  16. package/dist/cloud/CloudRemote.js +1 -1
  17. package/dist/components/Breadcrumbs.js +7 -7
  18. package/dist/components/Button.js +5 -5
  19. package/dist/components/Calendar.js +8 -8
  20. package/dist/components/Checkbox.js +8 -8
  21. package/dist/components/CheckboxGroup.js +5 -5
  22. package/dist/components/ColorSwatch.js +5 -5
  23. package/dist/components/ColorSwatchPicker.js +7 -7
  24. package/dist/components/ComboBox.js +18 -18
  25. package/dist/components/DateField.js +9 -9
  26. package/dist/components/DatePicker.js +9 -9
  27. package/dist/components/DateRangePicker.js +9 -9
  28. package/dist/components/Dialog.js +5 -5
  29. package/dist/components/Disclosure.js +11 -11
  30. package/dist/components/DropZone.js +5 -5
  31. package/dist/components/Label.js +10 -10
  32. package/dist/components/Link.js +5 -5
  33. package/dist/components/List.js +52 -50
  34. package/dist/components/Menu.js +8 -8
  35. package/dist/components/Modal.js +9 -9
  36. package/dist/components/MultipleSelect.js +30 -30
  37. package/dist/components/NumberField.js +7 -7
  38. package/dist/components/Popover.js +5 -5
  39. package/dist/components/ProgressCircle.js +7 -7
  40. package/dist/components/RadioGroup.js +7 -7
  41. package/dist/components/SearchField.js +12 -12
  42. package/dist/components/Select.js +13 -13
  43. package/dist/components/Surface.js +2 -2
  44. package/dist/components/Switch.js +7 -7
  45. package/dist/components/Table.js +13 -13
  46. package/dist/components/Tabs.js +9 -9
  47. package/dist/components/TagGroup.js +8 -8
  48. package/dist/components/TextField.js +10 -10
  49. package/dist/components/TimeField.js +5 -5
  50. package/dist/components/Toggle.js +7 -7
  51. package/dist/components/Toolbar.js +7 -7
  52. package/dist/components/Tooltip.js +8 -8
  53. package/dist/components/Tree.js +12 -12
  54. package/dist/core/TextDoc.d.ts +1 -0
  55. package/dist/core/db/EntryIndex.js +1 -8
  56. package/dist/core/db/EntryTransaction.js +33 -52
  57. package/dist/core/field/RichTextField.js +3 -3
  58. package/dist/dashboard/App.js +7 -5
  59. package/dist/dashboard/app/AccessDenied.js +3 -3
  60. package/dist/dashboard/app/ActivityStatus.js +32 -39
  61. package/dist/dashboard/app/AppShell.js +2 -2
  62. package/dist/dashboard/app/AuthView.js +11 -11
  63. package/dist/dashboard/app/Badge.js +2 -2
  64. package/dist/dashboard/app/CompactField.js +9 -9
  65. package/dist/dashboard/app/DashboardErrorBoundary.js +4 -4
  66. package/dist/dashboard/app/DashboardLayout.js +6 -5
  67. package/dist/dashboard/app/EntryFields.js +2 -2
  68. package/dist/dashboard/app/EntryHeader.js +10 -10
  69. package/dist/dashboard/app/EntryReferences.js +9 -14
  70. package/dist/dashboard/app/EntrySidebar.js +32 -18
  71. package/dist/dashboard/app/EntrySidebarPreview.js +12 -12
  72. package/dist/dashboard/app/EntryTranslationBanner.js +5 -5
  73. package/dist/dashboard/app/Explorer.js +50 -50
  74. package/dist/dashboard/app/ExplorerCards.js +32 -32
  75. package/dist/dashboard/app/ExplorerFileCard.js +19 -19
  76. package/dist/dashboard/app/ExplorerList.js +14 -14
  77. package/dist/dashboard/app/ExplorerModal.js +4 -4
  78. package/dist/dashboard/app/ExplorerTable.js +58 -58
  79. package/dist/dashboard/app/LinkPicker.js +3 -3
  80. package/dist/dashboard/app/LocaleMenu.js +11 -11
  81. package/dist/dashboard/app/SidebarTree.js +41 -41
  82. package/dist/dashboard/app/WorkspaceMenu.js +15 -15
  83. package/dist/dashboard/app/WorkspaceRoots.js +26 -26
  84. package/dist/dashboard/app/editor/FileEditor.js +23 -23
  85. package/dist/dashboard/app/editor/FilePreview.js +8 -8
  86. package/dist/dashboard/app/modals/CreateEntry.js +5 -5
  87. package/dist/dashboard/app/pages/EntryPage.js +19 -19
  88. package/dist/dashboard/app/pages/RootPage.js +3 -3
  89. package/dist/dashboard/app/pages/SplashPage.js +40 -40
  90. package/dist/dashboard/app/pages/UsersPage.js +33 -33
  91. package/dist/dashboard/app/ui/DashboardModal.js +22 -22
  92. package/dist/dashboard/app/ui/Rail.js +2 -2
  93. package/dist/dashboard/app/ui/Sidebar.js +2 -2
  94. package/dist/dashboard/atoms/activity.d.ts +0 -1
  95. package/dist/dashboard/atoms/activity.js +3 -8
  96. package/dist/dashboard/atoms/dashboard.js +2 -1
  97. package/dist/dashboard/atoms/editor.js +7 -0
  98. package/dist/dashboard/atoms/entry.d.ts +2 -4
  99. package/dist/dashboard/atoms/entry.js +8 -3
  100. package/dist/dashboard/atoms/root.d.ts +1 -0
  101. package/dist/dashboard/atoms/root.js +61 -35
  102. package/dist/dashboard/boot/ActivityEvent.d.ts +1 -1
  103. package/dist/dashboard/boot/Boot.js +7 -5
  104. package/dist/dashboard/boot/DashboardWorker.js +1 -28
  105. package/dist/field/code/CodeField.view.js +15 -15
  106. package/dist/field/date/DateField.view.js +5 -5
  107. package/dist/field/link/FileLink.js +1 -7
  108. package/dist/field/link/LinkField.view.js +39 -39
  109. package/dist/field/list/ListField.d.ts +5 -0
  110. package/dist/field/list/ListField.stories.d.ts +1 -0
  111. package/dist/field/list/ListField.view.js +62 -50
  112. package/dist/field/metadata/MetadataField.view.js +17 -17
  113. package/dist/field/richtext/PickTextLink.d.ts +3 -1
  114. package/dist/field/richtext/PickTextLink.js +7 -6
  115. package/dist/field/richtext/RichTextBlock.js +2 -2
  116. package/dist/field/richtext/RichTextDocument.js +8 -1
  117. package/dist/field/richtext/RichTextExtensions.js +19 -19
  118. package/dist/field/richtext/RichTextField.d.ts +3 -0
  119. package/dist/field/richtext/RichTextField.view.js +3 -3
  120. package/dist/field/select/SelectField.view.js +1 -1
  121. package/dist/index.css +17 -6
  122. package/dist/ui/RichText.js +33 -18
  123. package/package.json +1 -1
  124. package/dist/chunks/{chunk-6V4TAD2N.js → chunk-DNJX6CRV.js} +4 -4
@@ -1135,6 +1135,78 @@ function $42ceafc619f9c3ba$var$CollectionRoot({ children }) {
1135
1135
  }, wrappedChildren) : /* @__PURE__ */ (0, $kT5Ur$createPortal)(wrappedChildren, doc);
1136
1136
  }
1137
1137
 
1138
+ // node_modules/react-aria/dist/private/interactions/useInteractOutside.mjs
1139
+ import { useRef as $a2uwp$useRef, useEffect as $a2uwp$useEffect } from "react";
1140
+ function $e260d131964da0f9$export$872b660ac5a1ff98(props) {
1141
+ let { ref, onInteractOutside, isDisabled, onInteractOutsideStart } = props;
1142
+ let stateRef = (0, $a2uwp$useRef)({
1143
+ isPointerDown: false,
1144
+ ignoreEmulatedMouseEvents: false
1145
+ });
1146
+ let onPointerDown = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)((e) => {
1147
+ if (onInteractOutside && $e260d131964da0f9$var$isValidEvent(e, ref)) {
1148
+ if (onInteractOutsideStart) onInteractOutsideStart(e);
1149
+ stateRef.current.isPointerDown = true;
1150
+ }
1151
+ });
1152
+ let triggerInteractOutside = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)((e) => {
1153
+ if (onInteractOutside) onInteractOutside(e);
1154
+ });
1155
+ (0, $a2uwp$useEffect)(() => {
1156
+ let state = stateRef.current;
1157
+ if (isDisabled) return;
1158
+ const element = ref.current;
1159
+ const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(element);
1160
+ if (typeof PointerEvent !== "undefined") {
1161
+ let onClick = (e) => {
1162
+ if (state.isPointerDown && $e260d131964da0f9$var$isValidEvent(e, ref)) triggerInteractOutside(e);
1163
+ state.isPointerDown = false;
1164
+ };
1165
+ documentObject.addEventListener("pointerdown", onPointerDown, true);
1166
+ documentObject.addEventListener("click", onClick, true);
1167
+ return () => {
1168
+ documentObject.removeEventListener("pointerdown", onPointerDown, true);
1169
+ documentObject.removeEventListener("click", onClick, true);
1170
+ };
1171
+ } else if (process.env.NODE_ENV === "test") {
1172
+ let onMouseUp = (e) => {
1173
+ if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;
1174
+ else if (state.isPointerDown && $e260d131964da0f9$var$isValidEvent(e, ref)) triggerInteractOutside(e);
1175
+ state.isPointerDown = false;
1176
+ };
1177
+ let onTouchEnd = (e) => {
1178
+ state.ignoreEmulatedMouseEvents = true;
1179
+ if (state.isPointerDown && $e260d131964da0f9$var$isValidEvent(e, ref)) triggerInteractOutside(e);
1180
+ state.isPointerDown = false;
1181
+ };
1182
+ documentObject.addEventListener("mousedown", onPointerDown, true);
1183
+ documentObject.addEventListener("mouseup", onMouseUp, true);
1184
+ documentObject.addEventListener("touchstart", onPointerDown, true);
1185
+ documentObject.addEventListener("touchend", onTouchEnd, true);
1186
+ return () => {
1187
+ documentObject.removeEventListener("mousedown", onPointerDown, true);
1188
+ documentObject.removeEventListener("mouseup", onMouseUp, true);
1189
+ documentObject.removeEventListener("touchstart", onPointerDown, true);
1190
+ documentObject.removeEventListener("touchend", onTouchEnd, true);
1191
+ };
1192
+ }
1193
+ }, [
1194
+ ref,
1195
+ isDisabled
1196
+ ]);
1197
+ }
1198
+ function $e260d131964da0f9$var$isValidEvent(event, ref) {
1199
+ if (event.button > 0) return false;
1200
+ let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(event);
1201
+ if (target) {
1202
+ const ownerDocument = target.ownerDocument;
1203
+ if (!ownerDocument || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(ownerDocument.documentElement, target)) return false;
1204
+ if (target.closest("[data-react-aria-top-layer]")) return false;
1205
+ }
1206
+ if (!ref.current) return false;
1207
+ return !event.composedPath().includes(ref.current);
1208
+ }
1209
+
1138
1210
  // node_modules/react-aria/dist/private/i18n/useCollator.mjs
1139
1211
  var $673d46fce3e5717d$var$cache = /* @__PURE__ */ new Map();
1140
1212
  function $673d46fce3e5717d$export$a16aca283550c30d(options) {
@@ -10403,78 +10475,6 @@ function $b3526bc71400be8d$var$translateRTL(position, direction) {
10403
10475
  return position.replace("start", "left").replace("end", "right");
10404
10476
  }
10405
10477
 
10406
- // node_modules/react-aria/dist/private/interactions/useInteractOutside.mjs
10407
- import { useRef as $a2uwp$useRef, useEffect as $a2uwp$useEffect } from "react";
10408
- function $e260d131964da0f9$export$872b660ac5a1ff98(props) {
10409
- let { ref, onInteractOutside, isDisabled, onInteractOutsideStart } = props;
10410
- let stateRef = (0, $a2uwp$useRef)({
10411
- isPointerDown: false,
10412
- ignoreEmulatedMouseEvents: false
10413
- });
10414
- let onPointerDown = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)((e) => {
10415
- if (onInteractOutside && $e260d131964da0f9$var$isValidEvent(e, ref)) {
10416
- if (onInteractOutsideStart) onInteractOutsideStart(e);
10417
- stateRef.current.isPointerDown = true;
10418
- }
10419
- });
10420
- let triggerInteractOutside = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)((e) => {
10421
- if (onInteractOutside) onInteractOutside(e);
10422
- });
10423
- (0, $a2uwp$useEffect)(() => {
10424
- let state = stateRef.current;
10425
- if (isDisabled) return;
10426
- const element = ref.current;
10427
- const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(element);
10428
- if (typeof PointerEvent !== "undefined") {
10429
- let onClick = (e) => {
10430
- if (state.isPointerDown && $e260d131964da0f9$var$isValidEvent(e, ref)) triggerInteractOutside(e);
10431
- state.isPointerDown = false;
10432
- };
10433
- documentObject.addEventListener("pointerdown", onPointerDown, true);
10434
- documentObject.addEventListener("click", onClick, true);
10435
- return () => {
10436
- documentObject.removeEventListener("pointerdown", onPointerDown, true);
10437
- documentObject.removeEventListener("click", onClick, true);
10438
- };
10439
- } else if (process.env.NODE_ENV === "test") {
10440
- let onMouseUp = (e) => {
10441
- if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;
10442
- else if (state.isPointerDown && $e260d131964da0f9$var$isValidEvent(e, ref)) triggerInteractOutside(e);
10443
- state.isPointerDown = false;
10444
- };
10445
- let onTouchEnd = (e) => {
10446
- state.ignoreEmulatedMouseEvents = true;
10447
- if (state.isPointerDown && $e260d131964da0f9$var$isValidEvent(e, ref)) triggerInteractOutside(e);
10448
- state.isPointerDown = false;
10449
- };
10450
- documentObject.addEventListener("mousedown", onPointerDown, true);
10451
- documentObject.addEventListener("mouseup", onMouseUp, true);
10452
- documentObject.addEventListener("touchstart", onPointerDown, true);
10453
- documentObject.addEventListener("touchend", onTouchEnd, true);
10454
- return () => {
10455
- documentObject.removeEventListener("mousedown", onPointerDown, true);
10456
- documentObject.removeEventListener("mouseup", onMouseUp, true);
10457
- documentObject.removeEventListener("touchstart", onPointerDown, true);
10458
- documentObject.removeEventListener("touchend", onTouchEnd, true);
10459
- };
10460
- }
10461
- }, [
10462
- ref,
10463
- isDisabled
10464
- ]);
10465
- }
10466
- function $e260d131964da0f9$var$isValidEvent(event, ref) {
10467
- if (event.button > 0) return false;
10468
- let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(event);
10469
- if (target) {
10470
- const ownerDocument = target.ownerDocument;
10471
- if (!ownerDocument || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(ownerDocument.documentElement, target)) return false;
10472
- if (target.closest("[data-react-aria-top-layer]")) return false;
10473
- }
10474
- if (!ref.current) return false;
10475
- return !event.composedPath().includes(ref.current);
10476
- }
10477
-
10478
10478
  // node_modules/react-aria/dist/private/overlays/useOverlay.mjs
10479
10479
  import { useRef as $eUNmN$useRef, useEffect as $eUNmN$useEffect } from "react";
10480
10480
  var $77844860df94ba23$var$visibleOverlays = [];
@@ -19437,6 +19437,7 @@ export {
19437
19437
  $3d6c959d2ef57b72$export$c3f9f39876e4bc7,
19438
19438
  $970072cf4b13fde3$export$683480f191c0e3ea,
19439
19439
  $b3526bc71400be8d$export$d39e1813b3bdd0e1,
19440
+ $e260d131964da0f9$export$872b660ac5a1ff98,
19440
19441
  $f8a024fbad3a5a2e$export$542a6fd13ac93354,
19441
19442
  $081058010ef8962e$export$2317d149ed6f78c4,
19442
19443
  $0d47b37c475c5231$export$3351871ee4b288b8,
@@ -1,3 +1,43 @@
1
+ import {
2
+ $086b1fd51041276f$export$3fcbf6e4407997e0,
3
+ $120eca7b9c40f820$export$b453a3bfd4a5fa9e,
4
+ $178a7f94e1b4b497$export$31447e17397b15c2,
5
+ $178a7f94e1b4b497$export$907bcc6c48325fd6,
6
+ $28aae683a942e141$export$87194bb378cc3ac2,
7
+ $29256f53a2edafe9$export$5159ec8b34d4ec12,
8
+ $3834487504f4fc00$export$4d40659c25ecb50b,
9
+ $384704861d32dbed$export$bca9d026f8e704eb,
10
+ $3b14a8cc70843920$export$7c127db850d4e81e,
11
+ $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c,
12
+ $3d8ad31c4c1725e9$export$8deac67f4addf270,
13
+ $4a07ac835f260f78$export$6c8a5aaad13c9852,
14
+ $51e619e0f141c3ec$export$1505db82fe357e65,
15
+ $56baeede9f35e022$export$3f8be18b0f41eaf2,
16
+ $5b3242e27644e8f1$export$cfc51cf86138bf98,
17
+ $60f19cefd567a3e4$export$253fe78d46329472,
18
+ $6b915bde6cd300dd$export$728d6ba534403756,
19
+ $6de3e3f1a7663217$export$e50a61c1de9f574,
20
+ $8cd68577ce0207f7$export$daff6da51032a415,
21
+ $8e7461aabf74661f$export$60e84778edff6d26,
22
+ $a0a87fb6fcfb22ec$export$9a987164d97ecc90,
23
+ $af827553fd3cf456$export$c79fc6492f3af13d,
24
+ $b14b6f590b50af39$export$2f645645f7bca764,
25
+ $b14b6f590b50af39$export$ba9d38c0f1bf2b36,
26
+ $b822555cf9fe955c$export$fd53cef0cc796101,
27
+ $b88f793813fc795e$export$baf26146a414f24a,
28
+ $caeb030f09a278a1$export$4ba071daf4e486,
29
+ $cc8e610d5d6e3fe4$export$cb6da89c6af1a8ec,
30
+ $e3403870bfb691da$export$79fefeb1c2091ac3,
31
+ $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f,
32
+ $f11fb0bcf1b2687a$export$61c6a8c84e605fb6,
33
+ $f229ad6ed8947519$export$dc6b73b623f8645f
34
+ } from "./chunk-NIVGVRDS.js";
35
+ import {
36
+ $f9554a667e4f0374$export$971707d8a129a1f7,
37
+ $f9554a667e4f0374$export$d188a835a7bc5783,
38
+ $f9554a667e4f0374$export$d1e8e3fbb7461f6,
39
+ $f9554a667e4f0374$export$f55761759794cf55
40
+ } from "./chunk-DNJX6CRV.js";
1
41
  import {
2
42
  $03e8ab2d84d7657a$export$4338b53315abf666,
3
43
  $054f71d2330da2e3$export$712718f7aec83d5,
@@ -101,53 +141,13 @@ import {
101
141
  $f282e36c29c025e8$export$f9d5c8beee7d008d,
102
142
  $f8a024fbad3a5a2e$export$542a6fd13ac93354,
103
143
  $fb95af427cd4e876$export$25bceaac3c7e4dc7
104
- } from "./chunk-O7XWTMCB.js";
105
- import {
106
- $086b1fd51041276f$export$3fcbf6e4407997e0,
107
- $120eca7b9c40f820$export$b453a3bfd4a5fa9e,
108
- $178a7f94e1b4b497$export$31447e17397b15c2,
109
- $178a7f94e1b4b497$export$907bcc6c48325fd6,
110
- $28aae683a942e141$export$87194bb378cc3ac2,
111
- $29256f53a2edafe9$export$5159ec8b34d4ec12,
112
- $3834487504f4fc00$export$4d40659c25ecb50b,
113
- $384704861d32dbed$export$bca9d026f8e704eb,
114
- $3b14a8cc70843920$export$7c127db850d4e81e,
115
- $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c,
116
- $3d8ad31c4c1725e9$export$8deac67f4addf270,
117
- $4a07ac835f260f78$export$6c8a5aaad13c9852,
118
- $51e619e0f141c3ec$export$1505db82fe357e65,
119
- $56baeede9f35e022$export$3f8be18b0f41eaf2,
120
- $5b3242e27644e8f1$export$cfc51cf86138bf98,
121
- $60f19cefd567a3e4$export$253fe78d46329472,
122
- $6b915bde6cd300dd$export$728d6ba534403756,
123
- $6de3e3f1a7663217$export$e50a61c1de9f574,
124
- $8cd68577ce0207f7$export$daff6da51032a415,
125
- $8e7461aabf74661f$export$60e84778edff6d26,
126
- $a0a87fb6fcfb22ec$export$9a987164d97ecc90,
127
- $af827553fd3cf456$export$c79fc6492f3af13d,
128
- $b14b6f590b50af39$export$2f645645f7bca764,
129
- $b14b6f590b50af39$export$ba9d38c0f1bf2b36,
130
- $b822555cf9fe955c$export$fd53cef0cc796101,
131
- $b88f793813fc795e$export$baf26146a414f24a,
132
- $caeb030f09a278a1$export$4ba071daf4e486,
133
- $cc8e610d5d6e3fe4$export$cb6da89c6af1a8ec,
134
- $e3403870bfb691da$export$79fefeb1c2091ac3,
135
- $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f,
136
- $f11fb0bcf1b2687a$export$61c6a8c84e605fb6,
137
- $f229ad6ed8947519$export$dc6b73b623f8645f
138
- } from "./chunk-NIVGVRDS.js";
144
+ } from "./chunk-D6RGFNUW.js";
139
145
  import {
140
146
  $240e9101ba2842f5$export$7d15b64cf5a3a4c4,
141
147
  $3e6197669829fe11$export$40bfa8c7b0832715,
142
148
  $890783418b00a858$export$6e865ea70d7724f,
143
149
  $fd3c5e01e837dc20$export$8042c6c013fd5226
144
150
  } from "./chunk-SJBZFMQ2.js";
145
- import {
146
- $f9554a667e4f0374$export$971707d8a129a1f7,
147
- $f9554a667e4f0374$export$d188a835a7bc5783,
148
- $f9554a667e4f0374$export$d1e8e3fbb7461f6,
149
- $f9554a667e4f0374$export$f55761759794cf55
150
- } from "./chunk-6V4TAD2N.js";
151
151
  import {
152
152
  $23f2114a1b82827e$export$4282f70798064fe0,
153
153
  $23f2114a1b82827e$export$b4f377a2b6254582,
@@ -36,6 +36,7 @@ async function* generate(options) {
36
36
  configFile,
37
37
  staticDir = path.join(__dirname, "static"),
38
38
  quiet = false,
39
+ watch = cmd === "dev",
39
40
  onAfterGenerate
40
41
  } = options;
41
42
  const now = performance.now();
@@ -105,7 +106,7 @@ async function* generate(options) {
105
106
  dashboardUrl: await options.dashboardUrl
106
107
  });
107
108
  try {
108
- indexing = fillCache(db, context.fix);
109
+ indexing = fillCache(db, context.fix, watch);
109
110
  } catch (error) {
110
111
  reportError(error);
111
112
  if (cmd === "build") process.exit(1);
package/dist/cli/Serve.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-A6M3PNJT.js";
3
+ } from "../chunks/chunk-6P4UVRPH.js";
4
4
  import "../chunks/chunk-CQ52GEHY.js";
5
5
 
6
6
  // src/cli/Serve.ts
package/dist/cli/bin.js CHANGED
@@ -220,7 +220,7 @@ var lib_default2 = (e, t2) => new o(e, t2);
220
220
  // package.json
221
221
  var package_default = {
222
222
  name: "alinea",
223
- version: "2.0.0-preview.5",
223
+ version: "2.0.0-preview.7",
224
224
  description: "Headless git-based CMS",
225
225
  repository: "github:alineacms/alinea",
226
226
  license: "MIT",
@@ -1,3 +1,3 @@
1
1
  import { type Emitter } from '../util/Emitter.js';
2
2
  import type { DevDB } from './DevDB.js';
3
- export declare function fillCache(db: DevDB, fix?: boolean): Emitter<DevDB>;
3
+ export declare function fillCache(db: DevDB, fix?: boolean, watch?: boolean): Emitter<DevDB>;
@@ -7,7 +7,7 @@ import "../../chunks/chunk-CQ52GEHY.js";
7
7
  import { createEmitter } from "../util/Emitter.js";
8
8
  import { reportError } from "../util/Report.js";
9
9
  import { createWatcher } from "../util/Watcher.js";
10
- function fillCache(db, fix) {
10
+ function fillCache(db, fix, watch = true) {
11
11
  let canceled = false;
12
12
  let stopWatching = () => {
13
13
  canceled = true;
@@ -18,19 +18,30 @@ function fillCache(db, fix) {
18
18
  }
19
19
  });
20
20
  const limit = pLimit(1);
21
- const run = () => limit(cache).then(results.emit, reportError);
21
+ const run = () => limit(cache).then(
22
+ (db2) => {
23
+ results.emit(db2);
24
+ if (!watch) results.return();
25
+ },
26
+ (error) => {
27
+ if (watch) reportError(error);
28
+ else results.throw(error);
29
+ }
30
+ );
22
31
  const cache = async () => {
23
32
  await db.sync();
24
33
  if (fix) await db.fix();
25
34
  return db;
26
35
  };
27
- createWatcher({
28
- watchFiles: db.watchFiles.bind(db),
29
- onChange: run
30
- }).then((cancel) => {
31
- if (canceled) cancel();
32
- else stopWatching = cancel;
33
- });
36
+ if (watch) {
37
+ createWatcher({
38
+ watchFiles: db.watchFiles.bind(db),
39
+ onChange: run
40
+ }).then((cancel) => {
41
+ if (canceled) cancel();
42
+ else stopWatching = cancel;
43
+ });
44
+ }
34
45
  run();
35
46
  return results;
36
47
  }
@@ -124,6 +124,7 @@ async function createDevServer(dir, options) {
124
124
  }
125
125
  }
126
126
  void reloadServer();
127
+ if (cmd === "build") await initialServer;
127
128
  return {
128
129
  close() {
129
130
  currentServer?.close();
@@ -19,7 +19,7 @@ function createEmitter({
19
19
  while (!queue.length) {
20
20
  await new Promise((_) => resolve = _);
21
21
  }
22
- const current = queue.pop();
22
+ const current = queue.shift();
23
23
  switch (current.type) {
24
24
  case "emit":
25
25
  return { value: current.value, done: false };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-A6M3PNJT.js";
3
+ } from "../chunks/chunk-6P4UVRPH.js";
4
4
  import "../chunks/chunk-CQ52GEHY.js";
5
5
 
6
6
  // src/cloud/CloudRemote.ts
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  $65dbe90f868fa5f4$export$2dc68d50d56fbbd,
3
3
  $65dbe90f868fa5f4$export$dabcc1ec9dd9d1cc
4
- } from "../chunks/chunk-VXZM6V4P.js";
5
- import "../chunks/chunk-O7XWTMCB.js";
6
- import "../chunks/chunk-RKDPDEF7.js";
4
+ } from "../chunks/chunk-OFEKTDRF.js";
7
5
  import "../chunks/chunk-NIVGVRDS.js";
8
6
  import "../chunks/chunk-IYAQC63Y.js";
7
+ import "../chunks/chunk-DNJX6CRV.js";
8
+ import "../chunks/chunk-AC4U3IMS.js";
9
+ import "../chunks/chunk-D6RGFNUW.js";
10
+ import "../chunks/chunk-RKDPDEF7.js";
9
11
  import "../chunks/chunk-SJBZFMQ2.js";
10
- import "../chunks/chunk-6V4TAD2N.js";
11
12
  import "../chunks/chunk-S4AU6SRS.js";
12
- import "../chunks/chunk-AC4U3IMS.js";
13
13
  import {
14
14
  styler
15
15
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -17,8 +17,8 @@ import "../chunks/chunk-CQ52GEHY.js";
17
17
 
18
18
  // src/components/Breadcrumbs.module.css
19
19
  var Breadcrumbs_default = {
20
- "Breadcrumb": "alinea-Breadcrumb",
21
- "Breadcrumbs": "alinea-Breadcrumbs"
20
+ "Breadcrumbs": "alinea-Breadcrumbs",
21
+ "Breadcrumb": "alinea-Breadcrumb"
22
22
  };
23
23
 
24
24
  // src/components/Breadcrumbs.tsx
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  $7705c033048f6da7$export$353f5b6fc5456de1
3
- } from "../chunks/chunk-VXZM6V4P.js";
4
- import "../chunks/chunk-O7XWTMCB.js";
5
- import "../chunks/chunk-RKDPDEF7.js";
3
+ } from "../chunks/chunk-OFEKTDRF.js";
6
4
  import "../chunks/chunk-NIVGVRDS.js";
7
5
  import "../chunks/chunk-IYAQC63Y.js";
6
+ import "../chunks/chunk-DNJX6CRV.js";
7
+ import "../chunks/chunk-AC4U3IMS.js";
8
+ import "../chunks/chunk-D6RGFNUW.js";
9
+ import "../chunks/chunk-RKDPDEF7.js";
8
10
  import "../chunks/chunk-SJBZFMQ2.js";
9
- import "../chunks/chunk-6V4TAD2N.js";
10
11
  import "../chunks/chunk-S4AU6SRS.js";
11
- import "../chunks/chunk-AC4U3IMS.js";
12
12
  import {
13
13
  dist_default
14
14
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -5,15 +5,15 @@ import {
5
5
  $6f9a1820b787aac7$export$a4f5c8b89d277a8d,
6
6
  $6f9a1820b787aac7$export$e1aef45b828286de,
7
7
  $7705c033048f6da7$export$353f5b6fc5456de1
8
- } from "../chunks/chunk-VXZM6V4P.js";
9
- import "../chunks/chunk-O7XWTMCB.js";
10
- import "../chunks/chunk-RKDPDEF7.js";
8
+ } from "../chunks/chunk-OFEKTDRF.js";
11
9
  import "../chunks/chunk-NIVGVRDS.js";
12
10
  import "../chunks/chunk-IYAQC63Y.js";
11
+ import "../chunks/chunk-DNJX6CRV.js";
12
+ import "../chunks/chunk-AC4U3IMS.js";
13
+ import "../chunks/chunk-D6RGFNUW.js";
14
+ import "../chunks/chunk-RKDPDEF7.js";
13
15
  import "../chunks/chunk-SJBZFMQ2.js";
14
- import "../chunks/chunk-6V4TAD2N.js";
15
16
  import "../chunks/chunk-S4AU6SRS.js";
16
- import "../chunks/chunk-AC4U3IMS.js";
17
17
  import {
18
18
  dist_default
19
19
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -27,15 +27,15 @@ import {
27
27
 
28
28
  // src/components/Calendar.module.css
29
29
  var Calendar_default = {
30
+ "Calendar-header": "alinea-Calendar-header",
31
+ "CalendarHeader": "alinea-Calendar-header",
30
32
  "Calendar-heading": "alinea-Calendar-heading",
31
33
  "CalendarHeading": "alinea-Calendar-heading",
32
34
  "Calendar-button": "alinea-Calendar-button",
33
35
  "CalendarButton": "alinea-Calendar-button",
36
+ "Calendar": "alinea-Calendar",
34
37
  "Calendar-grid": "alinea-Calendar-grid",
35
38
  "CalendarGrid": "alinea-Calendar-grid",
36
- "Calendar": "alinea-Calendar",
37
- "Calendar-header": "alinea-Calendar-header",
38
- "CalendarHeader": "alinea-Calendar-header",
39
39
  "Calendar-cell": "alinea-Calendar-cell",
40
40
  "CalendarCell": "alinea-Calendar-cell"
41
41
  };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  $ed8ccb2e23e76301$export$48513f6b9f8ce62d
3
- } from "../chunks/chunk-VXZM6V4P.js";
4
- import "../chunks/chunk-O7XWTMCB.js";
5
- import "../chunks/chunk-RKDPDEF7.js";
3
+ } from "../chunks/chunk-OFEKTDRF.js";
6
4
  import "../chunks/chunk-NIVGVRDS.js";
7
5
  import "../chunks/chunk-IYAQC63Y.js";
6
+ import "../chunks/chunk-DNJX6CRV.js";
7
+ import "../chunks/chunk-AC4U3IMS.js";
8
+ import "../chunks/chunk-D6RGFNUW.js";
9
+ import "../chunks/chunk-RKDPDEF7.js";
8
10
  import "../chunks/chunk-SJBZFMQ2.js";
9
- import "../chunks/chunk-6V4TAD2N.js";
10
11
  import "../chunks/chunk-S4AU6SRS.js";
11
- import "../chunks/chunk-AC4U3IMS.js";
12
12
  import {
13
13
  dist_default
14
14
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -16,11 +16,11 @@ import "../chunks/chunk-CQ52GEHY.js";
16
16
 
17
17
  // src/components/Checkbox.module.css
18
18
  var Checkbox_default = {
19
- "Checkbox-mark": "alinea-Checkbox-mark",
20
- "CheckboxMark": "alinea-Checkbox-mark",
19
+ "Checkbox": "alinea-Checkbox",
21
20
  "Checkbox-box": "alinea-Checkbox-box",
22
21
  "CheckboxBox": "alinea-Checkbox-box",
23
- "Checkbox": "alinea-Checkbox"
22
+ "Checkbox-mark": "alinea-Checkbox-mark",
23
+ "CheckboxMark": "alinea-Checkbox-mark"
24
24
  };
25
25
 
26
26
  // src/components/Checkbox.tsx
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  $ed8ccb2e23e76301$export$4aa08d5625cb8ead
3
- } from "../chunks/chunk-VXZM6V4P.js";
4
- import "../chunks/chunk-O7XWTMCB.js";
5
- import "../chunks/chunk-RKDPDEF7.js";
3
+ } from "../chunks/chunk-OFEKTDRF.js";
6
4
  import "../chunks/chunk-NIVGVRDS.js";
7
5
  import "../chunks/chunk-IYAQC63Y.js";
6
+ import "../chunks/chunk-DNJX6CRV.js";
7
+ import "../chunks/chunk-AC4U3IMS.js";
8
+ import "../chunks/chunk-D6RGFNUW.js";
9
+ import "../chunks/chunk-RKDPDEF7.js";
8
10
  import "../chunks/chunk-SJBZFMQ2.js";
9
- import "../chunks/chunk-6V4TAD2N.js";
10
11
  import "../chunks/chunk-S4AU6SRS.js";
11
- import "../chunks/chunk-AC4U3IMS.js";
12
12
  import {
13
13
  dist_default
14
14
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  $eeaff5a2d2421ecc$export$cae13e90592f246a
3
- } from "../chunks/chunk-VXZM6V4P.js";
4
- import "../chunks/chunk-O7XWTMCB.js";
5
- import "../chunks/chunk-RKDPDEF7.js";
3
+ } from "../chunks/chunk-OFEKTDRF.js";
6
4
  import "../chunks/chunk-NIVGVRDS.js";
7
5
  import "../chunks/chunk-IYAQC63Y.js";
6
+ import "../chunks/chunk-DNJX6CRV.js";
7
+ import "../chunks/chunk-AC4U3IMS.js";
8
+ import "../chunks/chunk-D6RGFNUW.js";
9
+ import "../chunks/chunk-RKDPDEF7.js";
8
10
  import "../chunks/chunk-SJBZFMQ2.js";
9
- import "../chunks/chunk-6V4TAD2N.js";
10
11
  import "../chunks/chunk-S4AU6SRS.js";
11
- import "../chunks/chunk-AC4U3IMS.js";
12
12
  import {
13
13
  dist_default
14
14
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  $a36727cf8b43b57f$export$abcd89c27081c2ef,
3
3
  $a36727cf8b43b57f$export$b46792416e3d8515
4
- } from "../chunks/chunk-VXZM6V4P.js";
5
- import "../chunks/chunk-O7XWTMCB.js";
6
- import "../chunks/chunk-RKDPDEF7.js";
4
+ } from "../chunks/chunk-OFEKTDRF.js";
7
5
  import "../chunks/chunk-NIVGVRDS.js";
8
6
  import "../chunks/chunk-IYAQC63Y.js";
7
+ import "../chunks/chunk-DNJX6CRV.js";
8
+ import "../chunks/chunk-AC4U3IMS.js";
9
+ import "../chunks/chunk-D6RGFNUW.js";
10
+ import "../chunks/chunk-RKDPDEF7.js";
9
11
  import "../chunks/chunk-SJBZFMQ2.js";
10
- import "../chunks/chunk-6V4TAD2N.js";
11
12
  import "../chunks/chunk-S4AU6SRS.js";
12
- import "../chunks/chunk-AC4U3IMS.js";
13
13
  import {
14
14
  dist_default
15
15
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -20,8 +20,8 @@ import { ColorSwatch } from "./ColorSwatch.js";
20
20
 
21
21
  // src/components/ColorSwatchPicker.module.css
22
22
  var ColorSwatchPicker_default = {
23
- "ColorSwatchPickerItem": "alinea-ColorSwatchPickerItem",
24
- "ColorSwatchPicker": "alinea-ColorSwatchPicker"
23
+ "ColorSwatchPicker": "alinea-ColorSwatchPicker",
24
+ "ColorSwatchPickerItem": "alinea-ColorSwatchPickerItem"
25
25
  };
26
26
 
27
27
  // src/components/ColorSwatchPicker.tsx
@@ -5,15 +5,15 @@ import {
5
5
  $928221da08ecbc62$export$a11e76429ed99b4,
6
6
  $dbdc5e6e7ce01b4b$export$72b9695b8216309a,
7
7
  $dbdc5e6e7ce01b4b$export$c02625b26074192c
8
- } from "../chunks/chunk-VXZM6V4P.js";
9
- import "../chunks/chunk-O7XWTMCB.js";
10
- import "../chunks/chunk-RKDPDEF7.js";
8
+ } from "../chunks/chunk-OFEKTDRF.js";
11
9
  import "../chunks/chunk-NIVGVRDS.js";
12
10
  import "../chunks/chunk-IYAQC63Y.js";
11
+ import "../chunks/chunk-DNJX6CRV.js";
12
+ import "../chunks/chunk-AC4U3IMS.js";
13
+ import "../chunks/chunk-D6RGFNUW.js";
14
+ import "../chunks/chunk-RKDPDEF7.js";
13
15
  import "../chunks/chunk-SJBZFMQ2.js";
14
- import "../chunks/chunk-6V4TAD2N.js";
15
16
  import "../chunks/chunk-S4AU6SRS.js";
16
- import "../chunks/chunk-AC4U3IMS.js";
17
17
  import {
18
18
  dist_default
19
19
  } from "../chunks/chunk-I4OYYAX5.js";
@@ -29,24 +29,24 @@ import {
29
29
 
30
30
  // src/components/ComboBox.module.css
31
31
  var ComboBox_default = {
32
- "ComboBoxItem-check": "alinea-ComboBoxItem-check",
33
- "ComboBoxItemCheck": "alinea-ComboBoxItem-check",
34
- "ComboBox": "alinea-ComboBox",
32
+ "ComboBoxPopover-listbox": "alinea-ComboBoxPopover-listbox",
33
+ "ComboBoxPopoverListbox": "alinea-ComboBoxPopover-listbox",
34
+ "ComboBoxTrigger-button": "alinea-ComboBoxTrigger-button",
35
+ "ComboBoxTriggerButton": "alinea-ComboBoxTrigger-button",
36
+ "ComboBoxClear": "alinea-ComboBoxClear",
35
37
  "ComboBoxTrigger-button-arrow": "alinea-ComboBoxTrigger-button-arrow",
36
38
  "ComboBoxTriggerButtonArrow": "alinea-ComboBoxTrigger-button-arrow",
37
- "ComboBoxTrigger-input": "alinea-ComboBoxTrigger-input",
38
- "ComboBoxTriggerInput": "alinea-ComboBoxTrigger-input",
39
- "ComboBoxClear": "alinea-ComboBoxClear",
40
- "ComboBoxItem": "alinea-ComboBoxItem",
41
- "ComboBoxTrigger-actions": "alinea-ComboBoxTrigger-actions",
42
- "ComboBoxTriggerActions": "alinea-ComboBoxTrigger-actions",
43
39
  "ComboBoxTrigger-button-value": "alinea-ComboBoxTrigger-button-value",
44
40
  "ComboBoxTriggerButtonValue": "alinea-ComboBoxTrigger-button-value",
41
+ "ComboBoxItem": "alinea-ComboBoxItem",
45
42
  "ComboBoxTrigger": "alinea-ComboBoxTrigger",
46
- "ComboBoxTrigger-button": "alinea-ComboBoxTrigger-button",
47
- "ComboBoxTriggerButton": "alinea-ComboBoxTrigger-button",
48
- "ComboBoxPopover-listbox": "alinea-ComboBoxPopover-listbox",
49
- "ComboBoxPopoverListbox": "alinea-ComboBoxPopover-listbox"
43
+ "ComboBoxItem-check": "alinea-ComboBoxItem-check",
44
+ "ComboBoxItemCheck": "alinea-ComboBoxItem-check",
45
+ "ComboBoxTrigger-actions": "alinea-ComboBoxTrigger-actions",
46
+ "ComboBoxTriggerActions": "alinea-ComboBoxTrigger-actions",
47
+ "ComboBox": "alinea-ComboBox",
48
+ "ComboBoxTrigger-input": "alinea-ComboBoxTrigger-input",
49
+ "ComboBoxTriggerInput": "alinea-ComboBoxTrigger-input"
50
50
  };
51
51
 
52
52
  // src/components/ComboBox.tsx