@plitzi/sdk-style 0.31.0 → 0.31.2
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/CHANGELOG.md +20 -0
- package/dist/BuilderStyleContextProvider.mjs +1 -1
- package/dist/SdkStyleContextProvider.mjs +1 -1
- package/dist/StyleAdvanceEditor.mjs +1 -1
- package/dist/components/StyleInspector/StyleInspector.mjs +1 -1
- package/dist/components/StyleInspector/StyleInspectorProvider.mjs +1 -1
- package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +1 -1
- package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +3 -3
- package/dist/components/StyleManager/StyleManager.mjs +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @plitzi/sdk-style
|
|
2
2
|
|
|
3
|
+
## 0.31.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- v0.31.2
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @plitzi/sdk-plugins@0.31.2
|
|
10
|
+
- @plitzi/sdk-shared@0.31.2
|
|
11
|
+
- @plitzi/sdk-variables@0.31.2
|
|
12
|
+
|
|
13
|
+
## 0.31.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- v0.31.1
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @plitzi/sdk-plugins@0.31.1
|
|
20
|
+
- @plitzi/sdk-shared@0.31.1
|
|
21
|
+
- @plitzi/sdk-variables@0.31.1
|
|
22
|
+
|
|
3
23
|
## 0.31.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -4,7 +4,7 @@ import n, { StyleActions as r } from "./StyleReducer.mjs";
|
|
|
4
4
|
import { get as i } from "@plitzi/plitzi-ui/helpers";
|
|
5
5
|
import { use as a, useCallback as o, useEffect as s, useMemo as c } from "react";
|
|
6
6
|
import { jsx as l } from "react/jsx-runtime";
|
|
7
|
-
import { createStoreHook as u } from "@plitzi/
|
|
7
|
+
import { createStoreHook as u } from "@plitzi/nexus/createStore";
|
|
8
8
|
import d from "@plitzi/plitzi-ui/hooks/useReducerWithMiddleware";
|
|
9
9
|
import f from "@plitzi/sdk-event-bridge/hooks/useEventBridge";
|
|
10
10
|
import p from "@plitzi/sdk-shared/network/NetworkContext";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./StyleContext.mjs";
|
|
2
2
|
import { use as t, useMemo as n } from "react";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
import { createStoreHook as i } from "@plitzi/
|
|
4
|
+
import { createStoreHook as i } from "@plitzi/nexus/createStore";
|
|
5
5
|
import { EMPTY_STYLE_SCHEMA as a } from "@plitzi/sdk-shared/style/styleConstants";
|
|
6
6
|
import o from "@plitzi/sdk-shared/network/NetworkInternalContext";
|
|
7
7
|
//#region src/SdkStyleContextProvider.tsx
|
|
@@ -3,7 +3,7 @@ import { use as n, useCallback as r, useMemo as i, useState as a } from "react";
|
|
|
3
3
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
4
|
import c from "@plitzi/plitzi-ui/ContainerFloating";
|
|
5
5
|
import l from "@plitzi/plitzi-ui/Button";
|
|
6
|
-
import { createStoreHook as u } from "@plitzi/
|
|
6
|
+
import { createStoreHook as u } from "@plitzi/nexus/createStore";
|
|
7
7
|
import d from "@plitzi/plitzi-ui/CodeMirror";
|
|
8
8
|
import { ThemeContext as f } from "@plitzi/sdk-shared/theme/ThemeProvider";
|
|
9
9
|
import p from "@plitzi/sdk-shared/network/NetworkContext";
|
|
@@ -4,7 +4,7 @@ import { get as n, pick as r, set as i } from "@plitzi/plitzi-ui/helpers";
|
|
|
4
4
|
import { clsx as a } from "clsx";
|
|
5
5
|
import { use as o, useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
|
|
6
6
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
-
import { createStoreHook as p } from "@plitzi/
|
|
7
|
+
import { createStoreHook as p } from "@plitzi/nexus/createStore";
|
|
8
8
|
import { produce as m } from "immer";
|
|
9
9
|
import h from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
|
|
10
10
|
import g from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
|
|
@@ -4,7 +4,7 @@ import { get as n, omit as r } from "@plitzi/plitzi-ui/helpers";
|
|
|
4
4
|
import { useCallback as i, useMemo as a } from "react";
|
|
5
5
|
import { jsx as o } from "react/jsx-runtime";
|
|
6
6
|
import { emptyObject as s } from "@plitzi/sdk-shared/helpers/utils";
|
|
7
|
-
import { createStoreHook as c } from "@plitzi/
|
|
7
|
+
import { createStoreHook as c } from "@plitzi/nexus/createStore";
|
|
8
8
|
import { baseDefaultValue as l } from "@plitzi/sdk-shared";
|
|
9
9
|
//#region src/components/StyleInspector/StyleInspectorProvider.tsx
|
|
10
10
|
var u = ({ children: u, componentType: d, selector: f, styleSelector: p = "base", styleState: m, styleVariant: h, element: g, inheritData: _, displayMode: v, onChange: y }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { get as e, set as t } from "@plitzi/plitzi-ui/helpers";
|
|
2
2
|
import { useMemo as n } from "react";
|
|
3
3
|
import { emptyObject as r } from "@plitzi/sdk-shared/helpers/utils";
|
|
4
|
-
import { createStoreHook as i } from "@plitzi/
|
|
4
|
+
import { createStoreHook as i } from "@plitzi/nexus/createStore";
|
|
5
5
|
//#region src/components/StyleInspector/hooks/useStyleBinding.ts
|
|
6
6
|
var a = ({ element: a }) => {
|
|
7
7
|
let { useStore: o } = i(), [s] = o("runtime.sources", { defaultValue: r });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e from "../../../helpers/calculateInheriting.mjs";
|
|
2
2
|
import { use as t, useMemo as n } from "react";
|
|
3
|
-
import r from "@plitzi/
|
|
4
|
-
import
|
|
3
|
+
import { createStoreHook as r } from "@plitzi/nexus/createStore";
|
|
4
|
+
import i from "@plitzi/sdk-shared/elements/ComponentContext";
|
|
5
5
|
//#region src/components/StyleInspector/hooks/useStyleInherit.ts
|
|
6
6
|
var a = ({ element: a, componentType: o, componentSubType: s, selector: c, styleSelector: l = "base", styleState: u, styleVariant: d }) => {
|
|
7
|
-
let { useStore: f } =
|
|
7
|
+
let { useStore: f } = r(), [[p, m]] = f(["schema.flat", "style.platform"]), { componentDefinitions: h } = t(i);
|
|
8
8
|
return n(() => {
|
|
9
9
|
let t = [], n = [], r = (a?.definition.styleSelectors[l] ?? "").split(" ");
|
|
10
10
|
return c && r.length > 1 && t.push(c), e(a, o, p, m, h.current, {
|
|
@@ -3,11 +3,11 @@ import t from "../StyleInspector/index.mjs";
|
|
|
3
3
|
import { get as n } from "@plitzi/plitzi-ui/helpers";
|
|
4
4
|
import { use as r, useMemo as i, useState as a } from "react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
import c from "@plitzi/
|
|
7
|
-
import
|
|
6
|
+
import { createStoreHook as c } from "@plitzi/nexus/createStore";
|
|
7
|
+
import l from "@plitzi/sdk-shared/elements/ComponentContext";
|
|
8
8
|
//#region src/components/StyleManager/StyleManager.tsx
|
|
9
9
|
var u = () => {
|
|
10
|
-
let { componentDefinitions: u } = r(
|
|
10
|
+
let { componentDefinitions: u } = r(l), [d, f] = a(void 0), { useStore: p } = c(), [[m, h]] = p(["schema.flat", "displayMode"]), [g] = p(`style.platform.${h}`), _ = i(() => Object.values(m), [m]), v = i(() => d?.type === "element" ? Object.keys(n(u.current, `${d.componentType}.definition.styleSelectors`, {})) : ["base"], [u, d]), y = i(() => d?.type === "element" ? Object.keys(n(u.current, `${d.componentType}.defaultStyle.subTypes`, {})) : [], [u, d]), b = i(() => {
|
|
11
11
|
if (d) return d.type === "element" && v.length > 1 ? v.reduce((e, t) => ({
|
|
12
12
|
...e,
|
|
13
13
|
[t]: d.componentType
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-style",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.2",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -832,9 +832,9 @@
|
|
|
832
832
|
},
|
|
833
833
|
"dependencies": {
|
|
834
834
|
"@plitzi/plitzi-ui": "^1.6.9",
|
|
835
|
-
"@plitzi/sdk-plugins": "0.31.
|
|
836
|
-
"@plitzi/sdk-shared": "0.31.
|
|
837
|
-
"@plitzi/sdk-variables": "0.31.
|
|
835
|
+
"@plitzi/sdk-plugins": "0.31.2",
|
|
836
|
+
"@plitzi/sdk-shared": "0.31.2",
|
|
837
|
+
"@plitzi/sdk-variables": "0.31.2",
|
|
838
838
|
"clsx": "^2.1.1",
|
|
839
839
|
"immer": "^11.1.8",
|
|
840
840
|
"prop-types": "^15.8.1",
|