* refactor!: generate Tailwind JSX through dom-css Core kept its own SceneGraph → Tailwind mapper next to the one dom-css uses for Tailwind HTML, and the two drifted: HTML export turned grid frames into flex columns and dropped rotation, inner shadows, blur, and flex grow, while Tailwind JSX had them. Tailwind JSX is now printed by dom-css from the same CSS projection as HTML export, with esrap building the JSX and string literals carrying text or attributes that JSX would otherwise reinterpret. The projection gains grid layout and placement, rotation, every shadow, layer and background blur, flex grow, right-to-left direction, and sections, and writes opaque colors as hex so Tailwind can match its palette. BREAKING CHANGE: `sceneNodeToJSX` and `selectionToJSX` in `@open-pencil/core` no longer accept a format, and `JSXFormat` and `JSXExportOptions` are removed. Use `sceneNodesToTailwindJSX` from `@open-pencil/dom-css` or `@open-pencil/dom-css/browser`. * fix(dom-css): keep backslashes and line breaks in Tailwind JSX attributes JSX attribute strings keep backslashes literally, but the printer escapes backslashes and line breaks in string literals, so a layer named `a\b` came back as `a\\b`. Such values are now written as expression containers, like values containing quotes or `&`.
82 lines
2 KiB
JSON
82 lines
2 KiB
JSON
{
|
|
"name": "@open-pencil/dom-css",
|
|
"version": "0.15.1",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"imports": {
|
|
"#dom-css/*": {
|
|
"types": "./src/*",
|
|
"bun": "./src/*",
|
|
"default": "./dist/*"
|
|
}
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"bun": "./src/index.ts",
|
|
"import": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./browser": {
|
|
"types": "./dist/browser.d.ts",
|
|
"bun": "./src/browser.ts",
|
|
"import": "./dist/browser.js",
|
|
"default": "./dist/browser.js"
|
|
},
|
|
"./jsx-runtime": {
|
|
"types": "./dist/jsx-runtime.d.ts",
|
|
"bun": "./src/jsx/runtime.ts",
|
|
"import": "./dist/jsx-runtime.js",
|
|
"default": "./dist/jsx-runtime.js"
|
|
},
|
|
"./jsx-dev-runtime": {
|
|
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
"bun": "./src/jsx/dev-runtime.ts",
|
|
"import": "./dist/jsx-dev-runtime.js",
|
|
"default": "./dist/jsx-dev-runtime.js"
|
|
}
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"sideEffects": false,
|
|
"files": [
|
|
"dist",
|
|
"src",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"build": "bunx tsdown --config tsdown.config.ts",
|
|
"check": "bun run typecheck && bun run test && bun run build && bun run smoke:dist",
|
|
"prepack": "bun run build",
|
|
"smoke:dist": "bun scripts/smoke-dist.ts",
|
|
"test": "bun test tests",
|
|
"typecheck": "bunx tsc --noEmit -p tsconfig.test.json"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/open-pencil/open-pencil.git",
|
|
"directory": "packages/dom-css"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"peerDependencies": {
|
|
"@open-pencil/core": "workspace:*",
|
|
"@open-pencil/scene-graph": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.14",
|
|
"tsdown": "^0.22.14",
|
|
"typescript": "~5.8.3"
|
|
},
|
|
"dependencies": {
|
|
"@acemir/cssom": "^0.9.31",
|
|
"esrap": "^2.3.11",
|
|
"parse5": "^8.0.1",
|
|
"postcss-value-parser": "^4.2.0",
|
|
"tailwindcss": "^4.3.3",
|
|
"twirlwind": "^0.3.0"
|
|
}
|
|
}
|