@bigbluebutton/tlschema 2.0.0-alpha.20 → 2.0.0-alpha.27

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.
@@ -933,6 +933,7 @@ export declare interface TLBaseShape<Type extends string, Props extends object>
933
933
  opacity: TLOpacityType;
934
934
  props: Props;
935
935
  meta: JsonObject;
936
+ whiteboardId?: string;
936
937
  }
937
938
 
938
939
  /**
@@ -46,7 +46,9 @@ function createShapeValidator(type, props, meta) {
46
46
  isLocked: import_validate.T.boolean,
47
47
  opacity: import_TLOpacity.opacityValidator,
48
48
  props: props ? import_validate.T.object(props) : import_validate.T.jsonValue,
49
- meta: meta ? import_validate.T.object(meta) : import_validate.T.jsonValue
49
+ meta: meta ? import_validate.T.object(meta) : import_validate.T.jsonValue,
50
+ whiteboardId: import_validate.T.optional(import_validate.T.string)
51
+ // Needed when akka-bbb-apps sends data to the whiteboard
50
52
  });
51
53
  }
52
54
  //# sourceMappingURL=TLBaseShape.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shapes/TLBaseShape.ts"],
4
- "sourcesContent": ["import { BaseRecord } from '@bigbluebutton/store'\nimport { Expand, JsonObject } from '@bigbluebutton/utils'\nimport { T } from '@bigbluebutton/validate'\nimport { TLOpacityType, opacityValidator } from '../misc/TLOpacity'\nimport { idValidator } from '../misc/id-validator'\nimport { TLParentId, TLShapeId } from '../records/TLShape'\n\n/** @public */\nexport interface TLBaseShape<Type extends string, Props extends object>\n\textends BaseRecord<'shape', TLShapeId> {\n\ttype: Type\n\tx: number\n\ty: number\n\trotation: number\n\tindex: string\n\tparentId: TLParentId\n\tisLocked: boolean\n\topacity: TLOpacityType\n\tprops: Props\n\tmeta: JsonObject\n}\n\n/** @public */\nexport const parentIdValidator = T.string.refine((id) => {\n\tif (!id.startsWith('page:') && !id.startsWith('shape:')) {\n\t\tthrow new Error('Parent ID must start with \"page:\" or \"shape:\"')\n\t}\n\treturn id as TLParentId\n})\n\n/** @public */\nexport const shapeIdValidator = idValidator<TLShapeId>('shape')\n\n/** @public */\nexport function createShapeValidator<\n\tType extends string,\n\tProps extends JsonObject,\n\tMeta extends JsonObject\n>(\n\ttype: Type,\n\tprops?: { [K in keyof Props]: T.Validatable<Props[K]> },\n\tmeta?: { [K in keyof Meta]: T.Validatable<Meta[K]> }\n) {\n\treturn T.object<TLBaseShape<Type, Props>>({\n\t\tid: shapeIdValidator,\n\t\ttypeName: T.literal('shape'),\n\t\tx: T.number,\n\t\ty: T.number,\n\t\trotation: T.number,\n\t\tindex: T.string,\n\t\tparentId: parentIdValidator,\n\t\ttype: T.literal(type),\n\t\tisLocked: T.boolean,\n\t\topacity: opacityValidator,\n\t\tprops: props ? T.object(props) : (T.jsonValue as T.ObjectValidator<Props>),\n\t\tmeta: meta ? T.object(meta) : (T.jsonValue as T.ObjectValidator<Meta>),\n\t})\n}\n\n/** @public */\nexport type ShapeProps<Shape extends TLBaseShape<any, any>> = {\n\t[K in keyof Shape['props']]: T.Validatable<Shape['props'][K]>\n}\n\nexport type ShapePropsType<Config extends Record<string, T.Validatable<any>>> = Expand<{\n\t[K in keyof Config]: T.TypeOf<Config[K]>\n}>\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAAkB;AAClB,uBAAgD;AAChD,0BAA4B;AAmBrB,MAAM,oBAAoB,kBAAE,OAAO,OAAO,CAAC,OAAO;AACxD,MAAI,CAAC,GAAG,WAAW,OAAO,KAAK,CAAC,GAAG,WAAW,QAAQ,GAAG;AACxD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AACA,SAAO;AACR,CAAC;AAGM,MAAM,uBAAmB,iCAAuB,OAAO;AAGvD,SAAS,qBAKf,MACA,OACA,MACC;AACD,SAAO,kBAAE,OAAiC;AAAA,IACzC,IAAI;AAAA,IACJ,UAAU,kBAAE,QAAQ,OAAO;AAAA,IAC3B,GAAG,kBAAE;AAAA,IACL,GAAG,kBAAE;AAAA,IACL,UAAU,kBAAE;AAAA,IACZ,OAAO,kBAAE;AAAA,IACT,UAAU;AAAA,IACV,MAAM,kBAAE,QAAQ,IAAI;AAAA,IACpB,UAAU,kBAAE;AAAA,IACZ,SAAS;AAAA,IACT,OAAO,QAAQ,kBAAE,OAAO,KAAK,IAAK,kBAAE;AAAA,IACpC,MAAM,OAAO,kBAAE,OAAO,IAAI,IAAK,kBAAE;AAAA,EAClC,CAAC;AACF;",
4
+ "sourcesContent": ["import { BaseRecord } from '@bigbluebutton/store'\nimport { Expand, JsonObject } from '@bigbluebutton/utils'\nimport { T } from '@bigbluebutton/validate'\nimport { TLOpacityType, opacityValidator } from '../misc/TLOpacity'\nimport { idValidator } from '../misc/id-validator'\nimport { TLParentId, TLShapeId } from '../records/TLShape'\n\n/** @public */\nexport interface TLBaseShape<Type extends string, Props extends object>\n\textends BaseRecord<'shape', TLShapeId> {\n\ttype: Type\n\tx: number\n\ty: number\n\trotation: number\n\tindex: string\n\tparentId: TLParentId\n\tisLocked: boolean\n\topacity: TLOpacityType\n\tprops: Props\n\tmeta: JsonObject\n\twhiteboardId?: string\n}\n\n/** @public */\nexport const parentIdValidator = T.string.refine((id) => {\n\tif (!id.startsWith('page:') && !id.startsWith('shape:')) {\n\t\tthrow new Error('Parent ID must start with \"page:\" or \"shape:\"')\n\t}\n\treturn id as TLParentId\n})\n\n/** @public */\nexport const shapeIdValidator = idValidator<TLShapeId>('shape')\n\n/** @public */\nexport function createShapeValidator<\n\tType extends string,\n\tProps extends JsonObject,\n\tMeta extends JsonObject\n>(\n\ttype: Type,\n\tprops?: { [K in keyof Props]: T.Validatable<Props[K]> },\n\tmeta?: { [K in keyof Meta]: T.Validatable<Meta[K]> }\n) {\n\treturn T.object<TLBaseShape<Type, Props>>({\n\t\tid: shapeIdValidator,\n\t\ttypeName: T.literal('shape'),\n\t\tx: T.number,\n\t\ty: T.number,\n\t\trotation: T.number,\n\t\tindex: T.string,\n\t\tparentId: parentIdValidator,\n\t\ttype: T.literal(type),\n\t\tisLocked: T.boolean,\n\t\topacity: opacityValidator,\n\t\tprops: props ? T.object(props) : (T.jsonValue as T.ObjectValidator<Props>),\n\t\tmeta: meta ? T.object(meta) : (T.jsonValue as T.ObjectValidator<Meta>),\n\t\twhiteboardId: T.optional(T.string), // Needed when akka-bbb-apps sends data to the whiteboard\n\t})\n}\n\n/** @public */\nexport type ShapeProps<Shape extends TLBaseShape<any, any>> = {\n\t[K in keyof Shape['props']]: T.Validatable<Shape['props'][K]>\n}\n\nexport type ShapePropsType<Config extends Record<string, T.Validatable<any>>> = Expand<{\n\t[K in keyof Config]: T.TypeOf<Config[K]>\n}>\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAAkB;AAClB,uBAAgD;AAChD,0BAA4B;AAoBrB,MAAM,oBAAoB,kBAAE,OAAO,OAAO,CAAC,OAAO;AACxD,MAAI,CAAC,GAAG,WAAW,OAAO,KAAK,CAAC,GAAG,WAAW,QAAQ,GAAG;AACxD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AACA,SAAO;AACR,CAAC;AAGM,MAAM,uBAAmB,iCAAuB,OAAO;AAGvD,SAAS,qBAKf,MACA,OACA,MACC;AACD,SAAO,kBAAE,OAAiC;AAAA,IACzC,IAAI;AAAA,IACJ,UAAU,kBAAE,QAAQ,OAAO;AAAA,IAC3B,GAAG,kBAAE;AAAA,IACL,GAAG,kBAAE;AAAA,IACL,UAAU,kBAAE;AAAA,IACZ,OAAO,kBAAE;AAAA,IACT,UAAU;AAAA,IACV,MAAM,kBAAE,QAAQ,IAAI;AAAA,IACpB,UAAU,kBAAE;AAAA,IACZ,SAAS;AAAA,IACT,OAAO,QAAQ,kBAAE,OAAO,KAAK,IAAK,kBAAE;AAAA,IACpC,MAAM,OAAO,kBAAE,OAAO,IAAI,IAAK,kBAAE;AAAA,IACjC,cAAc,kBAAE,SAAS,kBAAE,MAAM;AAAA;AAAA,EAClC,CAAC;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,32 @@
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 TLPollShape_exports = {};
20
+ __export(TLPollShape_exports, {
21
+ pollShapeMigrations: () => pollShapeMigrations,
22
+ pollShapeProps: () => pollShapeProps
23
+ });
24
+ module.exports = __toCommonJS(TLPollShape_exports);
25
+ var import_store = require("@bigbluebutton/store");
26
+ var import_validate = require("@bigbluebutton/validate");
27
+ const pollShapeProps = {
28
+ w: import_validate.T.nonZeroNumber,
29
+ h: import_validate.T.nonZeroNumber
30
+ };
31
+ const pollShapeMigrations = (0, import_store.defineMigrations)({});
32
+ //# sourceMappingURL=TLPollShape.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/shapes/TLPollShape.ts"],
4
+ "sourcesContent": ["import { defineMigrations } from '@bigbluebutton/store'\nimport { T } from '@bigbluebutton/validate'\nimport { ShapePropsType, TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport const pollShapeProps = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n}\n\ntype TLPollShapeProps = ShapePropsType<typeof pollShapeProps>\n\n/** @public */\nexport type TLPollShape = TLBaseShape<'poll', TLPollShapeProps>\n\n/** @internal */\nexport const pollShapeMigrations = defineMigrations({})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAiC;AACjC,sBAAkB;AAIX,MAAM,iBAAiB;AAAA,EAC7B,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AACN;AAQO,MAAM,0BAAsB,+BAAiB,CAAC,CAAC;",
6
+ "names": []
7
+ }
@@ -933,6 +933,7 @@ export declare interface TLBaseShape<Type extends string, Props extends object>
933
933
  opacity: TLOpacityType;
934
934
  props: Props;
935
935
  meta: JsonObject;
936
+ whiteboardId?: string;
936
937
  }
