alinea 2.0.0-preview.1 → 2.0.0-preview.2
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.
- package/dist/.init/content/pages/welcome.json +1 -1
- package/dist/LICENSES.md +61 -34
- package/dist/adapter/next/DevRemote.d.ts +3 -0
- package/dist/adapter/next/DevRemote.js +37 -0
- package/dist/adapter/next/ForwardCredentials.d.ts +1 -0
- package/dist/adapter/next/ForwardCredentials.js +17 -0
- package/dist/adapter/next/cms.js +86 -38
- package/dist/adapter/next/context.d.ts +1 -1
- package/dist/adapter/next/context.js +11 -3
- package/dist/adapter/next/handler.d.ts +2 -0
- package/dist/adapter/next/handler.js +23 -16
- package/dist/adapter/next/with-alinea.js +18 -16
- package/dist/backend/Handler.d.ts +14 -13
- package/dist/backend/Handler.js +53 -22
- package/dist/backend/resolver/ParsePreview.d.ts +8 -4
- package/dist/backend/resolver/ParsePreview.js +40 -43
- package/dist/bundled.d.ts +255 -60
- package/dist/chunks/{chunk-LUBOGJCG.js → chunk-6V4TAD2N.js} +1 -1
- package/dist/chunks/{chunk-TL7ZW6BX.js → chunk-A3XXZBOQ.js} +2535 -2999
- package/dist/chunks/chunk-AC5ATYI3.js +1434 -0
- package/dist/chunks/{chunk-7ORQ7BYK.js → chunk-KMLLLZ6X.js} +202 -269
- package/dist/chunks/{chunk-IWN3T3FL.js → chunk-O7XWTMCB.js} +1 -1
- package/dist/chunks/{chunk-53DZYORR.js → chunk-PAYSVIYI.js} +76 -176
- package/dist/chunks/{chunk-YK3OSMDM.js → chunk-S4AU6SRS.js} +188 -158
- package/dist/chunks/{chunk-FRYHNUEK.js → chunk-UVOEM4AH.js} +6 -3
- package/dist/chunks/{chunk-I7X64JTZ.js → chunk-VXZM6V4P.js} +4 -4
- package/dist/cli/Generate.js +3 -13
- package/dist/cli/Serve.js +7 -3
- package/dist/cli/bin.js +8 -5
- package/dist/cli/generate/CopyStaticFiles.js +2 -3
- package/dist/cli/generate/DevDB.d.ts +1 -1
- package/dist/cli/generate/DevDB.js +3 -5
- package/dist/cli/serve/CreateLocalServer.d.ts +1 -1
- package/dist/cli/serve/CreateLocalServer.js +3 -2
- package/dist/cli/serve/DevServer.d.ts +3 -2
- package/dist/cli/serve/DevServer.js +60 -3
- package/dist/cli/serve/ServeContext.d.ts +1 -0
- package/dist/cli/serve/StartServer.d.ts +1 -0
- package/dist/cli/serve/StartServer.js +6 -1
- package/dist/cli/util/EnsureLibs.js +2 -2
- package/dist/cli/util/EnsureNode.js +2 -2
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Breadcrumbs.js +8 -8
- package/dist/components/Button.js +6 -6
- package/dist/components/Calendar.js +9 -9
- package/dist/components/Checkbox.js +9 -9
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/ColorSwatch.js +6 -6
- package/dist/components/ColorSwatchPicker.js +6 -6
- package/dist/components/ComboBox.js +16 -16
- package/dist/components/DateField.js +9 -9
- package/dist/components/DatePicker.js +11 -11
- package/dist/components/DateRangePicker.js +14 -14
- package/dist/components/Dialog.js +6 -6
- package/dist/components/Disclosure.js +14 -14
- package/dist/components/DropZone.js +6 -6
- package/dist/components/Label.js +14 -14
- package/dist/components/Link.js +6 -6
- package/dist/components/List.js +32 -32
- package/dist/components/Menu.js +10 -10
- package/dist/components/Modal.js +8 -8
- package/dist/components/MultipleSelect.js +25 -25
- package/dist/components/NumberField.d.ts +2 -1
- package/dist/components/NumberField.js +25 -15
- package/dist/components/Popover.js +6 -6
- package/dist/components/ProgressCircle.js +9 -9
- package/dist/components/RadioGroup.js +8 -8
- package/dist/components/SearchField.js +15 -15
- package/dist/components/Select.js +14 -14
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +8 -8
- package/dist/components/Table.js +14 -14
- package/dist/components/Tabs.js +7 -7
- package/dist/components/TagGroup.js +8 -8
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +8 -8
- package/dist/components/Toggle.js +8 -8
- package/dist/components/Toolbar.js +9 -9
- package/dist/components/Tooltip.js +7 -7
- package/dist/components/Tree.js +10 -10
- package/dist/core/Client.js +3 -2
- package/dist/core/Config.d.ts +4 -0
- package/dist/core/Config.js +6 -0
- package/dist/core/Connection.d.ts +2 -2
- package/dist/core/Connection.js +7 -0
- package/dist/core/Graph.d.ts +3 -4
- package/dist/core/ListRow.d.ts +2 -0
- package/dist/core/OrderBy.d.ts +7 -3
- package/dist/core/TextDoc.d.ts +11 -0
- package/dist/core/Trace.d.ts +8 -0
- package/dist/core/Trace.js +32 -0
- package/dist/core/db/CommitRequest.d.ts +0 -3
- package/dist/core/db/CommitRequest.js +0 -9
- package/dist/core/db/EntryDB.js +1 -1
- package/dist/core/db/EntryIndex.d.ts +10 -0
- package/dist/core/db/EntryIndex.js +117 -9
- package/dist/core/db/EntryResolver.js +104 -29
- package/dist/core/db/EntryTransaction.d.ts +1 -2
- package/dist/core/db/EntryTransaction.js +25 -13
- package/dist/core/db/LocalDB.d.ts +2 -3
- package/dist/core/db/LocalDB.js +24 -19
- package/dist/core/field/RichTextField.d.ts +30 -3
- package/dist/core/field/RichTextField.js +125 -41
- package/dist/core/media/MediaAltField.d.ts +1 -0
- package/dist/core/media/MediaAltField.js +9 -1
- package/dist/core/source/OverlaySource.d.ts +12 -0
- package/dist/core/source/OverlaySource.js +50 -0
- package/dist/core/source/Source.d.ts +1 -1
- package/dist/core/source/Source.js +3 -3
- package/dist/dashboard/App.css +158 -0
- package/dist/dashboard/App.js +3 -3
- package/dist/dashboard/app/AccessDenied.js +1 -1
- package/dist/dashboard/app/ActivityStatus.js +14 -14
- package/dist/dashboard/app/AppShell.js +2 -2
- package/dist/dashboard/app/AuthView.js +12 -12
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +13 -13
- package/dist/dashboard/app/DashboardErrorBoundary.js +6 -6
- package/dist/dashboard/app/DashboardLayout.js +22 -19
- package/dist/dashboard/app/EntryHeader.js +10 -10
- package/dist/dashboard/app/EntryReferences.js +9 -9
- package/dist/dashboard/app/EntrySidebar.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebar.js +19 -18
- package/dist/dashboard/app/EntrySidebarPreview.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebarPreview.js +20 -15
- package/dist/dashboard/app/EntryTranslationBanner.js +6 -6
- package/dist/dashboard/app/Explorer.js +46 -46
- package/dist/dashboard/app/ExplorerCards.js +42 -42
- package/dist/dashboard/app/ExplorerFileCard.js +16 -16
- package/dist/dashboard/app/ExplorerList.js +15 -15
- package/dist/dashboard/app/ExplorerModal.js +5 -5
- package/dist/dashboard/app/ExplorerTable.js +54 -54
- package/dist/dashboard/app/ExternalLinkPicker.js +15 -4
- package/dist/dashboard/app/LinkPicker.js +6 -6
- package/dist/dashboard/app/LocaleMenu.js +11 -11
- package/dist/dashboard/app/SidebarLayout.d.ts +8 -0
- package/dist/dashboard/app/SidebarLayout.js +1169 -0
- package/dist/dashboard/app/SidebarTree.js +44 -44
- package/dist/dashboard/app/WorkspaceMenu.js +17 -17
- package/dist/dashboard/app/WorkspaceRoots.js +26 -26
- package/dist/dashboard/app/editor/FileEditor.js +28 -29
- package/dist/dashboard/app/editor/FilePreview.js +2 -2
- package/dist/dashboard/app/editor/MediaAltField.view.d.ts +1 -1
- package/dist/dashboard/app/editor/MediaAltField.view.js +6 -9
- package/dist/dashboard/app/modals/CreateEntry.js +4 -4
- package/dist/dashboard/app/pages/EntryPage.js +49 -25
- package/dist/dashboard/app/pages/UsersPage.js +38 -38
- package/dist/dashboard/app/ui/DashboardModal.js +22 -22
- package/dist/dashboard/app/ui/Rail.js +2 -2
- package/dist/dashboard/app/ui/Sidebar.js +2 -2
- package/dist/dashboard/atoms/auth.js +2 -0
- package/dist/dashboard/atoms/dashboard.d.ts +9 -0
- package/dist/dashboard/atoms/dashboard.js +17 -0
- package/dist/dashboard/atoms/editor.d.ts +7 -1
- package/dist/dashboard/atoms/editor.js +4 -1
- package/dist/dashboard/atoms/entry.d.ts +3 -1
- package/dist/dashboard/atoms/entry.js +55 -15
- package/dist/dashboard/atoms/explorer.js +3 -8
- package/dist/dashboard/atoms/preview.d.ts +3 -0
- package/dist/dashboard/atoms/preview.js +18 -1
- package/dist/dashboard/hooks.d.ts +4 -2
- package/dist/dashboard/hooks.js +9 -5
- package/dist/dashboard/icons.d.ts +1 -0
- package/dist/dashboard/icons.js +10 -0
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +13 -13
- package/dist/field/date/DateField.view.js +12 -2
- package/dist/field/link/Link.js +2 -2
- package/dist/field/link/LinkField.view.js +88 -77
- package/dist/field/list/ListField.view.js +22 -33
- package/dist/field/metadata/MetadataField.view.js +20 -20
- package/dist/field/number/NumberField.d.ts +2 -0
- package/dist/field/number/NumberField.view.js +4 -2
- package/dist/field/richtext/PickTextLink.d.ts +7 -0
- package/dist/field/richtext/PickTextLink.js +104 -2
- package/dist/field/richtext/ReferenceLink.d.ts +4 -1
- package/dist/field/richtext/ReferenceLink.js +18 -4
- package/dist/field/richtext/RichTextDocument.d.ts +7 -2
- package/dist/field/richtext/RichTextDocument.js +34 -5
- package/dist/field/richtext/RichTextExtensions.d.ts +3 -1
- package/dist/field/richtext/RichTextExtensions.js +2704 -7467
- package/dist/field/richtext/RichTextField.d.ts +4 -0
- package/dist/field/richtext/RichTextField.story.d.ts +4 -0
- package/dist/field/richtext/RichTextField.view.js +44 -21
- package/dist/field/richtext/RichTextInsertMenu.js +281 -495
- package/dist/field/richtext/RichTextToolbar.d.ts +5 -2
- package/dist/field/richtext/RichTextToolbar.js +38 -3
- package/dist/field/richtext/Toolbar.d.ts +19 -1
- package/dist/field/richtext/Toolbar.js +18 -13
- package/dist/field/richtext/extensions/Anchor.js +1 -1
- package/dist/field/richtext/extensions/Link.js +1 -1
- package/dist/field/richtext/extensions/Small.js +1 -1
- package/dist/field/select/SelectField.view.js +8 -6
- package/dist/index.css +219 -14
- package/dist/next.cjs +18 -16
- package/dist/next.d.ts +2 -1
- package/dist/next.edge.d.ts +2 -1
- package/dist/ui/RichText.d.ts +1 -0
- package/dist/ui/RichText.js +29 -2
- package/package.json +6 -3
- package/dist/chunks/{chunk-JFROOUG6.js → chunk-NIVGVRDS.js} +17 -17
|
@@ -1,3 +1,190 @@
|
|
|
1
|
+
// node_modules/react-aria/dist/private/i18n/utils.mjs
|
|
2
|
+
var $d805ff57cab8bee2$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
3
|
+
"Arab",
|
|
4
|
+
"Syrc",
|
|
5
|
+
"Samr",
|
|
6
|
+
"Mand",
|
|
7
|
+
"Thaa",
|
|
8
|
+
"Mend",
|
|
9
|
+
"Nkoo",
|
|
10
|
+
"Adlm",
|
|
11
|
+
"Rohg",
|
|
12
|
+
"Hebr"
|
|
13
|
+
]);
|
|
14
|
+
var $d805ff57cab8bee2$var$RTL_LANGS = /* @__PURE__ */ new Set([
|
|
15
|
+
"ae",
|
|
16
|
+
"ar",
|
|
17
|
+
"arc",
|
|
18
|
+
"bcc",
|
|
19
|
+
"bqi",
|
|
20
|
+
"ckb",
|
|
21
|
+
"dv",
|
|
22
|
+
"fa",
|
|
23
|
+
"glk",
|
|
24
|
+
"he",
|
|
25
|
+
"ku",
|
|
26
|
+
"mzn",
|
|
27
|
+
"nqo",
|
|
28
|
+
"pnb",
|
|
29
|
+
"ps",
|
|
30
|
+
"sd",
|
|
31
|
+
"ug",
|
|
32
|
+
"ur",
|
|
33
|
+
"yi"
|
|
34
|
+
]);
|
|
35
|
+
function $d805ff57cab8bee2$export$702d680b21cbd764(localeString) {
|
|
36
|
+
if (Intl.Locale) {
|
|
37
|
+
let locale = new Intl.Locale(localeString).maximize();
|
|
38
|
+
let textInfo = typeof locale.getTextInfo === "function" ? locale.getTextInfo() : locale.textInfo;
|
|
39
|
+
if (textInfo) return textInfo.direction === "rtl";
|
|
40
|
+
if (locale.script) return $d805ff57cab8bee2$var$RTL_SCRIPTS.has(locale.script);
|
|
41
|
+
}
|
|
42
|
+
let lang = localeString.split("-")[0];
|
|
43
|
+
return $d805ff57cab8bee2$var$RTL_LANGS.has(lang);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// node_modules/react-aria/dist/private/ssr/SSRProvider.mjs
|
|
47
|
+
import $bl59K$react, { useContext as $bl59K$useContext, useState as $bl59K$useState, useMemo as $bl59K$useMemo, useLayoutEffect as $bl59K$useLayoutEffect, useRef as $bl59K$useRef } from "react";
|
|
48
|
+
var $c7eafbbe1ea5834e$var$defaultContext = {
|
|
49
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
50
|
+
current: 0
|
|
51
|
+
};
|
|
52
|
+
var $c7eafbbe1ea5834e$var$SSRContext = /* @__PURE__ */ (0, $bl59K$react).createContext($c7eafbbe1ea5834e$var$defaultContext);
|
|
53
|
+
var $c7eafbbe1ea5834e$var$IsSSRContext = /* @__PURE__ */ (0, $bl59K$react).createContext(false);
|
|
54
|
+
var $c7eafbbe1ea5834e$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
55
|
+
var $c7eafbbe1ea5834e$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
56
|
+
function $c7eafbbe1ea5834e$var$useCounter(isDisabled = false) {
|
|
57
|
+
let ctx = (0, $bl59K$useContext)($c7eafbbe1ea5834e$var$SSRContext);
|
|
58
|
+
let ref = (0, $bl59K$useRef)(null);
|
|
59
|
+
if (ref.current === null && !isDisabled) {
|
|
60
|
+
let currentOwner = (0, $bl59K$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;
|
|
61
|
+
if (currentOwner) {
|
|
62
|
+
let prevComponentValue = $c7eafbbe1ea5834e$var$componentIds.get(currentOwner);
|
|
63
|
+
if (prevComponentValue == null)
|
|
64
|
+
$c7eafbbe1ea5834e$var$componentIds.set(currentOwner, {
|
|
65
|
+
id: ctx.current,
|
|
66
|
+
state: currentOwner.memoizedState
|
|
67
|
+
});
|
|
68
|
+
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
69
|
+
ctx.current = prevComponentValue.id;
|
|
70
|
+
$c7eafbbe1ea5834e$var$componentIds.delete(currentOwner);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
ref.current = ++ctx.current;
|
|
74
|
+
}
|
|
75
|
+
return ref.current;
|
|
76
|
+
}
|
|
77
|
+
function $c7eafbbe1ea5834e$var$useLegacySSRSafeId(defaultId) {
|
|
78
|
+
let ctx = (0, $bl59K$useContext)($c7eafbbe1ea5834e$var$SSRContext);
|
|
79
|
+
if (ctx === $c7eafbbe1ea5834e$var$defaultContext && !$c7eafbbe1ea5834e$var$canUseDOM && process.env.NODE_ENV !== "production") console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
80
|
+
let counter = $c7eafbbe1ea5834e$var$useCounter(!!defaultId);
|
|
81
|
+
let prefix = ctx === $c7eafbbe1ea5834e$var$defaultContext && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
82
|
+
return defaultId || `${prefix}-${counter}`;
|
|
83
|
+
}
|
|
84
|
+
function $c7eafbbe1ea5834e$var$useModernSSRSafeId(defaultId) {
|
|
85
|
+
let id = (0, $bl59K$react).useId();
|
|
86
|
+
let [didSSR] = (0, $bl59K$useState)($c7eafbbe1ea5834e$export$535bd6ca7f90a273());
|
|
87
|
+
let prefix = didSSR || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${$c7eafbbe1ea5834e$var$defaultContext.prefix}`;
|
|
88
|
+
return defaultId || `${prefix}-${id}`;
|
|
89
|
+
}
|
|
90
|
+
var $c7eafbbe1ea5834e$export$619500959fc48b26 = typeof (0, $bl59K$react)["useId"] === "function" ? $c7eafbbe1ea5834e$var$useModernSSRSafeId : $c7eafbbe1ea5834e$var$useLegacySSRSafeId;
|
|
91
|
+
function $c7eafbbe1ea5834e$var$getSnapshot() {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
function $c7eafbbe1ea5834e$var$getServerSnapshot() {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
function $c7eafbbe1ea5834e$var$subscribe(onStoreChange) {
|
|
98
|
+
return () => {
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function $c7eafbbe1ea5834e$export$535bd6ca7f90a273() {
|
|
102
|
+
if (typeof (0, $bl59K$react)["useSyncExternalStore"] === "function") return (0, $bl59K$react)["useSyncExternalStore"]($c7eafbbe1ea5834e$var$subscribe, $c7eafbbe1ea5834e$var$getSnapshot, $c7eafbbe1ea5834e$var$getServerSnapshot);
|
|
103
|
+
return (0, $bl59K$useContext)($c7eafbbe1ea5834e$var$IsSSRContext);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// node_modules/react-aria/dist/private/i18n/useDefaultLocale.mjs
|
|
107
|
+
import { useState as $lEF9U$useState, useEffect as $lEF9U$useEffect } from "react";
|
|
108
|
+
var $520a025cdb0d710d$var$localeSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.locale");
|
|
109
|
+
function $520a025cdb0d710d$export$f09106e7c6677ec5() {
|
|
110
|
+
let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol] || typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
111
|
+
try {
|
|
112
|
+
Intl.DateTimeFormat.supportedLocalesOf([
|
|
113
|
+
locale
|
|
114
|
+
]);
|
|
115
|
+
} catch {
|
|
116
|
+
locale = "en-US";
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
locale,
|
|
120
|
+
direction: (0, $d805ff57cab8bee2$export$702d680b21cbd764)(locale) ? "rtl" : "ltr"
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
var $520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
|
|
124
|
+
var $520a025cdb0d710d$var$listeners = /* @__PURE__ */ new Set();
|
|
125
|
+
function $520a025cdb0d710d$var$updateLocale() {
|
|
126
|
+
$520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
|
|
127
|
+
for (let listener of $520a025cdb0d710d$var$listeners) listener($520a025cdb0d710d$var$currentLocale);
|
|
128
|
+
}
|
|
129
|
+
function $520a025cdb0d710d$export$188ec29ebc2bdc3a() {
|
|
130
|
+
let isSSR = (0, $c7eafbbe1ea5834e$export$535bd6ca7f90a273)();
|
|
131
|
+
let [defaultLocale, setDefaultLocale] = (0, $lEF9U$useState)($520a025cdb0d710d$var$currentLocale);
|
|
132
|
+
(0, $lEF9U$useEffect)(() => {
|
|
133
|
+
if ($520a025cdb0d710d$var$listeners.size === 0) window.addEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
|
|
134
|
+
$520a025cdb0d710d$var$listeners.add(setDefaultLocale);
|
|
135
|
+
return () => {
|
|
136
|
+
$520a025cdb0d710d$var$listeners.delete(setDefaultLocale);
|
|
137
|
+
if ($520a025cdb0d710d$var$listeners.size === 0) window.removeEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
|
|
138
|
+
};
|
|
139
|
+
}, []);
|
|
140
|
+
if (isSSR) {
|
|
141
|
+
let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol];
|
|
142
|
+
return {
|
|
143
|
+
locale: locale || "en-US",
|
|
144
|
+
direction: "ltr"
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return defaultLocale;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// node_modules/react-aria/dist/private/i18n/I18nProvider.mjs
|
|
151
|
+
import $01Dwp$react, { useContext as $01Dwp$useContext } from "react";
|
|
152
|
+
var $2eb8e6d23f3d0cb0$var$I18nContext = /* @__PURE__ */ (0, $01Dwp$react).createContext(null);
|
|
153
|
+
function $2eb8e6d23f3d0cb0$var$I18nProviderWithLocale(props) {
|
|
154
|
+
let { locale, children } = props;
|
|
155
|
+
let value = (0, $01Dwp$react).useMemo(() => ({
|
|
156
|
+
locale,
|
|
157
|
+
direction: (0, $d805ff57cab8bee2$export$702d680b21cbd764)(locale) ? "rtl" : "ltr"
|
|
158
|
+
}), [
|
|
159
|
+
locale
|
|
160
|
+
]);
|
|
161
|
+
return /* @__PURE__ */ (0, $01Dwp$react).createElement($2eb8e6d23f3d0cb0$var$I18nContext.Provider, {
|
|
162
|
+
value
|
|
163
|
+
}, children);
|
|
164
|
+
}
|
|
165
|
+
function $2eb8e6d23f3d0cb0$var$I18nProviderWithDefaultLocale(props) {
|
|
166
|
+
let { children } = props;
|
|
167
|
+
let defaultLocale = (0, $520a025cdb0d710d$export$188ec29ebc2bdc3a)();
|
|
168
|
+
return /* @__PURE__ */ (0, $01Dwp$react).createElement($2eb8e6d23f3d0cb0$var$I18nContext.Provider, {
|
|
169
|
+
value: defaultLocale
|
|
170
|
+
}, children);
|
|
171
|
+
}
|
|
172
|
+
function $2eb8e6d23f3d0cb0$export$a54013f0d02a8f82(props) {
|
|
173
|
+
let { locale, children } = props;
|
|
174
|
+
if (locale) return /* @__PURE__ */ (0, $01Dwp$react).createElement($2eb8e6d23f3d0cb0$var$I18nProviderWithLocale, {
|
|
175
|
+
locale,
|
|
176
|
+
children
|
|
177
|
+
});
|
|
178
|
+
return /* @__PURE__ */ (0, $01Dwp$react).createElement($2eb8e6d23f3d0cb0$var$I18nProviderWithDefaultLocale, {
|
|
179
|
+
children
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7() {
|
|
183
|
+
let defaultLocale = (0, $520a025cdb0d710d$export$188ec29ebc2bdc3a)();
|
|
184
|
+
let context = (0, $01Dwp$useContext)($2eb8e6d23f3d0cb0$var$I18nContext);
|
|
185
|
+
return context || defaultLocale;
|
|
186
|
+
}
|
|
187
|
+
|
|
1
188
|
// node_modules/react-aria/dist/private/dnd/constants.mjs
|
|
2
189
|
var $2991e2e71ca29774$export$60b7b4bcf3903d8e = /* @__PURE__ */ (function(DROP_OPERATION) {
|
|
3
190
|
DROP_OPERATION[DROP_OPERATION["none"] = 0] = "none";
|
|
@@ -495,66 +682,6 @@ function $caaf0dd3060ed57c$export$13aea1a3cb5e3f1f(e, router, href, routerOption
|
|
|
495
682
|
}
|
|
496
683
|
}
|
|
497
684
|
|
|
498
|
-
// node_modules/react-aria/dist/private/ssr/SSRProvider.mjs
|
|
499
|
-
import $bl59K$react, { useContext as $bl59K$useContext, useState as $bl59K$useState, useMemo as $bl59K$useMemo, useLayoutEffect as $bl59K$useLayoutEffect, useRef as $bl59K$useRef } from "react";
|
|
500
|
-
var $c7eafbbe1ea5834e$var$defaultContext = {
|
|
501
|
-
prefix: String(Math.round(Math.random() * 1e10)),
|
|
502
|
-
current: 0
|
|
503
|
-
};
|
|
504
|
-
var $c7eafbbe1ea5834e$var$SSRContext = /* @__PURE__ */ (0, $bl59K$react).createContext($c7eafbbe1ea5834e$var$defaultContext);
|
|
505
|
-
var $c7eafbbe1ea5834e$var$IsSSRContext = /* @__PURE__ */ (0, $bl59K$react).createContext(false);
|
|
506
|
-
var $c7eafbbe1ea5834e$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
507
|
-
var $c7eafbbe1ea5834e$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
508
|
-
function $c7eafbbe1ea5834e$var$useCounter(isDisabled = false) {
|
|
509
|
-
let ctx = (0, $bl59K$useContext)($c7eafbbe1ea5834e$var$SSRContext);
|
|
510
|
-
let ref = (0, $bl59K$useRef)(null);
|
|
511
|
-
if (ref.current === null && !isDisabled) {
|
|
512
|
-
let currentOwner = (0, $bl59K$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;
|
|
513
|
-
if (currentOwner) {
|
|
514
|
-
let prevComponentValue = $c7eafbbe1ea5834e$var$componentIds.get(currentOwner);
|
|
515
|
-
if (prevComponentValue == null)
|
|
516
|
-
$c7eafbbe1ea5834e$var$componentIds.set(currentOwner, {
|
|
517
|
-
id: ctx.current,
|
|
518
|
-
state: currentOwner.memoizedState
|
|
519
|
-
});
|
|
520
|
-
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
521
|
-
ctx.current = prevComponentValue.id;
|
|
522
|
-
$c7eafbbe1ea5834e$var$componentIds.delete(currentOwner);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
ref.current = ++ctx.current;
|
|
526
|
-
}
|
|
527
|
-
return ref.current;
|
|
528
|
-
}
|
|
529
|
-
function $c7eafbbe1ea5834e$var$useLegacySSRSafeId(defaultId) {
|
|
530
|
-
let ctx = (0, $bl59K$useContext)($c7eafbbe1ea5834e$var$SSRContext);
|
|
531
|
-
if (ctx === $c7eafbbe1ea5834e$var$defaultContext && !$c7eafbbe1ea5834e$var$canUseDOM && process.env.NODE_ENV !== "production") console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
532
|
-
let counter = $c7eafbbe1ea5834e$var$useCounter(!!defaultId);
|
|
533
|
-
let prefix = ctx === $c7eafbbe1ea5834e$var$defaultContext && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
534
|
-
return defaultId || `${prefix}-${counter}`;
|
|
535
|
-
}
|
|
536
|
-
function $c7eafbbe1ea5834e$var$useModernSSRSafeId(defaultId) {
|
|
537
|
-
let id = (0, $bl59K$react).useId();
|
|
538
|
-
let [didSSR] = (0, $bl59K$useState)($c7eafbbe1ea5834e$export$535bd6ca7f90a273());
|
|
539
|
-
let prefix = didSSR || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${$c7eafbbe1ea5834e$var$defaultContext.prefix}`;
|
|
540
|
-
return defaultId || `${prefix}-${id}`;
|
|
541
|
-
}
|
|
542
|
-
var $c7eafbbe1ea5834e$export$619500959fc48b26 = typeof (0, $bl59K$react)["useId"] === "function" ? $c7eafbbe1ea5834e$var$useModernSSRSafeId : $c7eafbbe1ea5834e$var$useLegacySSRSafeId;
|
|
543
|
-
function $c7eafbbe1ea5834e$var$getSnapshot() {
|
|
544
|
-
return false;
|
|
545
|
-
}
|
|
546
|
-
function $c7eafbbe1ea5834e$var$getServerSnapshot() {
|
|
547
|
-
return true;
|
|
548
|
-
}
|
|
549
|
-
function $c7eafbbe1ea5834e$var$subscribe(onStoreChange) {
|
|
550
|
-
return () => {
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
function $c7eafbbe1ea5834e$export$535bd6ca7f90a273() {
|
|
554
|
-
if (typeof (0, $bl59K$react)["useSyncExternalStore"] === "function") return (0, $bl59K$react)["useSyncExternalStore"]($c7eafbbe1ea5834e$var$subscribe, $c7eafbbe1ea5834e$var$getSnapshot, $c7eafbbe1ea5834e$var$getServerSnapshot);
|
|
555
|
-
return (0, $bl59K$useContext)($c7eafbbe1ea5834e$var$IsSSRContext);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
685
|
// node_modules/react-aria/dist/private/interactions/useFocusVisible.mjs
|
|
559
686
|
import { useState as $7U4qw$useState, useEffect as $7U4qw$useEffect } from "react";
|
|
560
687
|
var $8f5a2122b0992be3$var$currentModality = null;
|
|
@@ -3366,104 +3493,6 @@ function $121970af65029459$export$f8aeda7b10753fa1(description) {
|
|
|
3366
3493
|
};
|
|
3367
3494
|
}
|
|
3368
3495
|
|
|
3369
|
-
// node_modules/react-aria/dist/private/i18n/utils.mjs
|
|
3370
|
-
var $d805ff57cab8bee2$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
3371
|
-
"Arab",
|
|
3372
|
-
"Syrc",
|
|
3373
|
-
"Samr",
|
|
3374
|
-
"Mand",
|
|
3375
|
-
"Thaa",
|
|
3376
|
-
"Mend",
|
|
3377
|
-
"Nkoo",
|
|
3378
|
-
"Adlm",
|
|
3379
|
-
"Rohg",
|
|
3380
|
-
"Hebr"
|
|
3381
|
-
]);
|
|
3382
|
-
var $d805ff57cab8bee2$var$RTL_LANGS = /* @__PURE__ */ new Set([
|
|
3383
|
-
"ae",
|
|
3384
|
-
"ar",
|
|
3385
|
-
"arc",
|
|
3386
|
-
"bcc",
|
|
3387
|
-
"bqi",
|
|
3388
|
-
"ckb",
|
|
3389
|
-
"dv",
|
|
3390
|
-
"fa",
|
|
3391
|
-
"glk",
|
|
3392
|
-
"he",
|
|
3393
|
-
"ku",
|
|
3394
|
-
"mzn",
|
|
3395
|
-
"nqo",
|
|
3396
|
-
"pnb",
|
|
3397
|
-
"ps",
|
|
3398
|
-
"sd",
|
|
3399
|
-
"ug",
|
|
3400
|
-
"ur",
|
|
3401
|
-
"yi"
|
|
3402
|
-
]);
|
|
3403
|
-
function $d805ff57cab8bee2$export$702d680b21cbd764(localeString) {
|
|
3404
|
-
if (Intl.Locale) {
|
|
3405
|
-
let locale = new Intl.Locale(localeString).maximize();
|
|
3406
|
-
let textInfo = typeof locale.getTextInfo === "function" ? locale.getTextInfo() : locale.textInfo;
|
|
3407
|
-
if (textInfo) return textInfo.direction === "rtl";
|
|
3408
|
-
if (locale.script) return $d805ff57cab8bee2$var$RTL_SCRIPTS.has(locale.script);
|
|
3409
|
-
}
|
|
3410
|
-
let lang = localeString.split("-")[0];
|
|
3411
|
-
return $d805ff57cab8bee2$var$RTL_LANGS.has(lang);
|
|
3412
|
-
}
|
|
3413
|
-
|
|
3414
|
-
// node_modules/react-aria/dist/private/i18n/useDefaultLocale.mjs
|
|
3415
|
-
import { useState as $lEF9U$useState, useEffect as $lEF9U$useEffect } from "react";
|
|
3416
|
-
var $520a025cdb0d710d$var$localeSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.locale");
|
|
3417
|
-
function $520a025cdb0d710d$export$f09106e7c6677ec5() {
|
|
3418
|
-
let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol] || typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
3419
|
-
try {
|
|
3420
|
-
Intl.DateTimeFormat.supportedLocalesOf([
|
|
3421
|
-
locale
|
|
3422
|
-
]);
|
|
3423
|
-
} catch {
|
|
3424
|
-
locale = "en-US";
|
|
3425
|
-
}
|
|
3426
|
-
return {
|
|
3427
|
-
locale,
|
|
3428
|
-
direction: (0, $d805ff57cab8bee2$export$702d680b21cbd764)(locale) ? "rtl" : "ltr"
|
|
3429
|
-
};
|
|
3430
|
-
}
|
|
3431
|
-
var $520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
|
|
3432
|
-
var $520a025cdb0d710d$var$listeners = /* @__PURE__ */ new Set();
|
|
3433
|
-
function $520a025cdb0d710d$var$updateLocale() {
|
|
3434
|
-
$520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
|
|
3435
|
-
for (let listener of $520a025cdb0d710d$var$listeners) listener($520a025cdb0d710d$var$currentLocale);
|
|
3436
|
-
}
|
|
3437
|
-
function $520a025cdb0d710d$export$188ec29ebc2bdc3a() {
|
|
3438
|
-
let isSSR = (0, $c7eafbbe1ea5834e$export$535bd6ca7f90a273)();
|
|
3439
|
-
let [defaultLocale, setDefaultLocale] = (0, $lEF9U$useState)($520a025cdb0d710d$var$currentLocale);
|
|
3440
|
-
(0, $lEF9U$useEffect)(() => {
|
|
3441
|
-
if ($520a025cdb0d710d$var$listeners.size === 0) window.addEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
|
|
3442
|
-
$520a025cdb0d710d$var$listeners.add(setDefaultLocale);
|
|
3443
|
-
return () => {
|
|
3444
|
-
$520a025cdb0d710d$var$listeners.delete(setDefaultLocale);
|
|
3445
|
-
if ($520a025cdb0d710d$var$listeners.size === 0) window.removeEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
|
|
3446
|
-
};
|
|
3447
|
-
}, []);
|
|
3448
|
-
if (isSSR) {
|
|
3449
|
-
let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol];
|
|
3450
|
-
return {
|
|
3451
|
-
locale: locale || "en-US",
|
|
3452
|
-
direction: "ltr"
|
|
3453
|
-
};
|
|
3454
|
-
}
|
|
3455
|
-
return defaultLocale;
|
|
3456
|
-
}
|
|
3457
|
-
|
|
3458
|
-
// node_modules/react-aria/dist/private/i18n/I18nProvider.mjs
|
|
3459
|
-
import $01Dwp$react, { useContext as $01Dwp$useContext } from "react";
|
|
3460
|
-
var $2eb8e6d23f3d0cb0$var$I18nContext = /* @__PURE__ */ (0, $01Dwp$react).createContext(null);
|
|
3461
|
-
function $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7() {
|
|
3462
|
-
let defaultLocale = (0, $520a025cdb0d710d$export$188ec29ebc2bdc3a)();
|
|
3463
|
-
let context = (0, $01Dwp$useContext)($2eb8e6d23f3d0cb0$var$I18nContext);
|
|
3464
|
-
return context || defaultLocale;
|
|
3465
|
-
}
|
|
3466
|
-
|
|
3467
3496
|
// node_modules/react-aria/node_modules/@internationalized/string/dist/private/LocalizedStringDictionary.mjs
|
|
3468
3497
|
var $a747a10fe70a57da$var$localeSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.locale");
|
|
3469
3498
|
var $a747a10fe70a57da$var$stringsSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.strings");
|
|
@@ -5445,6 +5474,7 @@ export {
|
|
|
5445
5474
|
$8f5a2122b0992be3$export$98e20ec92f614cfe,
|
|
5446
5475
|
$8f5a2122b0992be3$export$ec71b4b83ac08ec3,
|
|
5447
5476
|
$fe16bffc7a557bf0$export$7f54fc3180508a52,
|
|
5477
|
+
$2eb8e6d23f3d0cb0$export$a54013f0d02a8f82,
|
|
5448
5478
|
$2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7,
|
|
5449
5479
|
$cf2482eff2eeeec2$export$87b761675e8eaa10,
|
|
5450
5480
|
$cf2482eff2eeeec2$export$f12b703ca79dfbb1,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
// package.json with { type: 'json' }
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "alinea",
|
|
4
|
-
version: "2.0.0-preview.
|
|
4
|
+
version: "2.0.0-preview.2",
|
|
5
5
|
description: "Headless git-based CMS",
|
|
6
6
|
repository: "github:alineacms/alinea",
|
|
7
7
|
license: "MIT",
|
|
8
|
+
engines: {
|
|
9
|
+
node: ">=24.0.0"
|
|
10
|
+
},
|
|
8
11
|
sideEffects: false,
|
|
9
12
|
type: "module",
|
|
10
13
|
imports: {
|
|
@@ -69,8 +72,8 @@ var package_default = {
|
|
|
69
72
|
esbuild: "^0.28.0"
|
|
70
73
|
},
|
|
71
74
|
peerDependencies: {
|
|
72
|
-
react: "
|
|
73
|
-
"react-dom": "
|
|
75
|
+
react: ">=19.0.0",
|
|
76
|
+
"react-dom": ">=19.0.0"
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
79
|
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
$f282e36c29c025e8$export$f9d5c8beee7d008d,
|
|
102
102
|
$f8a024fbad3a5a2e$export$542a6fd13ac93354,
|
|
103
103
|
$fb95af427cd4e876$export$25bceaac3c7e4dc7
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-O7XWTMCB.js";
|
|
105
105
|
import {
|
|
106
106
|
$086b1fd51041276f$export$3fcbf6e4407997e0,
|
|
107
107
|
$120eca7b9c40f820$export$b453a3bfd4a5fa9e,
|
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
$ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f,
|
|
136
136
|
$f11fb0bcf1b2687a$export$61c6a8c84e605fb6,
|
|
137
137
|
$f229ad6ed8947519$export$dc6b73b623f8645f
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-NIVGVRDS.js";
|
|
139
139
|
import {
|
|
140
140
|
$240e9101ba2842f5$export$7d15b64cf5a3a4c4,
|
|
141
141
|
$3e6197669829fe11$export$40bfa8c7b0832715,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
$f9554a667e4f0374$export$d188a835a7bc5783,
|
|
148
148
|
$f9554a667e4f0374$export$d1e8e3fbb7461f6,
|
|
149
149
|
$f9554a667e4f0374$export$f55761759794cf55
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-6V4TAD2N.js";
|
|
151
151
|
import {
|
|
152
152
|
$23f2114a1b82827e$export$4282f70798064fe0,
|
|
153
153
|
$23f2114a1b82827e$export$b4f377a2b6254582,
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
$cf2482eff2eeeec2$export$f12b703ca79dfbb1,
|
|
170
170
|
$f302ef02e940a6f8$export$ccdee5eaf73cf661,
|
|
171
171
|
$fe16bffc7a557bf0$export$7f54fc3180508a52
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-S4AU6SRS.js";
|
|
173
173
|
|
|
174
174
|
// node_modules/react-aria-components/dist/private/utils.mjs
|
|
175
175
|
import $ahdqC$react, { useMemo as $ahdqC$useMemo, useContext as $ahdqC$useContext, useState as $ahdqC$useState, useRef as $ahdqC$useRef, useCallback as $ahdqC$useCallback, forwardRef as $ahdqC$forwardRef } from "react";
|
package/dist/cli/Generate.js
CHANGED
|
@@ -18,7 +18,6 @@ import { fillCache } from "./generate/FillCache.js";
|
|
|
18
18
|
import { generateDashboard } from "./generate/GenerateDashboard.js";
|
|
19
19
|
import { dirname } from "./util/Dirname.js";
|
|
20
20
|
import { findConfigFile } from "./util/FindConfigFile.js";
|
|
21
|
-
import { writeFileIfContentsDiffer } from "./util/FS.js";
|
|
22
21
|
import { reportError, reportFatal } from "./util/Report.js";
|
|
23
22
|
var __dirname = dirname(import.meta.url);
|
|
24
23
|
var require2 = createRequire(import.meta.url);
|
|
@@ -28,12 +27,7 @@ async function generatePackage(context, cms) {
|
|
|
28
27
|
if (!config.dashboardFile) return;
|
|
29
28
|
const staticFile = config.dashboardFile ? join(config.publicDir, config.dashboardFile) : void 0;
|
|
30
29
|
if (!staticFile) return;
|
|
31
|
-
await generateDashboard(
|
|
32
|
-
context,
|
|
33
|
-
cms,
|
|
34
|
-
config.handlerUrl ?? "/api/cms",
|
|
35
|
-
staticFile
|
|
36
|
-
);
|
|
30
|
+
await generateDashboard(context, cms, Config.handlerUrl(config), staticFile);
|
|
37
31
|
return basename(staticFile);
|
|
38
32
|
}
|
|
39
33
|
async function* generate(options) {
|
|
@@ -79,14 +73,10 @@ async function* generate(options) {
|
|
|
79
73
|
return data.length;
|
|
80
74
|
}
|
|
81
75
|
for await (const cms of builds) {
|
|
82
|
-
|
|
83
|
-
join(context.outDir, "settings.json"),
|
|
84
|
-
JSON.stringify({ adminPath: Config.adminPath(cms.config) }, null, 2)
|
|
85
|
-
);
|
|
76
|
+
Config.handlerUrl(cms.config);
|
|
86
77
|
if (cmd === "build") {
|
|
87
|
-
const handlerUrl = cms.config.handlerUrl;
|
|
88
78
|
const baseUrl = Config.baseUrl(cms.config, "production");
|
|
89
|
-
if (
|
|
79
|
+
if (!baseUrl) {
|
|
90
80
|
reportFatal(
|
|
91
81
|
"No baseUrl was set for the production build in Alinea config"
|
|
92
82
|
);
|
package/dist/cli/Serve.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-UVOEM4AH.js";
|
|
4
4
|
import "../chunks/chunk-CQ52GEHY.js";
|
|
5
5
|
|
|
6
6
|
// src/cli/Serve.ts
|
|
7
7
|
import { Config } from "alinea/core/Config";
|
|
8
|
+
import { createId } from "alinea/core/Id";
|
|
8
9
|
import path from "node:path";
|
|
9
10
|
import { buildOptions } from "./build/BuildOptions.js";
|
|
10
11
|
import { createDevServer } from "./serve/DevServer.js";
|
|
@@ -20,9 +21,10 @@ async function serve(options) {
|
|
|
20
21
|
cmd
|
|
21
22
|
} = options;
|
|
22
23
|
const preferredPort = options.port ? Number(options.port) : 4500;
|
|
24
|
+
const apiKey = process.env.ALINEA_API_KEY ?? createId();
|
|
23
25
|
const nodeServer = startServer(preferredPort, 0, cmd === "build");
|
|
24
26
|
const dashboardUrl = nodeServer.then(
|
|
25
|
-
(server) => `http
|
|
27
|
+
(server) => `http://${server.hostname}:${server.port}`
|
|
26
28
|
);
|
|
27
29
|
let devServer;
|
|
28
30
|
try {
|
|
@@ -33,6 +35,7 @@ async function serve(options) {
|
|
|
33
35
|
configFile: options.configFile,
|
|
34
36
|
alineaDev: options.alineaDev,
|
|
35
37
|
production: options.production,
|
|
38
|
+
apiKey,
|
|
36
39
|
buildOptions: {
|
|
37
40
|
...buildOptions,
|
|
38
41
|
...options.buildOptions,
|
|
@@ -56,7 +59,8 @@ async function serve(options) {
|
|
|
56
59
|
process.stdout.write(header + details + footer);
|
|
57
60
|
options.onAfterGenerate?.({
|
|
58
61
|
ALINEA_DEV_SERVER: url,
|
|
59
|
-
ALINEA_ADMIN_PATH: Config.adminPath(config)
|
|
62
|
+
ALINEA_ADMIN_PATH: Config.adminPath(config),
|
|
63
|
+
ALINEA_API_KEY: apiKey
|
|
60
64
|
});
|
|
61
65
|
});
|
|
62
66
|
}
|
package/dist/cli/bin.js
CHANGED
|
@@ -220,10 +220,13 @@ 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.
|
|
223
|
+
version: "2.0.0-preview.2",
|
|
224
224
|
description: "Headless git-based CMS",
|
|
225
225
|
repository: "github:alineacms/alinea",
|
|
226
226
|
license: "MIT",
|
|
227
|
+
engines: {
|
|
228
|
+
node: ">=24.0.0"
|
|
229
|
+
},
|
|
227
230
|
sideEffects: false,
|
|
228
231
|
type: "module",
|
|
229
232
|
imports: {
|
|
@@ -288,8 +291,8 @@ var package_default = {
|
|
|
288
291
|
esbuild: "^0.28.0"
|
|
289
292
|
},
|
|
290
293
|
peerDependencies: {
|
|
291
|
-
react: "
|
|
292
|
-
"react-dom": "
|
|
294
|
+
react: ">=19.0.0",
|
|
295
|
+
"react-dom": ">=19.0.0"
|
|
293
296
|
}
|
|
294
297
|
};
|
|
295
298
|
|
|
@@ -300,8 +303,8 @@ import { ensureNode } from "./util/EnsureNode.js";
|
|
|
300
303
|
import { forwardCommand } from "./util/ForwardCommand.js";
|
|
301
304
|
var prog = lib_default2("alinea");
|
|
302
305
|
var libs = {
|
|
303
|
-
react: "
|
|
304
|
-
"react-dom": "
|
|
306
|
+
react: "19.0.0",
|
|
307
|
+
"react-dom": "19.0.0"
|
|
305
308
|
};
|
|
306
309
|
prog.version(package_default.version).command("init").describe("Initialize a new Alinea project in the current directory").action(async (args) => {
|
|
307
310
|
ensureNode();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
2
2
|
|
|
3
3
|
// src/cli/generate/CopyStaticFiles.ts
|
|
4
|
-
import fs from "node:fs/promises";
|
|
5
|
-
import path from "node:path";
|
|
6
4
|
import { createId } from "alinea/core/Id";
|
|
7
5
|
import { MemorySource } from "alinea/core/source/MemorySource";
|
|
8
6
|
import { exportSource } from "alinea/core/source/SourceExport";
|
|
7
|
+
import fs from "node:fs/promises";
|
|
8
|
+
import path from "node:path";
|
|
9
9
|
import { writeFileIfContentsDiffer } from "../util/FS.js";
|
|
10
10
|
var packageJson = {
|
|
11
11
|
private: true,
|
|
@@ -17,7 +17,6 @@ var packageJson = {
|
|
|
17
17
|
"./package.json": "./package.json",
|
|
18
18
|
"./config.js": "./config.js",
|
|
19
19
|
"./release.js": "./release.js",
|
|
20
|
-
"./settings.json": "./settings.json",
|
|
21
20
|
"./source.js": {
|
|
22
21
|
"edge-light": "./empty-source.js",
|
|
23
22
|
default: "./source.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config } from 'alinea/core/Config';
|
|
2
2
|
import type { UploadResponse } from 'alinea/core/Connection';
|
|
3
|
-
import {
|
|
3
|
+
import type { CommitRequest } from 'alinea/core/db/CommitRequest';
|
|
4
4
|
import { LocalDB } from 'alinea/core/db/LocalDB';
|
|
5
5
|
import { CachedFSSource } from 'alinea/core/source/FSSource';
|
|
6
6
|
export interface DevDBOptions {
|
|
@@ -3,11 +3,11 @@ import "../../chunks/chunk-CQ52GEHY.js";
|
|
|
3
3
|
// src/cli/generate/DevDB.ts
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
5
5
|
import { Config } from "alinea/core/Config";
|
|
6
|
-
import { checkCommit } from "alinea/core/db/CommitRequest";
|
|
7
6
|
import { LocalDB } from "alinea/core/db/LocalDB";
|
|
8
7
|
import { createId } from "alinea/core/Id";
|
|
9
8
|
import { getWorkspace } from "alinea/core/Internal";
|
|
10
9
|
import { CachedFSSource } from "alinea/core/source/FSSource";
|
|
10
|
+
import { ShaMismatchError } from "alinea/core/source/ShaMismatchError";
|
|
11
11
|
import { assert } from "alinea/core/util/Assert";
|
|
12
12
|
import { keys, values } from "alinea/core/util/Objects";
|
|
13
13
|
import { basename, contains, dirname, extname, join } from "alinea/core/util/Paths";
|
|
@@ -54,10 +54,8 @@ var DevDB = class extends LocalDB {
|
|
|
54
54
|
}
|
|
55
55
|
async write(request) {
|
|
56
56
|
if (this.sha === request.intoSha) return { sha: this.sha };
|
|
57
|
-
if (this.sha !== request.fromSha)
|
|
58
|
-
|
|
59
|
-
checkCommit(tree, request);
|
|
60
|
-
}
|
|
57
|
+
if (this.sha !== request.fromSha)
|
|
58
|
+
throw new ShaMismatchError(request.fromSha, this.sha);
|
|
61
59
|
const { rootDir } = this.#options;
|
|
62
60
|
for (const change of request.changes) {
|
|
63
61
|
switch (change.op) {
|
|
@@ -3,7 +3,7 @@ import type { CMS } from 'alinea/core/CMS';
|
|
|
3
3
|
import type { User } from 'alinea/core/User';
|
|
4
4
|
import { type Request, Response } from '@alinea/iso';
|
|
5
5
|
import type { ServeContext } from './ServeContext.js';
|
|
6
|
-
export declare function createLocalServer({ cmd, configLocation, rootDir, staticDir, alineaDev, buildOptions, production, liveReload, buildId }: ServeContext, cms: CMS, handleApi: Handler, user: User): {
|
|
6
|
+
export declare function createLocalServer({ cmd, configLocation, rootDir, staticDir, alineaDev, buildOptions, production, liveReload, buildId, apiKey }: ServeContext, cms: CMS, handleApi: Handler, user: User): {
|
|
7
7
|
close(): void;
|
|
8
8
|
handle(input: Request): Promise<Response>;
|
|
9
9
|
};
|
|
@@ -61,13 +61,14 @@ function createLocalServer({
|
|
|
61
61
|
buildOptions,
|
|
62
62
|
production,
|
|
63
63
|
liveReload,
|
|
64
|
-
buildId
|
|
64
|
+
buildId,
|
|
65
|
+
apiKey
|
|
65
66
|
}, cms, handleApi, user) {
|
|
66
67
|
function devHandler(request) {
|
|
67
68
|
return handleApi(request, {
|
|
68
69
|
isDev: true,
|
|
69
70
|
handlerUrl: new URL(request.url.split("?")[0]),
|
|
70
|
-
apiKey
|
|
71
|
+
apiKey
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
const devDir = path.join(staticDir, "dev");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
1
|
+
import { Config } from 'alinea/core/Config';
|
|
2
|
+
import { Request, type Response } from '@alinea/iso';
|
|
3
3
|
import type { BuildOptions } from 'esbuild';
|
|
4
4
|
export interface CreateDevServerOptions {
|
|
5
5
|
cmd: 'dev' | 'build';
|
|
@@ -9,6 +9,7 @@ export interface CreateDevServerOptions {
|
|
|
9
9
|
buildOptions?: BuildOptions;
|
|
10
10
|
alineaDev?: boolean;
|
|
11
11
|
production?: boolean;
|
|
12
|
+
apiKey?: string;
|
|
12
13
|
dashboardUrl: Promise<string>;
|
|
13
14
|
onAfterGenerate?: (message: string, config: Config) => void;
|
|
14
15
|
}
|