@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
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as clientExports } from "./index-
|
|
2
|
-
import { W, X, Q, K, L, Y, J, Z, $, a0, a1, a2, a3, w, a4, a5, a6, a7, a8, U, a9, P, aa, ab, ac, ad, R, v, S, m, d, e, l, n, k, M, x, q, s, f, i, g, w as w2, c, o, j, h, u, t, A, ae, af, ag, ah, ai, T, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, y, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, H, aT, aU, aV, aW, aX, aY, C, aZ, a_, a$, b0, b1, E, b2, b3, z, b4, b5, b6, r, G, F, b7, b8, b9, O, B, D, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, N, bH } from "./index-
|
|
1
|
+
import { V as clientExports } from "./index-BJ9Spvb2.js";
|
|
2
|
+
import { W, X, Q, K, L, Y, J, Z, $, a0, a1, a2, a3, w, a4, a5, a6, a7, a8, U, a9, P, aa, ab, ac, ad, R, v, S, m, d, e, l, n, k, M, x, q, s, f, i, g, w as w2, c, o, j, h, u, t, A, ae, af, ag, ah, ai, T, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, y, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, H, aT, aU, aV, aW, aX, aY, C, aZ, a_, a$, b0, b1, E, b2, b3, z, b4, b5, b6, r, G, F, b7, b8, b9, O, B, D, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, N, bH } from "./index-BJ9Spvb2.js";
|
|
3
3
|
const createRoot = clientExports.createRoot;
|
|
4
4
|
export {
|
|
5
5
|
W as Await,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator, p as pascalCase, b as IconSize } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator, p as pascalCase, b as IconSize } from "./index-BJ9Spvb2.js";
|
|
2
2
|
var splitPathsBySizeLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var key, pathsRecord;
|
|
@@ -31,4 +31,4 @@ var splitPathsBySizeLoader = function(name, size) {
|
|
|
31
31
|
export {
|
|
32
32
|
splitPathsBySizeLoader
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=splitPathsBySizeLoader-
|
|
34
|
+
//# sourceMappingURL=splitPathsBySizeLoader-B4XDAReL.js.map
|
package/dist/{splitPathsBySizeLoader-7T-BWlcy.js.map → splitPathsBySizeLoader-B4XDAReL.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitPathsBySizeLoader-
|
|
1
|
+
{"version":3,"file":"splitPathsBySizeLoader-B4XDAReL.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/splitPathsBySizeLoader.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\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator, p as pascalCase, I as IconSize } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator, p as pascalCase, I as IconSize } from "./index-BJ9Spvb2.js";
|
|
2
2
|
var splitPathsBySizeLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var key, pathsRecord;
|
|
@@ -31,4 +31,4 @@ var splitPathsBySizeLoader = function(name, size) {
|
|
|
31
31
|
export {
|
|
32
32
|
splitPathsBySizeLoader
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=splitPathsBySizeLoader-
|
|
34
|
+
//# sourceMappingURL=splitPathsBySizeLoader-CibQwaTm.js.map
|
package/dist/{splitPathsBySizeLoader-CsnSym95.js.map → splitPathsBySizeLoader-CibQwaTm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitPathsBySizeLoader-
|
|
1
|
+
{"version":3,"file":"splitPathsBySizeLoader-CibQwaTm.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/splitPathsBySizeLoader.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\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
import type { GridDropInfo } from "./types.js";
|
|
1
|
+
import type { GridDropInfo, RectLike } from "./types.js";
|
|
2
2
|
import type { RootStore } from "../../lib/internal-details/lib/root-store.js";
|
|
3
3
|
import type { DragAndDropManager } from "../features/drag-and-drop-store.js";
|
|
4
|
+
import type { RuntimeWidgetMeta } from "../features/runtime-widgets-manager.js";
|
|
4
5
|
import type { ClientRect } from "@dnd-kit/core";
|
|
6
|
+
import type { Padding } from "@superblocksteam/library-shared/types";
|
|
7
|
+
type GridInfo = {
|
|
8
|
+
targetColumns: number;
|
|
9
|
+
tileWidth: number;
|
|
10
|
+
tileHeight: number;
|
|
11
|
+
targetHeightGU: number;
|
|
12
|
+
targetPadding: Padding;
|
|
13
|
+
};
|
|
5
14
|
export declare class GridManager {
|
|
6
15
|
private root;
|
|
7
16
|
private dnd;
|
|
8
17
|
constructor(root: RootStore, dnd: DragAndDropManager);
|
|
9
18
|
private get draggedInstanceId();
|
|
10
19
|
refreshPositionsAndGetDropConstraints(): GridDropInfo;
|
|
20
|
+
getGridInfo(runtimeWidget: RuntimeWidgetMeta, targetRect: ClientRect): GridInfo | null;
|
|
11
21
|
private get lazyTargetGridInfo();
|
|
12
|
-
private
|
|
22
|
+
private getGridPositionFromRect;
|
|
23
|
+
getGridPositionInfo({ positionRect, targetRect, targetGridInfo, includePadding, }: {
|
|
24
|
+
positionRect: RectLike<number>;
|
|
25
|
+
targetRect: ClientRect;
|
|
26
|
+
targetGridInfo: GridInfo;
|
|
27
|
+
includePadding: boolean;
|
|
28
|
+
}): {
|
|
29
|
+
xGU: number;
|
|
30
|
+
yGU: number;
|
|
31
|
+
widthGU: number;
|
|
32
|
+
heightGU: number;
|
|
33
|
+
tileWidth: number;
|
|
34
|
+
tileHeight: number;
|
|
35
|
+
targetPadding: import("@superblocksteam/library-shared/types").Spacing;
|
|
36
|
+
};
|
|
13
37
|
get lazyChildGridPositionsGU(): Record<`I-${string}`, {
|
|
14
38
|
xGU: number;
|
|
15
39
|
yGU: number;
|
|
@@ -17,7 +41,7 @@ export declare class GridManager {
|
|
|
17
41
|
heightGU: number;
|
|
18
42
|
tileWidth: number;
|
|
19
43
|
tileHeight: number;
|
|
20
|
-
targetPadding:
|
|
44
|
+
targetPadding: import("@superblocksteam/library-shared/types").Spacing;
|
|
21
45
|
} | null>;
|
|
22
46
|
get lazyActiveRectGU(): {
|
|
23
47
|
xGU: number;
|
|
@@ -26,8 +50,9 @@ export declare class GridManager {
|
|
|
26
50
|
heightGU: number;
|
|
27
51
|
tileWidth: number;
|
|
28
52
|
tileHeight: number;
|
|
29
|
-
targetPadding:
|
|
53
|
+
targetPadding: import("@superblocksteam/library-shared/types").Spacing;
|
|
30
54
|
} | null;
|
|
31
55
|
get lazyIsFreePos(): boolean;
|
|
32
56
|
adjustDragRectForCollisions(collidingRect: ClientRect | null): ClientRect | null;
|
|
33
57
|
}
|
|
58
|
+
export {};
|
|
@@ -23,7 +23,7 @@ declare class PropertiesPanelManager {
|
|
|
23
23
|
computeSideEffectsForPropertyUpdate(payload: {
|
|
24
24
|
sourceId: SbElement;
|
|
25
25
|
updates: Record<string, PropertyInfo<unknown>>;
|
|
26
|
-
}): Record
|
|
26
|
+
}): Record<`SB-${string}`, {
|
|
27
27
|
props?: Record<string, PropertyInfo<unknown>>;
|
|
28
28
|
meta?: Record<string, unknown>;
|
|
29
29
|
}>;
|
|
@@ -3,7 +3,9 @@ import { propertiesDefinition } from "./props.js";
|
|
|
3
3
|
import type { ContainerLayout } from "../../component-base/constants.js";
|
|
4
4
|
import type { InternalPropsWithOptional } from "../../properties-panel/props-builder.js";
|
|
5
5
|
type OptionalProps = "backgroundColor" | "border" | "borderRadius";
|
|
6
|
-
type ContainerProps = InternalPropsWithOptional<typeof propertiesDefinition, OptionalProps
|
|
6
|
+
type ContainerProps<T> = Omit<InternalPropsWithOptional<typeof propertiesDefinition, OptionalProps>, "layout"> & {
|
|
7
|
+
layout: T;
|
|
8
|
+
};
|
|
7
9
|
/**
|
|
8
10
|
* TODO:
|
|
9
11
|
* - interaciton rect of children will show outside of container if overflow
|
|
@@ -13,7 +15,7 @@ type ContainerProps = InternalPropsWithOptional<typeof propertiesDefinition, Opt
|
|
|
13
15
|
* - border style are showing some control default value even actually undefined. styles are coming from container classes but ideally we should set them as default props?
|
|
14
16
|
* - move more props to inner layout component
|
|
15
17
|
*/
|
|
16
|
-
export declare const InternalContainer: (props: ContainerProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const InternalContainer: <T extends ContainerLayout>(props: ContainerProps<T>) => import("react").JSX.Element;
|
|
17
19
|
export declare const SbContainer: import("react").FC<import("../../properties-panel/props-builder.js").ExternalProps<{
|
|
18
20
|
layout: import("../../properties-panel/props-builder.js").Section<((Record<string, import("../../properties-panel/props-builder.js").Prop<any, any>> & ((Omit<{
|
|
19
21
|
layout: import("../../properties-panel/props-builder.js").Prop<ContainerLayout, true>;
|
|
@@ -99,13 +99,13 @@ type EntityProps<Definition extends PropertiesDefinition, MergedSections = Merge
|
|
|
99
99
|
* - Properties are fully evaluated to their final types
|
|
100
100
|
*/
|
|
101
101
|
type InternalProps<Definition extends PropertiesDefinition, FlattenedProps = EntityProps<Definition>, BaseProps = Omit<SbComponentProps, keyof FlattenedProps>> = FlattenedProps & BaseProps;
|
|
102
|
-
type MakeOptional<T, K extends
|
|
102
|
+
type MakeOptional<T, K extends string> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
|
|
103
103
|
type CleanProps<T> = {
|
|
104
104
|
[K in keyof T as string extends K ? never : K]: T[K];
|
|
105
105
|
};
|
|
106
|
-
type InternalPropsWithOptional<Definition extends PropertiesDefinition, OptionalProps extends
|
|
106
|
+
type InternalPropsWithOptional<Definition extends PropertiesDefinition, OptionalProps extends string, InternalPropsWithDefinition = InternalProps<Definition>> = InternalPropsWithDefinition extends infer U ? U extends any ? MakeOptional<CleanProps<U>, OptionalProps> & {
|
|
107
107
|
[key: string]: any;
|
|
108
|
-
};
|
|
108
|
+
} : never : never;
|
|
109
109
|
/**
|
|
110
110
|
* External props exposed to component consumers
|
|
111
111
|
* - All properties are optional regardless of defaults
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/library",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.89",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@react-hook/resize-observer": "1.2.6",
|
|
34
34
|
"@superblocksteam/fast-deep-equal": "3.1.4",
|
|
35
35
|
"@superblocksteam/iso-currency": "2.0.0",
|
|
36
|
-
"@superblocksteam/library-shared": "2.0.0-next.
|
|
36
|
+
"@superblocksteam/library-shared": "2.0.0-next.89",
|
|
37
37
|
"@superblocksteam/shared": "0.9149.0",
|
|
38
38
|
"antd": "4.24.15",
|
|
39
39
|
"apca-w3": "^0.1.9",
|