937
938
 
938
939
  /**
@@ -21,7 +21,9 @@ function createShapeValidator(type, props, meta) {
21
21
  isLocked: T.boolean,
22
22
  opacity: opacityValidator,
23
23
  props: props ? T.object(props) : T.jsonValue,
24
- meta: meta ? T.object(meta) : T.jsonValue
24
+ meta: meta ? T.object(meta) : T.jsonValue,
25
+ whiteboardId: T.optional(T.string)
26
+ // Needed when akka-bbb-apps sends data to the whiteboard
25
27
  });
26
28
  }
27
29
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shapes/TLBaseShape.ts"],
4
- "sourcesContent": ["import { BaseRecord } from '@bigbluebutton/store'\nimport { Expand, JsonObject } from '@bigbluebutton/utils'\nimport { T } from '@bigbluebutton/validate'\nimport { TLOpacityType, opacityValidator } from '../misc/TLOpacity'\nimport { idValidator } from '../misc/id-validator'\nimport { TLParentId, TLShapeId } from '../records/TLShape'\n\n/** @public */\nexport interface TLBaseShape<Type extends string, Props extends object>\n\textends BaseRecord<'shape', TLShapeId> {\n\ttype: Type\n\tx: number\n\ty: number\n\trotation: number\n\tindex: string\n\tparentId: TLParentId\n\tisLocked: boolean\n\topacity: TLOpacityType\n\tprops: Props\n\tmeta: JsonObject\n}\n\n/** @public */\nexport const parentIdValidator = T.string.refine((id) => {\n\tif (!id.startsWith('page:') && !id.startsWith('shape:')) {\n\t\tthrow new Error('Parent ID must start with \"page:\" or \"shape:\"')\n\t}\n\treturn id as TLParentId\n})\n\n/** @public */\nexport const shapeIdValidator = idValidator<TLShapeId>('shape')\n\n/** @public */\nexport function createShapeValidator<\n\tType extends string,\n\tProps extends JsonObject,\n\tMeta extends JsonObject\n>(\n\ttype: Type,\n\tprops?: { [K in keyof Props]: T.Validatable<Props[K]> },\n\tmeta?: { [K in keyof Meta]: T.Validatable<Meta[K]> }\n) {\n\treturn T.object<TLBaseShape<Type, Props>>({\n\t\tid: shapeIdValidator,\n\t\ttypeName: T.literal('shape'),\n\t\tx: T.number,\n\t\ty: T.number,\n\t\trotation: T.number,\n\t\tindex: T.string,\n\t\tparentId: parentIdValidator,\n\t\ttype: T.literal(type),\n\t\tisLocked: T.boolean,\n\t\topacity: opacityValidator,\n\t\tprops: props ? T.object(props) : (T.jsonValue as T.ObjectValidator<Props>),\n\t\tmeta: meta ? T.object(meta) : (T.jsonValue as T.ObjectValidator<Meta>),\n\t})\n}\n\n/** @public */\nexport type ShapeProps<Shape extends TLBaseShape<any, any>> = {\n\t[K in keyof Shape['props']]: T.Validatable<Shape['props'][K]>\n}\n\nexport type ShapePropsType<Config extends Record<string, T.Validatable<any>>> = Expand<{\n\t[K in keyof Config]: T.TypeOf<Config[K]>\n}>\n"],
5
- "mappings": "AAEA,SAAS,SAAS;AAClB,SAAwB,wBAAwB;AAChD,SAAS,mBAAmB;AAmBrB,MAAM,oBAAoB,EAAE,OAAO,OAAO,CAAC,OAAO;AACxD,MAAI,CAAC,GAAG,WAAW,OAAO,KAAK,CAAC,GAAG,WAAW,QAAQ,GAAG;AACxD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AACA,SAAO;AACR,CAAC;AAGM,MAAM,mBAAmB,YAAuB,OAAO;AAGvD,SAAS,qBAKf,MACA,OACA,MACC;AACD,SAAO,EAAE,OAAiC;AAAA,IACzC,IAAI;AAAA,IACJ,UAAU,EAAE,QAAQ,OAAO;AAAA,IAC3B,GAAG,EAAE;AAAA,IACL,GAAG,EAAE;AAAA,IACL,UAAU,EAAE;AAAA,IACZ,OAAO,EAAE;AAAA,IACT,UAAU;AAAA,IACV,MAAM,EAAE,QAAQ,IAAI;AAAA,IACpB,UAAU,EAAE;AAAA,IACZ,SAAS;AAAA,IACT,OAAO,QAAQ,EAAE,OAAO,KAAK,IAAK,EAAE;AAAA,IACpC,MAAM,OAAO,EAAE,OAAO,IAAI,IAAK,EAAE;AAAA,EAClC,CAAC;AACF;",
4
+ "sourcesContent": ["import { BaseRecord } from '@bigbluebutton/store'\nimport { Expand, JsonObject } from '@bigbluebutton/utils'\nimport { T } from '@bigbluebutton/validate'\nimport { TLOpacityType, opacityValidator } from '../misc/TLOpacity'\nimport { idValidator } from '../misc/id-validator'\nimport { TLParentId, TLShapeId } from '../records/TLShape'\n\n/** @public */\nexport interface TLBaseShape<Type extends string, Props extends object>\n\textends BaseRecord<'shape', TLShapeId> {\n\ttype: Type\n\tx: number\n\ty: number\n\trotation: number\n\tindex: string\n\tparentId: TLParentId\n\tisLocked: boolean\n\topacity: TLOpacityType\n\tprops: Props\n\tmeta: JsonObject\n\twhiteboardId?: string\n}\n\n/** @public */\nexport const parentIdValidator = T.string.refine((id) => {\n\tif (!id.startsWith('page:') && !id.startsWith('shape:')) {\n\t\tthrow new Error('Parent ID must start with \"page:\" or \"shape:\"')\n\t}\n\treturn id as TLParentId\n})\n\n/** @public */\nexport const shapeIdValidator = idValidator<TLShapeId>('shape')\n\n/** @public */\nexport function createShapeValidator<\n\tType extends string,\n\tProps extends JsonObject,\n\tMeta extends JsonObject\n>(\n\ttype: Type,\n\tprops?: { [K in keyof Props]: T.Validatable<Props[K]> },\n\tmeta?: { [K in keyof Meta]: T.Validatable<Meta[K]> }\n) {\n\treturn T.object<TLBaseShape<Type, Props>>({\n\t\tid: shapeIdValidator,\n\t\ttypeName: T.literal('shape'),\n\t\tx: T.number,\n\t\ty: T.number,\n\t\trotation: T.number,\n\t\tindex: T.string,\n\t\tparentId: parentIdValidator,\n\t\ttype: T.literal(type),\n\t\tisLocked: T.boolean,\n\t\topacity: opacityValidator,\n\t\tprops: props ? T.object(props) : (T.jsonValue as T.ObjectValidator<Props>),\n\t\tmeta: meta ? T.object(meta) : (T.jsonValue as T.ObjectValidator<Meta>),\n\t\twhiteboardId: T.optional(T.string), // Needed when akka-bbb-apps sends data to the whiteboard\n\t})\n}\n\n/** @public */\nexport type ShapeProps<Shape extends TLBaseShape<any, any>> = {\n\t[K in keyof Shape['props']]: T.Validatable<Shape['props'][K]>\n}\n\nexport type ShapePropsType<Config extends Record<string, T.Validatable<any>>> = Expand<{\n\t[K in keyof Config]: T.TypeOf<Config[K]>\n}>\n"],
5
+ "mappings": "AAEA,SAAS,SAAS;AAClB,SAAwB,wBAAwB;AAChD,SAAS,mBAAmB;AAoBrB,MAAM,oBAAoB,EAAE,OAAO,OAAO,CAAC,OAAO;AACxD,MAAI,CAAC,GAAG,WAAW,OAAO,KAAK,CAAC,GAAG,WAAW,QAAQ,GAAG;AACxD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AACA,SAAO;AACR,CAAC;AAGM,MAAM,mBAAmB,YAAuB,OAAO;AAGvD,SAAS,qBAKf,MACA,OACA,MACC;AACD,SAAO,EAAE,OAAiC;AAAA,IACzC,IAAI;AAAA,IACJ,UAAU,EAAE,QAAQ,OAAO;AAAA,IAC3B,GAAG,EAAE;AAAA,IACL,GAAG,EAAE;AAAA,IACL,UAAU,EAAE;AAAA,IACZ,OAAO,EAAE;AAAA,IACT,UAAU;AAAA,IACV,MAAM,EAAE,QAAQ,IAAI;AAAA,IACpB,UAAU,EAAE;AAAA,IACZ,SAAS;AAAA,IACT,OAAO,QAAQ,EAAE,OAAO,KAAK,IAAK,EAAE;AAAA,IACpC,MAAM,OAAO,EAAE,OAAO,IAAI,IAAK,EAAE;AAAA,IACjC,cAAc,EAAE,SAAS,EAAE,MAAM;AAAA;AAAA,EAClC,CAAC;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,12 @@
1
+ import { defineMigrations } from "@bigbluebutton/store";
2
+ import { T } from "@bigbluebutton/validate";
3
+ const pollShapeProps = {
4
+ w: T.nonZeroNumber,
5
+ h: T.nonZeroNumber
6
+ };
7
+ const pollShapeMigrations = defineMigrations({});
8
+ export {
9
+ pollShapeMigrations,
10
+ pollShapeProps
11
+ };
12
+ //# sourceMappingURL=TLPollShape.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/shapes/TLPollShape.ts"],
4
+ "sourcesContent": ["import { defineMigrations } from '@bigbluebutton/store'\nimport { T } from '@bigbluebutton/validate'\nimport { ShapePropsType, TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport const pollShapeProps = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n}\n\ntype TLPollShapeProps = ShapePropsType<typeof pollShapeProps>\n\n/** @public */\nexport type TLPollShape = TLBaseShape<'poll', TLPollShapeProps>\n\n/** @internal */\nexport const pollShapeMigrations = defineMigrations({})\n"],
5
+ "mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,SAAS;AAIX,MAAM,iBAAiB;AAAA,EAC7B,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AACN;AAQO,MAAM,sBAAsB,iBAAiB,CAAC,CAAC;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bigbluebutton/tlschema",
3
3
  "description": "BigBlueButton's fork of tldraw 2.0-alpha.19 - A tiny little drawing app (schema).",
