@refrakt-md/svelte 0.2.0 → 0.4.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@refrakt-md/svelte",
3
3
  "description": "Svelte renderer for refrakt.md content",
4
- "version": "0.2.0",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@markdoc/markdoc": "0.4.0",
30
- "@refrakt-md/types": "0.2.0"
30
+ "@refrakt-md/types": "0.4.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "svelte": "^5.0.0"
@@ -20,9 +20,19 @@
20
20
  interface PageData {
21
21
  title: string;
22
22
  description: string;
23
+ frontmatter?: Record<string, unknown>;
23
24
  regions: Record<string, { name: string; mode: string; content: any[] }>;
24
25
  renderable: any;
25
- pages: Array<{ url: string; title: string; draft: boolean }>;
26
+ pages: Array<{
27
+ url: string;
28
+ title: string;
29
+ draft: boolean;
30
+ description?: string;
31
+ date?: string;
32
+ author?: string;
33
+ tags?: string[];
34
+ image?: string;
35
+ }>;
26
36
  url: string;
27
37
  seo?: PageSeo;
28
38
  }
@@ -76,6 +86,7 @@
76
86
  <Layout
77
87
  title={page.title}
78
88
  description={page.description}
89
+ frontmatter={page.frontmatter}
79
90
  regions={page.regions}
80
91
  renderable={page.renderable}
81
92
  pages={page.pages}
package/src/types.ts CHANGED
@@ -1,9 +1,2 @@
1
- /** A serialized Markdoc Tag (plain object, not a class instance) */
2
- export interface SerializedTag {
3
- $$mdtype: 'Tag';
4
- name: string;
5
- attributes: Record<string, any>;
6
- children: RendererNode[];
7
- }
8
-
9
- export type RendererNode = SerializedTag | string | number | null | undefined | RendererNode[];
1
+ // Canonical types live in @refrakt-md/types; re-exported here for backward compat
2
+ export type { SerializedTag, RendererNode } from '@refrakt-md/types';