@superblocksteam/library 2.0.3-next.193 → 2.0.3-next.194
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-Cwqv3pxS.js → allPaths-CPmeaksr.js} +2 -2
- package/dist/{allPaths-Cwqv3pxS.js.map → allPaths-CPmeaksr.js.map} +1 -1
- package/dist/{allPaths-iEErC5oB.js → allPaths-TKGgbejI.js} +2 -2
- package/dist/{allPaths-iEErC5oB.js.map → allPaths-TKGgbejI.js.map} +1 -1
- package/dist/{allPathsLoader-CezvKtLr.js → allPathsLoader-B0O4sfbG.js} +3 -3
- package/dist/{allPathsLoader-CezvKtLr.js.map → allPathsLoader-B0O4sfbG.js.map} +1 -1
- package/dist/{allPathsLoader-DZx5fcim.js → allPathsLoader-DhkzAeHr.js} +3 -3
- package/dist/{allPathsLoader-DZx5fcim.js.map → allPathsLoader-DhkzAeHr.js.map} +1 -1
- package/dist/{index-6cyaLCpJ.js → index-DzenoqnP.js} +117 -36
- package/dist/{index-6cyaLCpJ.js.map → index-DzenoqnP.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-DTElIxB6.js → splitPathsBySizeLoader-DH3bh2P5.js} +2 -2
- package/dist/{splitPathsBySizeLoader-DTElIxB6.js.map → splitPathsBySizeLoader-DH3bh2P5.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-DtT_iiPt.js → splitPathsBySizeLoader-DQGuCgWt.js} +2 -2
- package/dist/{splitPathsBySizeLoader-DtT_iiPt.js.map → splitPathsBySizeLoader-DQGuCgWt.js.map} +1 -1
- package/dist-types/edit-mode/extended-clickable-area.d.ts +9 -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-DzenoqnP.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-CPmeaksr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-CPmeaksr.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-DzenoqnP.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-TKGgbejI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-TKGgbejI.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-DzenoqnP.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-CPmeaksr.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-B0O4sfbG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-B0O4sfbG.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-DzenoqnP.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-TKGgbejI.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-DhkzAeHr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-DhkzAeHr.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]}
|
|
@@ -90956,14 +90956,14 @@ function getLoaderFn$1(options) {
|
|
|
90956
90956
|
if (!(loader === "all")) return [3, 3];
|
|
90957
90957
|
return [4, import(
|
|
90958
90958
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
90959
|
-
"./allPathsLoader-
|
|
90959
|
+
"./allPathsLoader-DhkzAeHr.js"
|
|
90960
90960
|
)];
|
|
90961
90961
|
case 2:
|
|
90962
90962
|
return [2, _b2.sent().allPathsLoader];
|
|
90963
90963
|
case 3:
|
|
90964
90964
|
return [4, import(
|
|
90965
90965
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
90966
|
-
"./splitPathsBySizeLoader-
|
|
90966
|
+
"./splitPathsBySizeLoader-DQGuCgWt.js"
|
|
90967
90967
|
)];
|
|
90968
90968
|
case 4:
|
|
90969
90969
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -115931,6 +115931,19 @@ const DroppableWidget = observer(
|
|
|
115931
115931
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, { children: props2.children });
|
|
115932
115932
|
}
|
|
115933
115933
|
);
|
|
115934
|
+
const EXTENDED_CLICKABLE_AREA_DELTA = 6;
|
|
115935
|
+
const EXTENDED_CLICKABLE_AREA_TYPES = ["SbButton"];
|
|
115936
|
+
const EXTENDED_CLICKABLE_ANCHOR_CSS = {
|
|
115937
|
+
top: `calc(anchor(top) - ${EXTENDED_CLICKABLE_AREA_DELTA}px)`,
|
|
115938
|
+
left: `calc(anchor(left) - ${EXTENDED_CLICKABLE_AREA_DELTA}px)`,
|
|
115939
|
+
right: `calc(anchor(right) - ${EXTENDED_CLICKABLE_AREA_DELTA}px)`,
|
|
115940
|
+
bottom: `calc(anchor(bottom) - ${EXTENDED_CLICKABLE_AREA_DELTA}px)`
|
|
115941
|
+
};
|
|
115942
|
+
const EXTENDED_CLICKABLE_ANCHOR_CLIP_PATH = `polygon(
|
|
115943
|
+
0% 0%, 0% 100%, 100% 100%, 100% 0%,
|
|
115944
|
+
0% 0%, ${EXTENDED_CLICKABLE_AREA_DELTA}px ${EXTENDED_CLICKABLE_AREA_DELTA}px, calc(100% - ${EXTENDED_CLICKABLE_AREA_DELTA}px) ${EXTENDED_CLICKABLE_AREA_DELTA}px,
|
|
115945
|
+
calc(100% - ${EXTENDED_CLICKABLE_AREA_DELTA}px) calc(100% - ${EXTENDED_CLICKABLE_AREA_DELTA}px), ${EXTENDED_CLICKABLE_AREA_DELTA}px calc(100% - ${EXTENDED_CLICKABLE_AREA_DELTA}px), ${EXTENDED_CLICKABLE_AREA_DELTA}px ${EXTENDED_CLICKABLE_AREA_DELTA}px
|
|
115946
|
+
)`;
|
|
115934
115947
|
function useRegisterSourceElement(sourceId) {
|
|
115935
115948
|
const instanceIdRef = useRef(null);
|
|
115936
115949
|
return useCallback(
|
|
@@ -117964,6 +117977,7 @@ const InteractionRect = (props2) => {
|
|
|
117964
117977
|
left: "anchor(left)",
|
|
117965
117978
|
right: "anchor(right)",
|
|
117966
117979
|
bottom: "anchor(bottom)",
|
|
117980
|
+
...EXTENDED_CLICKABLE_AREA_TYPES.includes(type5 ?? "") && selectionType === "FOCUSED" ? EXTENDED_CLICKABLE_ANCHOR_CSS : {},
|
|
117967
117981
|
visibility: isDragging ? "hidden" : "visible",
|
|
117968
117982
|
anchorName: getWidgetRectAnchorName(instanceId),
|
|
117969
117983
|
positionAnchor: getWidgetAnchorName(instanceId),
|
|
@@ -118011,7 +118025,27 @@ const selectDisplayNameAndVisibility = (instanceId) => {
|
|
|
118011
118025
|
};
|
|
118012
118026
|
};
|
|
118013
118027
|
const calculateWidgetsAtCursor = (params) => {
|
|
118014
|
-
|
|
118028
|
+
let elements = document.elementsFromPoint(params.x, params.y);
|
|
118029
|
+
if (params.delta) {
|
|
118030
|
+
elements = [
|
|
118031
|
+
...document.elementsFromPoint(
|
|
118032
|
+
params.x - params.delta.x,
|
|
118033
|
+
params.y - params.delta.y
|
|
118034
|
+
),
|
|
118035
|
+
...document.elementsFromPoint(
|
|
118036
|
+
params.x + params.delta.x,
|
|
118037
|
+
params.y + params.delta.y
|
|
118038
|
+
),
|
|
118039
|
+
...document.elementsFromPoint(
|
|
118040
|
+
params.x - params.delta.x,
|
|
118041
|
+
params.y + params.delta.y
|
|
118042
|
+
),
|
|
118043
|
+
...document.elementsFromPoint(
|
|
118044
|
+
params.x + params.delta.x,
|
|
118045
|
+
params.y - params.delta.y
|
|
118046
|
+
)
|
|
118047
|
+
];
|
|
118048
|
+
}
|
|
118015
118049
|
const hoveredPills = [];
|
|
118016
118050
|
const hoveredActual = [];
|
|
118017
118051
|
elements.forEach((element) => {
|
|
@@ -118033,6 +118067,30 @@ const calculateWidgetsAtCursor = (params) => {
|
|
|
118033
118067
|
hoveredActual
|
|
118034
118068
|
};
|
|
118035
118069
|
};
|
|
118070
|
+
function getFocusedWidget(event, rootType, rootElement, editStore2, delta, types2) {
|
|
118071
|
+
if (!rootElement) {
|
|
118072
|
+
return null;
|
|
118073
|
+
}
|
|
118074
|
+
const { hoveredPills, hoveredActual } = calculateWidgetsAtCursor({
|
|
118075
|
+
x: event.clientX,
|
|
118076
|
+
y: event.clientY,
|
|
118077
|
+
rootType,
|
|
118078
|
+
rootElement,
|
|
118079
|
+
delta
|
|
118080
|
+
});
|
|
118081
|
+
const instanceIds = [...hoveredPills, ...hoveredActual];
|
|
118082
|
+
const focusedWidget = instanceIds.find((id2) => {
|
|
118083
|
+
const widgetMeta = editStore2.runtimeEntitiesManager.getEditorWidgetMeta(id2);
|
|
118084
|
+
const sourceIdInstanceCount = editStore2.interactionLayerManager.getSourceIdElements(
|
|
118085
|
+
(widgetMeta == null ? void 0 : widgetMeta.sourceId) ?? ""
|
|
118086
|
+
).length;
|
|
118087
|
+
return (types2 === void 0 || types2.includes((widgetMeta == null ? void 0 : widgetMeta.type) ?? "")) && (widgetMeta == null ? void 0 : widgetMeta.isSbComponent) && !(widgetMeta == null ? void 0 : widgetMeta.isInCustomComponent) && sourceIdInstanceCount <= 1;
|
|
118088
|
+
}) ?? null;
|
|
118089
|
+
if (focusedWidget) {
|
|
118090
|
+
return focusedWidget;
|
|
118091
|
+
}
|
|
118092
|
+
return null;
|
|
118093
|
+
}
|
|
118036
118094
|
function useWidgetHover(rootType) {
|
|
118037
118095
|
useEffect(() => {
|
|
118038
118096
|
const rootElement = document.getElementById(
|
|
@@ -118040,22 +118098,26 @@ function useWidgetHover(rootType) {
|
|
|
118040
118098
|
);
|
|
118041
118099
|
const editStore2 = getEditStore();
|
|
118042
118100
|
const handleMouseMove = (event) => {
|
|
118043
|
-
const
|
|
118044
|
-
|
|
118045
|
-
y: event.clientY,
|
|
118101
|
+
const focusedWidgetExtended = getFocusedWidget(
|
|
118102
|
+
event,
|
|
118046
118103
|
rootType,
|
|
118047
|
-
rootElement
|
|
118048
|
-
|
|
118049
|
-
|
|
118050
|
-
|
|
118051
|
-
|
|
118052
|
-
|
|
118053
|
-
|
|
118054
|
-
|
|
118055
|
-
|
|
118056
|
-
|
|
118057
|
-
|
|
118058
|
-
|
|
118104
|
+
rootElement,
|
|
118105
|
+
editStore2,
|
|
118106
|
+
{ x: EXTENDED_CLICKABLE_AREA_DELTA, y: EXTENDED_CLICKABLE_AREA_DELTA },
|
|
118107
|
+
EXTENDED_CLICKABLE_AREA_TYPES
|
|
118108
|
+
);
|
|
118109
|
+
if (focusedWidgetExtended) {
|
|
118110
|
+
editStore2.ui.setFocusedInstanceId(focusedWidgetExtended);
|
|
118111
|
+
} else {
|
|
118112
|
+
const focusedWidget = getFocusedWidget(
|
|
118113
|
+
event,
|
|
118114
|
+
rootType,
|
|
118115
|
+
rootElement,
|
|
118116
|
+
editStore2
|
|
118117
|
+
);
|
|
118118
|
+
if (focusedWidget) {
|
|
118119
|
+
editStore2.ui.setFocusedInstanceId(focusedWidget);
|
|
118120
|
+
}
|
|
118059
118121
|
}
|
|
118060
118122
|
};
|
|
118061
118123
|
const throttledHandleMouseMove = throttle(handleMouseMove, 25);
|
|
@@ -118296,6 +118358,24 @@ const EditWrapper = observer(function EditWrapper2(props2) {
|
|
|
118296
118358
|
const scopeName = rootStore.entityManager.getScopeName(
|
|
118297
118359
|
props2.identifier.scopeId
|
|
118298
118360
|
);
|
|
118361
|
+
const handleClick = (ev) => {
|
|
118362
|
+
const sourceIdInstanceCount = editStore2.interactionLayerManager.getSourceIdElements(
|
|
118363
|
+
props2.identifier.sourceId
|
|
118364
|
+
).length;
|
|
118365
|
+
if (sourceIdInstanceCount > 1) {
|
|
118366
|
+
return;
|
|
118367
|
+
}
|
|
118368
|
+
if (isInCustomComponent && customComponentInstanceId) {
|
|
118369
|
+
editStore2.ui.selectWidget(customComponentInstanceId);
|
|
118370
|
+
ev.stopPropagation();
|
|
118371
|
+
return;
|
|
118372
|
+
}
|
|
118373
|
+
editStore2.ui.selectWidget(props2.identifier.instanceId);
|
|
118374
|
+
ev.stopPropagation();
|
|
118375
|
+
};
|
|
118376
|
+
const expandedClickArea = EXTENDED_CLICKABLE_AREA_TYPES.includes(
|
|
118377
|
+
(meta == null ? void 0 : meta.type) ?? ""
|
|
118378
|
+
);
|
|
118299
118379
|
const node2 = /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
118300
118380
|
"div",
|
|
118301
118381
|
{
|
|
@@ -118307,24 +118387,25 @@ const EditWrapper = observer(function EditWrapper2(props2) {
|
|
|
118307
118387
|
"data-can-drop": props2.isDroppable,
|
|
118308
118388
|
"data-selected": isSelected,
|
|
118309
118389
|
"data-has-local-binding": hasLocalBinding,
|
|
118390
|
+
onClick: handleClick,
|
|
118310
118391
|
id: getEditWrapperId(props2.identifier.instanceId),
|
|
118311
|
-
onClick: (ev) => {
|
|
118312
|
-
const sourceIdInstanceCount = editStore2.interactionLayerManager.getSourceIdElements(
|
|
118313
|
-
props2.identifier.sourceId
|
|
118314
|
-
).length;
|
|
118315
|
-
if (sourceIdInstanceCount > 1) {
|
|
118316
|
-
return;
|
|
118317
|
-
}
|
|
118318
|
-
if (isInCustomComponent && customComponentInstanceId) {
|
|
118319
|
-
editStore2.ui.selectWidget(customComponentInstanceId);
|
|
118320
|
-
ev.stopPropagation();
|
|
118321
|
-
return;
|
|
118322
|
-
}
|
|
118323
|
-
editStore2.ui.selectWidget(props2.identifier.instanceId);
|
|
118324
|
-
ev.stopPropagation();
|
|
118325
|
-
},
|
|
118326
118392
|
ref: registerSourceElement,
|
|
118327
118393
|
children: [
|
|
118394
|
+
expandedClickArea && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
118395
|
+
"div",
|
|
118396
|
+
{
|
|
118397
|
+
onClick: handleClick,
|
|
118398
|
+
style: {
|
|
118399
|
+
position: "absolute",
|
|
118400
|
+
...EXTENDED_CLICKABLE_ANCHOR_CSS,
|
|
118401
|
+
zIndex: 0,
|
|
118402
|
+
pointerEvents: "auto",
|
|
118403
|
+
overflow: "hidden",
|
|
118404
|
+
positionAnchor: getWidgetAnchorName(identifier2.instanceId),
|
|
118405
|
+
clipPath: EXTENDED_CLICKABLE_ANCHOR_CLIP_PATH
|
|
118406
|
+
}
|
|
118407
|
+
}
|
|
118408
|
+
),
|
|
118328
118409
|
showVisibilityBackground && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
118329
118410
|
"div",
|
|
118330
118411
|
{
|
|
@@ -145322,14 +145403,14 @@ function getLoaderFn(options) {
|
|
|
145322
145403
|
if (!(loader === "all")) return [3, 3];
|
|
145323
145404
|
return [4, import(
|
|
145324
145405
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
145325
|
-
"./allPathsLoader-
|
|
145406
|
+
"./allPathsLoader-B0O4sfbG.js"
|
|
145326
145407
|
)];
|
|
145327
145408
|
case 2:
|
|
145328
145409
|
return [2, _b2.sent().allPathsLoader];
|
|
145329
145410
|
case 3:
|
|
145330
145411
|
return [4, import(
|
|
145331
145412
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
145332
|
-
"./splitPathsBySizeLoader-
|
|
145413
|
+
"./splitPathsBySizeLoader-DH3bh2P5.js"
|
|
145333
145414
|
)];
|
|
145334
145415
|
case 4:
|
|
145335
145416
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -197869,4 +197950,4 @@ export {
|
|
|
197869
197950
|
copyToClipboard as y,
|
|
197870
197951
|
navigateTo as z
|
|
197871
197952
|
};
|
|
197872
|
-
//# sourceMappingURL=index-
|
|
197953
|
+
//# sourceMappingURL=index-DzenoqnP.js.map
|