@supernova-studio/model 0.55.28 → 0.55.30
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/index.d.mts +269 -2
- package/dist/index.d.ts +269 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/documentation-block-v1.ts +2 -0
- package/src/dsm/elements/raw-element.ts +2 -2
- package/src/utils/common.ts +1 -1
package/package.json
CHANGED
|
@@ -293,7 +293,9 @@ export const PageBlockBaseV1 = z.object({
|
|
|
293
293
|
persistentId: z.string(),
|
|
294
294
|
type: PageBlockTypeV1,
|
|
295
295
|
|
|
296
|
+
// V2 generic attributes
|
|
296
297
|
numberOfColumns: nullishToOptional(z.number()),
|
|
298
|
+
itemBackgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
297
299
|
|
|
298
300
|
// Element linking
|
|
299
301
|
designObjectId: nullishToOptional(z.string()),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { ObjectMeta } from "../../common";
|
|
2
3
|
import { DbCreateInputOmit, DbUpdate } from "../../helpers";
|
|
3
4
|
import { OmitStrict } from "../../utils";
|
|
4
|
-
import { ObjectMeta } from "../../common";
|
|
5
5
|
|
|
6
6
|
export type CreateDesignElement = DbCreateInputOmit<DesignElement>;
|
|
7
7
|
export type UpdateDesignElement = OmitStrict<
|
|
8
8
|
DbUpdate<DesignElement>,
|
|
9
|
-
"brandPersistentId" | "childType" | "designSystemVersionId" | "shortPersistentId"
|
|
9
|
+
"brandPersistentId" | "childType" | "designSystemVersionId" | "shortPersistentId"
|
|
10
10
|
>;
|
|
11
11
|
|
|
12
12
|
//
|
package/src/utils/common.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function parseUrl(url: string): URL {
|
|
|
58
58
|
return new URL(url.startsWith("https://") || url.startsWith("http://") ? url : `https://${url}`);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export function mapByUnique<V, K>(items: V
|
|
61
|
+
export function mapByUnique<V, K>(items: Iterable<V>, keyFn: (item: V) => K): Map<K, V> {
|
|
62
62
|
const result = new Map<K, V>();
|
|
63
63
|
for (const item of items) {
|
|
64
64
|
result.set(keyFn(item), item);
|