@ixo/editor 7.12.0 → 7.13.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.
- package/dist/{chunk-H3UJUFQJ.js → chunk-EWYIYBND.js} +5 -3
- package/dist/chunk-EWYIYBND.js.map +1 -0
- package/dist/{chunk-7CYW6V5T.js → chunk-HVTS5UPZ.js} +72 -11
- package/dist/chunk-HVTS5UPZ.js.map +1 -0
- package/dist/{connections-Cwsj5oRD.d.ts → connections-Dg3LrIiZ.d.ts} +1 -1
- package/dist/core/index.cjs +4 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +1 -1
- package/dist/{graphql-client-DmjebTor.d.ts → graphql-client-QwJ3jtcD.d.ts} +4 -2
- package/dist/{index-D99iLwsk.d.ts → index-Jxe3NJeY.d.ts} +5 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/mantine/index.d.ts +5 -5
- package/dist/mantine/index.js +2 -2
- package/dist/{types-DObm_Y95.d.ts → types-D-PiyyFv.d.ts} +2 -2
- package/package.json +1 -1
- package/style-core.css +35 -21
- package/style-mantine.css +35 -21
- package/style-scoped.css +35 -21
- package/style.css +35 -21
- package/dist/chunk-7CYW6V5T.js.map +0 -1
- package/dist/chunk-H3UJUFQJ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as FlowNodeAuthzExtension, a7 as FlowNode, a8 as EvaluationStatus, F as FlowRuntimeStateManager, G as UcanService, g as InvocationStore, U as UcanCapability, a9 as IxoEditorType, aa as PendingInvocation, ab as ActionServices, ac as ActionHandlers, ad as RunEventAppender, ae as TopicExecutionContext, af as TopicActionBridge, ag as DesignPodRuntimeAuthorityV1, ah as ActionResult, ai as TopicActionWriteBackResult, aj as FlowNodeRuntimeState, z as UcanDelegationStore, v as StoredDelegation, ak as ActionDefinition, al as DesignPodMethodId } from './types-
|
|
1
|
+
import { a6 as FlowNodeAuthzExtension, a7 as FlowNode, a8 as EvaluationStatus, F as FlowRuntimeStateManager, G as UcanService, g as InvocationStore, U as UcanCapability, a9 as IxoEditorType, aa as PendingInvocation, ab as ActionServices, ac as ActionHandlers, ad as RunEventAppender, ae as TopicExecutionContext, af as TopicActionBridge, ag as DesignPodRuntimeAuthorityV1, ah as ActionResult, ai as TopicActionWriteBackResult, aj as FlowNodeRuntimeState, z as UcanDelegationStore, v as StoredDelegation, ak as ActionDefinition, al as DesignPodMethodId } from './types-D-PiyyFv.js';
|
|
2
2
|
import * as Y from 'yjs';
|
|
3
3
|
import { Doc, Map } from 'yjs';
|
|
4
4
|
import { MatrixClient } from 'matrix-js-sdk';
|
package/dist/core/index.cjs
CHANGED
|
@@ -3736,6 +3736,7 @@ function validPageBlock(value, schema, ids = /* @__PURE__ */ new Set(), depth =
|
|
|
3736
3736
|
// src/core/lib/pageSerializer/index.ts
|
|
3737
3737
|
var PAGE_FILE_SCHEMA_VERSION = 1;
|
|
3738
3738
|
var IXO_BLOCK_FENCE = "ixo-block";
|
|
3739
|
+
var STRING_META_KEYS = ["title", "id", "author", "createdAt", "exportedAt", "icon", "cover"];
|
|
3739
3740
|
var yamlValue = (value) => JSON.stringify(value);
|
|
3740
3741
|
function frontmatter(meta) {
|
|
3741
3742
|
const lines = Object.entries(meta).filter(([, value]) => value !== void 0 && value !== null && value !== "").map(([key, value]) => `${key}: ${yamlValue(value)}`);
|
|
@@ -3908,7 +3909,7 @@ async function pageMarkdownToBlocks(converter, markdown) {
|
|
|
3908
3909
|
const { meta, body } = parseFrontmatter(markdown.replace(/\r\n?/g, "\n"));
|
|
3909
3910
|
const schemaVersion = typeof meta.schemaVersion === "number" ? meta.schemaVersion : PAGE_FILE_SCHEMA_VERSION;
|
|
3910
3911
|
const supportedVersion = meta.schemaVersion === void 0 || meta.schemaVersion === PAGE_FILE_SCHEMA_VERSION;
|
|
3911
|
-
const validMeta =
|
|
3912
|
+
const validMeta = STRING_META_KEYS.every((key) => meta[key] === void 0 || typeof meta[key] === "string") && (meta.coverPosition === void 0 || typeof meta.coverPosition === "number");
|
|
3912
3913
|
const diagnostics = supportedVersion ? [] : [{ code: "unsupported-schema-version" }];
|
|
3913
3914
|
if (!validMeta) diagnostics.push({ code: "invalid-metadata" });
|
|
3914
3915
|
const [{ unified }, { default: remarkParse }, { default: remarkGfm }] = await Promise.all([import("unified"), import("remark-parse"), import("remark-gfm")]);
|
|
@@ -3976,9 +3977,10 @@ async function pageMarkdownToBlocks(converter, markdown) {
|
|
|
3976
3977
|
}
|
|
3977
3978
|
await parseRun(body.slice(cursor));
|
|
3978
3979
|
const { schemaVersion: _ignored, ...rest } = meta;
|
|
3979
|
-
for (const key of
|
|
3980
|
+
for (const key of STRING_META_KEYS) {
|
|
3980
3981
|
if (meta[key] !== void 0 && typeof meta[key] !== "string") delete rest[key];
|
|
3981
3982
|
}
|
|
3983
|
+
if (meta.coverPosition !== void 0 && typeof meta.coverPosition !== "number") delete rest.coverPosition;
|
|
3982
3984
|
return { meta: { ...rest, schemaVersion }, blocks, diagnostics };
|
|
3983
3985
|
}
|
|
3984
3986
|
async function pageContentHash(markdown) {
|