css is now string | CSSStyleSheet. A sheet is adopted as-is: into its own
shadow root, an enclosing shadow root, or document.adoptedStyleSheets for
light DOM at the document level. Strings behave as before.
The examples import their styles with `with { type: 'css' }` and their
static templates with `with { type: 'text' }`. Safari doesn't support those
yet, so vite.config.ts rewrites them into modules Vite builds: a constructed
CSSStyleSheet, or the file's text. npm run examples now just runs vite,
with root set in the config.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"name": "wc-mixin",
|
|
"version": "0.1.0",
|
|
"description": "Web Component Mixin",
|
|
"license": "MIT",
|
|
"author": "Buddy Sandidge",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"sideEffects": false,
|
|
"files": [
|
|
"dist",
|
|
"src",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"examples": "vite",
|
|
"build": "rm -rf dist && tsc",
|
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
"lint": "oxlint --type-aware src test examples",
|
|
"format": "oxfmt '*.md' '*.ts' 'src/**/*.ts' 'test/**/*.ts' 'examples/**/*.ts'",
|
|
"format:check": "oxfmt --check '*.md' '*.ts' 'src/**/*.ts' 'test/**/*.ts' 'examples/**/*.ts'",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"prepublishOnly": "npm run format:check && npm run lint && npm run typecheck && npm run test && npm run build"
|
|
},
|
|
"devDependencies": {
|
|
"@vitest/browser-playwright": "^5.1.0",
|
|
"oxfmt": "^0.77.0",
|
|
"oxlint": "^1.92.0",
|
|
"oxlint-tsgolint": "^7.0.2006",
|
|
"playwright": "^1.65.0",
|
|
"typescript": "^7.0.2",
|
|
"vite": "^8.3.6",
|
|
"vitest": "^5.1.0"
|
|
}
|
|
}
|