react-minolith 1.0.14 → 1.0.16
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/README.md +2 -2
- package/dist/base/Minolith/Minolith.d.ts.map +1 -1
- package/dist/base/Minolith/Minolith.js +24 -18
- package/dist/base/Minolith/Minolith.js.map +1 -1
- package/dist/base/MinolithStatic/MinolithStatic.d.ts.map +1 -1
- package/dist/base/MinolithStatic/MinolithStatic.js +23 -15
- package/dist/base/MinolithStatic/MinolithStatic.js.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ react-minolith is an open-source react wrapper for [minolith](https://github.com
|
|
|
12
12
|
|
|
13
13
|
## ⚠️Breaking Changes version 1.0
|
|
14
14
|
|
|
15
|
-
`react-minolith` now have
|
|
15
|
+
`react-minolith` now have `@emotion/react` as dependencies.
|
|
16
16
|
|
|
17
17
|
```shell
|
|
18
18
|
npm install @emotion/react
|
|
@@ -21,7 +21,7 @@ npm install @emotion/react
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
23
|
```shell
|
|
24
|
-
npm install react-minolith @emotion/react
|
|
24
|
+
npm install react-minolith @emotion/react
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Getting Started
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Minolith.d.ts","sourceRoot":"","sources":["../../../src/base/Minolith/Minolith.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Minolith.d.ts","sourceRoot":"","sources":["../../../src/base/Minolith/Minolith.tsx"],"names":[],"mappings":"AAKA,OAAO,iBAAiB,CAAC;AACzB,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CAgDzE"}
|
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import m from "../../utilities/minolithStyleUtility/minolithStyleUtility.js";
|
|
5
|
-
import a from "../Tabula/Tabula.js";
|
|
2
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { useMemo as u, useInsertionEffect as a } from "react";
|
|
6
4
|
import d from "../../contexts/MinolithColorSchemeContext/MinolithColorSchemeContext.js";
|
|
7
|
-
import
|
|
8
|
-
|
|
5
|
+
import y from "../../utilities/minolithStyleUtility/minolithStyleUtility.js";
|
|
6
|
+
import S from "../Tabula/Tabula.js";
|
|
7
|
+
import '../../assets/Minolith.css';function p(i) {
|
|
8
|
+
const e = { ...i };
|
|
9
9
|
delete e.cssVariableSetting;
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
12
|
-
|
|
10
|
+
const l = u(
|
|
11
|
+
() => y.getMinolithCssVariableStyles(
|
|
12
|
+
i.cssVariableSetting
|
|
13
13
|
),
|
|
14
|
-
[
|
|
14
|
+
[i.cssVariableSetting]
|
|
15
15
|
);
|
|
16
|
-
return
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
return a(() => {
|
|
17
|
+
const o = "minolith-custom-css-variables", c = () => {
|
|
18
|
+
const t = document.createElement("style");
|
|
19
|
+
return t.id = o, t.textContent = l.join(), t;
|
|
20
|
+
}, n = (t) => {
|
|
21
|
+
const r = t.querySelector(`#${o}`);
|
|
22
|
+
r && t.removeChild(r);
|
|
23
|
+
const m = c();
|
|
24
|
+
t.append(m);
|
|
25
|
+
};
|
|
26
|
+
document.querySelector(`#${o}`) === null && (n(document.head), document.querySelector(`#${o}`) === null && n(document.body));
|
|
27
|
+
}, [l]), /* @__PURE__ */ s(
|
|
22
28
|
d.Provider,
|
|
23
29
|
{
|
|
24
30
|
value: e.colorScheme ? e.colorScheme : "light",
|
|
25
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ s(S, { ...e })
|
|
26
32
|
}
|
|
27
33
|
);
|
|
28
34
|
}
|
|
29
35
|
export {
|
|
30
|
-
|
|
36
|
+
p as default
|
|
31
37
|
};
|
|
32
38
|
//# sourceMappingURL=Minolith.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Minolith.js","sources":["../../../src/base/Minolith/Minolith.tsx"],"sourcesContent":["\"use client\";\r\nimport { useInsertionEffect, useMemo } from \"react\";\r\nimport minolithStyleUtility from \"../../utilities/minolithStyleUtility\";\r\nimport Tabula from \"../Tabula\";\r\nimport \"./Minolith.scss\";\r\nimport MinolithProps from \"./MinolithProps\";\r\
|
|
1
|
+
{"version":3,"file":"Minolith.js","sources":["../../../src/base/Minolith/Minolith.tsx"],"sourcesContent":["\"use client\";\r\nimport { useInsertionEffect, useMemo } from \"react\";\r\nimport { MinolithColorSchemeContext } from \"../../contexts\";\r\nimport minolithStyleUtility from \"../../utilities/minolithStyleUtility\";\r\nimport Tabula from \"../Tabula\";\r\nimport \"./Minolith.scss\";\r\nimport MinolithProps from \"./MinolithProps\";\r\n\r\nexport default function Minolith(props: MinolithProps): React.ReactElement {\r\n const assignedProps = { ...props };\r\n delete assignedProps[\"cssVariableSetting\"];\r\n\r\n const minolithStyles = useMemo(\r\n () =>\r\n minolithStyleUtility.getMinolithCssVariableStyles(\r\n props.cssVariableSetting\r\n ),\r\n [props.cssVariableSetting]\r\n );\r\n\r\n useInsertionEffect(() => {\r\n const styleId = \"minolith-custom-css-variables\";\r\n\r\n const createMinolithCustomStyleElement = () => {\r\n const style = document.createElement(\"style\");\r\n style.id = styleId;\r\n style.textContent = minolithStyles.join();\r\n return style;\r\n };\r\n\r\n const setStyle = (element: HTMLElement) => {\r\n const currentCustomStyle = element.querySelector(`#${styleId}`);\r\n if (currentCustomStyle) {\r\n element.removeChild(currentCustomStyle);\r\n }\r\n\r\n const style = createMinolithCustomStyleElement();\r\n element.append(style);\r\n };\r\n\r\n if (document.querySelector(`#${styleId}`) === null) {\r\n setStyle(document.head);\r\n\r\n if (document.querySelector(`#${styleId}`) === null) {\r\n setStyle(document.body);\r\n }\r\n }\r\n }, [minolithStyles]);\r\n\r\n return (\r\n <MinolithColorSchemeContext.Provider\r\n value={assignedProps.colorScheme ? assignedProps.colorScheme : \"light\"}\r\n >\r\n <Tabula {...assignedProps} />\r\n </MinolithColorSchemeContext.Provider>\r\n );\r\n}\r\n"],"names":["Minolith","props","assignedProps","minolithStyles","useMemo","minolithStyleUtility","useInsertionEffect","styleId","createMinolithCustomStyleElement","style","setStyle","element","currentCustomStyle","jsx","MinolithColorSchemeContext","Tabula"],"mappings":";;;;;;AAQA,SAAwBA,EAASC,GAA0C;AACnE,QAAAC,IAAgB,EAAE,GAAGD,EAAM;AACjC,SAAOC,EAAc;AAErB,QAAMC,IAAiBC;AAAA,IACrB,MACEC,EAAqB;AAAA,MACnBJ,EAAM;AAAA,IACR;AAAA,IACF,CAACA,EAAM,kBAAkB;AAAA,EAC3B;AAEA,SAAAK,EAAmB,MAAM;AACvB,UAAMC,IAAU,iCAEVC,IAAmC,MAAM;AACvC,YAAAC,IAAQ,SAAS,cAAc,OAAO;AAC5C,aAAAA,EAAM,KAAKF,GACLE,EAAA,cAAcN,EAAe,KAAK,GACjCM;AAAA,IACT,GAEMC,IAAW,CAACC,MAAyB;AACzC,YAAMC,IAAqBD,EAAQ,cAAc,IAAIJ,CAAO,EAAE;AAC9D,MAAIK,KACFD,EAAQ,YAAYC,CAAkB;AAGxC,YAAMH,IAAQD,EAAiC;AAC/C,MAAAG,EAAQ,OAAOF,CAAK;AAAA,IACtB;AAEA,IAAI,SAAS,cAAc,IAAIF,CAAO,EAAE,MAAM,SAC5CG,EAAS,SAAS,IAAI,GAElB,SAAS,cAAc,IAAIH,CAAO,EAAE,MAAM,QAC5CG,EAAS,SAAS,IAAI;AAAA,EAE1B,GACC,CAACP,CAAc,CAAC,GAGjB,gBAAAU;AAAA,IAACC,EAA2B;AAAA,IAA3B;AAAA,MACC,OAAOZ,EAAc,cAAcA,EAAc,cAAc;AAAA,MAE/D,UAAA,gBAAAW,EAACE,GAAQ,EAAA,GAAGb,EAAe,CAAA;AAAA,IAAA;AAAA,EAC7B;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinolithStatic.d.ts","sourceRoot":"","sources":["../../../src/base/MinolithStatic/MinolithStatic.tsx"],"names":[],"mappings":"AAIA,OAAO,uBAAuB,CAAC;AAC/B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,sCAAsC;AACtC,MAAM,CAAC,OAAO,UAAU,cAAc,
|
|
1
|
+
{"version":3,"file":"MinolithStatic.d.ts","sourceRoot":"","sources":["../../../src/base/MinolithStatic/MinolithStatic.tsx"],"names":[],"mappings":"AAIA,OAAO,uBAAuB,CAAC;AAC/B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,sCAAsC;AACtC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,KAAK,EAAE,mBAAmB,GACzB,KAAK,CAAC,YAAY,CA0CpB"}
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import '../../assets/Minolith.css';function
|
|
7
|
-
const i = { ...
|
|
2
|
+
import { jsx as u } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { useMemo as m, useInsertionEffect as a } from "react";
|
|
4
|
+
import y from "../../utilities/minolithStyleUtility/minolithStyleUtility.js";
|
|
5
|
+
import d from "../Tabula/Tabula.js";
|
|
6
|
+
import '../../assets/Minolith.css';function g(o) {
|
|
7
|
+
const i = { ...o };
|
|
8
8
|
delete i.cssVariableSetting;
|
|
9
|
-
const n =
|
|
10
|
-
() =>
|
|
11
|
-
|
|
9
|
+
const n = m(
|
|
10
|
+
() => y.getMinolithCssVariableStyles(
|
|
11
|
+
o.cssVariableSetting
|
|
12
|
+
),
|
|
13
|
+
[o.cssVariableSetting]
|
|
12
14
|
);
|
|
13
15
|
return a(() => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const e = "minolith-custom-css-variables", r = () => {
|
|
17
|
+
const t = document.createElement("style");
|
|
18
|
+
return t.id = e, t.textContent = n.join(), t;
|
|
19
|
+
}, s = (t) => {
|
|
20
|
+
const l = t.querySelector(`#${e}`);
|
|
21
|
+
l && t.removeChild(l);
|
|
22
|
+
const c = r();
|
|
23
|
+
t.append(c);
|
|
24
|
+
};
|
|
25
|
+
document.querySelector(`#${e}`) === null && (s(document.head), document.querySelector(`#${e}`) === null && s(document.body));
|
|
26
|
+
}, [n]), /* @__PURE__ */ u(d, { ...i });
|
|
19
27
|
}
|
|
20
28
|
export {
|
|
21
|
-
|
|
29
|
+
g as default
|
|
22
30
|
};
|
|
23
31
|
//# sourceMappingURL=MinolithStatic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinolithStatic.js","sources":["../../../src/base/MinolithStatic/MinolithStatic.tsx"],"sourcesContent":["\"use client\";\r\nimport { useInsertionEffect, useMemo } from \"react\";\r\nimport minolithStyleUtility from \"../../utilities/minolithStyleUtility\";\r\nimport Tabula from \"../Tabula\";\r\nimport \"./MinolithStatic.scss\";\r\nimport MinolithStaticProps from \"./MinolithStaticProps\";\r\n\r\n/** @deprecated please use Minolith */\r\nexport default function MinolithStatic(props: MinolithStaticProps): React.ReactElement {\r\n const assignedProps = { ...props };\r\n delete assignedProps[\"cssVariableSetting\"];\r\n\r\n const minolithStyles = useMemo(\r\n () =>\r\n minolithStyleUtility.getMinolithCssVariableStyles(props.cssVariableSetting),\r\n [props.cssVariableSetting]\r\n );\r\n\r\n useInsertionEffect(() => {\r\n const styleId = \"minolith-custom-css-variables\";\r\n\r\n const
|
|
1
|
+
{"version":3,"file":"MinolithStatic.js","sources":["../../../src/base/MinolithStatic/MinolithStatic.tsx"],"sourcesContent":["\"use client\";\r\nimport { useInsertionEffect, useMemo } from \"react\";\r\nimport minolithStyleUtility from \"../../utilities/minolithStyleUtility\";\r\nimport Tabula from \"../Tabula\";\r\nimport \"./MinolithStatic.scss\";\r\nimport MinolithStaticProps from \"./MinolithStaticProps\";\r\n\r\n/** @deprecated please use Minolith */\r\nexport default function MinolithStatic(\r\n props: MinolithStaticProps\r\n): React.ReactElement {\r\n const assignedProps = { ...props };\r\n delete assignedProps[\"cssVariableSetting\"];\r\n\r\n const minolithStyles = useMemo(\r\n () =>\r\n minolithStyleUtility.getMinolithCssVariableStyles(\r\n props.cssVariableSetting\r\n ),\r\n [props.cssVariableSetting]\r\n );\r\n\r\n useInsertionEffect(() => {\r\n const styleId = \"minolith-custom-css-variables\";\r\n\r\n const createMinolithCustomStyleElement = () => {\r\n const style = document.createElement(\"style\");\r\n style.id = styleId;\r\n style.textContent = minolithStyles.join();\r\n return style;\r\n };\r\n\r\n const setStyle = (element: HTMLElement) => {\r\n const currentCustomStyle = element.querySelector(`#${styleId}`);\r\n if (currentCustomStyle) {\r\n element.removeChild(currentCustomStyle);\r\n }\r\n\r\n const style = createMinolithCustomStyleElement();\r\n element.append(style);\r\n };\r\n\r\n if (document.querySelector(`#${styleId}`) === null) {\r\n setStyle(document.head);\r\n\r\n if (document.querySelector(`#${styleId}`) === null) {\r\n setStyle(document.body);\r\n }\r\n }\r\n }, [minolithStyles]);\r\n\r\n return <Tabula {...assignedProps} />;\r\n}\r\n"],"names":["MinolithStatic","props","assignedProps","minolithStyles","useMemo","minolithStyleUtility","useInsertionEffect","styleId","createMinolithCustomStyleElement","style","setStyle","element","currentCustomStyle","jsx","Tabula"],"mappings":";;;;;AAQA,SAAwBA,EACtBC,GACoB;AACd,QAAAC,IAAgB,EAAE,GAAGD,EAAM;AACjC,SAAOC,EAAc;AAErB,QAAMC,IAAiBC;AAAA,IACrB,MACEC,EAAqB;AAAA,MACnBJ,EAAM;AAAA,IACR;AAAA,IACF,CAACA,EAAM,kBAAkB;AAAA,EAC3B;AAEA,SAAAK,EAAmB,MAAM;AACvB,UAAMC,IAAU,iCAEVC,IAAmC,MAAM;AACvC,YAAAC,IAAQ,SAAS,cAAc,OAAO;AAC5C,aAAAA,EAAM,KAAKF,GACLE,EAAA,cAAcN,EAAe,KAAK,GACjCM;AAAA,IACT,GAEMC,IAAW,CAACC,MAAyB;AACzC,YAAMC,IAAqBD,EAAQ,cAAc,IAAIJ,CAAO,EAAE;AAC9D,MAAIK,KACFD,EAAQ,YAAYC,CAAkB;AAGxC,YAAMH,IAAQD,EAAiC;AAC/C,MAAAG,EAAQ,OAAOF,CAAK;AAAA,IACtB;AAEA,IAAI,SAAS,cAAc,IAAIF,CAAO,EAAE,MAAM,SAC5CG,EAAS,SAAS,IAAI,GAElB,SAAS,cAAc,IAAIH,CAAO,EAAE,MAAM,QAC5CG,EAAS,SAAS,IAAI;AAAA,EAE1B,GACC,CAACP,CAAc,CAAC,GAEZ,gBAAAU,EAACC,GAAQ,EAAA,GAAGZ,EAAe,CAAA;AACpC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-minolith",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "react-minolith is an open-source react wrapper for minolith.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/react-minolith.js",
|
|
@@ -350,6 +350,9 @@
|
|
|
350
350
|
"optional": true
|
|
351
351
|
}
|
|
352
352
|
},
|
|
353
|
+
"optionalDependencies": {
|
|
354
|
+
"@rollup/rollup-linux-x64-gnu": "4.44.2"
|
|
355
|
+
},
|
|
353
356
|
"devDependencies": {
|
|
354
357
|
"@emotion/babel-preset-css-prop": "^11.12.0",
|
|
355
358
|
"@emotion/react": "^11.14.0",
|