@ibodr/schema 0.2.1 → 0.2.2
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.ts +28 -14
- package/dist/index.mjs +45 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -825,6 +825,10 @@ interface DrThemeDefaultColors {
|
|
|
825
825
|
'light-red': DrDefaultColor;
|
|
826
826
|
red: DrDefaultColor;
|
|
827
827
|
white: DrDefaultColor;
|
|
828
|
+
/** Soft pink sticky (Miro-like pastel) */
|
|
829
|
+
pink: DrDefaultColor;
|
|
830
|
+
/** Soft cyan / teal sticky (Miro-like pastel) */
|
|
831
|
+
cyan: DrDefaultColor;
|
|
828
832
|
}
|
|
829
833
|
/**
|
|
830
834
|
* A font definition within a theme. Maps a font style name to a CSS font-family
|
|
@@ -984,14 +988,24 @@ type DrThemeId = keyof DrThemes & string;
|
|
|
984
988
|
type DrDefaultColorStyle = {
|
|
985
989
|
[K in keyof DrThemeDefaultColors]: DrThemeDefaultColors[K] extends DrDefaultColor ? K : never;
|
|
986
990
|
}[keyof DrThemeDefaultColors] & string;
|
|
991
|
+
/**
|
|
992
|
+
* Named theme color **or** a CSS hex (`#RGB` / `#RRGGBB` / `#RRGGBBAA`).
|
|
993
|
+
* Hex values render via {@link getColorValue} pass-through and are used for
|
|
994
|
+
* faithful imports (e.g. Miro sticky pastels).
|
|
995
|
+
*
|
|
996
|
+
* @public
|
|
997
|
+
*/
|
|
998
|
+
type DrColorStyle = DrDefaultColorStyle | (string & {});
|
|
999
|
+
/** @public */
|
|
1000
|
+
declare function isCssHexColor(value: unknown): value is string;
|
|
987
1001
|
/**
|
|
988
1002
|
* @public
|
|
989
1003
|
*/
|
|
990
|
-
declare const DefaultColorStyle: EnumStyleProp<
|
|
1004
|
+
declare const DefaultColorStyle: EnumStyleProp<DrColorStyle>;
|
|
991
1005
|
/**
|
|
992
1006
|
* @public
|
|
993
1007
|
*/
|
|
994
|
-
declare const DefaultLabelColorStyle: EnumStyleProp<
|
|
1008
|
+
declare const DefaultLabelColorStyle: EnumStyleProp<DrColorStyle>;
|
|
995
1009
|
/**
|
|
996
1010
|
* Scan theme definitions and sync color registrations to match.
|
|
997
1011
|
* A color entry is any key in `DrThemeColors` whose value is an object
|
|
@@ -1589,8 +1603,8 @@ type DrArrowShapeArrowheadStyle = T.TypeOf<typeof ArrowShapeArrowheadStartStyle>
|
|
|
1589
1603
|
*/
|
|
1590
1604
|
interface DrArrowShapeProps {
|
|
1591
1605
|
kind: DrArrowShapeKind;
|
|
1592
|
-
labelColor:
|
|
1593
|
-
color:
|
|
1606
|
+
labelColor: DrColorStyle;
|
|
1607
|
+
color: DrColorStyle;
|
|
1594
1608
|
fill: DrDefaultFillStyle;
|
|
1595
1609
|
dash: DrDefaultDashStyle;
|
|
1596
1610
|
size: DrDefaultSizeStyle;
|
|
@@ -1779,7 +1793,7 @@ interface DrDrawShapeSegment {
|
|
|
1779
1793
|
*/
|
|
1780
1794
|
interface DrDrawShapeProps {
|
|
1781
1795
|
/** Color style for the drawing stroke */
|
|
1782
|
-
color:
|
|
1796
|
+
color: DrColorStyle;
|
|
1783
1797
|
/** Fill style for closed drawing shapes */
|
|
1784
1798
|
fill: DrDefaultFillStyle;
|
|
1785
1799
|
/** Dash pattern style for the stroke */
|
|
@@ -1949,7 +1963,7 @@ interface DrFrameShapeProps {
|
|
|
1949
1963
|
/** Display name for the frame (shown in UI) */
|
|
1950
1964
|
name: string;
|
|
1951
1965
|
/** Color style for the frame border and label */
|
|
1952
|
-
color:
|
|
1966
|
+
color: DrColorStyle;
|
|
1953
1967
|
}
|
|
1954
1968
|
/**
|
|
1955
1969
|
* A frame shape provides a container for organizing and grouping other shapes.
|
|
@@ -2156,9 +2170,9 @@ interface DrGeoShapeProps {
|
|
|
2156
2170
|
/** Scale factor applied to the shape */
|
|
2157
2171
|
scale: number;
|
|
2158
2172
|
/** Color style for text label */
|
|
2159
|
-
labelColor:
|
|
2173
|
+
labelColor: DrColorStyle;
|
|
2160
2174
|
/** Color style for the shape outline */
|
|
2161
|
-
color:
|
|
2175
|
+
color: DrColorStyle;
|
|
2162
2176
|
/** Fill style for the shape interior */
|
|
2163
2177
|
fill: DrDefaultFillStyle;
|
|
2164
2178
|
/** Size/thickness style for outline and text */
|
|
@@ -2311,7 +2325,7 @@ declare const groupShapeMigrations: DrPropsMigrations;
|
|
|
2311
2325
|
*/
|
|
2312
2326
|
interface DrHighlightShapeProps {
|
|
2313
2327
|
/** The color style of the highlight stroke */
|
|
2314
|
-
color:
|
|
2328
|
+
color: DrColorStyle;
|
|
2315
2329
|
/** The size style determining the thickness of the highlight stroke */
|
|
2316
2330
|
size: DrDefaultSizeStyle;
|
|
2317
2331
|
/** Array of segments that make up the highlight stroke path */
|
|
@@ -2642,7 +2656,7 @@ interface DrLineShapePoint {
|
|
|
2642
2656
|
*/
|
|
2643
2657
|
interface DrLineShapeProps {
|
|
2644
2658
|
/** Color style of the line stroke */
|
|
2645
|
-
color:
|
|
2659
|
+
color: DrColorStyle;
|
|
2646
2660
|
/** Dash pattern style for the line (solid, dashed, dotted) */
|
|
2647
2661
|
dash: DrDefaultDashStyle;
|
|
2648
2662
|
/** Size/thickness style of the line stroke */
|
|
@@ -2738,9 +2752,9 @@ declare const lineShapeMigrations: DrPropsMigrations;
|
|
|
2738
2752
|
*/
|
|
2739
2753
|
interface DrNoteShapeProps {
|
|
2740
2754
|
/** Background color style of the note */
|
|
2741
|
-
color:
|
|
2755
|
+
color: DrColorStyle;
|
|
2742
2756
|
/** Text color style for the note content */
|
|
2743
|
-
labelColor:
|
|
2757
|
+
labelColor: DrColorStyle;
|
|
2744
2758
|
/** Size style determining the font size and note dimensions */
|
|
2745
2759
|
size: DrDefaultSizeStyle;
|
|
2746
2760
|
/** Font family style for the note text */
|
|
@@ -2900,7 +2914,7 @@ type DrDefaultTextAlignStyle = T.TypeOf<typeof DefaultTextAlignStyle>;
|
|
|
2900
2914
|
* ```
|
|
2901
2915
|
*/
|
|
2902
2916
|
interface DrTextShapeProps {
|
|
2903
|
-
color:
|
|
2917
|
+
color: DrColorStyle;
|
|
2904
2918
|
size: DrDefaultSizeStyle;
|
|
2905
2919
|
font: DrDefaultFontStyle;
|
|
2906
2920
|
textAlign: DrDefaultTextAlignStyle;
|
|
@@ -6712,4 +6726,4 @@ declare class b64Vecs {
|
|
|
6712
6726
|
static decodeLastPoint(b64Points: string): VecModel | null;
|
|
6713
6727
|
}
|
|
6714
6728
|
|
|
6715
|
-
export { ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, ArrowShapeKindStyle, AssetRecordType, type BoxModel, CameraRecordType, type CreatePresenceStateDerivationOpts, type CustomRecordInfo, DR_BOARD_BACKGROUND_TYPES, DefaultColorStyle, DefaultDashStyle, DefaultFillStyle, DefaultFontFamilies, DefaultFontStyle, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultSizeStyle, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DocumentRecordType, type DrArrowBinding, type DrArrowBindingProps, type DrArrowShape, type DrArrowShapeArrowheadStyle, type DrArrowShapeKind, type DrArrowShapeProps, type DrAsset, type DrAssetContext, type DrAssetId, type DrAssetPartial, type DrAssetShape, type DrAssetStore, type DrBaseAsset, type DrBaseBinding, type DrBaseShape, type DrBinding, type DrBindingCreate, type DrBindingId, type DrBindingUpdate, type DrBoardBackgroundType, type DrBookmarkAsset, type DrBookmarkShape, type DrBookmarkShapeProps, type DrCamera, type DrCameraId, type DrCanvasUiColor, type DrCreateShapePartial, type DrCursor, type DrCursorType, type DrCustomRecord, DrDOCUMENT_ID, type DrDefaultAsset, type DrDefaultBinding, type DrDefaultColor, type DrDefaultColorStyle, type DrDefaultDashStyle, type DrDefaultFillStyle, type DrDefaultFontStyle, type DrDefaultHorizontalAlignStyle, type DrDefaultRecord, type DrDefaultShape, type DrDefaultSizeStyle, type DrDefaultTextAlignStyle, type DrDefaultVerticalAlignStyle, type DrDocument, type DrDrawShape, type DrDrawShapeProps, type DrDrawShapeSegment, type DrEmbedShape, type DrEmbedShapeProps, type DrFontFace, type DrFontFaceSource, type DrFrameShape, type DrFrameShapeProps, type DrGeoShape, type DrGeoShapeGeoStyle, type DrGeoShapeProps, type DrGlobalAssetPropsMap, type DrGlobalBindingPropsMap, type DrGlobalRecordPropsMap, type DrGlobalShapePropsMap, type DrGroupShape, type DrGroupShapeProps, type DrHandle, type DrHandleType, type DrHighlightShape, type DrHighlightShapeProps, DrINSTANCE_ID, type DrImageAsset, type DrImageShape, type DrImageShapeProps, type DrIndexedAssets, type DrIndexedBindings, type DrIndexedRecords, type DrIndexedShapes, type DrInstance, type DrInstanceId, type DrInstancePageState, type DrInstancePageStateId, type DrInstancePresence, type DrInstancePresenceID, type DrLanguage, type DrLineShape, type DrLineShapePoint, type DrLineShapeProps, type DrLineShapeSplineStyle, type DrNoteShape, type DrNoteShapeProps, type DrOpacityType, DrPOINTER_ID, type DrPage, type DrPageId, type DrParentId, type DrPointer, type DrPointerId, type DrPresenceStateInfo, type DrPropsMigration, type DrPropsMigrations, type DrRecord, type DrRemovedDefaultThemeColors, type DrRichText, type DrSchema, type DrScribble, type DrSerializedStore, type DrShape, type DrShapeCrop, type DrShapeId, type DrShapePartial, type DrStore, type DrStoreProps, type DrStoreSchema, type DrStoreSnapshot, type DrTextShape, type DrTextShapeProps, type DrTheme, type DrThemeColors, type DrThemeDefaultColors, type DrThemeFont, type DrThemeFonts, type DrThemeId, type DrThemeUiColorKeys, type DrThemes, type DrUnknownAsset, type DrUnknownBinding, type DrUnknownShape, type DrUser, type DrUserId, type DrUserStore, type DrVideoAsset, type DrVideoShape, type DrVideoShapeProps, ElbowArrowSnap, EnumStyleProp, type ExtractShapeByProps, GeoShapeGeoStyle, ImageShapeCrop, InstancePageStateRecordType, InstancePresenceRecordType, LANGUAGES, LineShapeSplineStyle, PageRecordType, PointerRecordType, type RecordProps, type RecordPropsType, type SchemaPropsInfo, type SetValue, type ShapeWithCrop, StyleProp, type StylePropValue, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, UserRecordType, type UserSchemaInfo, type VecModel, arrowBindingMigrations, arrowBindingProps, arrowBindingVersions, arrowShapeMigrations, arrowShapeProps, arrowShapeVersions, assetIdValidator, assetMigrations, b64Vecs, bindingIdValidator, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkShapeMigrations, bookmarkShapeProps, boxModelValidator, canvasUiColorTypeValidator, compressLegacySegments, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetRecordType, createAssetValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createCachedUserResolve, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createDrSchema, createPresenceStateDerivation, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createUserId, createUserRecordType, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, drawShapeMigrations, drawShapeProps, embedShapeMigrations, embedShapeProps, frameShapeMigrations, frameShapeProps, geoShapeMigrations, geoShapeProps, getDefaultTranslationLocale, getDefaultUserPresence, getShapePropKeysByStyle, groupShapeMigrations, groupShapeProps, highlightShapeMigrations, highlightShapeProps, idValidator, imageAssetMigrations, imageAssetProps, imageShapeMigrations, imageShapeProps, isBinding, isBindingId, isCustomRecord, isCustomRecordId, isDocument, isFontEntry, isPageId, isShape, isShapeId, isUserId, lineShapeMigrations, lineShapeProps, noteShapeMigrations, noteShapeProps, opacityValidator, pageIdValidator, parentIdValidator, pluckPreservingValues, registerColorsFromThemes, registerFontsFromThemes, richTextValidator, rootBindingMigrations, rootShapeMigrations, scribbleValidator, shapeIdValidator, textShapeMigrations, textShapeProps, toRichText, userIdValidator, vecModelValidator, videoAssetMigrations, videoAssetProps, videoShapeMigrations, videoShapeProps };
|
|
6729
|
+
export { ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, ArrowShapeKindStyle, AssetRecordType, type BoxModel, CameraRecordType, type CreatePresenceStateDerivationOpts, type CustomRecordInfo, DR_BOARD_BACKGROUND_TYPES, DefaultColorStyle, DefaultDashStyle, DefaultFillStyle, DefaultFontFamilies, DefaultFontStyle, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultSizeStyle, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DocumentRecordType, type DrArrowBinding, type DrArrowBindingProps, type DrArrowShape, type DrArrowShapeArrowheadStyle, type DrArrowShapeKind, type DrArrowShapeProps, type DrAsset, type DrAssetContext, type DrAssetId, type DrAssetPartial, type DrAssetShape, type DrAssetStore, type DrBaseAsset, type DrBaseBinding, type DrBaseShape, type DrBinding, type DrBindingCreate, type DrBindingId, type DrBindingUpdate, type DrBoardBackgroundType, type DrBookmarkAsset, type DrBookmarkShape, type DrBookmarkShapeProps, type DrCamera, type DrCameraId, type DrCanvasUiColor, type DrColorStyle, type DrCreateShapePartial, type DrCursor, type DrCursorType, type DrCustomRecord, DrDOCUMENT_ID, type DrDefaultAsset, type DrDefaultBinding, type DrDefaultColor, type DrDefaultColorStyle, type DrDefaultDashStyle, type DrDefaultFillStyle, type DrDefaultFontStyle, type DrDefaultHorizontalAlignStyle, type DrDefaultRecord, type DrDefaultShape, type DrDefaultSizeStyle, type DrDefaultTextAlignStyle, type DrDefaultVerticalAlignStyle, type DrDocument, type DrDrawShape, type DrDrawShapeProps, type DrDrawShapeSegment, type DrEmbedShape, type DrEmbedShapeProps, type DrFontFace, type DrFontFaceSource, type DrFrameShape, type DrFrameShapeProps, type DrGeoShape, type DrGeoShapeGeoStyle, type DrGeoShapeProps, type DrGlobalAssetPropsMap, type DrGlobalBindingPropsMap, type DrGlobalRecordPropsMap, type DrGlobalShapePropsMap, type DrGroupShape, type DrGroupShapeProps, type DrHandle, type DrHandleType, type DrHighlightShape, type DrHighlightShapeProps, DrINSTANCE_ID, type DrImageAsset, type DrImageShape, type DrImageShapeProps, type DrIndexedAssets, type DrIndexedBindings, type DrIndexedRecords, type DrIndexedShapes, type DrInstance, type DrInstanceId, type DrInstancePageState, type DrInstancePageStateId, type DrInstancePresence, type DrInstancePresenceID, type DrLanguage, type DrLineShape, type DrLineShapePoint, type DrLineShapeProps, type DrLineShapeSplineStyle, type DrNoteShape, type DrNoteShapeProps, type DrOpacityType, DrPOINTER_ID, type DrPage, type DrPageId, type DrParentId, type DrPointer, type DrPointerId, type DrPresenceStateInfo, type DrPropsMigration, type DrPropsMigrations, type DrRecord, type DrRemovedDefaultThemeColors, type DrRichText, type DrSchema, type DrScribble, type DrSerializedStore, type DrShape, type DrShapeCrop, type DrShapeId, type DrShapePartial, type DrStore, type DrStoreProps, type DrStoreSchema, type DrStoreSnapshot, type DrTextShape, type DrTextShapeProps, type DrTheme, type DrThemeColors, type DrThemeDefaultColors, type DrThemeFont, type DrThemeFonts, type DrThemeId, type DrThemeUiColorKeys, type DrThemes, type DrUnknownAsset, type DrUnknownBinding, type DrUnknownShape, type DrUser, type DrUserId, type DrUserStore, type DrVideoAsset, type DrVideoShape, type DrVideoShapeProps, ElbowArrowSnap, EnumStyleProp, type ExtractShapeByProps, GeoShapeGeoStyle, ImageShapeCrop, InstancePageStateRecordType, InstancePresenceRecordType, LANGUAGES, LineShapeSplineStyle, PageRecordType, PointerRecordType, type RecordProps, type RecordPropsType, type SchemaPropsInfo, type SetValue, type ShapeWithCrop, StyleProp, type StylePropValue, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, UserRecordType, type UserSchemaInfo, type VecModel, arrowBindingMigrations, arrowBindingProps, arrowBindingVersions, arrowShapeMigrations, arrowShapeProps, arrowShapeVersions, assetIdValidator, assetMigrations, b64Vecs, bindingIdValidator, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkShapeMigrations, bookmarkShapeProps, boxModelValidator, canvasUiColorTypeValidator, compressLegacySegments, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetRecordType, createAssetValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createCachedUserResolve, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createDrSchema, createPresenceStateDerivation, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createUserId, createUserRecordType, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, drawShapeMigrations, drawShapeProps, embedShapeMigrations, embedShapeProps, frameShapeMigrations, frameShapeProps, geoShapeMigrations, geoShapeProps, getDefaultTranslationLocale, getDefaultUserPresence, getShapePropKeysByStyle, groupShapeMigrations, groupShapeProps, highlightShapeMigrations, highlightShapeProps, idValidator, imageAssetMigrations, imageAssetProps, imageShapeMigrations, imageShapeProps, isBinding, isBindingId, isCssHexColor, isCustomRecord, isCustomRecordId, isDocument, isFontEntry, isPageId, isShape, isShapeId, isUserId, lineShapeMigrations, lineShapeProps, noteShapeMigrations, noteShapeProps, opacityValidator, pageIdValidator, parentIdValidator, pluckPreservingValues, registerColorsFromThemes, registerFontsFromThemes, richTextValidator, rootBindingMigrations, rootShapeMigrations, scribbleValidator, shapeIdValidator, textShapeMigrations, textShapeProps, toRichText, userIdValidator, vecModelValidator, videoAssetMigrations, videoAssetProps, videoShapeMigrations, videoShapeProps };
|
package/dist/index.mjs
CHANGED
|
@@ -658,8 +658,6 @@ function createPropsMigration(typeName, subType, m) {
|
|
|
658
658
|
} : void 0
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
|
|
662
|
-
// src/styles/DrColorStyle.ts
|
|
663
661
|
var defaultColorNames = [
|
|
664
662
|
"black",
|
|
665
663
|
"grey",
|
|
@@ -673,16 +671,48 @@ var defaultColorNames = [
|
|
|
673
671
|
"light-green",
|
|
674
672
|
"light-red",
|
|
675
673
|
"red",
|
|
676
|
-
"white"
|
|
674
|
+
"white",
|
|
675
|
+
"pink",
|
|
676
|
+
"cyan"
|
|
677
677
|
];
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
678
|
+
function isCssHexColor(value) {
|
|
679
|
+
return typeof value === "string" && /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value);
|
|
680
|
+
}
|
|
681
|
+
var cssHexColorValidator = T.string.check("css-hex-color", (value) => {
|
|
682
|
+
if (!isCssHexColor(value)) {
|
|
683
|
+
throw new Error(`Expected CSS hex color (#RGB/#RRGGBB/#RRGGBBAA), got ${JSON.stringify(value)}`);
|
|
684
|
+
}
|
|
685
685
|
});
|
|
686
|
+
function colorStyleValidator(namedValues) {
|
|
687
|
+
return T.or(T.literalEnum(...namedValues), cssHexColorValidator);
|
|
688
|
+
}
|
|
689
|
+
var ColorStyleProp = class extends EnumStyleProp {
|
|
690
|
+
constructor(id, defaultValue, values) {
|
|
691
|
+
super(id, defaultValue, values);
|
|
692
|
+
this.rebuildValidator();
|
|
693
|
+
}
|
|
694
|
+
rebuildValidator() {
|
|
695
|
+
this.type = colorStyleValidator(this.values);
|
|
696
|
+
}
|
|
697
|
+
addValues(...newValues) {
|
|
698
|
+
super.addValues(...newValues);
|
|
699
|
+
this.rebuildValidator();
|
|
700
|
+
}
|
|
701
|
+
removeValues(...valuesToRemove) {
|
|
702
|
+
super.removeValues(...valuesToRemove);
|
|
703
|
+
this.rebuildValidator();
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
var DefaultColorStyle = new ColorStyleProp(
|
|
707
|
+
"draw:color",
|
|
708
|
+
"black",
|
|
709
|
+
defaultColorNames
|
|
710
|
+
);
|
|
711
|
+
var DefaultLabelColorStyle = new ColorStyleProp(
|
|
712
|
+
"draw:labelColor",
|
|
713
|
+
"black",
|
|
714
|
+
defaultColorNames
|
|
715
|
+
);
|
|
686
716
|
function registerColorsFromThemes(definitions) {
|
|
687
717
|
const colorNames = /* @__PURE__ */ new Set();
|
|
688
718
|
for (const def of Object.values(definitions)) {
|
|
@@ -698,7 +728,9 @@ function registerColorsFromThemes(definitions) {
|
|
|
698
728
|
DefaultColorStyle.addValues(...colorNames);
|
|
699
729
|
DefaultLabelColorStyle.addValues(...colorNames);
|
|
700
730
|
}
|
|
701
|
-
const toRemove = DefaultColorStyle.values.filter(
|
|
731
|
+
const toRemove = DefaultColorStyle.values.filter(
|
|
732
|
+
(v) => !isCssHexColor(v) && !colorNames.has(v)
|
|
733
|
+
);
|
|
702
734
|
if (toRemove.length > 0) {
|
|
703
735
|
DefaultColorStyle.removeValues(...toRemove);
|
|
704
736
|
DefaultLabelColorStyle.removeValues(...toRemove);
|
|
@@ -4111,10 +4143,10 @@ function getSupportedLocale(locale) {
|
|
|
4111
4143
|
// src/index.ts
|
|
4112
4144
|
registerDrawLibraryVersion(
|
|
4113
4145
|
"@ibodr/schema",
|
|
4114
|
-
"0.2.
|
|
4146
|
+
"0.2.2",
|
|
4115
4147
|
"esm"
|
|
4116
4148
|
);
|
|
4117
4149
|
|
|
4118
|
-
export { ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, ArrowShapeKindStyle, AssetRecordType, CameraRecordType, DR_BOARD_BACKGROUND_TYPES, DefaultColorStyle, DefaultDashStyle, DefaultFillStyle, DefaultFontFamilies, DefaultFontStyle, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultSizeStyle, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DocumentRecordType, DrDOCUMENT_ID, DrINSTANCE_ID, DrPOINTER_ID, ElbowArrowSnap, EnumStyleProp, GeoShapeGeoStyle, ImageShapeCrop, InstancePageStateRecordType, InstancePresenceRecordType, LANGUAGES, LineShapeSplineStyle, PageRecordType, PointerRecordType, StyleProp, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, UserRecordType, arrowBindingMigrations, arrowBindingProps, arrowBindingVersions, arrowShapeMigrations, arrowShapeProps, arrowShapeVersions, assetIdValidator, assetMigrations, b64Vecs, bindingIdValidator, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkShapeMigrations, bookmarkShapeProps, boxModelValidator, canvasUiColorTypeValidator, compressLegacySegments, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetRecordType, createAssetValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createCachedUserResolve, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createDrSchema, createPresenceStateDerivation, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createUserId, createUserRecordType, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, drawShapeMigrations, drawShapeProps, embedShapeMigrations, embedShapeProps, frameShapeMigrations, frameShapeProps, geoShapeMigrations, geoShapeProps, getDefaultTranslationLocale, getDefaultUserPresence, getShapePropKeysByStyle, groupShapeMigrations, groupShapeProps, highlightShapeMigrations, highlightShapeProps, idValidator, imageAssetMigrations, imageAssetProps, imageShapeMigrations, imageShapeProps, isBinding, isBindingId, isCustomRecord, isCustomRecordId, isDocument, isFontEntry, isPageId, isShape, isShapeId, isUserId, lineShapeMigrations, lineShapeProps, noteShapeMigrations, noteShapeProps, opacityValidator, pageIdValidator, parentIdValidator, pluckPreservingValues, registerColorsFromThemes, registerFontsFromThemes, richTextValidator, rootBindingMigrations, rootShapeMigrations, scribbleValidator, shapeIdValidator, textShapeMigrations, textShapeProps, toRichText, userIdValidator, vecModelValidator, videoAssetMigrations, videoAssetProps, videoShapeMigrations, videoShapeProps };
|
|
4150
|
+
export { ArrowShapeArrowheadEndStyle, ArrowShapeArrowheadStartStyle, ArrowShapeKindStyle, AssetRecordType, CameraRecordType, DR_BOARD_BACKGROUND_TYPES, DefaultColorStyle, DefaultDashStyle, DefaultFillStyle, DefaultFontFamilies, DefaultFontStyle, DefaultHorizontalAlignStyle, DefaultLabelColorStyle, DefaultSizeStyle, DefaultTextAlignStyle, DefaultVerticalAlignStyle, DocumentRecordType, DrDOCUMENT_ID, DrINSTANCE_ID, DrPOINTER_ID, ElbowArrowSnap, EnumStyleProp, GeoShapeGeoStyle, ImageShapeCrop, InstancePageStateRecordType, InstancePresenceRecordType, LANGUAGES, LineShapeSplineStyle, PageRecordType, PointerRecordType, StyleProp, TL_CANVAS_UI_COLOR_TYPES, TL_CURSOR_TYPES, TL_HANDLE_TYPES, TL_SCRIBBLE_STATES, UserRecordType, arrowBindingMigrations, arrowBindingProps, arrowBindingVersions, arrowShapeMigrations, arrowShapeProps, arrowShapeVersions, assetIdValidator, assetMigrations, b64Vecs, bindingIdValidator, bookmarkAssetMigrations, bookmarkAssetProps, bookmarkShapeMigrations, bookmarkShapeProps, boxModelValidator, canvasUiColorTypeValidator, compressLegacySegments, createAssetPropsMigrationIds, createAssetPropsMigrationSequence, createAssetRecordType, createAssetValidator, createBindingId, createBindingPropsMigrationIds, createBindingPropsMigrationSequence, createBindingValidator, createCachedUserResolve, createCustomRecordId, createCustomRecordMigrationIds, createCustomRecordMigrationSequence, createDrSchema, createPresenceStateDerivation, createShapeId, createShapePropsMigrationIds, createShapePropsMigrationSequence, createShapeValidator, createUserId, createUserRecordType, defaultAssetSchemas, defaultBindingSchemas, defaultShapeSchemas, drawShapeMigrations, drawShapeProps, embedShapeMigrations, embedShapeProps, frameShapeMigrations, frameShapeProps, geoShapeMigrations, geoShapeProps, getDefaultTranslationLocale, getDefaultUserPresence, getShapePropKeysByStyle, groupShapeMigrations, groupShapeProps, highlightShapeMigrations, highlightShapeProps, idValidator, imageAssetMigrations, imageAssetProps, imageShapeMigrations, imageShapeProps, isBinding, isBindingId, isCssHexColor, isCustomRecord, isCustomRecordId, isDocument, isFontEntry, isPageId, isShape, isShapeId, isUserId, lineShapeMigrations, lineShapeProps, noteShapeMigrations, noteShapeProps, opacityValidator, pageIdValidator, parentIdValidator, pluckPreservingValues, registerColorsFromThemes, registerFontsFromThemes, richTextValidator, rootBindingMigrations, rootShapeMigrations, scribbleValidator, shapeIdValidator, textShapeMigrations, textShapeProps, toRichText, userIdValidator, vecModelValidator, videoAssetMigrations, videoAssetProps, videoShapeMigrations, videoShapeProps };
|
|
4119
4151
|
//# sourceMappingURL=index.mjs.map
|
|
4120
4152
|
//# sourceMappingURL=index.mjs.map
|