@echovisionlab/geul-common 0.1.2 → 0.2.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/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@echovisionlab/geul-common",
3
- "version": "0.1.2",
3
+ "description": "Shared TypeScript contracts and helpers for Geul editors, collaboration, localized content, media blocks, pages, posts, and runtime events.",
4
+ "author": "state303 <state303@dsub.io>",
5
+ "version": "0.2.0",
4
6
  "private": false,
5
7
  "type": "module",
6
8
  "repository": {
@@ -60,7 +62,7 @@
60
62
  },
61
63
  "dependencies": {
62
64
  "@bufbuild/protobuf": "^2.14.0",
63
- "@echovisionlab/geul-proto": "^0.1.1",
65
+ "@echovisionlab/geul-proto": "^0.2.0",
64
66
  "zod": "^4.4.3"
65
67
  },
66
68
  "peerDependencies": {
@@ -20,12 +20,14 @@ export const PAGE_RICH_TEXT_BLOCK_LOCALE_PROP_KEYS = {
20
20
  file: ["alt", "caption"],
21
21
  map: ["caption"],
22
22
  p5Sketch: ["title"],
23
+ mermaid: ["title"],
23
24
  threeScene: ["title"],
24
25
  shader: ["title"],
25
26
  } as const;
26
27
 
27
28
  export const PAGE_RICH_TEXT_BLOCK_SOURCE_OWNED_CONTENT_TYPES = [
28
29
  "p5Sketch",
30
+ "mermaid",
29
31
  "threeScene",
30
32
  "shader",
31
33
  ] as const;
@@ -20,7 +20,13 @@ export type PageBlockType =
20
20
  | "immersive-scene"
21
21
  | "map"
22
22
  | "external-video"
23
- | "columns";
23
+ | "columns"
24
+ | "mermaid";
25
+
26
+ export interface MermaidProps {
27
+ source: string;
28
+ title: string;
29
+ }
24
30
 
25
31
  export interface ExternalVideoProps {
26
32
  url: string;
@@ -82,6 +88,7 @@ export const PAGE_BLOCK_TYPES = [
82
88
  "map",
83
89
  "external-video",
84
90
  "columns",
91
+ "mermaid",
85
92
  ] as const satisfies readonly PageBlockType[];
86
93
 
87
94
  function createParagraphBlock(id: string, text: string): PageBlockFixtureBlock {
@@ -456,6 +463,12 @@ export const PAGE_BLOCK_FIXTURE_SECTIONS: PageBlockFixtureSection[] = [
456
463
  caption: "",
457
464
  },
458
465
  },
466
+ {
467
+ id: "fixture-section-mermaid",
468
+ type: "mermaid",
469
+ settings: {},
470
+ props: { source: "flowchart LR\n A --> B", title: "Diagram" },
471
+ },
459
472
  {
460
473
  id: "fixture-section-external-video",
461
474
  type: "external-video",