@plasmicpkgs/plasmic-embed-css 0.1.19 → 0.1.22
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 +1 -1
- package/dist/plasmic-embed-css.cjs.development.js +5 -0
- package/dist/plasmic-embed-css.cjs.development.js.map +1 -1
- package/dist/plasmic-embed-css.cjs.production.min.js +1 -1
- package/dist/plasmic-embed-css.cjs.production.min.js.map +1 -1
- package/dist/plasmic-embed-css.esm.js +5 -0
- package/dist/plasmic-embed-css.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import registerGlobalContext, { GlobalContextMeta } from "@plasmicapp/host/registerGlobalContext";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export interface EmbedCssProps {
|
|
4
|
-
css
|
|
4
|
+
css?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function EmbedCss({ css, children, }: React.PropsWithChildren<EmbedCssProps>): JSX.Element;
|
|
7
7
|
export declare const embedCssMeta: GlobalContextMeta<EmbedCssProps>;
|
|
@@ -10,6 +10,11 @@ var React = _interopDefault(require('react'));
|
|
|
10
10
|
function EmbedCss(_ref) {
|
|
11
11
|
var css = _ref.css,
|
|
12
12
|
children = _ref.children;
|
|
13
|
+
|
|
14
|
+
if (!css) {
|
|
15
|
+
return React.createElement(React.Fragment, null, children);
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
return React.createElement(React.Fragment, null, React.createElement("style", {
|
|
14
19
|
dangerouslySetInnerHTML: {
|
|
15
20
|
__html: css
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plasmic-embed-css.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerGlobalContext, {\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css
|
|
1
|
+
{"version":3,"file":"plasmic-embed-css.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerGlobalContext, {\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css?: string;\n}\n\nexport function EmbedCss({\n css,\n children,\n}: React.PropsWithChildren<EmbedCssProps>) {\n if (!css) {\n return <>{children}</>;\n }\n return (\n <>\n <style dangerouslySetInnerHTML={{ __html: css }} /> {children}\n </>\n );\n}\n\nexport const embedCssMeta: GlobalContextMeta<EmbedCssProps> = {\n name: \"global-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-embed-css\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerGlobalContext: typeof registerGlobalContext },\n customEmbedCssMeta?: GlobalContextMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerGlobalContext(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerGlobalContext(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["EmbedCss","css","children","React","dangerouslySetInnerHTML","__html","embedCssMeta","name","displayName","importName","importPath","props","type","lang","defaultValueHint","description","registerEmbedCss","loader","customEmbedCssMeta","registerGlobalContext"],"mappings":";;;;;;;;;SASgBA;MACdC,WAAAA;MACAC,gBAAAA;;AAEA,MAAI,CAACD,GAAL,EAAU;AACR,WAAOE,mBAAA,eAAA,MAAA,EAAGD,QAAH,CAAP;AACD;;AACD,SACEC,mBAAA,eAAA,MAAA,EACEA,mBAAA,QAAA;AAAOC,IAAAA,uBAAuB,EAAE;AAAEC,MAAAA,MAAM,EAAEJ;AAAV;GAAhC,CADF,KAAA,EACuDC,QADvD,CADF;AAKD;IAEYI,YAAY,GAAqC;AAC5DC,EAAAA,IAAI,EAAE,kBADsD;AAE5DC,EAAAA,WAAW,EAAE,WAF+C;AAG5DC,EAAAA,UAAU,EAAE,UAHgD;AAI5DC,EAAAA,UAAU,EAAE,gCAJgD;AAK5DC,EAAAA,KAAK,EAAE;AACLV,IAAAA,GAAG,EAAE;AACHW,MAAAA,IAAI,EAAE,MADH;AAEHC,MAAAA,IAAI,EAAE,KAFH;AAGHC,MAAAA,gBAAgB,EAAE,mBAHf;AAIHC,MAAAA,WAAW,EAAE;AAJV;AADA;AALqD;SAe9CC,iBACdC,QACAC;AAEA,MAAID,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,qBAAP,CAA6BnB,QAA7B,EAAuCkB,kBAAvC,WAAuCA,kBAAvC,GAA6DZ,YAA7D;AACD,GAFD,MAEO;AACLa,IAAAA,qBAAqB,CAACnB,QAAD,EAAWkB,kBAAX,WAAWA,kBAAX,GAAiCZ,YAAjC,CAArB;AACD;AACF;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerGlobalContext")),s=e(require("react"));function r(e){var t=e.children;return s.createElement(s.Fragment,null,s.createElement("style",{dangerouslySetInnerHTML:{__html:
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerGlobalContext")),s=e(require("react"));function r(e){var t=e.css,r=e.children;return t?s.createElement(s.Fragment,null,s.createElement("style",{dangerouslySetInnerHTML:{__html:t}})," ",r):s.createElement(s.Fragment,null,r)}var l={name:"global-embed-css",displayName:"Embed Css",importName:"EmbedCss",importPath:"@plasmicpkgs/plasmic-embed-css",props:{css:{type:"code",lang:"css",defaultValueHint:"/* CSS snippet */",description:"CSS rules to be inserted"}}};exports.EmbedCss=r,exports.embedCssMeta=l,exports.registerEmbedCss=function(e,s){e?e.registerGlobalContext(r,null!=s?s:l):t(r,null!=s?s:l)};
|
|
2
2
|
//# sourceMappingURL=plasmic-embed-css.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plasmic-embed-css.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerGlobalContext, {\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css
|
|
1
|
+
{"version":3,"file":"plasmic-embed-css.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerGlobalContext, {\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css?: string;\n}\n\nexport function EmbedCss({\n css,\n children,\n}: React.PropsWithChildren<EmbedCssProps>) {\n if (!css) {\n return <>{children}</>;\n }\n return (\n <>\n <style dangerouslySetInnerHTML={{ __html: css }} /> {children}\n </>\n );\n}\n\nexport const embedCssMeta: GlobalContextMeta<EmbedCssProps> = {\n name: \"global-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-embed-css\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerGlobalContext: typeof registerGlobalContext },\n customEmbedCssMeta?: GlobalContextMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerGlobalContext(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerGlobalContext(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["EmbedCss","css","children","React","dangerouslySetInnerHTML","__html","embedCssMeta","name","displayName","importName","importPath","props","type","lang","defaultValueHint","description","loader","customEmbedCssMeta","registerGlobalContext"],"mappings":"oOASgBA,SACdC,IAAAA,IACAC,IAAAA,gBAEKD,EAIHE,gCACEA,yBAAOC,wBAAyB,CAAEC,OAAQJ,SAAWC,GAJhDC,gCAAGD,OASDI,EAAiD,CAC5DC,KAAM,mBACNC,YAAa,YACbC,WAAY,WACZC,WAAY,iCACZC,MAAO,CACLV,IAAK,CACHW,KAAM,OACNC,KAAM,MACNC,iBAAkB,oBAClBC,YAAa,0GAMjBC,EACAC,GAEID,EACFA,EAAOE,sBAAsBlB,QAAUiB,EAAAA,EAAsBX,GAE7DY,EAAsBlB,QAAUiB,EAAAA,EAAsBX"}
|
|
@@ -4,6 +4,11 @@ import React from 'react';
|
|
|
4
4
|
function EmbedCss(_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
children = _ref.children;
|
|
7
|
+
|
|
8
|
+
if (!css) {
|
|
9
|
+
return React.createElement(React.Fragment, null, children);
|
|
10
|
+
}
|
|
11
|
+
|
|
7
12
|
return React.createElement(React.Fragment, null, React.createElement("style", {
|
|
8
13
|
dangerouslySetInnerHTML: {
|
|
9
14
|
__html: css
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plasmic-embed-css.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerGlobalContext, {\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css
|
|
1
|
+
{"version":3,"file":"plasmic-embed-css.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerGlobalContext, {\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css?: string;\n}\n\nexport function EmbedCss({\n css,\n children,\n}: React.PropsWithChildren<EmbedCssProps>) {\n if (!css) {\n return <>{children}</>;\n }\n return (\n <>\n <style dangerouslySetInnerHTML={{ __html: css }} /> {children}\n </>\n );\n}\n\nexport const embedCssMeta: GlobalContextMeta<EmbedCssProps> = {\n name: \"global-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-embed-css\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerGlobalContext: typeof registerGlobalContext },\n customEmbedCssMeta?: GlobalContextMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerGlobalContext(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerGlobalContext(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["EmbedCss","css","children","React","dangerouslySetInnerHTML","__html","embedCssMeta","name","displayName","importName","importPath","props","type","lang","defaultValueHint","description","registerEmbedCss","loader","customEmbedCssMeta","registerGlobalContext"],"mappings":";;;SASgBA;MACdC,WAAAA;MACAC,gBAAAA;;AAEA,MAAI,CAACD,GAAL,EAAU;AACR,WAAOE,mBAAA,eAAA,MAAA,EAAGD,QAAH,CAAP;AACD;;AACD,SACEC,mBAAA,eAAA,MAAA,EACEA,mBAAA,QAAA;AAAOC,IAAAA,uBAAuB,EAAE;AAAEC,MAAAA,MAAM,EAAEJ;AAAV;GAAhC,CADF,KAAA,EACuDC,QADvD,CADF;AAKD;IAEYI,YAAY,GAAqC;AAC5DC,EAAAA,IAAI,EAAE,kBADsD;AAE5DC,EAAAA,WAAW,EAAE,WAF+C;AAG5DC,EAAAA,UAAU,EAAE,UAHgD;AAI5DC,EAAAA,UAAU,EAAE,gCAJgD;AAK5DC,EAAAA,KAAK,EAAE;AACLV,IAAAA,GAAG,EAAE;AACHW,MAAAA,IAAI,EAAE,MADH;AAEHC,MAAAA,IAAI,EAAE,KAFH;AAGHC,MAAAA,gBAAgB,EAAE,mBAHf;AAIHC,MAAAA,WAAW,EAAE;AAJV;AADA;AALqD;SAe9CC,iBACdC,QACAC;AAEA,MAAID,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,qBAAP,CAA6BnB,QAA7B,EAAuCkB,kBAAvC,WAAuCA,kBAAvC,GAA6DZ,YAA7D;AACD,GAFD,MAEO;AACLa,IAAAA,qBAAqB,CAACnB,QAAD,EAAWkB,kBAAX,WAAWA,kBAAX,GAAiCZ,YAAjC,CAArB;AACD;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/plasmic-embed-css",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Plasmic embed css code components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"analyze": "size-limit --why"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@plasmicapp/host": "1.0.
|
|
31
|
+
"@plasmicapp/host": "1.0.38",
|
|
32
32
|
"@size-limit/preset-small-lib": "^7.0.8",
|
|
33
33
|
"@types/node": "^17.0.14",
|
|
34
34
|
"size-limit": "^7.0.8",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"react": ">=16.8.0",
|
|
42
42
|
"react-dom": ">=16.8.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "ea0c85f1b7d88855d71907270cb3922527d34bd9"
|
|
45
45
|
}
|