4
- "version": "2.0.0-alpha.20",
4
+ "version": "2.0.0-alpha.27",
5
5
  "packageManager": "yarn@3.5.0",
6
6
  "author": {
7
7
  "name": "tldraw GB Ltd.",
@@ -47,12 +47,13 @@
47
47
  ]
48
48
  },
49
49
  "dependencies": {
50
- "@bigbluebutton/state": "2.0.0-alpha.20",
51
- "@bigbluebutton/store": "2.0.0-alpha.20",
52
- "@bigbluebutton/utils": "2.0.0-alpha.20",
53
- "@bigbluebutton/validate": "2.0.0-alpha.20",
50
+ "@bigbluebutton/state": "2.0.0-alpha.27",
51
+ "@bigbluebutton/store": "2.0.0-alpha.27",
52
+ "@bigbluebutton/utils": "2.0.0-alpha.27",
53
+ "@bigbluebutton/validate": "2.0.0-alpha.27",
54
54
  "nanoid": "4.0.2"
55
55
  },
56
+ "stableVersion": "2.0.0-alpha.20",
56
57
  "module": "dist-esm/index.mjs",
57
58
  "source": "src/index.ts",
58
59
  "exports": {
@@ -1054,7 +1054,7 @@ describe('user config refactor', () => {
1054
1054
  // it cannot be added back so it should add some meaningless id in there
1055
1055
  // in practice, because we bumped the store version, this down migrator will never be used
1056
1056
  expect(down(next)).toMatchInlineSnapshot(`
1057
- Object {
1057
+ {
1058
1058
  "id": "instance:123",
1059
1059
  "typeName": "instance",
1060
1060
  "userId": "user:none",
@@ -1103,11 +1103,11 @@ describe('making instance state independent', () => {
1103
1103
  expect(up(prev)).toEqual(next)
1104
1104
  // down should never be called
1105
1105
  expect(down(next)).toMatchInlineSnapshot(`
1106
- Object {
1106
+ {
1107
1107
  "cameraId": "camera:void",
1108
1108
  "id": "instance_page_state:123",
1109
1109
  "instanceId": "instance:instance",
1110
- "selectedShapeIds": Array [],
1110
+ "selectedShapeIds": [],
1111
1111
  "typeName": "instance_page_state",
1112
1112
  }
1113
1113
  `)
@@ -1134,10 +1134,10 @@ describe('making instance state independent', () => {
1134
1134
 
1135
1135
  // down should never be called
1136
1136
  expect(down(next)).toMatchInlineSnapshot(`
1137
- Object {
1137
+ {
1138
1138
  "id": "instance_presence:123",
1139
1139
  "instanceId": "instance:instance",
1140
- "selectedShapeIds": Array [],
1140
+ "selectedShapeIds": [],
1141
1141
  "typeName": "instance_presence",
1142
1142
  }
1143
1143
  `)
@@ -18,6 +18,7 @@ export interface TLBaseShape<Type extends string, Props extends object>
18
18
  opacity: TLOpacityType
19
19
  props: Props
20
20
  meta: JsonObject
21
+ whiteboardId?: string
21
22
  }
22
23
 
23
24
  /** @public */
@@ -54,6 +55,7 @@ export function createShapeValidator<
54
55
  opacity: opacityValidator,
55
56
  props: props ? T.object(props) : (T.jsonValue as T.ObjectValidator<Props>),
56
57
  meta: meta ? T.object(meta) : (T.jsonValue as T.ObjectValidator<Meta>),
58
+ whiteboardId: T.optional(T.string), // Needed when akka-bbb-apps sends data to the whiteboard
57
59
  })
58
60
  }
59
61
 
@@ -0,0 +1,17 @@
1
+ import { defineMigrations } from '@bigbluebutton/store'
2
+ import { T } from '@bigbluebutton/validate'
3
+ import { ShapePropsType, TLBaseShape } from './TLBaseShape'
4
+
5
+ /** @public */
6
+ export const pollShapeProps = {
7
+ w: T.nonZeroNumber,
8
+ h: T.nonZeroNumber,
9
+ }
10
+
11
+ type TLPollShapeProps = ShapePropsType<typeof pollShapeProps>
12
+
13
+ /** @public */
14
+ export type TLPollShape = TLBaseShape<'poll', TLPollShapeProps>
15
+
16
+ /** @internal */
17
+ export const pollShapeMigrations = defineMigrations({})