@superblocksteam/library 2.0.0-next.87 → 2.0.0-next.89
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/{allPaths-CfvuXG96.js → allPaths-CD2SfTiK.js} +2 -2
- package/dist/{allPaths-CfvuXG96.js.map → allPaths-CD2SfTiK.js.map} +1 -1
- package/dist/{allPaths-DP8ovvQU.js → allPaths-CKY9Xdnw.js} +2 -2
- package/dist/{allPaths-DP8ovvQU.js.map → allPaths-CKY9Xdnw.js.map} +1 -1
- package/dist/{allPathsLoader-DJiKR4cQ.js → allPathsLoader-ComojEaO.js} +3 -3
- package/dist/{allPathsLoader-OEj0-bGO.js.map → allPathsLoader-ComojEaO.js.map} +1 -1
- package/dist/{allPathsLoader-OEj0-bGO.js → allPathsLoader-D8XXt7wl.js} +3 -3
- package/dist/{allPathsLoader-DJiKR4cQ.js.map → allPathsLoader-D8XXt7wl.js.map} +1 -1
- package/dist/{index-DMDqb7dn.js → index-BJ9Spvb2.js} +165 -65
- package/dist/{index-DMDqb7dn.js.map → index-BJ9Spvb2.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-7T-BWlcy.js → splitPathsBySizeLoader-B4XDAReL.js} +2 -2
- package/dist/{splitPathsBySizeLoader-7T-BWlcy.js.map → splitPathsBySizeLoader-B4XDAReL.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-CsnSym95.js → splitPathsBySizeLoader-CibQwaTm.js} +2 -2
- package/dist/{splitPathsBySizeLoader-CsnSym95.js.map → splitPathsBySizeLoader-CibQwaTm.js.map} +1 -1
- package/dist-types/edit-mode/dnd/grid-store.d.ts +29 -4
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +1 -1
- package/dist-types/lib/user-facing/components/container/index.d.ts +4 -2
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-DIJYif9G.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-LHtbj0-V.js";
|
|
3
|
-
import { p as pascalCase, I as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, I as IconSize } from "./index-BJ9Spvb2.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-CD2SfTiK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-CD2SfTiK.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-BxzKdlqH.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-DIn-fanT.js";
|
|
3
|
-
import { p as pascalCase, b as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, b as IconSize } from "./index-BJ9Spvb2.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-CKY9Xdnw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-CKY9Xdnw.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-BJ9Spvb2.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-CD2SfTiK.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-ComojEaO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-ComojEaO.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-BJ9Spvb2.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-CKY9Xdnw.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-D8XXt7wl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-D8XXt7wl.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -2690,14 +2690,14 @@ function getLoaderFn$1(options) {
|
|
|
2690
2690
|
if (!(loader === "all")) return [3, 3];
|
|
2691
2691
|
return [4, import(
|
|
2692
2692
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
2693
|
-
"./allPathsLoader-
|
|
2693
|
+
"./allPathsLoader-ComojEaO.js"
|
|
2694
2694
|
)];
|
|
2695
2695
|
case 2:
|
|
2696
2696
|
return [2, _b2.sent().allPathsLoader];
|
|
2697
2697
|
case 3:
|
|
2698
2698
|
return [4, import(
|
|
2699
2699
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
2700
|
-
"./splitPathsBySizeLoader-
|
|
2700
|
+
"./splitPathsBySizeLoader-CibQwaTm.js"
|
|
2701
2701
|
)];
|
|
2702
2702
|
case 4:
|
|
2703
2703
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -98809,7 +98809,6 @@ class PropertiesPanelManager {
|
|
|
98809
98809
|
}
|
|
98810
98810
|
return lookup[path2];
|
|
98811
98811
|
}
|
|
98812
|
-
// TODO (alex): needs to handle returning updates for multiple widgets at a time
|
|
98813
98812
|
computeSideEffectsForPropertyUpdate(payload) {
|
|
98814
98813
|
const { sourceId, updates } = payload;
|
|
98815
98814
|
const allUpdates = {
|
|
@@ -98842,9 +98841,6 @@ class PropertiesPanelManager {
|
|
|
98842
98841
|
var _a2, _b2;
|
|
98843
98842
|
const propChanges = (_a2 = sideEffects[changeSourceId]) == null ? void 0 : _a2.props;
|
|
98844
98843
|
const metaChanges = (_b2 = sideEffects[changeSourceId]) == null ? void 0 : _b2.meta;
|
|
98845
|
-
if (sourceId !== changeSourceId) {
|
|
98846
|
-
throw new Error("Changing other widgets not implemented yet");
|
|
98847
|
-
}
|
|
98848
98844
|
if (propChanges) {
|
|
98849
98845
|
allUpdates[changeSourceId] ?? (allUpdates[changeSourceId] = {});
|
|
98850
98846
|
allUpdates[changeSourceId].props = {
|
|
@@ -99776,20 +99772,14 @@ class GridManager {
|
|
|
99776
99772
|
isValid: true
|
|
99777
99773
|
};
|
|
99778
99774
|
}
|
|
99779
|
-
|
|
99775
|
+
getGridInfo(runtimeWidget, targetRect) {
|
|
99780
99776
|
var _a2, _b2, _c2;
|
|
99781
|
-
|
|
99782
|
-
const dropTargetId = this.dnd.dropTargetId;
|
|
99783
|
-
if (!targetRect || !dropTargetId) {
|
|
99784
|
-
return null;
|
|
99785
|
-
}
|
|
99786
|
-
const dropTargetWidgetMeta = getEditStore().runtimeEntitiesManager.getEditorWidgetMeta(dropTargetId);
|
|
99787
|
-
if (!(dropTargetWidgetMeta == null ? void 0 : dropTargetWidgetMeta.scopeId) || !(dropTargetWidgetMeta == null ? void 0 : dropTargetWidgetMeta.name)) {
|
|
99777
|
+
if (!runtimeWidget.scopeId || !runtimeWidget.name) {
|
|
99788
99778
|
return null;
|
|
99789
99779
|
}
|
|
99790
99780
|
const entityValues = this.root.entityManager.getEntity(
|
|
99791
|
-
|
|
99792
|
-
|
|
99781
|
+
runtimeWidget.scopeId,
|
|
99782
|
+
runtimeWidget.name
|
|
99793
99783
|
);
|
|
99794
99784
|
const targetColumns = entityValues == null ? void 0 : entityValues.columns;
|
|
99795
99785
|
if (!targetColumns) {
|
|
@@ -99808,7 +99798,19 @@ class GridManager {
|
|
|
99808
99798
|
targetPadding
|
|
99809
99799
|
};
|
|
99810
99800
|
}
|
|
99811
|
-
|
|
99801
|
+
get lazyTargetGridInfo() {
|
|
99802
|
+
const targetRect = this.dnd.activeTargetRect;
|
|
99803
|
+
const dropTargetId = this.dnd.dropTargetId;
|
|
99804
|
+
if (!targetRect || !dropTargetId) {
|
|
99805
|
+
return null;
|
|
99806
|
+
}
|
|
99807
|
+
const dropTargetWidgetMeta = getEditStore().runtimeEntitiesManager.getEditorWidgetMeta(dropTargetId);
|
|
99808
|
+
if (!(dropTargetWidgetMeta == null ? void 0 : dropTargetWidgetMeta.scopeId) || !(dropTargetWidgetMeta == null ? void 0 : dropTargetWidgetMeta.name)) {
|
|
99809
|
+
return null;
|
|
99810
|
+
}
|
|
99811
|
+
return this.getGridInfo(dropTargetWidgetMeta, targetRect);
|
|
99812
|
+
}
|
|
99813
|
+
getGridPositionFromRect(positionRect) {
|
|
99812
99814
|
const targetRect = this.dnd.activeTargetRect;
|
|
99813
99815
|
if (!targetRect) {
|
|
99814
99816
|
return null;
|
|
@@ -99817,13 +99819,31 @@ class GridManager {
|
|
|
99817
99819
|
if (!targetGridInfo) {
|
|
99818
99820
|
return null;
|
|
99819
99821
|
}
|
|
99822
|
+
return this.getGridPositionInfo({
|
|
99823
|
+
positionRect,
|
|
99824
|
+
targetRect,
|
|
99825
|
+
targetGridInfo,
|
|
99826
|
+
includePadding: false
|
|
99827
|
+
});
|
|
99828
|
+
}
|
|
99829
|
+
getGridPositionInfo({
|
|
99830
|
+
positionRect,
|
|
99831
|
+
targetRect,
|
|
99832
|
+
targetGridInfo,
|
|
99833
|
+
// you don't need this during normal drag and drop operations, its only used for updating
|
|
99834
|
+
// position between stack and freeform
|
|
99835
|
+
includePadding
|
|
99836
|
+
}) {
|
|
99837
|
+
var _a2, _b2;
|
|
99820
99838
|
const { tileWidth, tileHeight, targetPadding } = targetGridInfo;
|
|
99821
|
-
const
|
|
99822
|
-
const
|
|
99839
|
+
const paddingLeft = includePadding ? ((_a2 = targetPadding.left) == null ? void 0 : _a2.value) ?? 0 : 0;
|
|
99840
|
+
const paddingTop = includePadding ? ((_b2 = targetPadding.top) == null ? void 0 : _b2.value) ?? 0 : 0;
|
|
99841
|
+
const relativeX = positionRect.left - targetRect.left - paddingLeft;
|
|
99842
|
+
const relativeY = positionRect.top - targetRect.top - paddingTop;
|
|
99823
99843
|
const xGU = Math.round(relativeX / tileWidth);
|
|
99824
99844
|
const yGU = Math.round(relativeY / tileHeight);
|
|
99825
|
-
const widthGU = Math.max(Math.ceil(
|
|
99826
|
-
const heightGU = Math.max(Math.ceil(
|
|
99845
|
+
const widthGU = Math.max(Math.ceil(positionRect.width / tileWidth), 1);
|
|
99846
|
+
const heightGU = Math.max(Math.ceil(positionRect.height / tileHeight), 1);
|
|
99827
99847
|
return {
|
|
99828
99848
|
xGU,
|
|
99829
99849
|
yGU,
|
|
@@ -99846,7 +99866,7 @@ class GridManager {
|
|
|
99846
99866
|
(acc, childMeta) => {
|
|
99847
99867
|
const id2 = childMeta.instanceId;
|
|
99848
99868
|
const positionPx = this.dnd.widgetPositions[id2];
|
|
99849
|
-
const gridInfo = id2 === this.draggedInstanceId && this.dnd.activeDragRect ? this.
|
|
99869
|
+
const gridInfo = id2 === this.draggedInstanceId && this.dnd.activeDragRect ? this.getGridPositionFromRect(this.dnd.activeDragRect) : positionPx ? this.getGridPositionFromRect(positionPx) : null;
|
|
99850
99870
|
if (gridInfo) {
|
|
99851
99871
|
acc[id2] = gridInfo;
|
|
99852
99872
|
}
|
|
@@ -99860,7 +99880,7 @@ class GridManager {
|
|
|
99860
99880
|
if (!activeRect) {
|
|
99861
99881
|
return null;
|
|
99862
99882
|
}
|
|
99863
|
-
return this.
|
|
99883
|
+
return this.getGridPositionFromRect(activeRect);
|
|
99864
99884
|
}
|
|
99865
99885
|
get lazyIsFreePos() {
|
|
99866
99886
|
const dropTargetId = this.dnd.dropTargetId;
|
|
@@ -99897,7 +99917,7 @@ class GridManager {
|
|
|
99897
99917
|
const activeDragRect = { ...collidingRect };
|
|
99898
99918
|
let isIntersecting = false;
|
|
99899
99919
|
const childPositions = this.lazyChildGridPositionsGU;
|
|
99900
|
-
const collidingRectGU = this.
|
|
99920
|
+
const collidingRectGU = this.getGridPositionFromRect(collidingRect);
|
|
99901
99921
|
if (!collidingRectGU) {
|
|
99902
99922
|
return null;
|
|
99903
99923
|
}
|
|
@@ -111142,7 +111162,113 @@ const getAlignmentProps = () => {
|
|
|
111142
111162
|
};
|
|
111143
111163
|
const containerLayout = (sizeProps) => Prop.union({
|
|
111144
111164
|
shared: {
|
|
111145
|
-
layout: Prop.string().readAndWrite().default("vertical").
|
|
111165
|
+
layout: Prop.string().readAndWrite().default("vertical").onEdit(({ sourceId, updates, widgetMeta }) => {
|
|
111166
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
111167
|
+
const [previousProps, newProps] = getPreviousAndCurrentWidgetProps(updates, widgetMeta);
|
|
111168
|
+
const baseUpdate = {
|
|
111169
|
+
[sourceId]: {
|
|
111170
|
+
props: updates,
|
|
111171
|
+
meta: {}
|
|
111172
|
+
}
|
|
111173
|
+
};
|
|
111174
|
+
const editStore2 = rootStore.editStore;
|
|
111175
|
+
if (!editStore2) {
|
|
111176
|
+
return baseUpdate;
|
|
111177
|
+
}
|
|
111178
|
+
if (previousProps.layout !== "freeform" && newProps.layout === "freeform" && ((_a2 = newProps.width) == null ? void 0 : _a2.mode) === "fit") {
|
|
111179
|
+
const runtimeWidgetRect2 = (_d2 = (_c2 = (_b2 = editStore2.interactionLayerManager.getSourceIdElements(sourceId)) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.firstElementChild) == null ? void 0 : _d2.getBoundingClientRect();
|
|
111180
|
+
const pixelWidth = runtimeWidgetRect2 == null ? void 0 : runtimeWidgetRect2.width;
|
|
111181
|
+
baseUpdate[sourceId].props = {
|
|
111182
|
+
...updates,
|
|
111183
|
+
// fit-contenet width does not make sense grid component
|
|
111184
|
+
width: pixelWidth ? Property.Dimension(Dim.px(pixelWidth)) : Property.Static(Dim.fill())
|
|
111185
|
+
};
|
|
111186
|
+
}
|
|
111187
|
+
const runtimeWidget = editStore2.runtimeEntitiesManager.getAnyEditorWidgetMeta(sourceId);
|
|
111188
|
+
const runtimeWidgetRect = (_g2 = (_f2 = (_e2 = editStore2.interactionLayerManager.getSourceIdElements(sourceId)) == null ? void 0 : _e2[0]) == null ? void 0 : _f2.firstElementChild) == null ? void 0 : _g2.getBoundingClientRect();
|
|
111189
|
+
if (!runtimeWidget || !runtimeWidgetRect) {
|
|
111190
|
+
return baseUpdate;
|
|
111191
|
+
}
|
|
111192
|
+
const children = runtimeWidget ? editStore2.runtimeEntitiesManager.getEditorWidgetChildrenMeta(
|
|
111193
|
+
runtimeWidget.instanceId
|
|
111194
|
+
) : [];
|
|
111195
|
+
const elements = (children == null ? void 0 : children.map((child) => {
|
|
111196
|
+
var _a3, _b3;
|
|
111197
|
+
return {
|
|
111198
|
+
currentProps: child.props,
|
|
111199
|
+
sourceId: child.sourceId,
|
|
111200
|
+
element: (_b3 = (_a3 = editStore2.interactionLayerManager.getSourceIdElements(
|
|
111201
|
+
child.sourceId
|
|
111202
|
+
)) == null ? void 0 : _a3[0]) == null ? void 0 : _b3.firstElementChild
|
|
111203
|
+
};
|
|
111204
|
+
}).filter(({ element }) => !!element)) ?? [];
|
|
111205
|
+
if ("layout" in updates && updates.layout.value === "freeform") {
|
|
111206
|
+
const gridInfo = editStore2.ui.dnd.grid.getGridInfo(
|
|
111207
|
+
runtimeWidget,
|
|
111208
|
+
runtimeWidgetRect
|
|
111209
|
+
);
|
|
111210
|
+
if (!gridInfo) {
|
|
111211
|
+
return baseUpdate;
|
|
111212
|
+
}
|
|
111213
|
+
const updatesBySourceId = {};
|
|
111214
|
+
elements.forEach(({ sourceId: sourceId2, element, currentProps }) => {
|
|
111215
|
+
const elementRect = element.getBoundingClientRect();
|
|
111216
|
+
const gridPosition = editStore2.ui.dnd.grid.getGridPositionInfo({
|
|
111217
|
+
positionRect: elementRect,
|
|
111218
|
+
targetRect: runtimeWidgetRect,
|
|
111219
|
+
targetGridInfo: gridInfo,
|
|
111220
|
+
includePadding: true
|
|
111221
|
+
});
|
|
111222
|
+
const isHeightFit = isDimension(currentProps == null ? void 0 : currentProps.height) && currentProps.height.mode === "fit";
|
|
111223
|
+
updatesBySourceId[sourceId2] = {
|
|
111224
|
+
props: {
|
|
111225
|
+
marginTop: Property.Dimension(Dim.row(gridPosition.yGU)),
|
|
111226
|
+
marginLeft: Property.Dimension(Dim.col(gridPosition.xGU)),
|
|
111227
|
+
width: Property.Dimension(Dim.col(gridPosition.widthGU)),
|
|
111228
|
+
height: isHeightFit ? Property.Dimension(Dim.fit()) : Property.Dimension(Dim.row(gridPosition.heightGU))
|
|
111229
|
+
},
|
|
111230
|
+
meta: {}
|
|
111231
|
+
};
|
|
111232
|
+
});
|
|
111233
|
+
return {
|
|
111234
|
+
[widgetMeta.sourceId]: {
|
|
111235
|
+
props: {
|
|
111236
|
+
...updates,
|
|
111237
|
+
...baseUpdate[widgetMeta.sourceId].props
|
|
111238
|
+
},
|
|
111239
|
+
meta: {}
|
|
111240
|
+
},
|
|
111241
|
+
...updatesBySourceId
|
|
111242
|
+
};
|
|
111243
|
+
} else if (previousProps.layout === "freeform" && (newProps.layout === "vertical" || newProps.layout === "horizontal")) {
|
|
111244
|
+
const updatesBySourceId = {};
|
|
111245
|
+
elements.forEach(({ sourceId: sourceId2, element, currentProps }) => {
|
|
111246
|
+
const elementRect = element.getBoundingClientRect();
|
|
111247
|
+
const isHeightFit = isDimension(currentProps == null ? void 0 : currentProps.height) && currentProps.height.mode === "fit";
|
|
111248
|
+
updatesBySourceId[sourceId2] = {
|
|
111249
|
+
props: {
|
|
111250
|
+
marginTop: Property.Static(""),
|
|
111251
|
+
marginLeft: Property.Static(""),
|
|
111252
|
+
constraintTop: Property.Static(""),
|
|
111253
|
+
width: Property.Dimension(Dim.px(elementRect.width)),
|
|
111254
|
+
height: isHeightFit ? Property.Dimension(Dim.fit()) : Property.Dimension(Dim.px(elementRect.height))
|
|
111255
|
+
},
|
|
111256
|
+
meta: {}
|
|
111257
|
+
};
|
|
111258
|
+
});
|
|
111259
|
+
return {
|
|
111260
|
+
[widgetMeta.sourceId]: {
|
|
111261
|
+
props: {
|
|
111262
|
+
...updates,
|
|
111263
|
+
...baseUpdate[widgetMeta.sourceId].props
|
|
111264
|
+
},
|
|
111265
|
+
meta: {}
|
|
111266
|
+
},
|
|
111267
|
+
...updatesBySourceId
|
|
111268
|
+
};
|
|
111269
|
+
}
|
|
111270
|
+
return baseUpdate;
|
|
111271
|
+
}).propertiesPanel({
|
|
111146
111272
|
label: "Layout",
|
|
111147
111273
|
controlType: "RADIO_BUTTON_GROUP",
|
|
111148
111274
|
options: [
|
|
@@ -111165,29 +111291,6 @@ const containerLayout = (sizeProps) => Prop.union({
|
|
|
111165
111291
|
tooltip: "Horizontal"
|
|
111166
111292
|
}
|
|
111167
111293
|
]
|
|
111168
|
-
}).onEdit(({ sourceId, updates, widgetMeta }) => {
|
|
111169
|
-
var _a2, _b2, _c2, _d2;
|
|
111170
|
-
const [previousProps, newProps] = getPreviousAndCurrentWidgetProps(updates, widgetMeta);
|
|
111171
|
-
const baseUpdate = {
|
|
111172
|
-
[sourceId]: {
|
|
111173
|
-
props: updates,
|
|
111174
|
-
meta: {}
|
|
111175
|
-
}
|
|
111176
|
-
};
|
|
111177
|
-
if (previousProps.layout !== "freeform" && newProps.layout === "freeform" && ((_a2 = newProps.width) == null ? void 0 : _a2.mode) === "fit") {
|
|
111178
|
-
const editStore2 = rootStore.editStore;
|
|
111179
|
-
if (!editStore2) {
|
|
111180
|
-
return baseUpdate;
|
|
111181
|
-
}
|
|
111182
|
-
const runtimeWidgetRect = (_d2 = (_c2 = (_b2 = editStore2.interactionLayerManager.getSourceIdElements(sourceId)) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.firstElementChild) == null ? void 0 : _d2.getBoundingClientRect();
|
|
111183
|
-
const pixelWidth = runtimeWidgetRect == null ? void 0 : runtimeWidgetRect.width;
|
|
111184
|
-
baseUpdate[sourceId].props = {
|
|
111185
|
-
...updates,
|
|
111186
|
-
// fit-contenet width does not make sense grid component
|
|
111187
|
-
width: pixelWidth ? Property.Dimension(Dim.px(pixelWidth)) : Property.Static(Dim.fill())
|
|
111188
|
-
};
|
|
111189
|
-
}
|
|
111190
|
-
return baseUpdate;
|
|
111191
111294
|
})
|
|
111192
111295
|
},
|
|
111193
111296
|
variants: [
|
|
@@ -119144,17 +119247,16 @@ const InternalGrid = ({
|
|
|
119144
119247
|
return positions;
|
|
119145
119248
|
}, [columns, childrenArray, rowHeight, pxHeights]);
|
|
119146
119249
|
const gridStyle = React__default.useMemo(() => {
|
|
119147
|
-
|
|
119148
|
-
const spacingValue = ((_a3 = props.spacing) == null ? void 0 : _a3.value) ?? 0;
|
|
119250
|
+
const spacingValue = 0;
|
|
119149
119251
|
const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
|
|
119150
119252
|
return {
|
|
119151
119253
|
display: "grid",
|
|
119152
119254
|
gridAutoRows: `${rowHeight}px`,
|
|
119153
|
-
gap: `${spacingValue
|
|
119255
|
+
gap: `${spacingValue}px`,
|
|
119154
119256
|
gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
|
|
119155
119257
|
...style2
|
|
119156
119258
|
};
|
|
119157
|
-
}, [columns,
|
|
119259
|
+
}, [columns, rowHeight, style2]);
|
|
119158
119260
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props.className, children: childrenArray.map((child) => {
|
|
119159
119261
|
var _a3, _b3;
|
|
119160
119262
|
const heightMode = ((_a3 = child.props.height) == null ? void 0 : _a3.mode) ?? "fit";
|
|
@@ -144457,14 +144559,14 @@ function getLoaderFn(options) {
|
|
|
144457
144559
|
if (!(loader === "all")) return [3, 3];
|
|
144458
144560
|
return [4, import(
|
|
144459
144561
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
144460
|
-
"./allPathsLoader-
|
|
144562
|
+
"./allPathsLoader-D8XXt7wl.js"
|
|
144461
144563
|
)];
|
|
144462
144564
|
case 2:
|
|
144463
144565
|
return [2, _b2.sent().allPathsLoader];
|
|
144464
144566
|
case 3:
|
|
144465
144567
|
return [4, import(
|
|
144466
144568
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
144467
|
-
"./splitPathsBySizeLoader-
|
|
144569
|
+
"./splitPathsBySizeLoader-B4XDAReL.js"
|
|
144468
144570
|
)];
|
|
144469
144571
|
case 4:
|
|
144470
144572
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -177600,16 +177702,14 @@ const EmbedWrapper = (props) => {
|
|
|
177600
177702
|
metaUpdates,
|
|
177601
177703
|
scopeId
|
|
177602
177704
|
);
|
|
177603
|
-
|
|
177604
|
-
|
|
177605
|
-
|
|
177606
|
-
|
|
177607
|
-
|
|
177608
|
-
|
|
177609
|
-
|
|
177610
|
-
|
|
177611
|
-
tempWidgetPropChanges
|
|
177612
|
-
);
|
|
177705
|
+
editorBridge.resolvePromise(event.data.payload.callbackId, propUpdates);
|
|
177706
|
+
Object.keys(propUpdates).forEach((sourceId) => {
|
|
177707
|
+
getEditStore().operationManager.writeRuntimeProperties(
|
|
177708
|
+
sourceId,
|
|
177709
|
+
event.data.payload.transaction.id,
|
|
177710
|
+
propUpdates[sourceId]
|
|
177711
|
+
);
|
|
177712
|
+
});
|
|
177613
177713
|
};
|
|
177614
177714
|
iframeMessageHandler.addEventListener(
|
|
177615
177715
|
"sb-update-property-with-effects",
|
|
@@ -190906,4 +191006,4 @@ export {
|
|
|
190906
191006
|
copyToClipboard as y,
|
|
190907
191007
|
navigateTo as z
|
|
190908
191008
|
};
|
|
190909
|
-
//# sourceMappingURL=index-
|
|
191009
|
+
//# sourceMappingURL=index-BJ9Spvb2.js.map
|