alinea 0.9.1 → 0.9.3
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/chunks/{chunk-C4PS2PAP.js → chunk-YM2Q4PLN.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/GenerateDashboard.js +1 -1
- package/dist/cloud/server/CloudAuthServer.js +1 -1
- package/dist/core/TextDoc.js +4 -2
- package/dist/core/shape/RichTextShape.js +8 -2
- package/dist/core/util/EntryFilenames.js +1 -1
- package/dist/dashboard/util/PersistentStore.js +1 -1
- package/dist/field/richtext/RichTextField.browser.js +1 -3
- package/package.json +1 -1
package/dist/cli/Serve.js
CHANGED
package/dist/cli/bin.js
CHANGED
package/dist/core/TextDoc.js
CHANGED
|
@@ -9,11 +9,13 @@ var Node;
|
|
|
9
9
|
}
|
|
10
10
|
Node2.isText = isText;
|
|
11
11
|
function isElement(node) {
|
|
12
|
-
|
|
12
|
+
const typeName = node[Node2.type];
|
|
13
|
+
return typeof typeName === "string" && typeName !== "text" && typeName[0]?.toLowerCase() === typeName[0];
|
|
13
14
|
}
|
|
14
15
|
Node2.isElement = isElement;
|
|
15
16
|
function isBlock(node) {
|
|
16
|
-
|
|
17
|
+
const typeName = node[Node2.type];
|
|
18
|
+
return typeof typeName === "string" && typeName !== "text" && typeName[0]?.toUpperCase() === typeName[0];
|
|
17
19
|
}
|
|
18
20
|
Node2.isBlock = isBlock;
|
|
19
21
|
})(Node || (Node = {}));
|
|
@@ -375,8 +375,14 @@ var RichTextShape = class {
|
|
|
375
375
|
if (!this.blocks)
|
|
376
376
|
throw new Error("No types defined");
|
|
377
377
|
const shape = this.blocks[block];
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
map.set(
|
|
379
|
+
id,
|
|
380
|
+
shape.toY({
|
|
381
|
+
...shape.create(),
|
|
382
|
+
[Node.type]: block,
|
|
383
|
+
[BlockNode.id]: id
|
|
384
|
+
})
|
|
385
|
+
);
|
|
380
386
|
}
|
|
381
387
|
};
|
|
382
388
|
}
|
|
@@ -67,7 +67,7 @@ function entryUrl(type, meta) {
|
|
|
67
67
|
return entryUrl2(meta);
|
|
68
68
|
const segments = meta.locale ? [meta.locale] : [];
|
|
69
69
|
return "/" + segments.concat(
|
|
70
|
-
meta.parentPaths.concat(meta.path).filter((segment) => segment !== "index")
|
|
70
|
+
meta.parentPaths.concat(meta.path).filter((segment) => segment !== "index" && segment !== "")
|
|
71
71
|
).join("/");
|
|
72
72
|
}
|
|
73
73
|
function pathSuffix(path, conflictingPaths) {
|
|
@@ -1728,9 +1728,7 @@ function InsertMenu({ editor, schema, onInsert }) {
|
|
|
1728
1728
|
onInsert(id, key);
|
|
1729
1729
|
editor.chain().focus().insertContent({
|
|
1730
1730
|
type: key,
|
|
1731
|
-
attrs: {
|
|
1732
|
-
[BlockNode.id]: id
|
|
1733
|
-
}
|
|
1731
|
+
attrs: { [BlockNode.id]: id }
|
|
1734
1732
|
}).run();
|
|
1735
1733
|
},
|
|
1736
1734
|
children: /* @__PURE__ */ jsxs(HStack, { center: true, gap: 8, children: [
|