* refactor(codegen): share syntax-tree code generation between exporters dom-css printed Tailwind JSX with its own esrap JSX builders and kept TypeScript template helpers under its Storybook export. The OpenPencil JSX exporter needs the same JSX builders, and design-jsx and dom-css may not depend on each other. @open-pencil/codegen holds both: es for ESTree templates and modules (moved from dom-css) and jsx for JSX elements, attributes, text, and printing, including the literal rules that keep exported strings from being reinterpreted. dom-css no longer depends on acorn and esrap directly. * refactor(design-jsx): print JSX export as syntax trees sceneNodeToJSX concatenated strings with hand-written escaping and indentation. It now collects typed props (moved to export/props.ts) and prints them with @open-pencil/codegen's JSX builders. Output is unchanged except for text: special characters print as a string expression instead of entities, and multi-line text keeps its line breaks, which the old line-splitting lost on render. * docs(codegen): fix package metadata and dependency rules codegen's repository.directory still named design-jsx, the README mentioned es without showing it, and the design-jsx and dom-css guides still said they depend only on scene-graph. * test(core): move the JSX export round-trips to the design-jsx test home Covers tabs in layer names and text, which JSX keeps as written.
121 lines
2.8 KiB
JSON
121 lines
2.8 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"useDefineForClassFields": true,
|
|
"lib": [
|
|
"ES2023",
|
|
"DOM",
|
|
"DOM.Iterable"
|
|
],
|
|
"module": "ESNext",
|
|
"skipLibCheck": true,
|
|
"moduleResolution": "bundler",
|
|
"allowImportingTsExtensions": true,
|
|
"allowArbitraryExtensions": true,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noEmit": true,
|
|
"jsx": "preserve",
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"paths": {
|
|
"#vite-config/*": ["./vite/*"],
|
|
"@/*": [
|
|
"./src/*"
|
|
],
|
|
"#vue/*": [
|
|
"./packages/vue/src/*",
|
|
"./packages/vue/src/*.vue"
|
|
],
|
|
"#core/*": [
|
|
"./packages/core/src/*"
|
|
],
|
|
"#fig/*": [
|
|
"./packages/fig/src/*"
|
|
],
|
|
"#cli/*": [
|
|
"./packages/cli/src/*"
|
|
],
|
|
"#mcp/*": [
|
|
"./packages/mcp/src/*"
|
|
],
|
|
"@open-pencil/harness": [
|
|
"./packages/harness/src/index.ts"
|
|
],
|
|
"#dom-css/*": [
|
|
"./packages/dom-css/src/*"
|
|
],
|
|
"#tests/*": [
|
|
"./tests/*"
|
|
],
|
|
"#docs-config/*": [
|
|
"./packages/docs/.vitepress/*"
|
|
],
|
|
"tinykeys": [
|
|
"./node_modules/tinykeys/dist/tinykeys.d.ts"
|
|
],
|
|
"@open-pencil/cli/library": [
|
|
"./packages/cli/src/library/index.ts"
|
|
],
|
|
"@open-pencil/vue": [
|
|
"./packages/vue/src/index.ts"
|
|
],
|
|
"@open-pencil/core": [
|
|
"./packages/core/src/index.ts"
|
|
],
|
|
"@open-pencil/core/*": [
|
|
"./packages/core/src/*"
|
|
],
|
|
"@open-pencil/dom-css": [
|
|
"./packages/dom-css/src/index.ts"
|
|
],
|
|
"#scene-graph/*": [
|
|
"./packages/scene-graph/src/*"
|
|
],
|
|
"@open-pencil/scene-graph": [
|
|
"./packages/scene-graph/src/index.ts"
|
|
],
|
|
"@open-pencil/scene-graph/*": [
|
|
"./packages/scene-graph/src/*"
|
|
],
|
|
"#codegen/*": [
|
|
"./packages/codegen/src/*"
|
|
],
|
|
"@open-pencil/codegen": [
|
|
"./packages/codegen/src/index.ts"
|
|
],
|
|
"#design-jsx/*": [
|
|
"./packages/design-jsx/src/*"
|
|
],
|
|
"@open-pencil/design-jsx": [
|
|
"./packages/design-jsx/src/index.ts"
|
|
],
|
|
"#pen/*": [
|
|
"./packages/pen/src/*"
|
|
],
|
|
"@open-pencil/pen": [
|
|
"./packages/pen/src/index.ts"
|
|
],
|
|
"@open-pencil/pen/*": [
|
|
"./packages/pen/src/*"
|
|
]
|
|
}
|
|
},
|
|
"include": [
|
|
"src/**/*.ts",
|
|
"src/**/*.vue",
|
|
"packages/core/src/global.d.ts",
|
|
"packages/vue/src/global.d.ts",
|
|
"packages/dom-css/src/cssom.d.ts",
|
|
"packages/dom-css/src/postcss-value-parser.d.ts",
|
|
"packages/design-jsx/src/global.d.ts"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "./tsconfig.node.json"
|
|
}
|
|
]
|
|
}
|