@superblocksteam/library 2.0.5 → 2.0.6-next.1
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-CROgh4Wr.js → allPaths-CnwU0IkR.js} +2 -2
- package/dist/{allPaths-CROgh4Wr.js.map → allPaths-CnwU0IkR.js.map} +1 -1
- package/dist/{allPaths-Va1k8Bn4.js → allPaths-D2gSnJTY.js} +2 -2
- package/dist/{allPaths-Va1k8Bn4.js.map → allPaths-D2gSnJTY.js.map} +1 -1
- package/dist/{allPathsLoader-BJthmVkF.js → allPathsLoader-CKSn0cwC.js} +3 -3
- package/dist/{allPathsLoader-BJthmVkF.js.map → allPathsLoader-CKSn0cwC.js.map} +1 -1
- package/dist/{allPathsLoader-BdHvMdcd.js → allPathsLoader-gti9SNxQ.js} +3 -3
- package/dist/{allPathsLoader-BdHvMdcd.js.map → allPathsLoader-gti9SNxQ.js.map} +1 -1
- package/dist/{devtools-consolidated-Ck9KuyGf.js → devtools-consolidated-DZq1Gl91.js} +2 -2
- package/dist/{devtools-consolidated-Ck9KuyGf.js.map → devtools-consolidated-DZq1Gl91.js.map} +1 -1
- package/dist/{index-CJuRwhWz.js → index-4wDJlcoC.js} +84 -28
- package/dist/{index-CJuRwhWz.js.map → index-4wDJlcoC.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-3mcg6Jfx.js → splitPathsBySizeLoader-CJ_TAf-i.js} +2 -2
- package/dist/{splitPathsBySizeLoader-3mcg6Jfx.js.map → splitPathsBySizeLoader-CJ_TAf-i.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-BFbna0L2.js → splitPathsBySizeLoader-YkToSR_C.js} +2 -2
- package/dist/{splitPathsBySizeLoader-BFbna0L2.js.map → splitPathsBySizeLoader-YkToSR_C.js.map} +1 -1
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +12 -1
- package/dist-types/edit-mode/vite.d.ts +5 -0
- package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +2 -1
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +1 -1
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as clientExports } from "./index-
|
|
2
|
-
import { a0, a1, X, O, P, a2, N, a3, a4, a5, a6, a7, a8, B, a9, aa, ab, ac, ad, Z, ae, V, af, ag, ah, ai, Y, z, S, q, d, e, n, s, l, Q, C, v, w, f, i, g, B as B2, c, u, k, h, y, x, A, aj, ak, al, am, an, T, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, D, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, M, aY, aZ, a_, a$, b0, b1, G, b2, b3, b4, b5, b6, J, b7, b8, E, b9, ba, bb, r, L, K, bc, bd, be, W, F, H, 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, bH, bI, bJ, bK, bL, U, R, bM } from "./index-
|
|
1
|
+
import { $ as clientExports } from "./index-4wDJlcoC.js";
|
|
2
|
+
import { a0, a1, X, O, P, a2, N, a3, a4, a5, a6, a7, a8, B, a9, aa, ab, ac, ad, Z, ae, V, af, ag, ah, ai, Y, z, S, q, d, e, n, s, l, Q, C, v, w, f, i, g, B as B2, c, u, k, h, y, x, A, aj, ak, al, am, an, T, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, D, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, M, aY, aZ, a_, a$, b0, b1, G, b2, b3, b4, b5, b6, J, b7, b8, E, b9, ba, bb, r, L, K, bc, bd, be, W, F, H, 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, bH, bI, bJ, bK, bL, U, R, bM } from "./index-4wDJlcoC.js";
|
|
3
3
|
const createRoot = clientExports.createRoot;
|
|
4
4
|
export {
|
|
5
5
|
a0 as Await,
|
|
@@ -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-4wDJlcoC.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-CJ_TAf-i.js.map
|
package/dist/{splitPathsBySizeLoader-3mcg6Jfx.js.map → splitPathsBySizeLoader-CJ_TAf-i.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitPathsBySizeLoader-
|
|
1
|
+
{"version":3,"file":"splitPathsBySizeLoader-CJ_TAf-i.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,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-4wDJlcoC.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-YkToSR_C.js.map
|
package/dist/{splitPathsBySizeLoader-BFbna0L2.js.map → splitPathsBySizeLoader-YkToSR_C.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitPathsBySizeLoader-
|
|
1
|
+
{"version":3,"file":"splitPathsBySizeLoader-YkToSR_C.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,20 +1,24 @@
|
|
|
1
1
|
import { type PropertyInfo, type SbElement, type SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
2
|
import type RuntimeEntitiesManager from "./runtime-entities-manager.js";
|
|
3
3
|
import type { IEntityManager } from "../../lib/internal-details/lib/evaluator/base-entity-manager.js";
|
|
4
|
+
import type { ComponentRegistry } from "../../lib/internal-details/lib/features/component-registry.js";
|
|
4
5
|
import type { PropertiesDefinition } from "../../lib/user-facing/properties-panel/props-builder.js";
|
|
5
6
|
import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
|
|
6
7
|
declare class PropertiesPanelManager {
|
|
7
8
|
readonly runtimeEntitiesManager: RuntimeEntitiesManager;
|
|
8
9
|
readonly entityManager: IEntityManager;
|
|
10
|
+
readonly componentsManager: ComponentRegistry;
|
|
9
11
|
private propertiesDefinitions;
|
|
10
12
|
private propertiesPanelTrackerDisposer;
|
|
11
13
|
private nonDynamicPropertyPanels;
|
|
12
14
|
private _propertyLookupCache;
|
|
13
|
-
|
|
15
|
+
private removeHotReloadListener;
|
|
16
|
+
constructor(runtimeEntitiesManager: RuntimeEntitiesManager, entityManager: IEntityManager, componentsManager: ComponentRegistry);
|
|
14
17
|
getPropertiesPanel(scopeId: string, instanceId: SbInstance): PropertiesPanelDefinition;
|
|
15
18
|
trackPropertiesPanel(scopeId: string, instanceId: SbInstance, sourceId: string): void;
|
|
16
19
|
getPropertiesDefinition(type: string): PropertiesDefinition | undefined;
|
|
17
20
|
setPropertiesDefinition(widgetType: string, propertiesDefinition: PropertiesDefinition): void;
|
|
21
|
+
updatePropertiesDefinitionForType(type: string): void;
|
|
18
22
|
getNonDynamicPropertiesPanels(): {
|
|
19
23
|
[k: string]: PropertiesPanelDefinition;
|
|
20
24
|
};
|
|
@@ -27,5 +31,12 @@ declare class PropertiesPanelManager {
|
|
|
27
31
|
}>;
|
|
28
32
|
private cachedPropertyLookupForType;
|
|
29
33
|
private getPropertyForPath;
|
|
34
|
+
/**
|
|
35
|
+
* When a custom component's source code is updated, we want to update the properties definition for that component.
|
|
36
|
+
* In order to do that, we need to listen to vite's hot reload events. We can't put import.meta.hot calls in the library
|
|
37
|
+
* because Vite just compiled all of those out in library builds, so we inject a listener from the plugin instead.
|
|
38
|
+
* https://github.com/vitejs/vite/blob/v6.2/packages/vite/src/node/plugins/define.ts#L37
|
|
39
|
+
*/
|
|
40
|
+
private attachHotReloadListener;
|
|
30
41
|
}
|
|
31
42
|
export default PropertiesPanelManager;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { VitePostMessageKind } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { VitePostMessage } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare function onVitePostMessage<T extends VitePostMessageKind, Message extends Extract<VitePostMessage, {
|
|
4
|
+
kind: T;
|
|
5
|
+
}>>(kind: T, callback: (message: Message) => void): () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManagedPropsList } from "../../../user-facing/properties-panel/props-builder.js";
|
|
1
|
+
import type { ManagedPropsList, PropertiesDefinition } from "../../../user-facing/properties-panel/props-builder.js";
|
|
2
2
|
import type { RootStore } from "../root-store.js";
|
|
3
3
|
import type { ComponentRegistryShareState } from "@superblocksteam/library-shared/types";
|
|
4
4
|
import type * as React from "react";
|
|
@@ -7,6 +7,7 @@ export type Type = {
|
|
|
7
7
|
sbType: string;
|
|
8
8
|
isDroppable?: boolean;
|
|
9
9
|
hasExtendedClickArea?: boolean;
|
|
10
|
+
propertiesDefinition?: PropertiesDefinition;
|
|
10
11
|
} & React.ComponentType<any>;
|
|
11
12
|
export declare class ComponentRegistry implements ComponentRegistryShareState {
|
|
12
13
|
readonly rootStore: RootStore;
|
|
@@ -14,7 +14,7 @@ export declare const createTextStyleCompositeBase: () => {
|
|
|
14
14
|
letterSpacing: Prop<number, false>;
|
|
15
15
|
textTransform: Prop<string, false>;
|
|
16
16
|
};
|
|
17
|
-
export declare const basePropertiesPaneDisplay: PropertiesPanelDisplay<
|
|
17
|
+
export declare const basePropertiesPaneDisplay: PropertiesPanelDisplay<TextStyleWithVariant>;
|
|
18
18
|
export declare const textStyleProp: ({ baseProp, propertiesPanel, }?: {
|
|
19
19
|
baseProp?: ReturnType<typeof createTextStyleCompositeBase>;
|
|
20
20
|
propertiesPanel?: Omit<Partial<PropertiesPanelDisplay<TextStyleWithVariant, "TEXT_STYLE">>, "controlType">;
|
|
@@ -207,7 +207,7 @@ declare class Prop<Type extends DataType, _HasDefault extends boolean = false> {
|
|
|
207
207
|
setName(name: string): this;
|
|
208
208
|
onEdit(callback: SideEffectCallback): this;
|
|
209
209
|
onEvaluate(callback: SideEffectCallback): this;
|
|
210
|
-
propertiesPanel<CT extends ControlType>(schema: Omit<Partial<PropertiesPanelDisplay<Type, CT>>, "
|
|
210
|
+
propertiesPanel<CT extends ControlType>(schema: Omit<Partial<PropertiesPanelDisplay<Type, CT>>, "isTriggerProperty">): this;
|
|
211
211
|
build(): ManagedProp<Type>;
|
|
212
212
|
toDefinition(entity?: Entity, scopedState?: ScopedState): WidgetPropertyDefinition<DataType> | undefined;
|
|
213
213
|
getRelations(): Relation[][];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/library",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6-next.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@react-hook/resize-observer": "1.2.6",
|
|
33
33
|
"@superblocksteam/fast-deep-equal": "3.1.4",
|
|
34
34
|
"@superblocksteam/iso-currency": "2.0.0",
|
|
35
|
-
"@superblocksteam/library-shared": "2.0.
|
|
35
|
+
"@superblocksteam/library-shared": "2.0.6-next.1",
|
|
36
36
|
"@superblocksteam/shared": "0.9160.0",
|
|
37
37
|
"antd": "4.24.15",
|
|
38
38
|
"apca-w3": "^0.1.9",
|