@rocket.chat/styled 0.34.2-rc.0 → 0.35.0-rc.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.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styled.d.ts +5 -2
- package/dist/styled.d.ts.map +1 -1
- package/package.json +12 -6
- package/dist/index.module.js +0 -2
- package/dist/index.module.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default } from './styled';
|
|
2
|
-
export * from './OwnerDocument';
|
|
1
|
+
export { default } from './styled.js';
|
|
2
|
+
export * from './OwnerDocument.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{css as t,createClassName as e,escapeName as n,transpile as s,attachRules as o}from"@rocket.chat/css-in-js";import{createContext as c,useContext as r,createElement as a,Fragment as m,useDebugValue as d,useInsertionEffect as u}from"react";const i=c({document:window.document}),l=()=>r(i),p=(t,e)=>Object.assign(Object.assign({},t),{className:t.className?`${t.className} ${e}`:e}),f=(c,r)=>(i,...f)=>{const $=t(i,...f),w="undefined"==typeof window?t=>{const o=$(t),d=e(o),u=n(d),i=s(`.${u}`,o),l=p(t,d);return a(m,{},a("style",{},i),a(c,r?r(l):l))}:t=>{const m=$(t),i=e(m);d(i);const{document:f}=l();u(()=>{const t=n(i),e=s(`.${t}`,m),c=o(e,{document:f});return()=>{setTimeout(c,1e3)}},[i,m,f]);const w=p(t,i);return a(c,r?r(w):w)};return w.displayName=`StyledComponent(${c})`,w};export{i as OwnerDocument,f as default,l as useOwnerDocument};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/OwnerDocument.ts","../src/styled.ts"],"sourcesContent":[null,null],"names":["OwnerDocument","createContext","document","window","useOwnerDocument","useContext","attachClassName","props","additionalClassName","Object","assign","className","type","filter","slices","values","cssFn","css","StyledComponent","content","computedClassName","createClassName","escapedClassName","escapeName","transpiledContent","transpile","newProps","createElement","Fragment","useDebugValue","useInsertionEffect","detach","attachRules","setTimeout","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/OwnerDocument.ts","../src/styled.ts"],"sourcesContent":[null,null],"names":["OwnerDocument","createContext","document","window","useOwnerDocument","useContext","attachClassName","props","additionalClassName","Object","assign","className","styled","type","filter","slices","values","cssFn","css","StyledComponent","content","computedClassName","createClassName","escapedClassName","escapeName","transpiledContent","transpile","newProps","createElement","Fragment","useDebugValue","useInsertionEffect","detach","attachRules","setTimeout","displayName"],"mappings":"oPAEO,MAAMA,EAAgBC,EAE1B,CAAEC,SAAUC,OAAOD,WAETE,EAAmB,IACxBC,EAAWL,GCCNM,EAAkB,CAAmCC,EAAUC,IAAmCC,OAAAC,OAAAD,OAAAC,OAAA,GAC3GH,GAAK,CACRI,UAAWJ,EAAMI,UAAY,GAAGJ,EAAMI,aAAaH,IAAwBA,IAGtEI,EACL,CAA2CC,EAASC,IACpD,CACCC,KACGC,KAEH,MAAMC,EAAQC,EAAIH,KAAWC,GAEvBG,EACa,oBAAXhB,OACHI,IACD,MAAMa,EAAUH,EAAMV,GAChBc,EAAoBC,EAAgBF,GACpCG,EAAmBC,EAAWH,GAC9BI,EAAoBC,EAAU,IAAIH,IAAoBH,GAEtDO,EAAWrB,EAAgBC,EAAOc,GAExC,OAAOO,EACNC,EACA,CAAA,EACAD,EAAc,QAAS,CAAA,EAAIH,GAC3BG,EAAcf,EAAMC,EAASA,EAAOa,GAAYA,KAGhDpB,IACD,MAAMa,EAAUH,EAAMV,GAChBc,EAAoBC,EAAgBF,GAE1CU,EAAcT,GAEd,MAAMnB,SAAEA,GAAaE,IACrB2B,EAAmB,KAClB,MAAMR,EAAmBC,EAAWH,GAC9BI,EAAoBC,EAAU,IAAIH,IAAoBH,GACtDY,EAASC,EAAYR,EAAmB,CAAEvB,aAEhD,MAAO,KACNgC,WAAWF,EAAQ,OAElB,CAACX,EAAmBD,EAASlB,IAEhC,MAAMyB,EAAWrB,EAAgBC,EAAOc,GACxC,OAAOO,EAAcf,EAAMC,EAASA,EAAOa,GAAYA,IAK3D,OAFAR,EAAgBgB,YAAc,mBAAmBtB,KAE1CM"}
|
package/dist/styled.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { JSX,
|
|
1
|
+
import type { JSX, ReactElement } from 'react';
|
|
2
|
+
type StyledComponentType<P> = ((props: P) => ReactElement) & {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
};
|
|
2
5
|
export declare const attachClassName: <P extends {
|
|
3
6
|
className?: string;
|
|
4
7
|
}>(props: P, additionalClassName: string) => P;
|
|
5
|
-
declare const styled: <K extends keyof JSX.IntrinsicElements, P>(type: K, filter?: (p: JSX.IntrinsicElements[K] & P) => JSX.IntrinsicElements[K]) => (slices: TemplateStringsArray, ...values: readonly (string | ((props: P) => string))[]) =>
|
|
8
|
+
declare const styled: <K extends keyof JSX.IntrinsicElements, P>(type: K, filter?: (p: JSX.IntrinsicElements[K] & P) => JSX.IntrinsicElements[K]) => (slices: TemplateStringsArray, ...values: readonly (string | ((props: P) => string))[]) => StyledComponentType<JSX.IntrinsicElements[K] & P>;
|
|
6
9
|
export default styled;
|
|
7
10
|
//# sourceMappingURL=styled.d.ts.map
|
package/dist/styled.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK/C,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,YAAY,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,CAAC,EAAE,qBAAqB,MAAM,KAAG,CAGxG,CAAC;AAEH,QAAA,MAAM,MAAM,GACV,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAEzH,QAAQ,oBAAoB,EAC5B,GAAG,QAAQ,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,KACrD,mBAAmB,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CA4ClD,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocket.chat/styled",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0-rc.0",
|
|
4
4
|
"description": "A simple styled API for React components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -22,10 +22,16 @@
|
|
|
22
22
|
"name": "Rocket.Chat",
|
|
23
23
|
"url": "https://rocket.chat/"
|
|
24
24
|
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"type": "module",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/index.js",
|
|
27
33
|
"source": "src/index.ts",
|
|
28
|
-
"types": "dist/index.d.ts",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
29
35
|
"files": [
|
|
30
36
|
"/dist"
|
|
31
37
|
],
|
|
@@ -38,10 +44,10 @@
|
|
|
38
44
|
"typecheck": "tsc --noEmit"
|
|
39
45
|
},
|
|
40
46
|
"dependencies": {
|
|
41
|
-
"@rocket.chat/css-in-js": "~0.
|
|
47
|
+
"@rocket.chat/css-in-js": "~0.34.0-rc.0"
|
|
42
48
|
},
|
|
43
49
|
"devDependencies": {
|
|
44
|
-
"@rocket.chat/jest-presets": "~0.0.4
|
|
50
|
+
"@rocket.chat/jest-presets": "~0.0.4",
|
|
45
51
|
"@rocket.chat/tsconfig": "~0.0.0",
|
|
46
52
|
"@rollup/plugin-commonjs": "~29.0.3",
|
|
47
53
|
"@rollup/plugin-json": "~6.1.0",
|
package/dist/index.module.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{css as t,createClassName as e,escapeName as n,transpile as s,attachRules as o}from"@rocket.chat/css-in-js";import{createContext as c,useContext as r,createElement as a,Fragment as m,useDebugValue as d,useInsertionEffect as u}from"react";const i=c({document:window.document}),l=()=>r(i),p=(t,e)=>Object.assign(Object.assign({},t),{className:t.className?`${t.className} ${e}`:e}),f=(c,r)=>(i,...f)=>{const $=t(i,...f),w="undefined"==typeof window?t=>{const o=$(t),d=e(o),u=n(d),i=s(`.${u}`,o),l=p(t,d);return a(m,{},a("style",{},i),a(c,r?r(l):l))}:t=>{const m=$(t),i=e(m);d(i);const{document:f}=l();u(()=>{const t=n(i),e=s(`.${t}`,m),c=o(e,{document:f});return()=>{setTimeout(c,1e3)}},[i,m,f]);const w=p(t,i);return a(c,r?r(w):w)};return w.displayName=`StyledComponent(${c})`,w};export{i as OwnerDocument,f as default,l as useOwnerDocument};
|
|
2
|
-
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.js","sources":["../src/OwnerDocument.ts","../src/styled.ts"],"sourcesContent":[null,null],"names":["OwnerDocument","createContext","document","window","useOwnerDocument","useContext","attachClassName","props","additionalClassName","Object","assign","className","styled","type","filter","slices","values","cssFn","css","StyledComponent","content","computedClassName","createClassName","escapedClassName","escapeName","transpiledContent","transpile","newProps","createElement","Fragment","useDebugValue","useInsertionEffect","detach","attachRules","setTimeout","displayName"],"mappings":"oPAEO,MAAMA,EAAgBC,EAE1B,CAAEC,SAAUC,OAAOD,WAETE,EAAmB,IACxBC,EAAWL,GCDNM,EAAkB,CAAmCC,EAAUC,IAAmCC,OAAAC,OAAAD,OAAAC,OAAA,GAC3GH,GAAK,CACRI,UAAWJ,EAAMI,UAAY,GAAGJ,EAAMI,aAAaH,IAAwBA,IAGtEI,EACL,CAA2CC,EAASC,IACpD,CACCC,KACGC,KAEH,MAAMC,EAAQC,EAAIH,KAAWC,GAEvBG,EACa,oBAAXhB,OACHI,IACD,MAAMa,EAAUH,EAAMV,GAChBc,EAAoBC,EAAgBF,GACpCG,EAAmBC,EAAWH,GAC9BI,EAAoBC,EAAU,IAAIH,IAAoBH,GAEtDO,EAAWrB,EAAgBC,EAAOc,GAExC,OAAOO,EACNC,EACA,CAAA,EACAD,EAAc,QAAS,CAAA,EAAIH,GAC3BG,EAAcf,EAAMC,EAASA,EAAOa,GAAYA,KAGhDpB,IACD,MAAMa,EAAUH,EAAMV,GAChBc,EAAoBC,EAAgBF,GAE1CU,EAAcT,GAEd,MAAMnB,SAAEA,GAAaE,IACrB2B,EAAmB,KAClB,MAAMR,EAAmBC,EAAWH,GAC9BI,EAAoBC,EAAU,IAAIH,IAAoBH,GACtDY,EAASC,EAAYR,EAAmB,CAAEvB,aAEhD,MAAO,KACNgC,WAAWF,EAAQ,OAElB,CAACX,EAAmBD,EAASlB,IAEhC,MAAMyB,EAAWrB,EAAgBC,EAAOc,GACxC,OAAOO,EAAcf,EAAMC,EAASA,EAAOa,GAAYA,IAK3D,OAFAR,EAAgBgB,YAAc,mBAAmBtB,KAE1CM"}
|