@bigbluebutton/tlschema 2.0.0-alpha.19
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/LICENSE +190 -0
- package/dist-cjs/TLStore.js +133 -0
- package/dist-cjs/TLStore.js.map +7 -0
- package/dist-cjs/assets/TLBaseAsset.js +37 -0
- package/dist-cjs/assets/TLBaseAsset.js.map +7 -0
- package/dist-cjs/assets/TLBookmarkAsset.js +38 -0
- package/dist-cjs/assets/TLBookmarkAsset.js.map +7 -0
- package/dist-cjs/assets/TLImageAsset.js +76 -0
- package/dist-cjs/assets/TLImageAsset.js.map +7 -0
- package/dist-cjs/assets/TLVideoAsset.js +76 -0
- package/dist-cjs/assets/TLVideoAsset.js.map +7 -0
- package/dist-cjs/createPresenceStateDerivation.js +68 -0
- package/dist-cjs/createPresenceStateDerivation.js.map +7 -0
- package/dist-cjs/createTLSchema.js +68 -0
- package/dist-cjs/createTLSchema.js.map +7 -0
- package/dist-cjs/index.d.ts +1414 -0
- package/dist-cjs/index.js +142 -0
- package/dist-cjs/index.js.map +7 -0
- package/dist-cjs/misc/TLColor.js +36 -0
- package/dist-cjs/misc/TLColor.js.map +7 -0
- package/dist-cjs/misc/TLCursor.js +55 -0
- package/dist-cjs/misc/TLCursor.js.map +7 -0
- package/dist-cjs/misc/TLHandle.js +36 -0
- package/dist-cjs/misc/TLHandle.js.map +7 -0
- package/dist-cjs/misc/TLOpacity.js +30 -0
- package/dist-cjs/misc/TLOpacity.js.map +7 -0
- package/dist-cjs/misc/TLScribble.js +40 -0
- package/dist-cjs/misc/TLScribble.js.map +7 -0
- package/dist-cjs/misc/geometry-types.js +37 -0
- package/dist-cjs/misc/geometry-types.js.map +7 -0
- package/dist-cjs/misc/id-validator.js +33 -0
- package/dist-cjs/misc/id-validator.js.map +7 -0
- package/dist-cjs/records/TLAsset.js +74 -0
- package/dist-cjs/records/TLAsset.js.map +7 -0
- package/dist-cjs/records/TLCamera.js +74 -0
- package/dist-cjs/records/TLCamera.js.map +7 -0
- package/dist-cjs/records/TLDocument.js +82 -0
- package/dist-cjs/records/TLDocument.js.map +7 -0
- package/dist-cjs/records/TLInstance.js +452 -0
- package/dist-cjs/records/TLInstance.js.map +7 -0
- package/dist-cjs/records/TLPage.js +74 -0
- package/dist-cjs/records/TLPage.js.map +7 -0
- package/dist-cjs/records/TLPageState.js +209 -0
- package/dist-cjs/records/TLPageState.js.map +7 -0
- package/dist-cjs/records/TLPointer.js +76 -0
- package/dist-cjs/records/TLPointer.js.map +7 -0
- package/dist-cjs/records/TLPresence.js +170 -0
- package/dist-cjs/records/TLPresence.js.map +7 -0
- package/dist-cjs/records/TLRecord.js +17 -0
- package/dist-cjs/records/TLRecord.js.map +7 -0
- package/dist-cjs/records/TLShape.js +147 -0
- package/dist-cjs/records/TLShape.js.map +7 -0
- package/dist-cjs/shapes/TLArrowShape.js +156 -0
- package/dist-cjs/shapes/TLArrowShape.js.map +7 -0
- package/dist-cjs/shapes/TLBaseShape.js +52 -0
- package/dist-cjs/shapes/TLBaseShape.js.map +7 -0
- package/dist-cjs/shapes/TLBookmarkShape.js +57 -0
- package/dist-cjs/shapes/TLBookmarkShape.js.map +7 -0
- package/dist-cjs/shapes/TLDrawShape.js +89 -0
- package/dist-cjs/shapes/TLDrawShape.js.map +7 -0
- package/dist-cjs/shapes/TLEmbedShape.js +709 -0
- package/dist-cjs/shapes/TLEmbedShape.js.map +7 -0
- package/dist-cjs/shapes/TLFrameShape.js +33 -0
- package/dist-cjs/shapes/TLFrameShape.js.map +7 -0
- package/dist-cjs/shapes/TLGeoShape.js +230 -0
- package/dist-cjs/shapes/TLGeoShape.js.map +7 -0
- package/dist-cjs/shapes/TLGroupShape.js +28 -0
- package/dist-cjs/shapes/TLGroupShape.js.map +7 -0
- package/dist-cjs/shapes/TLHighlightShape.js +38 -0
- package/dist-cjs/shapes/TLHighlightShape.js.map +7 -0
- package/dist-cjs/shapes/TLImageShape.js +69 -0
- package/dist-cjs/shapes/TLImageShape.js.map +7 -0
- package/dist-cjs/shapes/TLLineShape.js +70 -0
- package/dist-cjs/shapes/TLLineShape.js.map +7 -0
- package/dist-cjs/shapes/TLNoteShape.js +144 -0
- package/dist-cjs/shapes/TLNoteShape.js.map +7 -0
- package/dist-cjs/shapes/TLTextShape.js +67 -0
- package/dist-cjs/shapes/TLTextShape.js.map +7 -0
- package/dist-cjs/shapes/TLVideoShape.js +53 -0
- package/dist-cjs/shapes/TLVideoShape.js.map +7 -0
- package/dist-cjs/store-migrations.js +81 -0
- package/dist-cjs/store-migrations.js.map +7 -0
- package/dist-cjs/styles/StyleProp.js +94 -0
- package/dist-cjs/styles/StyleProp.js.map +7 -0
- package/dist-cjs/styles/TLColorStyle.js +283 -0
- package/dist-cjs/styles/TLColorStyle.js.map +7 -0
- package/dist-cjs/styles/TLDashStyle.js +29 -0
- package/dist-cjs/styles/TLDashStyle.js.map +7 -0
- package/dist-cjs/styles/TLFillStyle.js +29 -0
- package/dist-cjs/styles/TLFillStyle.js.map +7 -0
- package/dist-cjs/styles/TLFontStyle.js +36 -0
- package/dist-cjs/styles/TLFontStyle.js.map +7 -0
- package/dist-cjs/styles/TLHorizontalAlignStyle.js +29 -0
- package/dist-cjs/styles/TLHorizontalAlignStyle.js.map +7 -0
- package/dist-cjs/styles/TLSizeStyle.js +29 -0
- package/dist-cjs/styles/TLSizeStyle.js.map +7 -0
- package/dist-cjs/styles/TLVerticalAlignStyle.js +29 -0
- package/dist-cjs/styles/TLVerticalAlignStyle.js.map +7 -0
- package/dist-cjs/translations/languages.js +59 -0
- package/dist-cjs/translations/languages.js.map +7 -0
- package/dist-cjs/translations/translations.js +63 -0
- package/dist-cjs/translations/translations.js.map +7 -0
- package/dist-cjs/util-types.js +17 -0
- package/dist-cjs/util-types.js.map +7 -0
- package/dist-esm/TLStore.mjs +113 -0
- package/dist-esm/TLStore.mjs.map +7 -0
- package/dist-esm/assets/TLBaseAsset.mjs +17 -0
- package/dist-esm/assets/TLBaseAsset.mjs.map +7 -0
- package/dist-esm/assets/TLBookmarkAsset.mjs +18 -0
- package/dist-esm/assets/TLBookmarkAsset.mjs.map +7 -0
- package/dist-esm/assets/TLImageAsset.mjs +56 -0
- package/dist-esm/assets/TLImageAsset.mjs.map +7 -0
- package/dist-esm/assets/TLVideoAsset.mjs +56 -0
- package/dist-esm/assets/TLVideoAsset.mjs.map +7 -0
- package/dist-esm/createPresenceStateDerivation.mjs +48 -0
- package/dist-esm/createPresenceStateDerivation.mjs.map +7 -0
- package/dist-esm/createTLSchema.mjs +48 -0
- package/dist-esm/createTLSchema.mjs.map +7 -0
- package/dist-esm/index.d.mts +1414 -0
- package/dist-esm/index.mjs +193 -0
- package/dist-esm/index.mjs.map +7 -0
- package/dist-esm/misc/TLColor.mjs +16 -0
- package/dist-esm/misc/TLColor.mjs.map +7 -0
- package/dist-esm/misc/TLCursor.mjs +35 -0
- package/dist-esm/misc/TLCursor.mjs.map +7 -0
- package/dist-esm/misc/TLHandle.mjs +16 -0
- package/dist-esm/misc/TLHandle.mjs.map +7 -0
- package/dist-esm/misc/TLOpacity.mjs +10 -0
- package/dist-esm/misc/TLOpacity.mjs.map +7 -0
- package/dist-esm/misc/TLScribble.mjs +20 -0
- package/dist-esm/misc/TLScribble.mjs.map +7 -0
- package/dist-esm/misc/geometry-types.mjs +17 -0
- package/dist-esm/misc/geometry-types.mjs.map +7 -0
- package/dist-esm/misc/id-validator.mjs +13 -0
- package/dist-esm/misc/id-validator.mjs.map +7 -0
- package/dist-esm/records/TLAsset.mjs +57 -0
- package/dist-esm/records/TLAsset.mjs.map +7 -0
- package/dist-esm/records/TLCamera.mjs +54 -0
- package/dist-esm/records/TLCamera.mjs.map +7 -0
- package/dist-esm/records/TLDocument.mjs +62 -0
- package/dist-esm/records/TLDocument.mjs.map +7 -0
- package/dist-esm/records/TLInstance.mjs +432 -0
- package/dist-esm/records/TLInstance.mjs.map +7 -0
- package/dist-esm/records/TLPage.mjs +54 -0
- package/dist-esm/records/TLPage.mjs.map +7 -0
- package/dist-esm/records/TLPageState.mjs +189 -0
- package/dist-esm/records/TLPageState.mjs.map +7 -0
- package/dist-esm/records/TLPointer.mjs +56 -0
- package/dist-esm/records/TLPointer.mjs.map +7 -0
- package/dist-esm/records/TLPresence.mjs +150 -0
- package/dist-esm/records/TLPresence.mjs.map +7 -0
- package/dist-esm/records/TLRecord.mjs +1 -0
- package/dist-esm/records/TLRecord.mjs.map +7 -0
- package/dist-esm/records/TLShape.mjs +127 -0
- package/dist-esm/records/TLShape.mjs.map +7 -0
- package/dist-esm/shapes/TLArrowShape.mjs +136 -0
- package/dist-esm/shapes/TLArrowShape.mjs.map +7 -0
- package/dist-esm/shapes/TLBaseShape.mjs +32 -0
- package/dist-esm/shapes/TLBaseShape.mjs.map +7 -0
- package/dist-esm/shapes/TLBookmarkShape.mjs +37 -0
- package/dist-esm/shapes/TLBookmarkShape.mjs.map +7 -0
- package/dist-esm/shapes/TLDrawShape.mjs +69 -0
- package/dist-esm/shapes/TLDrawShape.mjs.map +7 -0
- package/dist-esm/shapes/TLEmbedShape.mjs +689 -0
- package/dist-esm/shapes/TLEmbedShape.mjs.map +7 -0
- package/dist-esm/shapes/TLFrameShape.mjs +13 -0
- package/dist-esm/shapes/TLFrameShape.mjs.map +7 -0
- package/dist-esm/shapes/TLGeoShape.mjs +212 -0
- package/dist-esm/shapes/TLGeoShape.mjs.map +7 -0
- package/dist-esm/shapes/TLGroupShape.mjs +8 -0
- package/dist-esm/shapes/TLGroupShape.mjs.map +7 -0
- package/dist-esm/shapes/TLHighlightShape.mjs +18 -0
- package/dist-esm/shapes/TLHighlightShape.mjs.map +7 -0
- package/dist-esm/shapes/TLImageShape.mjs +49 -0
- package/dist-esm/shapes/TLImageShape.mjs.map +7 -0
- package/dist-esm/shapes/TLLineShape.mjs +50 -0
- package/dist-esm/shapes/TLLineShape.mjs.map +7 -0
- package/dist-esm/shapes/TLNoteShape.mjs +126 -0
- package/dist-esm/shapes/TLNoteShape.mjs.map +7 -0
- package/dist-esm/shapes/TLTextShape.mjs +47 -0
- package/dist-esm/shapes/TLTextShape.mjs.map +7 -0
- package/dist-esm/shapes/TLVideoShape.mjs +33 -0
- package/dist-esm/shapes/TLVideoShape.mjs.map +7 -0
- package/dist-esm/store-migrations.mjs +61 -0
- package/dist-esm/store-migrations.mjs.map +7 -0
- package/dist-esm/styles/StyleProp.mjs +74 -0
- package/dist-esm/styles/StyleProp.mjs.map +7 -0
- package/dist-esm/styles/TLColorStyle.mjs +263 -0
- package/dist-esm/styles/TLColorStyle.mjs.map +7 -0
- package/dist-esm/styles/TLDashStyle.mjs +9 -0
- package/dist-esm/styles/TLDashStyle.mjs.map +7 -0
- package/dist-esm/styles/TLFillStyle.mjs +9 -0
- package/dist-esm/styles/TLFillStyle.mjs.map +7 -0
- package/dist-esm/styles/TLFontStyle.mjs +16 -0
- package/dist-esm/styles/TLFontStyle.mjs.map +7 -0
- package/dist-esm/styles/TLHorizontalAlignStyle.mjs +9 -0
- package/dist-esm/styles/TLHorizontalAlignStyle.mjs.map +7 -0
- package/dist-esm/styles/TLSizeStyle.mjs +9 -0
- package/dist-esm/styles/TLSizeStyle.mjs.map +7 -0
- package/dist-esm/styles/TLVerticalAlignStyle.mjs +9 -0
- package/dist-esm/styles/TLVerticalAlignStyle.mjs.map +7 -0
- package/dist-esm/translations/languages.mjs +39 -0
- package/dist-esm/translations/languages.mjs.map +7 -0
- package/dist-esm/translations/translations.mjs +43 -0
- package/dist-esm/translations/translations.mjs.map +7 -0
- package/dist-esm/util-types.mjs +1 -0
- package/dist-esm/util-types.mjs.map +7 -0
- package/package.json +64 -0
- package/src/TLStore.ts +160 -0
- package/src/assets/TLBaseAsset.ts +44 -0
- package/src/assets/TLBookmarkAsset.ts +31 -0
- package/src/assets/TLImageAsset.ts +73 -0
- package/src/assets/TLVideoAsset.ts +73 -0
- package/src/createPresenceStateDerivation.ts +53 -0
- package/src/createTLSchema.ts +65 -0
- package/src/index.ts +168 -0
- package/src/migrations.test.ts +1768 -0
- package/src/misc/TLColor.ts +28 -0
- package/src/misc/TLCursor.ts +54 -0
- package/src/misc/TLHandle.ts +41 -0
- package/src/misc/TLOpacity.ts +11 -0
- package/src/misc/TLScribble.ts +39 -0
- package/src/misc/geometry-types.ts +37 -0
- package/src/misc/id-validator.ts +14 -0
- package/src/records/TLAsset.ts +80 -0
- package/src/records/TLCamera.ts +74 -0
- package/src/records/TLDocument.ts +77 -0
- package/src/records/TLInstance.ts +493 -0
- package/src/records/TLPage.ts +72 -0
- package/src/records/TLPageState.ts +216 -0
- package/src/records/TLPointer.ts +74 -0
- package/src/records/TLPresence.ts +179 -0
- package/src/records/TLRecord.ts +21 -0
- package/src/records/TLShape.ts +214 -0
- package/src/shapes/TLArrowShape.ts +160 -0
- package/src/shapes/TLBaseShape.ts +67 -0
- package/src/shapes/TLBookmarkShape.ts +44 -0
- package/src/shapes/TLDrawShape.ts +89 -0
- package/src/shapes/TLEmbedShape.ts +754 -0
- package/src/shapes/TLFrameShape.ts +18 -0
- package/src/shapes/TLGeoShape.ts +226 -0
- package/src/shapes/TLGroupShape.ts +14 -0
- package/src/shapes/TLHighlightShape.ts +24 -0
- package/src/shapes/TLImageShape.ts +59 -0
- package/src/shapes/TLLineShape.ts +61 -0
- package/src/shapes/TLNoteShape.ts +137 -0
- package/src/shapes/TLTextShape.ts +55 -0
- package/src/shapes/TLVideoShape.ts +40 -0
- package/src/store-migrations.ts +63 -0
- package/src/styles/StyleProp.ts +105 -0
- package/src/styles/TLColorStyle.ts +296 -0
- package/src/styles/TLDashStyle.ts +11 -0
- package/src/styles/TLFillStyle.ts +11 -0
- package/src/styles/TLFontStyle.ts +19 -0
- package/src/styles/TLHorizontalAlignStyle.ts +11 -0
- package/src/styles/TLSizeStyle.ts +11 -0
- package/src/styles/TLVerticalAlignStyle.ts +11 -0
- package/src/translations/languages.ts +39 -0
- package/src/translations/translations.test.ts +43 -0
- package/src/translations/translations.ts +73 -0
- package/src/util-types.ts +2 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var src_exports = {};
|
|
20
|
+
__export(src_exports, {
|
|
21
|
+
ArrowShapeArrowheadEndStyle: () => import_TLArrowShape.ArrowShapeArrowheadEndStyle,
|
|
22
|
+
ArrowShapeArrowheadStartStyle: () => import_TLArrowShape.ArrowShapeArrowheadStartStyle,
|
|
23
|
+
AssetRecordType: () => import_TLAsset.AssetRecordType,
|
|
24
|
+
CameraRecordType: () => import_TLCamera.CameraRecordType,
|
|
25
|
+
DefaultColorStyle: () => import_TLColorStyle.DefaultColorStyle,
|
|
26
|
+
DefaultColorThemePalette: () => import_TLColorStyle.DefaultColorThemePalette,
|
|
27
|
+
DefaultDashStyle: () => import_TLDashStyle.DefaultDashStyle,
|
|
28
|
+
DefaultFillStyle: () => import_TLFillStyle.DefaultFillStyle,
|
|
29
|
+
DefaultFontFamilies: () => import_TLFontStyle.DefaultFontFamilies,
|
|
30
|
+
DefaultFontStyle: () => import_TLFontStyle.DefaultFontStyle,
|
|
31
|
+
DefaultHorizontalAlignStyle: () => import_TLHorizontalAlignStyle.DefaultHorizontalAlignStyle,
|
|
32
|
+
DefaultSizeStyle: () => import_TLSizeStyle.DefaultSizeStyle,
|
|
33
|
+
DefaultVerticalAlignStyle: () => import_TLVerticalAlignStyle.DefaultVerticalAlignStyle,
|
|
34
|
+
DocumentRecordType: () => import_TLDocument.DocumentRecordType,
|
|
35
|
+
EMBED_DEFINITIONS: () => import_TLEmbedShape.EMBED_DEFINITIONS,
|
|
36
|
+
EnumStyleProp: () => import_StyleProp.EnumStyleProp,
|
|
37
|
+
GeoShapeGeoStyle: () => import_TLGeoShape.GeoShapeGeoStyle,
|
|
38
|
+
InstancePageStateRecordType: () => import_TLPageState.InstancePageStateRecordType,
|
|
39
|
+
InstancePresenceRecordType: () => import_TLPresence.InstancePresenceRecordType,
|
|
40
|
+
LANGUAGES: () => import_translations.LANGUAGES,
|
|
41
|
+
LineShapeSplineStyle: () => import_TLLineShape.LineShapeSplineStyle,
|
|
42
|
+
PageRecordType: () => import_TLPage.PageRecordType,
|
|
43
|
+
PointerRecordType: () => import_TLPointer.PointerRecordType,
|
|
44
|
+
StyleProp: () => import_StyleProp.StyleProp,
|
|
45
|
+
TLDOCUMENT_ID: () => import_TLDocument.TLDOCUMENT_ID,
|
|
46
|
+
TLINSTANCE_ID: () => import_TLInstance.TLINSTANCE_ID,
|
|
47
|
+
TLPOINTER_ID: () => import_TLPointer.TLPOINTER_ID,
|
|
48
|
+
TL_CANVAS_UI_COLOR_TYPES: () => import_TLColor.TL_CANVAS_UI_COLOR_TYPES,
|
|
49
|
+
arrowShapeMigrations: () => import_TLArrowShape.arrowShapeMigrations,
|
|
50
|
+
arrowShapeProps: () => import_TLArrowShape.arrowShapeProps,
|
|
51
|
+
assetIdValidator: () => import_TLBaseAsset.assetIdValidator,
|
|
52
|
+
assetMigrations: () => import_TLAsset.assetMigrations,
|
|
53
|
+
assetValidator: () => import_TLAsset.assetValidator,
|
|
54
|
+
bookmarkShapeMigrations: () => import_TLBookmarkShape.bookmarkShapeMigrations,
|
|
55
|
+
bookmarkShapeProps: () => import_TLBookmarkShape.bookmarkShapeProps,
|
|
56
|
+
box2dModelValidator: () => import_geometry_types.box2dModelValidator,
|
|
57
|
+
canvasUiColorTypeValidator: () => import_TLColor.canvasUiColorTypeValidator,
|
|
58
|
+
createAssetValidator: () => import_TLBaseAsset.createAssetValidator,
|
|
59
|
+
createPresenceStateDerivation: () => import_createPresenceStateDerivation.createPresenceStateDerivation,
|
|
60
|
+
createShapeId: () => import_TLShape.createShapeId,
|
|
61
|
+
createShapeValidator: () => import_TLBaseShape.createShapeValidator,
|
|
62
|
+
createTLSchema: () => import_createTLSchema.createTLSchema,
|
|
63
|
+
drawShapeMigrations: () => import_TLDrawShape.drawShapeMigrations,
|
|
64
|
+
drawShapeProps: () => import_TLDrawShape.drawShapeProps,
|
|
65
|
+
embedShapeMigrations: () => import_TLEmbedShape.embedShapeMigrations,
|
|
66
|
+
embedShapePermissionDefaults: () => import_TLEmbedShape.embedShapePermissionDefaults,
|
|
67
|
+
embedShapeProps: () => import_TLEmbedShape.embedShapeProps,
|
|
68
|
+
frameShapeMigrations: () => import_TLFrameShape.frameShapeMigrations,
|
|
69
|
+
frameShapeProps: () => import_TLFrameShape.frameShapeProps,
|
|
70
|
+
geoShapeMigrations: () => import_TLGeoShape.geoShapeMigrations,
|
|
71
|
+
geoShapeProps: () => import_TLGeoShape.geoShapeProps,
|
|
72
|
+
getDefaultColorTheme: () => import_TLColorStyle.getDefaultColorTheme,
|
|
73
|
+
getDefaultTranslationLocale: () => import_translations.getDefaultTranslationLocale,
|
|
74
|
+
getShapePropKeysByStyle: () => import_TLShape.getShapePropKeysByStyle,
|
|
75
|
+
groupShapeMigrations: () => import_TLGroupShape.groupShapeMigrations,
|
|
76
|
+
groupShapeProps: () => import_TLGroupShape.groupShapeProps,
|
|
77
|
+
highlightShapeMigrations: () => import_TLHighlightShape.highlightShapeMigrations,
|
|
78
|
+
highlightShapeProps: () => import_TLHighlightShape.highlightShapeProps,
|
|
79
|
+
idValidator: () => import_id_validator.idValidator,
|
|
80
|
+
imageShapeMigrations: () => import_TLImageShape.imageShapeMigrations,
|
|
81
|
+
imageShapeProps: () => import_TLImageShape.imageShapeProps,
|
|
82
|
+
isPageId: () => import_TLPage.isPageId,
|
|
83
|
+
isShape: () => import_TLShape.isShape,
|
|
84
|
+
isShapeId: () => import_TLShape.isShapeId,
|
|
85
|
+
lineShapeMigrations: () => import_TLLineShape.lineShapeMigrations,
|
|
86
|
+
lineShapeProps: () => import_TLLineShape.lineShapeProps,
|
|
87
|
+
noteShapeMigrations: () => import_TLNoteShape.noteShapeMigrations,
|
|
88
|
+
noteShapeProps: () => import_TLNoteShape.noteShapeProps,
|
|
89
|
+
opacityValidator: () => import_TLOpacity.opacityValidator,
|
|
90
|
+
pageIdValidator: () => import_TLPage.pageIdValidator,
|
|
91
|
+
parentIdValidator: () => import_TLBaseShape.parentIdValidator,
|
|
92
|
+
rootShapeMigrations: () => import_TLShape.rootShapeMigrations,
|
|
93
|
+
scribbleValidator: () => import_TLScribble.scribbleValidator,
|
|
94
|
+
shapeIdValidator: () => import_TLBaseShape.shapeIdValidator,
|
|
95
|
+
textShapeMigrations: () => import_TLTextShape.textShapeMigrations,
|
|
96
|
+
textShapeProps: () => import_TLTextShape.textShapeProps,
|
|
97
|
+
vec2dModelValidator: () => import_geometry_types.vec2dModelValidator,
|
|
98
|
+
videoShapeMigrations: () => import_TLVideoShape.videoShapeMigrations,
|
|
99
|
+
videoShapeProps: () => import_TLVideoShape.videoShapeProps
|
|
100
|
+
});
|
|
101
|
+
module.exports = __toCommonJS(src_exports);
|
|
102
|
+
var import_TLBaseAsset = require("./assets/TLBaseAsset");
|
|
103
|
+
var import_createPresenceStateDerivation = require("./createPresenceStateDerivation");
|
|
104
|
+
var import_createTLSchema = require("./createTLSchema");
|
|
105
|
+
var import_TLColor = require("./misc/TLColor");
|
|
106
|
+
var import_TLOpacity = require("./misc/TLOpacity");
|
|
107
|
+
var import_TLScribble = require("./misc/TLScribble");
|
|
108
|
+
var import_geometry_types = require("./misc/geometry-types");
|
|
109
|
+
var import_id_validator = require("./misc/id-validator");
|
|
110
|
+
var import_TLAsset = require("./records/TLAsset");
|
|
111
|
+
var import_TLCamera = require("./records/TLCamera");
|
|
112
|
+
var import_TLDocument = require("./records/TLDocument");
|
|
113
|
+
var import_TLInstance = require("./records/TLInstance");
|
|
114
|
+
var import_TLPage = require("./records/TLPage");
|
|
115
|
+
var import_TLPageState = require("./records/TLPageState");
|
|
116
|
+
var import_TLPointer = require("./records/TLPointer");
|
|
117
|
+
var import_TLPresence = require("./records/TLPresence");
|
|
118
|
+
var import_TLShape = require("./records/TLShape");
|
|
119
|
+
var import_TLArrowShape = require("./shapes/TLArrowShape");
|
|
120
|
+
var import_TLBaseShape = require("./shapes/TLBaseShape");
|
|
121
|
+
var import_TLBookmarkShape = require("./shapes/TLBookmarkShape");
|
|
122
|
+
var import_TLDrawShape = require("./shapes/TLDrawShape");
|
|
123
|
+
var import_TLEmbedShape = require("./shapes/TLEmbedShape");
|
|
124
|
+
var import_TLFrameShape = require("./shapes/TLFrameShape");
|
|
125
|
+
var import_TLGeoShape = require("./shapes/TLGeoShape");
|
|
126
|
+
var import_TLGroupShape = require("./shapes/TLGroupShape");
|
|
127
|
+
var import_TLHighlightShape = require("./shapes/TLHighlightShape");
|
|
128
|
+
var import_TLImageShape = require("./shapes/TLImageShape");
|
|
129
|
+
var import_TLLineShape = require("./shapes/TLLineShape");
|
|
130
|
+
var import_TLNoteShape = require("./shapes/TLNoteShape");
|
|
131
|
+
var import_TLTextShape = require("./shapes/TLTextShape");
|
|
132
|
+
var import_TLVideoShape = require("./shapes/TLVideoShape");
|
|
133
|
+
var import_StyleProp = require("./styles/StyleProp");
|
|
134
|
+
var import_TLColorStyle = require("./styles/TLColorStyle");
|
|
135
|
+
var import_TLDashStyle = require("./styles/TLDashStyle");
|
|
136
|
+
var import_TLFillStyle = require("./styles/TLFillStyle");
|
|
137
|
+
var import_TLFontStyle = require("./styles/TLFontStyle");
|
|
138
|
+
var import_TLHorizontalAlignStyle = require("./styles/TLHorizontalAlignStyle");
|
|
139
|
+
var import_TLSizeStyle = require("./styles/TLSizeStyle");
|
|
140
|
+
var import_TLVerticalAlignStyle = require("./styles/TLVerticalAlignStyle");
|
|
141
|
+
var import_translations = require("./translations/translations");
|
|
142
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["export {\n\ttype TLSerializedStore,\n\ttype TLStore,\n\ttype TLStoreProps,\n\ttype TLStoreSchema,\n\ttype TLStoreSnapshot,\n} from './TLStore'\nexport { assetIdValidator, createAssetValidator, type TLBaseAsset } from './assets/TLBaseAsset'\nexport { type TLBookmarkAsset } from './assets/TLBookmarkAsset'\nexport { type TLImageAsset } from './assets/TLImageAsset'\nexport { type TLVideoAsset } from './assets/TLVideoAsset'\nexport { createPresenceStateDerivation } from './createPresenceStateDerivation'\nexport { createTLSchema, type SchemaShapeInfo, type TLSchema } from './createTLSchema'\nexport {\n\tTL_CANVAS_UI_COLOR_TYPES,\n\tcanvasUiColorTypeValidator,\n\ttype TLCanvasUiColor,\n} from './misc/TLColor'\nexport { type TLCursor, type TLCursorType } from './misc/TLCursor'\nexport { type TLHandle, type TLHandleType } from './misc/TLHandle'\nexport { opacityValidator, type TLOpacityType } from './misc/TLOpacity'\nexport { scribbleValidator, type TLScribble } from './misc/TLScribble'\nexport {\n\tbox2dModelValidator,\n\tvec2dModelValidator,\n\ttype Box2dModel,\n\ttype Vec2dModel,\n} from './misc/geometry-types'\nexport { idValidator } from './misc/id-validator'\nexport {\n\tAssetRecordType,\n\tassetMigrations,\n\tassetValidator,\n\ttype TLAsset,\n\ttype TLAssetId,\n\ttype TLAssetPartial,\n\ttype TLAssetShape,\n} from './records/TLAsset'\nexport { CameraRecordType, type TLCamera, type TLCameraId } from './records/TLCamera'\nexport { DocumentRecordType, TLDOCUMENT_ID, type TLDocument } from './records/TLDocument'\nexport { TLINSTANCE_ID, type TLInstance, type TLInstanceId } from './records/TLInstance'\nexport {\n\tPageRecordType,\n\tisPageId,\n\tpageIdValidator,\n\ttype TLPage,\n\ttype TLPageId,\n} from './records/TLPage'\nexport { InstancePageStateRecordType, type TLInstancePageState } from './records/TLPageState'\nexport { PointerRecordType, TLPOINTER_ID } from './records/TLPointer'\nexport { InstancePresenceRecordType, type TLInstancePresence } from './records/TLPresence'\nexport { type TLRecord } from './records/TLRecord'\nexport {\n\tcreateShapeId,\n\tgetShapePropKeysByStyle,\n\tisShape,\n\tisShapeId,\n\trootShapeMigrations,\n\ttype TLDefaultShape,\n\ttype TLParentId,\n\ttype TLShape,\n\ttype TLShapeId,\n\ttype TLShapePartial,\n\ttype TLShapeProp,\n\ttype TLShapeProps,\n\ttype TLUnknownShape,\n} from './records/TLShape'\nexport {\n\tArrowShapeArrowheadEndStyle,\n\tArrowShapeArrowheadStartStyle,\n\tarrowShapeMigrations,\n\tarrowShapeProps,\n\ttype TLArrowShape,\n\ttype TLArrowShapeArrowheadStyle,\n\ttype TLArrowShapeProps,\n\ttype TLArrowShapeTerminal,\n} from './shapes/TLArrowShape'\nexport {\n\tcreateShapeValidator,\n\tparentIdValidator,\n\tshapeIdValidator,\n\ttype ShapeProps,\n\ttype TLBaseShape,\n} from './shapes/TLBaseShape'\nexport {\n\tbookmarkShapeMigrations,\n\tbookmarkShapeProps,\n\ttype TLBookmarkShape,\n} from './shapes/TLBookmarkShape'\nexport {\n\tdrawShapeMigrations,\n\tdrawShapeProps,\n\ttype TLDrawShape,\n\ttype TLDrawShapeSegment,\n} from './shapes/TLDrawShape'\nexport {\n\tEMBED_DEFINITIONS,\n\tembedShapeMigrations,\n\tembedShapePermissionDefaults,\n\tembedShapeProps,\n\ttype EmbedDefinition,\n\ttype TLEmbedShape,\n\ttype TLEmbedShapePermissions,\n} from './shapes/TLEmbedShape'\nexport { frameShapeMigrations, frameShapeProps, type TLFrameShape } from './shapes/TLFrameShape'\nexport {\n\tGeoShapeGeoStyle,\n\tgeoShapeMigrations,\n\tgeoShapeProps,\n\ttype TLGeoShape,\n} from './shapes/TLGeoShape'\nexport { groupShapeMigrations, groupShapeProps, type TLGroupShape } from './shapes/TLGroupShape'\nexport {\n\thighlightShapeMigrations,\n\thighlightShapeProps,\n\ttype TLHighlightShape,\n} from './shapes/TLHighlightShape'\nexport {\n\timageShapeMigrations,\n\timageShapeProps,\n\ttype TLImageShape,\n\ttype TLImageShapeCrop,\n\ttype TLImageShapeProps,\n} from './shapes/TLImageShape'\nexport {\n\tLineShapeSplineStyle,\n\tlineShapeMigrations,\n\tlineShapeProps,\n\ttype TLLineShape,\n} from './shapes/TLLineShape'\nexport { noteShapeMigrations, noteShapeProps, type TLNoteShape } from './shapes/TLNoteShape'\nexport {\n\ttextShapeMigrations,\n\ttextShapeProps,\n\ttype TLTextShape,\n\ttype TLTextShapeProps,\n} from './shapes/TLTextShape'\nexport { videoShapeMigrations, videoShapeProps, type TLVideoShape } from './shapes/TLVideoShape'\nexport { EnumStyleProp, StyleProp } from './styles/StyleProp'\nexport {\n\tDefaultColorStyle,\n\tDefaultColorThemePalette,\n\tgetDefaultColorTheme,\n\ttype TLDefaultColorStyle,\n\ttype TLDefaultColorTheme,\n\ttype TLDefaultColorThemeColor,\n} from './styles/TLColorStyle'\nexport { DefaultDashStyle, type TLDefaultDashStyle } from './styles/TLDashStyle'\nexport { DefaultFillStyle, type TLDefaultFillStyle } from './styles/TLFillStyle'\nexport {\n\tDefaultFontFamilies,\n\tDefaultFontStyle,\n\ttype TLDefaultFontStyle,\n} from './styles/TLFontStyle'\nexport {\n\tDefaultHorizontalAlignStyle,\n\ttype TLDefaultHorizontalAlignStyle,\n} from './styles/TLHorizontalAlignStyle'\nexport { DefaultSizeStyle, type TLDefaultSizeStyle } from './styles/TLSizeStyle'\nexport {\n\tDefaultVerticalAlignStyle,\n\ttype TLDefaultVerticalAlignStyle,\n} from './styles/TLVerticalAlignStyle'\nexport {\n\tLANGUAGES,\n\tgetDefaultTranslationLocale,\n\ttype TLLanguage,\n} from './translations/translations'\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,yBAAyE;AAIzE,2CAA8C;AAC9C,4BAAoE;AACpE,qBAIO;AAGP,uBAAqD;AACrD,wBAAmD;AACnD,4BAKO;AACP,0BAA4B;AAC5B,qBAQO;AACP,sBAAiE;AACjE,wBAAmE;AACnE,wBAAkE;AAClE,oBAMO;AACP,yBAAsE;AACtE,uBAAgD;AAChD,wBAAoE;AAEpE,qBAcO;AACP,0BASO;AACP,yBAMO;AACP,6BAIO;AACP,yBAKO;AACP,0BAQO;AACP,0BAAyE;AACzE,wBAKO;AACP,0BAAyE;AACzE,8BAIO;AACP,0BAMO;AACP,yBAKO;AACP,yBAAsE;AACtE,yBAKO;AACP,0BAAyE;AACzE,uBAAyC;AACzC,0BAOO;AACP,yBAA0D;AAC1D,yBAA0D;AAC1D,yBAIO;AACP,oCAGO;AACP,yBAA0D;AAC1D,kCAGO;AACP,0BAIO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var TLColor_exports = {};
|
|
20
|
+
__export(TLColor_exports, {
|
|
21
|
+
TL_CANVAS_UI_COLOR_TYPES: () => TL_CANVAS_UI_COLOR_TYPES,
|
|
22
|
+
canvasUiColorTypeValidator: () => canvasUiColorTypeValidator
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(TLColor_exports);
|
|
25
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
26
|
+
const TL_CANVAS_UI_COLOR_TYPES = /* @__PURE__ */ new Set([
|
|
27
|
+
"accent",
|
|
28
|
+
"white",
|
|
29
|
+
"black",
|
|
30
|
+
"selection-stroke",
|
|
31
|
+
"selection-fill",
|
|
32
|
+
"laser",
|
|
33
|
+
"muted-1"
|
|
34
|
+
]);
|
|
35
|
+
const canvasUiColorTypeValidator = import_validate.T.setEnum(TL_CANVAS_UI_COLOR_TYPES);
|
|
36
|
+
//# sourceMappingURL=TLColor.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/TLColor.ts"],
|
|
4
|
+
"sourcesContent": ["import { T } from '@bigbluebutton/validate'\nimport { SetValue } from '../util-types'\n\n/**\n * The colors used by tldraw's default shapes.\n *\n * @public */\nexport const TL_CANVAS_UI_COLOR_TYPES = new Set([\n\t'accent',\n\t'white',\n\t'black',\n\t'selection-stroke',\n\t'selection-fill',\n\t'laser',\n\t'muted-1',\n] as const)\n\n/**\n * A type for the colors used by tldraw's default shapes.\n *\n * @public */\nexport type TLCanvasUiColor = SetValue<typeof TL_CANVAS_UI_COLOR_TYPES>\n\n/**\n * A validator for the colors used by tldraw's default shapes.\n *\n * @public */\nexport const canvasUiColorTypeValidator = T.setEnum(TL_CANVAS_UI_COLOR_TYPES)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAOX,MAAM,2BAA2B,oBAAI,IAAI;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAU;AAYH,MAAM,6BAA6B,kBAAE,QAAQ,wBAAwB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var TLCursor_exports = {};
|
|
20
|
+
__export(TLCursor_exports, {
|
|
21
|
+
TL_CURSOR_TYPES: () => TL_CURSOR_TYPES,
|
|
22
|
+
cursorTypeValidator: () => cursorTypeValidator,
|
|
23
|
+
cursorValidator: () => cursorValidator
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(TLCursor_exports);
|
|
26
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
27
|
+
const TL_CURSOR_TYPES = /* @__PURE__ */ new Set([
|
|
28
|
+
"none",
|
|
29
|
+
"default",
|
|
30
|
+
"pointer",
|
|
31
|
+
"cross",
|
|
32
|
+
"grab",
|
|
33
|
+
"rotate",
|
|
34
|
+
"grabbing",
|
|
35
|
+
"resize-edge",
|
|
36
|
+
"resize-corner",
|
|
37
|
+
"text",
|
|
38
|
+
"move",
|
|
39
|
+
"ew-resize",
|
|
40
|
+
"ns-resize",
|
|
41
|
+
"nesw-resize",
|
|
42
|
+
"nwse-resize",
|
|
43
|
+
"nesw-rotate",
|
|
44
|
+
"nwse-rotate",
|
|
45
|
+
"swne-rotate",
|
|
46
|
+
"senw-rotate",
|
|
47
|
+
"zoom-in",
|
|
48
|
+
"zoom-out"
|
|
49
|
+
]);
|
|
50
|
+
const cursorTypeValidator = import_validate.T.setEnum(TL_CURSOR_TYPES);
|
|
51
|
+
const cursorValidator = import_validate.T.object({
|
|
52
|
+
type: cursorTypeValidator,
|
|
53
|
+
rotation: import_validate.T.number
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=TLCursor.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/TLCursor.ts"],
|
|
4
|
+
"sourcesContent": ["import { T } from '@bigbluebutton/validate'\nimport { SetValue } from '../util-types'\n\n/**\n * The cursor types used by tldraw's default shapes.\n *\n * @public */\nexport const TL_CURSOR_TYPES = new Set([\n\t'none',\n\t'default',\n\t'pointer',\n\t'cross',\n\t'grab',\n\t'rotate',\n\t'grabbing',\n\t'resize-edge',\n\t'resize-corner',\n\t'text',\n\t'move',\n\t'ew-resize',\n\t'ns-resize',\n\t'nesw-resize',\n\t'nwse-resize',\n\t'nesw-rotate',\n\t'nwse-rotate',\n\t'swne-rotate',\n\t'senw-rotate',\n\t'zoom-in',\n\t'zoom-out',\n])\n\n/**\n * A type for the cursor types used by tldraw's default shapes.\n *\n * @public */\nexport type TLCursorType = SetValue<typeof TL_CURSOR_TYPES>\n\n/** @internal */\nexport const cursorTypeValidator = T.setEnum(TL_CURSOR_TYPES)\n\n/**\n * A cursor used by tldraw.\n *\n * @public */\nexport interface TLCursor {\n\ttype: TLCursorType\n\trotation: number\n}\n\n/** @internal */\nexport const cursorValidator: T.Validator<TLCursor> = T.object<TLCursor>({\n\ttype: cursorTypeValidator,\n\trotation: T.number,\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAOX,MAAM,kBAAkB,oBAAI,IAAI;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AASM,MAAM,sBAAsB,kBAAE,QAAQ,eAAe;AAYrD,MAAM,kBAAyC,kBAAE,OAAiB;AAAA,EACxE,MAAM;AAAA,EACN,UAAU,kBAAE;AACb,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var TLHandle_exports = {};
|
|
20
|
+
__export(TLHandle_exports, {
|
|
21
|
+
TL_HANDLE_TYPES: () => TL_HANDLE_TYPES,
|
|
22
|
+
handleValidator: () => handleValidator
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(TLHandle_exports);
|
|
25
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
26
|
+
const TL_HANDLE_TYPES = /* @__PURE__ */ new Set(["vertex", "virtual", "create"]);
|
|
27
|
+
const handleValidator = import_validate.T.object({
|
|
28
|
+
id: import_validate.T.string,
|
|
29
|
+
type: import_validate.T.setEnum(TL_HANDLE_TYPES),
|
|
30
|
+
canBind: import_validate.T.boolean.optional(),
|
|
31
|
+
canSnap: import_validate.T.boolean.optional(),
|
|
32
|
+
index: import_validate.T.string,
|
|
33
|
+
x: import_validate.T.number,
|
|
34
|
+
y: import_validate.T.number
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=TLHandle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/TLHandle.ts"],
|
|
4
|
+
"sourcesContent": ["import { T } from '@bigbluebutton/validate'\nimport { SetValue } from '../util-types'\n\n/**\n * The handle types used by tldraw's default shapes.\n *\n * @public */\nexport const TL_HANDLE_TYPES = new Set(['vertex', 'virtual', 'create'] as const)\n\n/**\n * A type for the handle types used by tldraw's default shapes.\n *\n * @public */\nexport type TLHandleType = SetValue<typeof TL_HANDLE_TYPES>\n\n/**\n * A base interface for a shape's handles.\n *\n * @public\n */\nexport interface TLHandle {\n\t/** A unique identifier for the handle. */\n\tid: string\n\ttype: TLHandleType\n\tcanBind?: boolean\n\tcanSnap?: boolean\n\tindex: string\n\tx: number\n\ty: number\n}\n\n/** @internal */\nexport const handleValidator: T.Validator<TLHandle> = T.object({\n\tid: T.string,\n\ttype: T.setEnum(TL_HANDLE_TYPES),\n\tcanBind: T.boolean.optional(),\n\tcanSnap: T.boolean.optional(),\n\tindex: T.string,\n\tx: T.number,\n\ty: T.number,\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAOX,MAAM,kBAAkB,oBAAI,IAAI,CAAC,UAAU,WAAW,QAAQ,CAAU;AAyBxE,MAAM,kBAAyC,kBAAE,OAAO;AAAA,EAC9D,IAAI,kBAAE;AAAA,EACN,MAAM,kBAAE,QAAQ,eAAe;AAAA,EAC/B,SAAS,kBAAE,QAAQ,SAAS;AAAA,EAC5B,SAAS,kBAAE,QAAQ,SAAS;AAAA,EAC5B,OAAO,kBAAE;AAAA,EACT,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AACN,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var TLOpacity_exports = {};
|
|
20
|
+
__export(TLOpacity_exports, {
|
|
21
|
+
opacityValidator: () => opacityValidator
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(TLOpacity_exports);
|
|
24
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
25
|
+
const opacityValidator = import_validate.T.number.check((n) => {
|
|
26
|
+
if (n < 0 || n > 1) {
|
|
27
|
+
throw new import_validate.T.ValidationError("Opacity must be between 0 and 1");
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=TLOpacity.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/TLOpacity.ts"],
|
|
4
|
+
"sourcesContent": ["import { T } from '@bigbluebutton/validate'\n\n/** @public */\nexport type TLOpacityType = number\n\n/** @internal */\nexport const opacityValidator = T.number.check((n) => {\n\tif (n < 0 || n > 1) {\n\t\tthrow new T.ValidationError('Opacity must be between 0 and 1')\n\t}\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAMX,MAAM,mBAAmB,kBAAE,OAAO,MAAM,CAAC,MAAM;AACrD,MAAI,IAAI,KAAK,IAAI,GAAG;AACnB,UAAM,IAAI,kBAAE,gBAAgB,iCAAiC;AAAA,EAC9D;AACD,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var TLScribble_exports = {};
|
|
20
|
+
__export(TLScribble_exports, {
|
|
21
|
+
TL_SCRIBBLE_STATES: () => TL_SCRIBBLE_STATES,
|
|
22
|
+
scribbleValidator: () => scribbleValidator
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(TLScribble_exports);
|
|
25
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
26
|
+
var import_TLColor = require("./TLColor");
|
|
27
|
+
var import_geometry_types = require("./geometry-types");
|
|
28
|
+
const TL_SCRIBBLE_STATES = /* @__PURE__ */ new Set(["starting", "paused", "active", "stopping"]);
|
|
29
|
+
const scribbleValidator = import_validate.T.object({
|
|
30
|
+
id: import_validate.T.string,
|
|
31
|
+
points: import_validate.T.arrayOf(import_geometry_types.vec2dModelValidator),
|
|
32
|
+
size: import_validate.T.positiveNumber,
|
|
33
|
+
color: import_TLColor.canvasUiColorTypeValidator,
|
|
34
|
+
opacity: import_validate.T.number,
|
|
35
|
+
state: import_validate.T.setEnum(TL_SCRIBBLE_STATES),
|
|
36
|
+
delay: import_validate.T.number,
|
|
37
|
+
shrink: import_validate.T.number,
|
|
38
|
+
taper: import_validate.T.boolean
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=TLScribble.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/TLScribble.ts"],
|
|
4
|
+
"sourcesContent": ["import { T } from '@bigbluebutton/validate'\nimport { SetValue } from '../util-types'\nimport { TLCanvasUiColor, canvasUiColorTypeValidator } from './TLColor'\nimport { Vec2dModel, vec2dModelValidator } from './geometry-types'\n\n/**\n * The scribble states used by tldraw.\n *\n * @public */\nexport const TL_SCRIBBLE_STATES = new Set(['starting', 'paused', 'active', 'stopping'] as const)\n\n/**\n * A type for the scribble used by tldraw.\n *\n * @public */\nexport type TLScribble = {\n\tid: string\n\tpoints: Vec2dModel[]\n\tsize: number\n\tcolor: TLCanvasUiColor\n\topacity: number\n\tstate: SetValue<typeof TL_SCRIBBLE_STATES>\n\tdelay: number\n\tshrink: number\n\ttaper: boolean\n}\n\n/** @internal */\nexport const scribbleValidator: T.Validator<TLScribble> = T.object({\n\tid: T.string,\n\tpoints: T.arrayOf(vec2dModelValidator),\n\tsize: T.positiveNumber,\n\tcolor: canvasUiColorTypeValidator,\n\topacity: T.number,\n\tstate: T.setEnum(TL_SCRIBBLE_STATES),\n\tdelay: T.number,\n\tshrink: T.number,\n\ttaper: T.boolean,\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAElB,qBAA4D;AAC5D,4BAAgD;AAMzC,MAAM,qBAAqB,oBAAI,IAAI,CAAC,YAAY,UAAU,UAAU,UAAU,CAAU;AAmBxF,MAAM,oBAA6C,kBAAE,OAAO;AAAA,EAClE,IAAI,kBAAE;AAAA,EACN,QAAQ,kBAAE,QAAQ,yCAAmB;AAAA,EACrC,MAAM,kBAAE;AAAA,EACR,OAAO;AAAA,EACP,SAAS,kBAAE;AAAA,EACX,OAAO,kBAAE,QAAQ,kBAAkB;AAAA,EACnC,OAAO,kBAAE;AAAA,EACT,QAAQ,kBAAE;AAAA,EACV,OAAO,kBAAE;AACV,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var geometry_types_exports = {};
|
|
20
|
+
__export(geometry_types_exports, {
|
|
21
|
+
box2dModelValidator: () => box2dModelValidator,
|
|
22
|
+
vec2dModelValidator: () => vec2dModelValidator
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(geometry_types_exports);
|
|
25
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
26
|
+
const vec2dModelValidator = import_validate.T.object({
|
|
27
|
+
x: import_validate.T.number,
|
|
28
|
+
y: import_validate.T.number,
|
|
29
|
+
z: import_validate.T.number.optional()
|
|
30
|
+
});
|
|
31
|
+
const box2dModelValidator = import_validate.T.object({
|
|
32
|
+
x: import_validate.T.number,
|
|
33
|
+
y: import_validate.T.number,
|
|
34
|
+
w: import_validate.T.number,
|
|
35
|
+
h: import_validate.T.number
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=geometry-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/geometry-types.ts"],
|
|
4
|
+
"sourcesContent": ["import { T } from '@bigbluebutton/validate'\n\n/**\n * A serializable model for 2D boxes.\n *\n * @public */\nexport interface Box2dModel {\n\tx: number\n\ty: number\n\tw: number\n\th: number\n}\n\n/**\n * A serializable model for 2D vectors.\n *\n * @public */\nexport interface Vec2dModel {\n\tx: number\n\ty: number\n\tz?: number\n}\n\n/** @public */\nexport const vec2dModelValidator: T.Validator<Vec2dModel> = T.object({\n\tx: T.number,\n\ty: T.number,\n\tz: T.number.optional(),\n})\n\n/** @public */\nexport const box2dModelValidator: T.Validator<Box2dModel> = T.object({\n\tx: T.number,\n\ty: T.number,\n\tw: T.number,\n\th: T.number,\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAwBX,MAAM,sBAA+C,kBAAE,OAAO;AAAA,EACpE,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE,OAAO,SAAS;AACtB,CAAC;AAGM,MAAM,sBAA+C,kBAAE,OAAO;AAAA,EACpE,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AACN,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var id_validator_exports = {};
|
|
20
|
+
__export(id_validator_exports, {
|
|
21
|
+
idValidator: () => idValidator
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(id_validator_exports);
|
|
24
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
25
|
+
function idValidator(prefix) {
|
|
26
|
+
return import_validate.T.string.refine((id) => {
|
|
27
|
+
if (!id.startsWith(`${prefix}:`)) {
|
|
28
|
+
throw new Error(`${prefix} ID must start with "${prefix}:"`);
|
|
29
|
+
}
|
|
30
|
+
return id;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=id-validator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/misc/id-validator.ts"],
|
|
4
|
+
"sourcesContent": ["import type { RecordId, UnknownRecord } from '@bigbluebutton/store'\nimport { T } from '@bigbluebutton/validate'\n\n/** @internal */\nexport function idValidator<Id extends RecordId<UnknownRecord>>(\n\tprefix: Id['__type__']['typeName']\n): T.Validator<Id> {\n\treturn T.string.refine((id) => {\n\t\tif (!id.startsWith(`${prefix}:`)) {\n\t\t\tthrow new Error(`${prefix} ID must start with \"${prefix}:\"`)\n\t\t}\n\t\treturn id as Id\n\t})\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAkB;AAGX,SAAS,YACf,QACkB;AAClB,SAAO,kBAAE,OAAO,OAAO,CAAC,OAAO;AAC9B,QAAI,CAAC,GAAG,WAAW,GAAG,MAAM,GAAG,GAAG;AACjC,YAAM,IAAI,MAAM,GAAG,MAAM,wBAAwB,MAAM,IAAI;AAAA,IAC5D;AACA,WAAO;AAAA,EACR,CAAC;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var TLAsset_exports = {};
|
|
20
|
+
__export(TLAsset_exports, {
|
|
21
|
+
AssetRecordType: () => AssetRecordType,
|
|
22
|
+
assetMigrations: () => assetMigrations,
|
|
23
|
+
assetValidator: () => assetValidator,
|
|
24
|
+
assetVersions: () => assetVersions
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(TLAsset_exports);
|
|
27
|
+
var import_store = require("@bigbluebutton/store");
|
|
28
|
+
var import_validate = require("@bigbluebutton/validate");
|
|
29
|
+
var import_TLBookmarkAsset = require("../assets/TLBookmarkAsset");
|
|
30
|
+
var import_TLImageAsset = require("../assets/TLImageAsset");
|
|
31
|
+
var import_TLVideoAsset = require("../assets/TLVideoAsset");
|
|
32
|
+
const assetValidator = import_validate.T.model(
|
|
33
|
+
"asset",
|
|
34
|
+
import_validate.T.union("type", {
|
|
35
|
+
image: import_TLImageAsset.imageAssetValidator,
|
|
36
|
+
video: import_TLVideoAsset.videoAssetValidator,
|
|
37
|
+
bookmark: import_TLBookmarkAsset.bookmarkAssetValidator
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
const assetVersions = {
|
|
41
|
+
AddMeta: 1
|
|
42
|
+
};
|
|
43
|
+
const assetMigrations = (0, import_store.defineMigrations)({
|
|
44
|
+
subTypeKey: "type",
|
|
45
|
+
subTypeMigrations: {
|
|
46
|
+
image: import_TLImageAsset.imageAssetMigrations,
|
|
47
|
+
video: import_TLVideoAsset.videoAssetMigrations,
|
|
48
|
+
bookmark: import_TLBookmarkAsset.bookmarkAssetMigrations
|
|
49
|
+
},
|
|
50
|
+
currentVersion: assetVersions.AddMeta,
|
|
51
|
+
migrators: {
|
|
52
|
+
[assetVersions.AddMeta]: {
|
|
53
|
+
up: (record) => {
|
|
54
|
+
return {
|
|
55
|
+
...record,
|
|
56
|
+
meta: {}
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
down: ({ meta: _, ...record }) => {
|
|
60
|
+
return {
|
|
61
|
+
...record
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const AssetRecordType = (0, import_store.createRecordType)("asset", {
|
|
68
|
+
migrations: assetMigrations,
|
|
69
|
+
validator: assetValidator,
|
|
70
|
+
scope: "document"
|
|
71
|
+
}).withDefaultProperties(() => ({
|
|
72
|
+
meta: {}
|
|
73
|
+
}));
|
|
74
|
+
//# sourceMappingURL=TLAsset.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/records/TLAsset.ts"],
|
|
4
|
+
"sourcesContent": ["import { createRecordType, defineMigrations, RecordId } from '@bigbluebutton/store'\nimport { T } from '@bigbluebutton/validate'\nimport { TLBaseAsset } from '../assets/TLBaseAsset'\nimport {\n\tbookmarkAssetMigrations,\n\tbookmarkAssetValidator,\n\tTLBookmarkAsset,\n} from '../assets/TLBookmarkAsset'\nimport { imageAssetMigrations, imageAssetValidator, TLImageAsset } from '../assets/TLImageAsset'\nimport { TLVideoAsset, videoAssetMigrations, videoAssetValidator } from '../assets/TLVideoAsset'\nimport { TLShape } from './TLShape'\n\n/** @public */\nexport type TLAsset = TLImageAsset | TLVideoAsset | TLBookmarkAsset\n\n/** @internal */\nexport const assetValidator: T.Validator<TLAsset> = T.model(\n\t'asset',\n\tT.union('type', {\n\t\timage: imageAssetValidator,\n\t\tvideo: videoAssetValidator,\n\t\tbookmark: bookmarkAssetValidator,\n\t})\n)\n\n/** @internal */\nexport const assetVersions = {\n\tAddMeta: 1,\n}\n\n/** @internal */\nexport const assetMigrations = defineMigrations({\n\tsubTypeKey: 'type',\n\tsubTypeMigrations: {\n\t\timage: imageAssetMigrations,\n\t\tvideo: videoAssetMigrations,\n\t\tbookmark: bookmarkAssetMigrations,\n\t},\n\tcurrentVersion: assetVersions.AddMeta,\n\tmigrators: {\n\t\t[assetVersions.AddMeta]: {\n\t\t\tup: (record) => {\n\t\t\t\treturn {\n\t\t\t\t\t...record,\n\t\t\t\t\tmeta: {},\n\t\t\t\t}\n\t\t\t},\n\t\t\tdown: ({ meta: _, ...record }) => {\n\t\t\t\treturn {\n\t\t\t\t\t...record,\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n})\n\n/** @public */\nexport type TLAssetPartial<T extends TLAsset = TLAsset> = T extends T\n\t? {\n\t\t\tid: TLAssetId\n\t\t\ttype: T['type']\n\t\t\tprops?: Partial<T['props']>\n\t\t\tmeta?: Partial<T['meta']>\n\t } & Partial<Omit<T, 'type' | 'id' | 'props' | 'meta'>>\n\t: never\n\n/** @public */\nexport const AssetRecordType = createRecordType<TLAsset>('asset', {\n\tmigrations: assetMigrations,\n\tvalidator: assetValidator,\n\tscope: 'document',\n}).withDefaultProperties(() => ({\n\tmeta: {},\n}))\n\n/** @public */\nexport type TLAssetId = RecordId<TLBaseAsset<any, any>>\n\n/** @public */\nexport type TLAssetShape = Extract<TLShape, { props: { assetId: TLAssetId } }>\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6D;AAC7D,sBAAkB;AAElB,6BAIO;AACP,0BAAwE;AACxE,0BAAwE;AAOjE,MAAM,iBAAuC,kBAAE;AAAA,EACrD;AAAA,EACA,kBAAE,MAAM,QAAQ;AAAA,IACf,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EACX,CAAC;AACF;AAGO,MAAM,gBAAgB;AAAA,EAC5B,SAAS;AACV;AAGO,MAAM,sBAAkB,+BAAiB;AAAA,EAC/C,YAAY;AAAA,EACZ,mBAAmB;AAAA,IAClB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,gBAAgB,cAAc;AAAA,EAC9B,WAAW;AAAA,IACV,CAAC,cAAc,OAAO,GAAG;AAAA,MACxB,IAAI,CAAC,WAAW;AACf,eAAO;AAAA,UACN,GAAG;AAAA,UACH,MAAM,CAAC;AAAA,QACR;AAAA,MACD;AAAA,MACA,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,OAAO,MAAM;AACjC,eAAO;AAAA,UACN,GAAG;AAAA,QACJ;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;AAaM,MAAM,sBAAkB,+BAA0B,SAAS;AAAA,EACjE,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,OAAO;AACR,CAAC,EAAE,sBAAsB,OAAO;AAAA,EAC/B,MAAM,CAAC;AACR,EAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|