@inradius/solid-wc-css-mixin 1.0.0

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/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";const o=require("component-register"),S=n=>o.createMixin(t=>{const{element:e}=t,r=new CSSStyleSheet;return"adoptedStyleSheets"in e.renderRoot&&(r.replaceSync(n),e.renderRoot.adoptedStyleSheets=[...e.renderRoot.adoptedStyleSheets,r]),{...t,element:e}});module.exports=S;
@@ -0,0 +1,3 @@
1
+ declare const withCSS: (styles: string) => (ComponentType: import('component-register/types/utils').ComponentType<any>) => import('component-register/types/utils').ComponentType<any>;
2
+ export default withCSS;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,GAAI,QAAQ,MAAM,gJAY3B,CAAC;AAEL,eAAe,OAAO,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createMixin as S } from "component-register";
2
+ const d = (r) => S((t) => {
3
+ const { element: e } = t, o = new CSSStyleSheet();
4
+ return "adoptedStyleSheets" in e.renderRoot && (o.replaceSync(r), e.renderRoot.adoptedStyleSheets = [
5
+ ...e.renderRoot.adoptedStyleSheets,
6
+ o
7
+ ]), { ...t, element: e };
8
+ });
9
+ export {
10
+ d as default
11
+ };
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@inradius/solid-wc-css-mixin",
3
+ "author": "Travis Stroud <travis.unfasten577@travisstroud.me>",
4
+ "version": "1.0.0",
5
+ "description": "A Solid.js CSS web component mixin.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/inradius/solid-wc-utils-monorepo.git",
9
+ "directory": "packages/solid-wc-css-mixin"
10
+ },
11
+ "homepage": "https://github.com/inradius/solid-wc-utils-monorepo/tree/main/packages/solid-wc-css-mixin#readme",
12
+ "type": "module",
13
+ "main": "./dist/index.cjs",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "devDependencies": {
27
+ "@vitest/coverage-v8": "^2.1.9",
28
+ "@vitest/ui": "^2.1.0",
29
+ "jsdom": "^28.1.0",
30
+ "rimraf": "^6.0.0",
31
+ "vite": "^5.4.0",
32
+ "vite-plugin-dts": "^4.0.0",
33
+ "vitest": "^2.1.0",
34
+ "@inradius/solid-wc-utils-config": "0.0.0"
35
+ },
36
+ "peerDependencies": {
37
+ "component-register": "^0.8.8"
38
+ },
39
+ "license": "MIT",
40
+ "scripts": {
41
+ "build": "vite build",
42
+ "dev": "vite build --watch",
43
+ "clean": "rimraf dist",
44
+ "lint": "eslint src",
45
+ "lint:fix": "eslint src --fix",
46
+ "test": "vitest run --coverage",
47
+ "test:watch": "vitest"
48
+ }
49
+ }