@superblocksteam/library 2.0.0-next.3 → 2.0.0-next.4
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-D6A2vzyG.js → allPaths-CF1gtIOM.js} +2 -2
- package/dist/{allPaths-D6A2vzyG.js.map → allPaths-CF1gtIOM.js.map} +1 -1
- package/dist/{allPaths-4TPCDqqv.js → allPaths-D8-iN1no.js} +2 -2
- package/dist/{allPaths-4TPCDqqv.js.map → allPaths-D8-iN1no.js.map} +1 -1
- package/dist/{allPathsLoader-CVwVdrBb.js → allPathsLoader-BeBFpQBL.js} +3 -3
- package/dist/{allPathsLoader-CVwVdrBb.js.map → allPathsLoader-BeBFpQBL.js.map} +1 -1
- package/dist/{allPathsLoader-qCVzPQ-g.js → allPathsLoader-C9Zv92Qq.js} +3 -3
- package/dist/{allPathsLoader-qCVzPQ-g.js.map → allPathsLoader-C9Zv92Qq.js.map} +1 -1
- package/dist/{index-DTEW2pgh.js → index-BKcgNC6z.js} +66 -12
- package/dist/{index-DTEW2pgh.js.map → index-BKcgNC6z.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-B_6-S2vk.js → splitPathsBySizeLoader-B1mX23Pc.js} +2 -2
- package/dist/{splitPathsBySizeLoader-B_6-S2vk.js.map → splitPathsBySizeLoader-B1mX23Pc.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-D6mNjqKJ.js → splitPathsBySizeLoader-B2lh3sPK.js} +2 -2
- package/dist/{splitPathsBySizeLoader-D6mNjqKJ.js.map → splitPathsBySizeLoader-B2lh3sPK.js.map} +1 -1
- package/dist-types/edit-mode/dnd/utils.d.ts +15 -0
- package/package.json +2 -2
|
@@ -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-BKcgNC6z.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-CF1gtIOM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-CF1gtIOM.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,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-BKcgNC6z.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-D8-iN1no.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-D8-iN1no.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,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-BKcgNC6z.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-CF1gtIOM.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-BeBFpQBL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-BeBFpQBL.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]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-BKcgNC6z.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-D8-iN1no.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-C9Zv92Qq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-C9Zv92Qq.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]}
|
|
@@ -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-C9Zv92Qq.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-B2lh3sPK.js"
|
|
2701
2701
|
)];
|
|
2702
2702
|
case 4:
|
|
2703
2703
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -65946,6 +65946,36 @@ const isTypeDraggable = (type5) => {
|
|
|
65946
65946
|
function shouldWrapInSectionAndColumn(type5, parentType) {
|
|
65947
65947
|
return parentType === "SbPage" && type5 !== "SbSection" || parentType === "SbSection" && type5 !== "SbColumn";
|
|
65948
65948
|
}
|
|
65949
|
+
const filterSafeStackDimensionProperties = (existingProps) => {
|
|
65950
|
+
const { width, height } = existingProps;
|
|
65951
|
+
let safeHeight;
|
|
65952
|
+
let safeWidth;
|
|
65953
|
+
if ((height == null ? void 0 : height.mode) === "px" || (height == null ? void 0 : height.mode) === "fit" || (height == null ? void 0 : height.mode) === "fill") {
|
|
65954
|
+
safeHeight = Property.Dimension(height);
|
|
65955
|
+
}
|
|
65956
|
+
if ((width == null ? void 0 : width.mode) === "px" || (width == null ? void 0 : width.mode) === "fit" || (width == null ? void 0 : width.mode) === "fill") {
|
|
65957
|
+
safeWidth = Property.Dimension(width);
|
|
65958
|
+
}
|
|
65959
|
+
return {
|
|
65960
|
+
width: safeWidth,
|
|
65961
|
+
height: safeHeight
|
|
65962
|
+
};
|
|
65963
|
+
};
|
|
65964
|
+
const filterSafeGridDimensionProperties = (existingProps) => {
|
|
65965
|
+
const { width, height } = existingProps;
|
|
65966
|
+
let safeHeight;
|
|
65967
|
+
let safeWidth;
|
|
65968
|
+
if ((height == null ? void 0 : height.mode) === "rows" || (height == null ? void 0 : height.mode) === "fit") {
|
|
65969
|
+
safeHeight = Property.Dimension(height);
|
|
65970
|
+
}
|
|
65971
|
+
if ((width == null ? void 0 : width.mode) === "columns") {
|
|
65972
|
+
safeWidth = Property.Dimension(width);
|
|
65973
|
+
}
|
|
65974
|
+
return {
|
|
65975
|
+
width: safeWidth,
|
|
65976
|
+
height: safeHeight
|
|
65977
|
+
};
|
|
65978
|
+
};
|
|
65949
65979
|
const isWidgetGrid = (widget) => {
|
|
65950
65980
|
var _a2;
|
|
65951
65981
|
if (!widget) {
|
|
@@ -114784,6 +114814,7 @@ function wrapInSectionColumnIfDroppingOnPage(primaryComponent, parentType) {
|
|
|
114784
114814
|
};
|
|
114785
114815
|
}
|
|
114786
114816
|
const handleGridDropWithinCanvas = (params) => {
|
|
114817
|
+
var _a2;
|
|
114787
114818
|
const { gridDropInfo, draggedId, dropTargetId } = params;
|
|
114788
114819
|
const editStore2 = getEditStore();
|
|
114789
114820
|
const dropSourceId = editStore2.runtimeEntitiesManager.getEditorWidgetSourceId(dropTargetId);
|
|
@@ -114804,11 +114835,18 @@ const handleGridDropWithinCanvas = (params) => {
|
|
|
114804
114835
|
])
|
|
114805
114836
|
);
|
|
114806
114837
|
const droppedWidgetConstraints = constraintsBySourceId[draggedSourceId];
|
|
114838
|
+
const droppedWidgetProps = (_a2 = editStore2.runtimeEntitiesManager.getEditorWidgetMeta(draggedId)) == null ? void 0 : _a2.props;
|
|
114839
|
+
const safeExistingDimensions = filterSafeGridDimensionProperties({
|
|
114840
|
+
width: droppedWidgetProps == null ? void 0 : droppedWidgetProps.width,
|
|
114841
|
+
height: droppedWidgetProps == null ? void 0 : droppedWidgetProps.height
|
|
114842
|
+
});
|
|
114843
|
+
const width = safeExistingDimensions.width ?? Property.Dimension(Dim.col(droppedWidgetConstraints.width));
|
|
114844
|
+
const height = safeExistingDimensions.height ?? Property.Dimension(Dim.rows(droppedWidgetConstraints.height));
|
|
114807
114845
|
const propsToChange = droppedWidgetConstraints ? {
|
|
114808
114846
|
marginTop: Property.Dimension(Dim.row(droppedWidgetConstraints.top)),
|
|
114809
114847
|
marginLeft: Property.Dimension(Dim.col(droppedWidgetConstraints.left)),
|
|
114810
|
-
width
|
|
114811
|
-
height
|
|
114848
|
+
width,
|
|
114849
|
+
height,
|
|
114812
114850
|
constraintTop: Property.Expression(
|
|
114813
114851
|
JSON.stringify(droppedWidgetConstraints.constraintTop)
|
|
114814
114852
|
)
|
|
@@ -114838,7 +114876,7 @@ const handleGridDropForNewComponent = ({
|
|
|
114838
114876
|
marginTop: Property.Dimension(Dim.row((activeRectGU == null ? void 0 : activeRectGU.yGU) ?? 0)),
|
|
114839
114877
|
marginLeft: Property.Dimension(Dim.col((activeRectGU == null ? void 0 : activeRectGU.xGU) ?? 0)),
|
|
114840
114878
|
width: Property.Dimension(
|
|
114841
|
-
(activeRectGU == null ? void 0 : activeRectGU.widthGU) ? Dim.col(activeRectGU == null ? void 0 : activeRectGU.widthGU) : Dim.
|
|
114879
|
+
(activeRectGU == null ? void 0 : activeRectGU.widthGU) ? Dim.col(activeRectGU == null ? void 0 : activeRectGU.widthGU) : Dim.col(4)
|
|
114842
114880
|
),
|
|
114843
114881
|
height: Property.Dimension(
|
|
114844
114882
|
(activeRectGU == null ? void 0 : activeRectGU.heightGU) ? Dim.rows(activeRectGU == null ? void 0 : activeRectGU.heightGU) : Dim.fit()
|
|
@@ -114876,7 +114914,20 @@ const handleGridDrop = async ({
|
|
|
114876
114914
|
});
|
|
114877
114915
|
}
|
|
114878
114916
|
};
|
|
114917
|
+
const mergeDroppedDimensions = (draggedProps, activeDragRect) => {
|
|
114918
|
+
const safeExistingDimensions = filterSafeStackDimensionProperties({
|
|
114919
|
+
width: draggedProps == null ? void 0 : draggedProps.width,
|
|
114920
|
+
height: draggedProps == null ? void 0 : draggedProps.height
|
|
114921
|
+
});
|
|
114922
|
+
const width = safeExistingDimensions.width ?? ((activeDragRect == null ? void 0 : activeDragRect.width) ? Property.Dimension(Dim.px(activeDragRect.width)) : Property.Static(""));
|
|
114923
|
+
const height = safeExistingDimensions.height ?? ((activeDragRect == null ? void 0 : activeDragRect.height) ? Property.Dimension(Dim.px(activeDragRect.height)) : Property.Static(""));
|
|
114924
|
+
return {
|
|
114925
|
+
width,
|
|
114926
|
+
height
|
|
114927
|
+
};
|
|
114928
|
+
};
|
|
114879
114929
|
const handleStackDropWithinCanvas = (params) => {
|
|
114930
|
+
var _a2;
|
|
114880
114931
|
const { dropInfo, draggedId, dropTargetId } = params;
|
|
114881
114932
|
const editStore2 = getEditStore();
|
|
114882
114933
|
const dropSourceId = editStore2.runtimeEntitiesManager.getEditorWidgetSourceId(dropTargetId);
|
|
@@ -114900,6 +114951,7 @@ const handleStackDropWithinCanvas = (params) => {
|
|
|
114900
114951
|
const activeDragRect = editStore2.ui.dnd.activeDragRect;
|
|
114901
114952
|
if (shouldWrap) {
|
|
114902
114953
|
dropComponentInWrappingSectionOrColumn({
|
|
114954
|
+
draggedId,
|
|
114903
114955
|
draggedSourceId,
|
|
114904
114956
|
dropTargetId,
|
|
114905
114957
|
dropSourceId,
|
|
@@ -114908,6 +114960,7 @@ const handleStackDropWithinCanvas = (params) => {
|
|
|
114908
114960
|
activeDragRect
|
|
114909
114961
|
});
|
|
114910
114962
|
} else {
|
|
114963
|
+
const draggedProps = (_a2 = editStore2.runtimeEntitiesManager.getEditorWidgetMeta(draggedId)) == null ? void 0 : _a2.props;
|
|
114911
114964
|
editStore2.operationManager.dropComponent({
|
|
114912
114965
|
from: { source: { id: draggedSourceId } },
|
|
114913
114966
|
to: {
|
|
@@ -114920,14 +114973,15 @@ const handleStackDropWithinCanvas = (params) => {
|
|
|
114920
114973
|
marginTop: Property.Static(""),
|
|
114921
114974
|
marginLeft: Property.Static(""),
|
|
114922
114975
|
constraintTop: Property.Static(""),
|
|
114923
|
-
|
|
114924
|
-
height: (activeDragRect == null ? void 0 : activeDragRect.height) ? Property.Dimension(Dim.px(activeDragRect.height)) : Property.Static("")
|
|
114976
|
+
...mergeDroppedDimensions(draggedProps, activeDragRect)
|
|
114925
114977
|
}
|
|
114926
114978
|
});
|
|
114927
114979
|
}
|
|
114928
114980
|
};
|
|
114929
114981
|
const dropComponentInWrappingSectionOrColumn = async (params) => {
|
|
114982
|
+
var _a2;
|
|
114930
114983
|
const {
|
|
114984
|
+
draggedId,
|
|
114931
114985
|
draggedSourceId,
|
|
114932
114986
|
dropSourceId,
|
|
114933
114987
|
dropTargetId,
|
|
@@ -114949,6 +115003,7 @@ const dropComponentInWrappingSectionOrColumn = async (params) => {
|
|
|
114949
115003
|
if (!newComponentSourceId) {
|
|
114950
115004
|
throw new Error("Missing new component source id");
|
|
114951
115005
|
}
|
|
115006
|
+
const draggedProps = (_a2 = editStore2.runtimeEntitiesManager.getEditorWidgetMeta(draggedId)) == null ? void 0 : _a2.props;
|
|
114952
115007
|
editStore2.operationManager.dropComponent({
|
|
114953
115008
|
from: { source: { id: draggedSourceId } },
|
|
114954
115009
|
to: {
|
|
@@ -114961,8 +115016,7 @@ const dropComponentInWrappingSectionOrColumn = async (params) => {
|
|
|
114961
115016
|
marginTop: Property.Static(""),
|
|
114962
115017
|
marginLeft: Property.Static(""),
|
|
114963
115018
|
constraintTop: Property.Static(""),
|
|
114964
|
-
|
|
114965
|
-
height: (activeDragRect == null ? void 0 : activeDragRect.height) ? Property.Dimension(Dim.px(activeDragRect.height)) : Property.Static("")
|
|
115019
|
+
...mergeDroppedDimensions(draggedProps, activeDragRect)
|
|
114966
115020
|
}
|
|
114967
115021
|
});
|
|
114968
115022
|
};
|
|
@@ -143363,14 +143417,14 @@ function getLoaderFn(options) {
|
|
|
143363
143417
|
if (!(loader === "all")) return [3, 3];
|
|
143364
143418
|
return [4, import(
|
|
143365
143419
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
143366
|
-
"./allPathsLoader-
|
|
143420
|
+
"./allPathsLoader-BeBFpQBL.js"
|
|
143367
143421
|
)];
|
|
143368
143422
|
case 2:
|
|
143369
143423
|
return [2, _b2.sent().allPathsLoader];
|
|
143370
143424
|
case 3:
|
|
143371
143425
|
return [4, import(
|
|
143372
143426
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
143373
|
-
"./splitPathsBySizeLoader-
|
|
143427
|
+
"./splitPathsBySizeLoader-B1mX23Pc.js"
|
|
143374
143428
|
)];
|
|
143375
143429
|
case 4:
|
|
143376
143430
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -189920,4 +189974,4 @@ export {
|
|
|
189920
189974
|
copyToClipboard as y,
|
|
189921
189975
|
navigateTo as z
|
|
189922
189976
|
};
|
|
189923
|
-
//# sourceMappingURL=index-
|
|
189977
|
+
//# sourceMappingURL=index-BKcgNC6z.js.map
|