this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(core): generate unique presentation IDs

This should help with cross-tab syncing at a later time

+15 -1
+11 -1
core/markdoc-config.ts
··· 1 - import { Config, Node, nodes, Tag } from "@markdoc/markdoc"; 1 + import { Config, nodes, Tag } from "@markdoc/markdoc"; 2 2 import { createFenceNode } from "./nodes/fence.ts"; 3 3 import type { Includes } from "./types.ts"; 4 4 5 5 export function createMarkdocConfig() { 6 6 const includes: Includes = new Set(); 7 7 let slideNum = 0; 8 + 8 9 const config: Config = { 9 10 tags: { 10 11 slide: { ··· 25 26 document: { 26 27 ...nodes.document, 27 28 render: "morkdeck-presentation", 29 + async transform(node, config) { 30 + const uuid = crypto.randomUUID(); 31 + 32 + return new Tag( 33 + "morkdeck-presentation", 34 + { uuid }, 35 + await Promise.resolve(node.transformChildren(config)), 36 + ); 37 + }, 28 38 }, 29 39 }, 30 40 };
+4
templates/components/presentation.eta
··· 2 2 import { LitElement, html, css } from 'lit'; 3 3 4 4 class Presentation extends LitElement { 5 + static properties = { 6 + uuid: { type: String } 7 + } 8 + 5 9 static styles = css` 6 10 :host { 7 11 display: block;