@podlite/markdown 0.0.67 → 0.0.69
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/CHANGELOG.podlite +4 -0
- package/lib/index.cjs +35 -37
- package/lib/index.cjs.map +4 -4
- package/lib/index.esm.js +3 -1
- package/lib/index.esm.js.map +2 -2
- package/package.json +3 -3
package/lib/index.esm.js
CHANGED
|
@@ -19,10 +19,12 @@ import {
|
|
|
19
19
|
getTextContentFromNode
|
|
20
20
|
} from "@podlite/schema";
|
|
21
21
|
import { mkRootBlock } from "@podlite/schema";
|
|
22
|
+
import { assignHeadingKeys } from "@podlite/schema";
|
|
22
23
|
import { mkImage } from "@podlite/schema";
|
|
23
24
|
import { mkCaption } from "@podlite/schema";
|
|
24
25
|
import { mkFomattingCodeO } from "@podlite/schema";
|
|
25
26
|
var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
27
|
+
var _a;
|
|
26
28
|
const md_tree = unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src);
|
|
27
29
|
let definitionMap = {};
|
|
28
30
|
const applyLineOffset = ((offset) => (location) => {
|
|
@@ -205,7 +207,7 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
205
207
|
return null;
|
|
206
208
|
}
|
|
207
209
|
}).run(md_tree);
|
|
208
|
-
return res.interator;
|
|
210
|
+
return assignHeadingKeys(res.interator, typeof src === "string" ? src : (_a = src == null ? void 0 : src.value) != null ? _a : "");
|
|
209
211
|
};
|
|
210
212
|
|
|
211
213
|
// src/index.tsx
|
package/lib/index.esm.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.tsx", "../src/tools.ts"],
|
|
4
|
-
"sourcesContent": ["import { content as nodeContent, Plugins } from '@podlite/schema'\nimport { Plugin } from '@podlite/schema'\nimport { md2ast } from './tools'\n\nexport const plugin: Plugin = {\n toAst: (_, processor) => (node, ctx) => {\n if (typeof node !== 'string' && 'type' in node && 'content' in node && node.type === 'block') {\n const content = node.content[0]\n if (content && typeof content !== 'string' && 'location' in node && 'value' in content) {\n const lineOffset = node.location.start.line\n return { ...node, content: md2ast(content, { lineOffset }) }\n }\n return node\n }\n },\n toJSX: helper => {\n return nodeContent\n },\n}\nexport const PluginRegister: Plugins = {\n Markdown: plugin, //TODO: deprecate it\n markdown: plugin,\n}\n\nexport { md2ast as parseMd } from './tools'\nexport default plugin\n", "import { unified } from 'unified'\nimport markdown from 'remark-parse'\nimport remarkGfm from 'remark-gfm'\nimport remarkMath from 'remark-math'\n\nimport {\n toAny,\n AstTree,\n BlockImage,\n mkBlock,\n mkFomattingCode,\n mkFomattingCodeL,\n mkVerbatim,\n Location,\n mkMarkupCodeF,\n mkFormulaBlock,\n parseAttributes,\n headingId,\n getTextContentFromNode,\n} from '@podlite/schema'\nimport { mkRootBlock } from '@podlite/schema'\nimport { mkImage } from '@podlite/schema'\nimport { mkCaption } from '@podlite/schema'\nimport { mkFomattingCodeO } from '@podlite/schema'\n\ntype Md2astArgs = { lineOffset?: number }\nexport const md2ast = (src: string, { lineOffset }: Md2astArgs = { lineOffset: 0 }): AstTree => {\n // first convert mardown to ast\n const md_tree = unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src)\n\n // first pass : collect linkRefs\n let definitionMap = {}\n const applyLineOffset = (\n (offset: number) =>\n (location: Location): Location => {\n const { start, end } = location\n return {\n start: {\n ...start,\n line: start.line + offset,\n },\n end: {\n ...end,\n line: end.line + offset,\n },\n }\n }\n )(lineOffset)\n toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':definition': (writer, processor) => (node, ctx, interator) => {\n definitionMap[node.identifier] = node\n },\n })\n .run(md_tree)\n\n // second stage - make Universal AST nodes\n const uast = []\n const res = toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n console.warn('[Podlite:md2ast]- unhandled MD node')\n console.warn(JSON.stringify(node, null, 2))\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':root': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkRootBlock({}, interator(children, ctx))\n },\n ':math': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkFormulaBlock({ value, location: applyLineOffset(position) })\n },\n ':inlineMath': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkMarkupCodeF(value)\n },\n\n ':heading': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const block = mkBlock(\n { type: 'block', level: node.depth, name: 'head', location: applyLineOffset(position) },\n interator(children, ctx),\n )\n // a link to a heading is written against its text, so a generated id points at nothing\n const id = headingId(getTextContentFromNode(block))\n // a heading holding only an image has no text to be named by, and an empty id would\n // repeat across every such heading\n return id ? { ...block, id } : block\n },\n ':text': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return node.value\n // return mkNode({type:\"text\", value: node.value})\n },\n ':list': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'list', level: savedListLevel + 1, list: node.ordered ? 'ordered' : 'itemized' },\n interator(children, { ...ctx, listLevel: savedListLevel + 1, ordered: node.ordered }),\n )\n },\n ':listItem': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, checked, ...attr } = node\n const blockAttrs: any = {\n name: 'item',\n type: 'block',\n level: ctx['listLevel'],\n location: applyLineOffset(position),\n }\n\n if (checked !== null && checked !== undefined) {\n blockAttrs.checked = checked\n blockAttrs.config = [{ name: 'checked', value: checked, type: 'boolean' }]\n }\n\n return mkBlock(blockAttrs, interator(children, { ...ctx, listLevel: savedListLevel, ordered: node.ordered }))\n },\n ':paragraph': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'para', location: applyLineOffset(position), text: 'text', margin: '' },\n interator(children, { ...ctx }),\n )\n },\n ':linkReference': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const definition = definitionMap[attr.identifier]\n const meta = definition?.url || ''\n return mkFomattingCodeL({ meta }, interator(children, { ...ctx }))\n },\n ':definition': (writer, processor) => (node, ctx, interator) => {\n return null\n },\n ':inlineCode': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'C' }, [node.value])\n },\n ':strong': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'B' }, interator(children, { ...ctx }))\n },\n ':emphasis': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'I' }, interator(children, { ...ctx }))\n },\n ':link': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeL({ meta: node.url }, interator(children, { ...ctx }))\n },\n ':html': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ type: 'block', name: 'Html', location: applyLineOffset(position) }, [mkVerbatim(node.value)])\n },\n ':code': (writer, processor) => (node, ctx, interator) => {\n const { children, position, lang, meta, ...attr } = node\n if (lang === 'mermaid' || lang === 'diagram') {\n return mkBlock({ type: 'block', name: 'Mermaid', config: [], location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n }\n let config = []\n if (lang) {\n config.push({ name: 'lang', value: lang, type: 'string' })\n }\n if (meta) {\n config.push(...parseAttributes(meta))\n }\n return mkBlock({ type: 'block', name: 'code', config, location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n },\n ':image':\n (writer, processor) =>\n (node, ctx, interator): BlockImage => {\n const { title, alt, url, position, ...attr } = node\n let config = []\n const content: any[] = [mkImage(url, alt)]\n if (title) content.push(mkCaption([title]))\n return mkBlock({ type: 'block', name: 'Image', config, location: applyLineOffset(position) }, content)\n },\n ':thematicBreak': (writer, processor) => (node, ctx, interator) => {\n return null // TODO: add support for \"thematic break\"\n },\n ':blockquote': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'nested', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n //table section\n ':table': (writer, processor) => (node, ctx, interator) => {\n const { children, position, align, ...attr } = node\n return mkBlock(\n { name: 'table', location: applyLineOffset(position), align },\n interator(children, { ...ctx, isHeaderUsed: 0 }),\n )\n },\n ':tableRow': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const isHeaderUsed = ctx.isHeaderUsed++\n const blockAttrs: Record<string, unknown> = {\n name: 'row',\n location: applyLineOffset(position),\n }\n if (!isHeaderUsed) {\n blockAttrs.config = [{ name: 'header', value: true, type: 'boolean' }]\n }\n return mkBlock(blockAttrs, interator(children, { ...ctx }))\n },\n ':tableCell': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'cell', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n ':delete': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeO(interator(children, { ...ctx }))\n },\n ':break': (writer, processor) => (node, ctx, interator) => {\n return null\n },\n })\n .run(md_tree)\n return res.interator\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW,mBAA4B;;;ACAhD,SAAS,eAAe;AACxB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAEvB;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AAG1B,IAAM,SAAS,CAAC,KAAa,EAAE,WAAW,IAAgB,EAAE,YAAY,EAAE,MAAe;
|
|
4
|
+
"sourcesContent": ["import { content as nodeContent, Plugins } from '@podlite/schema'\nimport { Plugin } from '@podlite/schema'\nimport { md2ast } from './tools'\n\nexport const plugin: Plugin = {\n toAst: (_, processor) => (node, ctx) => {\n if (typeof node !== 'string' && 'type' in node && 'content' in node && node.type === 'block') {\n const content = node.content[0]\n if (content && typeof content !== 'string' && 'location' in node && 'value' in content) {\n const lineOffset = node.location.start.line\n return { ...node, content: md2ast(content, { lineOffset }) }\n }\n return node\n }\n },\n toJSX: helper => {\n return nodeContent\n },\n}\nexport const PluginRegister: Plugins = {\n Markdown: plugin, //TODO: deprecate it\n markdown: plugin,\n}\n\nexport { md2ast as parseMd } from './tools'\nexport default plugin\n", "import { unified } from 'unified'\nimport markdown from 'remark-parse'\nimport remarkGfm from 'remark-gfm'\nimport remarkMath from 'remark-math'\n\nimport {\n toAny,\n AstTree,\n BlockImage,\n mkBlock,\n mkFomattingCode,\n mkFomattingCodeL,\n mkVerbatim,\n Location,\n mkMarkupCodeF,\n mkFormulaBlock,\n parseAttributes,\n headingId,\n getTextContentFromNode,\n} from '@podlite/schema'\nimport { mkRootBlock } from '@podlite/schema'\nimport { assignHeadingKeys } from '@podlite/schema'\nimport { mkImage } from '@podlite/schema'\nimport { mkCaption } from '@podlite/schema'\nimport { mkFomattingCodeO } from '@podlite/schema'\n\ntype Md2astArgs = { lineOffset?: number }\nexport const md2ast = (src: string, { lineOffset }: Md2astArgs = { lineOffset: 0 }): AstTree => {\n // first convert mardown to ast\n const md_tree = unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src)\n\n // first pass : collect linkRefs\n let definitionMap = {}\n const applyLineOffset = (\n (offset: number) =>\n (location: Location): Location => {\n const { start, end } = location\n return {\n start: {\n ...start,\n line: start.line + offset,\n },\n end: {\n ...end,\n line: end.line + offset,\n },\n }\n }\n )(lineOffset)\n toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':definition': (writer, processor) => (node, ctx, interator) => {\n definitionMap[node.identifier] = node\n },\n })\n .run(md_tree)\n\n // second stage - make Universal AST nodes\n const uast = []\n const res = toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n console.warn('[Podlite:md2ast]- unhandled MD node')\n console.warn(JSON.stringify(node, null, 2))\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':root': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkRootBlock({}, interator(children, ctx))\n },\n ':math': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkFormulaBlock({ value, location: applyLineOffset(position) })\n },\n ':inlineMath': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkMarkupCodeF(value)\n },\n\n ':heading': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const block = mkBlock(\n { type: 'block', level: node.depth, name: 'head', location: applyLineOffset(position) },\n interator(children, ctx),\n )\n // a link to a heading is written against its text, so a generated id points at nothing\n const id = headingId(getTextContentFromNode(block))\n // a heading holding only an image has no text to be named by, and an empty id would\n // repeat across every such heading\n return id ? { ...block, id } : block\n },\n ':text': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return node.value\n // return mkNode({type:\"text\", value: node.value})\n },\n ':list': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'list', level: savedListLevel + 1, list: node.ordered ? 'ordered' : 'itemized' },\n interator(children, { ...ctx, listLevel: savedListLevel + 1, ordered: node.ordered }),\n )\n },\n ':listItem': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, checked, ...attr } = node\n const blockAttrs: any = {\n name: 'item',\n type: 'block',\n level: ctx['listLevel'],\n location: applyLineOffset(position),\n }\n\n if (checked !== null && checked !== undefined) {\n blockAttrs.checked = checked\n blockAttrs.config = [{ name: 'checked', value: checked, type: 'boolean' }]\n }\n\n return mkBlock(blockAttrs, interator(children, { ...ctx, listLevel: savedListLevel, ordered: node.ordered }))\n },\n ':paragraph': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'para', location: applyLineOffset(position), text: 'text', margin: '' },\n interator(children, { ...ctx }),\n )\n },\n ':linkReference': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const definition = definitionMap[attr.identifier]\n const meta = definition?.url || ''\n return mkFomattingCodeL({ meta }, interator(children, { ...ctx }))\n },\n ':definition': (writer, processor) => (node, ctx, interator) => {\n return null\n },\n ':inlineCode': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'C' }, [node.value])\n },\n ':strong': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'B' }, interator(children, { ...ctx }))\n },\n ':emphasis': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'I' }, interator(children, { ...ctx }))\n },\n ':link': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeL({ meta: node.url }, interator(children, { ...ctx }))\n },\n ':html': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ type: 'block', name: 'Html', location: applyLineOffset(position) }, [mkVerbatim(node.value)])\n },\n ':code': (writer, processor) => (node, ctx, interator) => {\n const { children, position, lang, meta, ...attr } = node\n if (lang === 'mermaid' || lang === 'diagram') {\n return mkBlock({ type: 'block', name: 'Mermaid', config: [], location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n }\n let config = []\n if (lang) {\n config.push({ name: 'lang', value: lang, type: 'string' })\n }\n if (meta) {\n config.push(...parseAttributes(meta))\n }\n return mkBlock({ type: 'block', name: 'code', config, location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n },\n ':image':\n (writer, processor) =>\n (node, ctx, interator): BlockImage => {\n const { title, alt, url, position, ...attr } = node\n let config = []\n const content: any[] = [mkImage(url, alt)]\n if (title) content.push(mkCaption([title]))\n return mkBlock({ type: 'block', name: 'Image', config, location: applyLineOffset(position) }, content)\n },\n ':thematicBreak': (writer, processor) => (node, ctx, interator) => {\n return null // TODO: add support for \"thematic break\"\n },\n ':blockquote': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'nested', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n //table section\n ':table': (writer, processor) => (node, ctx, interator) => {\n const { children, position, align, ...attr } = node\n return mkBlock(\n { name: 'table', location: applyLineOffset(position), align },\n interator(children, { ...ctx, isHeaderUsed: 0 }),\n )\n },\n ':tableRow': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const isHeaderUsed = ctx.isHeaderUsed++\n const blockAttrs: Record<string, unknown> = {\n name: 'row',\n location: applyLineOffset(position),\n }\n if (!isHeaderUsed) {\n blockAttrs.config = [{ name: 'header', value: true, type: 'boolean' }]\n }\n return mkBlock(blockAttrs, interator(children, { ...ctx }))\n },\n ':tableCell': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'cell', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n ':delete': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeO(interator(children, { ...ctx }))\n },\n ':break': (writer, processor) => (node, ctx, interator) => {\n return null\n },\n })\n .run(md_tree)\n // a =markdown block hands over its verbatim node: the keys are fingerprinted from the\n // text the reader parsed\n return assignHeadingKeys(res.interator, typeof src === 'string' ? src : (src as { value?: string })?.value ?? '')\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,mBAA4B;;;ACAhD,SAAS,eAAe;AACxB,OAAO,cAAc;AACrB,O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AK,cAAc;AACzD,aAAO;AAAA,IACT;AAAA,EACF,CAAC,EACA,IAAI,OAAO;AAGd,SAAO,kBAAkB,IAAI,WAAW,OAAO,QAAQ,WAAW,OAAO,gCAA4B,UAA5B,YAAqC,EAAE;AAClH;;;ADtOO,IAAM,SAAiB;AAAA,EAC5B,OAAO,CAAC,GAAG,cAAc,CAAC,MAAM,QAAQ;AACtC,QAAI,OAAO,SAAS,YAAY,UAAU,QAAQ,aAAa,QAAQ,KAAK,SAAS,SAAS;AAC5F,YAAM,UAAU,KAAK,QAAQ;AAC7B,UAAI,WAAW,OAAO,YAAY,YAAY,cAAc,QAAQ,WAAW,SAAS;AACtF,cAAM,aAAa,KAAK,SAAS,MAAM;AACvC,eAAO,EAAE,GAAG,MAAM,SAAS,OAAO,SAAS,EAAE,WAAW,CAAC,EAAE;AAAA,MAC7D;AACA,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,OAAO,YAAU;AACf,WAAO;AAAA,EACT;AACF;AACO,IAAM,iBAA0B;AAAA,EACrC,UAAU;AAAA,EACV,UAAU;AACZ;AAGA,IAAO,cAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/markdown",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"description": "Bidirectional Markdown support for Podlite — parse .md files, embed Markdown blocks",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"LICENSE"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"clean": "rm -rf dist lib esm
|
|
38
|
+
"clean": "rm -rf dist lib esm *.tsbuildinfo",
|
|
39
39
|
"test": "yarn g:jest --passWithNoTests",
|
|
40
40
|
"build": "run-p build:cjs build:esm",
|
|
41
41
|
"build:cjs": "ts-node ./scripts/build.ts && tsc --declaration --emitDeclarationOnly",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"compatibility"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@podlite/schema": "0.0.
|
|
64
|
+
"@podlite/schema": "0.0.76",
|
|
65
65
|
"react": "^16.0.0 || ^17.0.0 || ^18",
|
|
66
66
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18",
|
|
67
67
|
"react-is": "^18.0.0",
|