@tldraw/tlschema 3.12.0-canary.ceec8eda0db0 → 3.12.0-canary.d0e07565d818

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.
@@ -1030,6 +1030,13 @@ export declare interface TLDefaultColorThemeColor {
1030
1030
  semi: string;
1031
1031
  pattern: string;
1032
1032
  fill: string;
1033
+ frame: {
1034
+ fill: string;
1035
+ headingFill: string;
1036
+ headingStroke: string;
1037
+ stroke: string;
1038
+ text: string;
1039
+ };
1033
1040
  note: {
1034
1041
  fill: string;
1035
1042
  text: string;
@@ -1121,6 +1128,7 @@ export declare interface TLFrameShapeProps {
1121
1128
  w: number;
1122
1129
  h: number;
1123
1130
  name: string;
1131
+ color: TLDefaultColorStyle;
1124
1132
  }
1125
1133
 
1126
1134
  /** @public */
@@ -1216,6 +1224,7 @@ export declare interface TLImageShapeProps {
1216
1224
  crop: null | TLShapeCrop;
1217
1225
  flipX: boolean;
1218
1226
  flipY: boolean;
1227
+ altText: string;
1219
1228
  }
1220
1229
 
1221
1230
  /**
@@ -1588,6 +1597,7 @@ export declare interface TLVideoShapeProps {
1588
1597
  playing: boolean;
1589
1598
  url: string;
1590
1599
  assetId: null | TLAssetId;
1600
+ altText: string;
1591
1601
  }
1592
1602
 
1593
1603
  /** @public */
package/dist-cjs/index.js CHANGED
@@ -172,7 +172,7 @@ var import_TLVerticalAlignStyle = require("./styles/TLVerticalAlignStyle");
172
172
  var import_translations = require("./translations/translations");
173
173
  (0, import_utils.registerTldrawLibraryVersion)(
174
174
  "@tldraw/tlschema",
175
- "3.12.0-canary.ceec8eda0db0",
175
+ "3.12.0-canary.d0e07565d818",
176
176
  "cjs"
177
177
  );
178
178
  //# sourceMappingURL=index.js.map
@@ -19,17 +19,37 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var TLFrameShape_exports = {};
20
20
  __export(TLFrameShape_exports, {
21
21
  frameShapeMigrations: () => frameShapeMigrations,
22
- frameShapeProps: () => frameShapeProps
22
+ frameShapeProps: () => frameShapeProps,
23
+ frameShapeVersions: () => Versions
23
24
  });
24
25
  module.exports = __toCommonJS(TLFrameShape_exports);
25
26
  var import_validate = require("@tldraw/validate");
26
27
  var import_TLShape = require("../records/TLShape");
28
+ var import_TLColorStyle = require("../styles/TLColorStyle");
27
29
  const frameShapeProps = {
28
30
  w: import_validate.T.nonZeroNumber,
29
31
  h: import_validate.T.nonZeroNumber,
30
- name: import_validate.T.string
32
+ name: import_validate.T.string,
33
+ // because shape colors are an option, we don't want them to be picked up by the editor as a
34
+ // style prop by default, so instead of a proper style we just supply an equivalent validator.
35
+ // Check `FrameShapeUtil.configure` for how we replace this with the original
36
+ // `DefaultColorStyle` style when the option is turned on.
37
+ color: import_validate.T.literalEnum(...import_TLColorStyle.DefaultColorStyle.values)
31
38
  };
39
+ const Versions = (0, import_TLShape.createShapePropsMigrationIds)("frame", {
40
+ AddColorProp: 1
41
+ });
32
42
  const frameShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequence)({
33
- sequence: []
43
+ sequence: [
44
+ {
45
+ id: Versions.AddColorProp,
46
+ up: (props) => {
47
+ props.color = "black";
48
+ },
49
+ down: (props) => {
50
+ delete props.color;
51
+ }
52
+ }
53
+ ]
34
54
  });
35
55
  //# sourceMappingURL=TLFrameShape.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shapes/TLFrameShape.ts"],
4
- "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { createShapePropsMigrationSequence } from '../records/TLShape'\nimport { RecordProps } from '../recordsWithProps'\nimport { TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport interface TLFrameShapeProps {\n\tw: number\n\th: number\n\tname: string\n}\n\n/** @public */\nexport type TLFrameShape = TLBaseShape<'frame', TLFrameShapeProps>\n\n/** @public */\nexport const frameShapeProps: RecordProps<TLFrameShape> = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\tname: T.string,\n}\n\n/** @public */\nexport const frameShapeMigrations = createShapePropsMigrationSequence({\n\tsequence: [],\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAClB,qBAAkD;AAe3C,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,MAAM,kBAAE;AACT;AAGO,MAAM,2BAAuB,kDAAkC;AAAA,EACrE,UAAU,CAAC;AACZ,CAAC;",
4
+ "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { createShapePropsMigrationIds, createShapePropsMigrationSequence } from '../records/TLShape'\nimport { RecordProps } from '../recordsWithProps'\nimport { DefaultColorStyle, TLDefaultColorStyle } from '../styles/TLColorStyle'\nimport { TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport interface TLFrameShapeProps {\n\tw: number\n\th: number\n\tname: string\n\tcolor: TLDefaultColorStyle\n}\n\n/** @public */\nexport type TLFrameShape = TLBaseShape<'frame', TLFrameShapeProps>\n\n/** @public */\nexport const frameShapeProps: RecordProps<TLFrameShape> = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\tname: T.string,\n\t// because shape colors are an option, we don't want them to be picked up by the editor as a\n\t// style prop by default, so instead of a proper style we just supply an equivalent validator.\n\t// Check `FrameShapeUtil.configure` for how we replace this with the original\n\t// `DefaultColorStyle` style when the option is turned on.\n\tcolor: T.literalEnum(...DefaultColorStyle.values),\n}\n\nconst Versions = createShapePropsMigrationIds('frame', {\n\tAddColorProp: 1,\n})\n\nexport { Versions as frameShapeVersions }\n\n/** @public */\nexport const frameShapeMigrations = createShapePropsMigrationSequence({\n\tsequence: [\n\t\t{\n\t\t\tid: Versions.AddColorProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.color = 'black'\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.color\n\t\t\t},\n\t\t},\n\t],\n})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAClB,qBAAgF;AAEhF,0BAAuD;AAehD,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,MAAM,kBAAE;AAAA;AAAA;AAAA;AAAA;AAAA,EAKR,OAAO,kBAAE,YAAY,GAAG,sCAAkB,MAAM;AACjD;AAEA,MAAM,eAAW,6CAA6B,SAAS;AAAA,EACtD,cAAc;AACf,CAAC;AAKM,MAAM,2BAAuB,kDAAkC;AAAA,EACrE,UAAU;AAAA,IACT;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,QAAQ;AAAA,MACf;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
6
6
  "names": []
7
7
  }
@@ -40,13 +40,15 @@ const imageShapeProps = {
40
40
  assetId: import_TLBaseAsset.assetIdValidator.nullable(),
41
41
  crop: ImageShapeCrop.nullable(),
42
42
  flipX: import_validate.T.boolean,
43
- flipY: import_validate.T.boolean
43
+ flipY: import_validate.T.boolean,
44
+ altText: import_validate.T.string
44
45
  };
45
46
  const Versions = (0, import_TLShape.createShapePropsMigrationIds)("image", {
46
47
  AddUrlProp: 1,
47
48
  AddCropProp: 2,
48
49
  MakeUrlsValid: 3,
49
- AddFlipProps: 4
50
+ AddFlipProps: 4,
51
+ AddAltText: 5
50
52
  });
51
53
  const imageShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequence)({
52
54
  sequence: [
@@ -86,6 +88,15 @@ const imageShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequenc
86
88
  delete props.flipX;
87
89
  delete props.flipY;
88
90
  }
91
+ },
92
+ {
93
+ id: Versions.AddAltText,
94
+ up: (props) => {
95
+ props.altText = "";
96
+ },
97
+ down: (props) => {
98
+ delete props.altText;
99
+ }
89
100
  }
90
101
  ]
91
102
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shapes/TLImageShape.ts"],
4
- "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { assetIdValidator } from '../assets/TLBaseAsset'\nimport { vecModelValidator } from '../misc/geometry-types'\nimport { TLAssetId } from '../records/TLAsset'\nimport { createShapePropsMigrationIds, createShapePropsMigrationSequence } from '../records/TLShape'\nimport { RecordProps } from '../recordsWithProps'\nimport { TLShapeCrop } from './ShapeWithCrop'\nimport { TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport const ImageShapeCrop: T.ObjectValidator<TLShapeCrop> = T.object({\n\ttopLeft: vecModelValidator,\n\tbottomRight: vecModelValidator,\n})\n\n/** @public */\nexport interface TLImageShapeProps {\n\tw: number\n\th: number\n\tplaying: boolean\n\turl: string\n\tassetId: TLAssetId | null\n\tcrop: TLShapeCrop | null\n\tflipX: boolean\n\tflipY: boolean\n}\n\n/** @public */\nexport type TLImageShape = TLBaseShape<'image', TLImageShapeProps>\n\n/** @public */\nexport const imageShapeProps: RecordProps<TLImageShape> = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\tplaying: T.boolean,\n\turl: T.linkUrl,\n\tassetId: assetIdValidator.nullable(),\n\tcrop: ImageShapeCrop.nullable(),\n\tflipX: T.boolean,\n\tflipY: T.boolean,\n}\n\nconst Versions = createShapePropsMigrationIds('image', {\n\tAddUrlProp: 1,\n\tAddCropProp: 2,\n\tMakeUrlsValid: 3,\n\tAddFlipProps: 4,\n})\n\nexport { Versions as imageShapeVersions }\n\n/** @public */\nexport const imageShapeMigrations = createShapePropsMigrationSequence({\n\tsequence: [\n\t\t{\n\t\t\tid: Versions.AddUrlProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.url = ''\n\t\t\t},\n\t\t\tdown: 'retired',\n\t\t},\n\t\t{\n\t\t\tid: Versions.AddCropProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.crop = null\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.crop\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: Versions.MakeUrlsValid,\n\t\t\tup: (props) => {\n\t\t\t\tif (!T.linkUrl.isValid(props.url)) {\n\t\t\t\t\tprops.url = ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tdown: (_props) => {\n\t\t\t\t// noop\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: Versions.AddFlipProps,\n\t\t\tup: (props) => {\n\t\t\t\tprops.flipX = false\n\t\t\t\tprops.flipY = false\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.flipX\n\t\t\t\tdelete props.flipY\n\t\t\t},\n\t\t},\n\t],\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAClB,yBAAiC;AACjC,4BAAkC;AAElC,qBAAgF;AAMzE,MAAM,iBAAiD,kBAAE,OAAO;AAAA,EACtE,SAAS;AAAA,EACT,aAAa;AACd,CAAC;AAkBM,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,SAAS,kBAAE;AAAA,EACX,KAAK,kBAAE;AAAA,EACP,SAAS,oCAAiB,SAAS;AAAA,EACnC,MAAM,eAAe,SAAS;AAAA,EAC9B,OAAO,kBAAE;AAAA,EACT,OAAO,kBAAE;AACV;AAEA,MAAM,eAAW,6CAA6B,SAAS;AAAA,EACtD,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AACf,CAAC;AAKM,MAAM,2BAAuB,kDAAkC;AAAA,EACrE,UAAU;AAAA,IACT;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,MAAM;AAAA,MACb;AAAA,MACA,MAAM;AAAA,IACP;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,OAAO;AAAA,MACd;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,YAAI,CAAC,kBAAE,QAAQ,QAAQ,MAAM,GAAG,GAAG;AAClC,gBAAM,MAAM;AAAA,QACb;AAAA,MACD;AAAA,MACA,MAAM,CAAC,WAAW;AAAA,MAElB;AAAA,IACD;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,QAAQ;AACd,cAAM,QAAQ;AAAA,MACf;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AACb,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
4
+ "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { assetIdValidator } from '../assets/TLBaseAsset'\nimport { vecModelValidator } from '../misc/geometry-types'\nimport { TLAssetId } from '../records/TLAsset'\nimport { createShapePropsMigrationIds, createShapePropsMigrationSequence } from '../records/TLShape'\nimport { RecordProps } from '../recordsWithProps'\nimport { TLShapeCrop } from './ShapeWithCrop'\nimport { TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport const ImageShapeCrop: T.ObjectValidator<TLShapeCrop> = T.object({\n\ttopLeft: vecModelValidator,\n\tbottomRight: vecModelValidator,\n})\n\n/** @public */\nexport interface TLImageShapeProps {\n\tw: number\n\th: number\n\tplaying: boolean\n\turl: string\n\tassetId: TLAssetId | null\n\tcrop: TLShapeCrop | null\n\tflipX: boolean\n\tflipY: boolean\n\taltText: string\n}\n\n/** @public */\nexport type TLImageShape = TLBaseShape<'image', TLImageShapeProps>\n\n/** @public */\nexport const imageShapeProps: RecordProps<TLImageShape> = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\tplaying: T.boolean,\n\turl: T.linkUrl,\n\tassetId: assetIdValidator.nullable(),\n\tcrop: ImageShapeCrop.nullable(),\n\tflipX: T.boolean,\n\tflipY: T.boolean,\n\taltText: T.string,\n}\n\nconst Versions = createShapePropsMigrationIds('image', {\n\tAddUrlProp: 1,\n\tAddCropProp: 2,\n\tMakeUrlsValid: 3,\n\tAddFlipProps: 4,\n\tAddAltText: 5,\n})\n\nexport { Versions as imageShapeVersions }\n\n/** @public */\nexport const imageShapeMigrations = createShapePropsMigrationSequence({\n\tsequence: [\n\t\t{\n\t\t\tid: Versions.AddUrlProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.url = ''\n\t\t\t},\n\t\t\tdown: 'retired',\n\t\t},\n\t\t{\n\t\t\tid: Versions.AddCropProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.crop = null\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.crop\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: Versions.MakeUrlsValid,\n\t\t\tup: (props) => {\n\t\t\t\tif (!T.linkUrl.isValid(props.url)) {\n\t\t\t\t\tprops.url = ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tdown: (_props) => {\n\t\t\t\t// noop\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: Versions.AddFlipProps,\n\t\t\tup: (props) => {\n\t\t\t\tprops.flipX = false\n\t\t\t\tprops.flipY = false\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.flipX\n\t\t\t\tdelete props.flipY\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: Versions.AddAltText,\n\t\t\tup: (props) => {\n\t\t\t\tprops.altText = ''\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.altText\n\t\t\t},\n\t\t},\n\t],\n})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAClB,yBAAiC;AACjC,4BAAkC;AAElC,qBAAgF;AAMzE,MAAM,iBAAiD,kBAAE,OAAO;AAAA,EACtE,SAAS;AAAA,EACT,aAAa;AACd,CAAC;AAmBM,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,SAAS,kBAAE;AAAA,EACX,KAAK,kBAAE;AAAA,EACP,SAAS,oCAAiB,SAAS;AAAA,EACnC,MAAM,eAAe,SAAS;AAAA,EAC9B,OAAO,kBAAE;AAAA,EACT,OAAO,kBAAE;AAAA,EACT,SAAS,kBAAE;AACZ;AAEA,MAAM,eAAW,6CAA6B,SAAS;AAAA,EACtD,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AACb,CAAC;AAKM,MAAM,2BAAuB,kDAAkC;AAAA,EACrE,UAAU;AAAA,IACT;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,MAAM;AAAA,MACb;AAAA,MACA,MAAM;AAAA,IACP;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,OAAO;AAAA,MACd;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,YAAI,CAAC,kBAAE,QAAQ,QAAQ,MAAM,GAAG,GAAG;AAClC,gBAAM,MAAM;AAAA,QACb;AAAA,MACD;AAAA,MACA,MAAM,CAAC,WAAW;AAAA,MAElB;AAAA,IACD;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,QAAQ;AACd,cAAM,QAAQ;AAAA,MACf;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AACb,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,UAAU;AAAA,MACjB;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
6
6
  "names": []
7
7
  }
@@ -32,11 +32,13 @@ const videoShapeProps = {
32
32
  time: import_validate.T.number,
33
33
  playing: import_validate.T.boolean,
34
34
  url: import_validate.T.linkUrl,
35
- assetId: import_TLBaseAsset.assetIdValidator.nullable()
35
+ assetId: import_TLBaseAsset.assetIdValidator.nullable(),
36
+ altText: import_validate.T.string
36
37
  };
37
38
  const Versions = (0, import_TLShape.createShapePropsMigrationIds)("video", {
38
39
  AddUrlProp: 1,
39
- MakeUrlsValid: 2
40
+ MakeUrlsValid: 2,
41
+ AddAltText: 3
40
42
  });
41
43
  const videoShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequence)({
42
44
  sequence: [
@@ -56,6 +58,15 @@ const videoShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequenc
56
58
  },
57
59
  down: (_props) => {
58
60
  }
61
+ },
62
+ {
63
+ id: Versions.AddAltText,
64
+ up: (props) => {
65
+ props.altText = "";
66
+ },
67
+ down: (props) => {
68
+ delete props.altText;
69
+ }
59
70
  }
60
71
  ]
61
72
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shapes/TLVideoShape.ts"],
4
- "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { assetIdValidator } from '../assets/TLBaseAsset'\nimport { TLAssetId } from '../records/TLAsset'\nimport { createShapePropsMigrationIds, createShapePropsMigrationSequence } from '../records/TLShape'\nimport { RecordProps } from '../recordsWithProps'\nimport { TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport interface TLVideoShapeProps {\n\tw: number\n\th: number\n\ttime: number\n\tplaying: boolean\n\turl: string\n\tassetId: TLAssetId | null\n}\n\n/** @public */\nexport type TLVideoShape = TLBaseShape<'video', TLVideoShapeProps>\n\n/** @public */\nexport const videoShapeProps: RecordProps<TLVideoShape> = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\ttime: T.number,\n\tplaying: T.boolean,\n\turl: T.linkUrl,\n\tassetId: assetIdValidator.nullable(),\n}\n\nconst Versions = createShapePropsMigrationIds('video', {\n\tAddUrlProp: 1,\n\tMakeUrlsValid: 2,\n})\n\nexport { Versions as videoShapeVersions }\n\n/** @public */\nexport const videoShapeMigrations = createShapePropsMigrationSequence({\n\tsequence: [\n\t\t{\n\t\t\tid: Versions.AddUrlProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.url = ''\n\t\t\t},\n\t\t\tdown: 'retired',\n\t\t},\n\t\t{\n\t\t\tid: Versions.MakeUrlsValid,\n\t\t\tup: (props) => {\n\t\t\t\tif (!T.linkUrl.isValid(props.url)) {\n\t\t\t\t\tprops.url = ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tdown: (_props) => {\n\t\t\t\t// noop\n\t\t\t},\n\t\t},\n\t],\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAClB,yBAAiC;AAEjC,qBAAgF;AAkBzE,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,MAAM,kBAAE;AAAA,EACR,SAAS,kBAAE;AAAA,EACX,KAAK,kBAAE;AAAA,EACP,SAAS,oCAAiB,SAAS;AACpC;AAEA,MAAM,eAAW,6CAA6B,SAAS;AAAA,EACtD,YAAY;AAAA,EACZ,eAAe;AAChB,CAAC;AAKM,MAAM,2BAAuB,kDAAkC;AAAA,EACrE,UAAU;AAAA,IACT;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,MAAM;AAAA,MACb;AAAA,MACA,MAAM;AAAA,IACP;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,YAAI,CAAC,kBAAE,QAAQ,QAAQ,MAAM,GAAG,GAAG;AAClC,gBAAM,MAAM;AAAA,QACb;AAAA,MACD;AAAA,MACA,MAAM,CAAC,WAAW;AAAA,MAElB;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
4
+ "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { assetIdValidator } from '../assets/TLBaseAsset'\nimport { TLAssetId } from '../records/TLAsset'\nimport { createShapePropsMigrationIds, createShapePropsMigrationSequence } from '../records/TLShape'\nimport { RecordProps } from '../recordsWithProps'\nimport { TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport interface TLVideoShapeProps {\n\tw: number\n\th: number\n\ttime: number\n\tplaying: boolean\n\turl: string\n\tassetId: TLAssetId | null\n\taltText: string\n}\n\n/** @public */\nexport type TLVideoShape = TLBaseShape<'video', TLVideoShapeProps>\n\n/** @public */\nexport const videoShapeProps: RecordProps<TLVideoShape> = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\ttime: T.number,\n\tplaying: T.boolean,\n\turl: T.linkUrl,\n\tassetId: assetIdValidator.nullable(),\n\taltText: T.string,\n}\n\nconst Versions = createShapePropsMigrationIds('video', {\n\tAddUrlProp: 1,\n\tMakeUrlsValid: 2,\n\tAddAltText: 3,\n})\n\nexport { Versions as videoShapeVersions }\n\n/** @public */\nexport const videoShapeMigrations = createShapePropsMigrationSequence({\n\tsequence: [\n\t\t{\n\t\t\tid: Versions.AddUrlProp,\n\t\t\tup: (props) => {\n\t\t\t\tprops.url = ''\n\t\t\t},\n\t\t\tdown: 'retired',\n\t\t},\n\t\t{\n\t\t\tid: Versions.MakeUrlsValid,\n\t\t\tup: (props) => {\n\t\t\t\tif (!T.linkUrl.isValid(props.url)) {\n\t\t\t\t\tprops.url = ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tdown: (_props) => {\n\t\t\t\t// noop\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: Versions.AddAltText,\n\t\t\tup: (props) => {\n\t\t\t\tprops.altText = ''\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.altText\n\t\t\t},\n\t\t},\n\t],\n})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkB;AAClB,yBAAiC;AAEjC,qBAAgF;AAmBzE,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,MAAM,kBAAE;AAAA,EACR,SAAS,kBAAE;AAAA,EACX,KAAK,kBAAE;AAAA,EACP,SAAS,oCAAiB,SAAS;AAAA,EACnC,SAAS,kBAAE;AACZ;AAEA,MAAM,eAAW,6CAA6B,SAAS;AAAA,EACtD,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AACb,CAAC;AAKM,MAAM,2BAAuB,kDAAkC;AAAA,EACrE,UAAU;AAAA,IACT;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,MAAM;AAAA,MACb;AAAA,MACA,MAAM;AAAA,IACP;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,YAAI,CAAC,kBAAE,QAAQ,QAAQ,MAAM,GAAG,GAAG;AAClC,gBAAM,MAAM;AAAA,QACb;AAAA,MACD;AAAA,MACA,MAAM,CAAC,WAAW;AAAA,MAElB;AAAA,IACD;AAAA,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,UAAU;AAAA,MACjB;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
6
6
  "names": []
7
7
  }
@@ -45,11 +45,18 @@ const DefaultColorThemePalette = {
45
45
  lightMode: {
46
46
  id: "light",
47
47
  text: "#000000",
48
- background: "rgb(249, 250, 251)",
48
+ background: "#f9fafb",
49
49
  solid: "#fcfffe",
50
50
  black: {
51
51
  solid: "#1d1d1d",
52
52
  fill: "#1d1d1d",
53
+ frame: {
54
+ headingStroke: "#717171",
55
+ headingFill: "#ffffff",
56
+ stroke: "#717171",
57
+ fill: "#ffffff",
58
+ text: "#000000"
59
+ },
53
60
  note: {
54
61
  fill: "#FCE19C",
55
62
  text: "#000000"
@@ -64,6 +71,13 @@ const DefaultColorThemePalette = {
64
71
  blue: {
65
72
  solid: "#4465e9",
66
73
  fill: "#4465e9",
74
+ frame: {
75
+ headingStroke: "#6681ec",
76
+ headingFill: "#f9fafe",
77
+ stroke: "#6681ec",
78
+ fill: "#f9fafe",
79
+ text: "#000000"
80
+ },
67
81
  note: {
68
82
  fill: "#8AA3FF",
69
83
  text: "#000000"
@@ -78,6 +92,13 @@ const DefaultColorThemePalette = {
78
92
  green: {
79
93
  solid: "#099268",
80
94
  fill: "#099268",
95
+ frame: {
96
+ headingStroke: "#37a684",
97
+ headingFill: "#f8fcfa",
98
+ stroke: "#37a684",
99
+ fill: "#f8fcfa",
100
+ text: "#000000"
101
+ },
81
102
  note: {
82
103
  fill: "#6FC896",
83
104
  text: "#000000"
@@ -92,6 +113,13 @@ const DefaultColorThemePalette = {
92
113
  grey: {
93
114
  solid: "#9fa8b2",
94
115
  fill: "#9fa8b2",
116
+ frame: {
117
+ headingStroke: "#aaaaab",
118
+ headingFill: "#fbfcfc",
119
+ stroke: "#aaaaab",
120
+ fill: "#fcfcfd",
121
+ text: "#000000"
122
+ },
95
123
  note: {
96
124
  fill: "#C0CAD3",
97
125
  text: "#000000"
@@ -106,6 +134,13 @@ const DefaultColorThemePalette = {
106
134
  "light-blue": {
107
135
  solid: "#4ba1f1",
108
136
  fill: "#4ba1f1",
137
+ frame: {
138
+ headingStroke: "#6cb2f3",
139
+ headingFill: "#f8fbfe",
140
+ stroke: "#6cb2f3",
141
+ fill: "#fafcff",
142
+ text: "#000000"
143
+ },
109
144
  note: {
110
145
  fill: "#9BC4FD",
111
146
  text: "#000000"
@@ -120,6 +155,13 @@ const DefaultColorThemePalette = {
120
155
  "light-green": {
121
156
  solid: "#4cb05e",
122
157
  fill: "#4cb05e",
158
+ frame: {
159
+ headingStroke: "#6dbe7c",
160
+ headingFill: "#f8fcf9",
161
+ stroke: "#6dbe7c",
162
+ fill: "#fafdfa",
163
+ text: "#000000"
164
+ },
123
165
  note: {
124
166
  fill: "#98D08A",
125
167
  text: "#000000"
@@ -134,6 +176,13 @@ const DefaultColorThemePalette = {
134
176
  "light-red": {
135
177
  solid: "#f87777",
136
178
  fill: "#f87777",
179
+ frame: {
180
+ headingStroke: "#f89090",
181
+ headingFill: "#fffafa",
182
+ stroke: "#f89090",
183
+ fill: "#fffbfb",
184
+ text: "#000000"
185
+ },
137
186
  note: {
138
187
  fill: "#F7A5A1",
139
188
  text: "#000000"
@@ -148,6 +197,13 @@ const DefaultColorThemePalette = {
148
197
  "light-violet": {
149
198
  solid: "#e085f4",
150
199
  fill: "#e085f4",
200
+ frame: {
201
+ headingStroke: "#e59bf5",
202
+ headingFill: "#fefaff",
203
+ stroke: "#e59bf5",
204
+ fill: "#fefbff",
205
+ text: "#000000"
206
+ },
151
207
  note: {
152
208
  fill: "#DFB0F9",
153
209
  text: "#000000"
@@ -162,6 +218,13 @@ const DefaultColorThemePalette = {
162
218
  orange: {
163
219
  solid: "#e16919",
164
220
  fill: "#e16919",
221
+ frame: {
222
+ headingStroke: "#e68544",
223
+ headingFill: "#fef9f6",
224
+ stroke: "#e68544",
225
+ fill: "#fef9f6",
226
+ text: "#000000"
227
+ },
165
228
  note: {
166
229
  fill: "#FAA475",
167
230
  text: "#000000"
@@ -176,6 +239,13 @@ const DefaultColorThemePalette = {
176
239
  red: {
177
240
  solid: "#e03131",
178
241
  fill: "#e03131",
242
+ frame: {
243
+ headingStroke: "#e55757",
244
+ headingFill: "#fef7f7",
245
+ stroke: "#e55757",
246
+ fill: "#fef9f9",
247
+ text: "#000000"
248
+ },
179
249
  note: {
180
250
  fill: "#FC8282",
181
251
  text: "#000000"
@@ -190,6 +260,13 @@ const DefaultColorThemePalette = {
190
260
  violet: {
191
261
  solid: "#ae3ec9",
192
262
  fill: "#ae3ec9",
263
+ frame: {
264
+ headingStroke: "#bc62d3",
265
+ headingFill: "#fcf7fd",
266
+ stroke: "#bc62d3",
267
+ fill: "#fdf9fd",
268
+ text: "#000000"
269
+ },
193
270
  note: {
194
271
  fill: "#DB91FD",
195
272
  text: "#000000"
@@ -204,6 +281,13 @@ const DefaultColorThemePalette = {
204
281
  yellow: {
205
282
  solid: "#f1ac4b",
206
283
  fill: "#f1ac4b",
284
+ frame: {
285
+ headingStroke: "#f3bb6c",
286
+ headingFill: "#fefcf8",
287
+ stroke: "#f3bb6c",
288
+ fill: "#fffdfa",
289
+ text: "#000000"
290
+ },
207
291
  note: {
208
292
  fill: "#FED49A",
209
293
  text: "#000000"
@@ -220,6 +304,13 @@ const DefaultColorThemePalette = {
220
304
  fill: "#FFFFFF",
221
305
  semi: "#f5f5f5",
222
306
  pattern: "#f9f9f9",
307
+ frame: {
308
+ headingStroke: "#7d7d7d",
309
+ headingFill: "#ffffff",
310
+ stroke: "#7d7d7d",
311
+ fill: "#ffffff",
312
+ text: "#000000"
313
+ },
223
314
  note: {
224
315
  fill: "#FFFFFF",
225
316
  text: "#000000"
@@ -238,6 +329,13 @@ const DefaultColorThemePalette = {
238
329
  black: {
239
330
  solid: "#f2f2f2",
240
331
  fill: "#f2f2f2",
332
+ frame: {
333
+ headingStroke: "#5c5c5c",
334
+ headingFill: "#252525",
335
+ stroke: "#5c5c5c",
336
+ fill: "#0c0c0c",
337
+ text: "#f2f2f2"
338
+ },
241
339
  note: {
242
340
  fill: "#2c2c2c",
243
341
  text: "#f2f2f2"
@@ -253,6 +351,13 @@ const DefaultColorThemePalette = {
253
351
  solid: "#4f72fc",
254
352
  // 3c60f0
255
353
  fill: "#4f72fc",
354
+ frame: {
355
+ headingStroke: "#384994",
356
+ headingFill: "#1C2036",
357
+ stroke: "#384994",
358
+ fill: "#11141f",
359
+ text: "#f2f2f2"
360
+ },
256
361
  note: {
257
362
  fill: "#2A3F98",
258
363
  text: "#f2f2f2"
@@ -267,6 +372,13 @@ const DefaultColorThemePalette = {
267
372
  green: {
268
373
  solid: "#099268",
269
374
  fill: "#099268",
375
+ frame: {
376
+ headingStroke: "#10513C",
377
+ headingFill: "#14241f",
378
+ stroke: "#10513C",
379
+ fill: "#0E1614",
380
+ text: "#f2f2f2"
381
+ },
270
382
  note: {
271
383
  fill: "#014429",
272
384
  text: "#f2f2f2"
@@ -281,6 +393,13 @@ const DefaultColorThemePalette = {
281
393
  grey: {
282
394
  solid: "#9398b0",
283
395
  fill: "#9398b0",
396
+ frame: {
397
+ headingStroke: "#42474D",
398
+ headingFill: "#23262A",
399
+ stroke: "#42474D",
400
+ fill: "#151719",
401
+ text: "#f2f2f2"
402
+ },
284
403
  note: {
285
404
  fill: "#56595F",
286
405
  text: "#f2f2f2"
@@ -295,6 +414,13 @@ const DefaultColorThemePalette = {
295
414
  "light-blue": {
296
415
  solid: "#4dabf7",
297
416
  fill: "#4dabf7",
417
+ frame: {
418
+ headingStroke: "#075797",
419
+ headingFill: "#142839",
420
+ stroke: "#075797",
421
+ fill: "#0B1823",
422
+ text: "#f2f2f2"
423
+ },
298
424
  note: {
299
425
  fill: "#1F5495",
300
426
  text: "#f2f2f2"
@@ -309,6 +435,13 @@ const DefaultColorThemePalette = {
309
435
  "light-green": {
310
436
  solid: "#40c057",
311
437
  fill: "#40c057",
438
+ frame: {
439
+ headingStroke: "#1C5427",
440
+ headingFill: "#18251A",
441
+ stroke: "#1C5427",
442
+ fill: "#0F1911",
443
+ text: "#f2f2f2"
444
+ },
312
445
  note: {
313
446
  fill: "#21581D",
314
447
  text: "#f2f2f2"
@@ -323,12 +456,27 @@ const DefaultColorThemePalette = {
323
456
  "light-red": {
324
457
  solid: "#ff8787",
325
458
  fill: "#ff8787",
459
+ frame: {
460
+ headingStroke: "#6f3232",
461
+ // Darker and desaturated variant of solid
462
+ headingFill: "#341818",
463
+ // Deep, muted dark red
464
+ stroke: "#6f3232",
465
+ // Matches headingStroke
466
+ fill: "#181212",
467
+ // Darker, muted background shade
468
+ text: "#f2f2f2"
469
+ // Consistent bright text color
470
+ },
326
471
  note: {
327
- fill: "#923632",
472
+ fill: "#7a3333",
473
+ // Medium-dark, muted variant of solid
328
474
  text: "#f2f2f2"
329
475
  },
330
- semi: "#3b3235",
476
+ semi: "#3c2b2b",
477
+ // Subdued, darker neutral-red tone
331
478
  pattern: "#a56767",
479
+ // Existing pattern shade retained
332
480
  highlight: {
333
481
  srgb: "#db005b",
334
482
  p3: "color(display-p3 0.7849 0.0585 0.3589)"
@@ -337,6 +485,13 @@ const DefaultColorThemePalette = {
337
485
  "light-violet": {
338
486
  solid: "#e599f7",
339
487
  fill: "#e599f7",
488
+ frame: {
489
+ headingStroke: "#6c367a",
490
+ headingFill: "#2D2230",
491
+ stroke: "#6c367a",
492
+ fill: "#1C151E",
493
+ text: "#f2f2f2"
494
+ },
340
495
  note: {
341
496
  fill: "#762F8E",
342
497
  text: "#f2f2f2"
@@ -351,12 +506,27 @@ const DefaultColorThemePalette = {
351
506
  orange: {
352
507
  solid: "#f76707",
353
508
  fill: "#f76707",
509
+ frame: {
510
+ headingStroke: "#773a0e",
511
+ // Darker, muted version of solid
512
+ headingFill: "#2f1d13",
513
+ // Deep, warm, muted background
514
+ stroke: "#773a0e",
515
+ // Matches headingStroke
516
+ fill: "#1c1512",
517
+ // Darker, richer muted background
518
+ text: "#f2f2f2"
519
+ // Bright text for contrast
520
+ },
354
521
  note: {
355
- fill: "#843906",
522
+ fill: "#7c3905",
523
+ // Muted dark variant for note fill
356
524
  text: "#f2f2f2"
357
525
  },
358
- semi: "#3a2e2a",
526
+ semi: "#3b2e27",
527
+ // Muted neutral-orange tone
359
528
  pattern: "#9f552d",
529
+ // Retained existing shade
360
530
  highlight: {
361
531
  srgb: "#d07a00",
362
532
  p3: "color(display-p3 0.7699 0.4937 0.0085)"
@@ -365,12 +535,27 @@ const DefaultColorThemePalette = {
365
535
  red: {
366
536
  solid: "#e03131",
367
537
  fill: "#e03131",
538
+ frame: {
539
+ headingStroke: "#701e1e",
540
+ // Darker, muted variation of solid
541
+ headingFill: "#301616",
542
+ // Deep, muted reddish backdrop
543
+ stroke: "#701e1e",
544
+ // Matches headingStroke
545
+ fill: "#1b1313",
546
+ // Rich, dark muted background
547
+ text: "#f2f2f2"
548
+ // Bright text for readability
549
+ },
368
550
  note: {
369
- fill: "#89231A",
551
+ fill: "#7e201f",
552
+ // Muted dark variant for note fill
370
553
  text: "#f2f2f2"
371
554
  },
372
- semi: "#36292b",
555
+ semi: "#382726",
556
+ // Dark neutral-red tone
373
557
  pattern: "#8f3734",
558
+ // Existing pattern color retained
374
559
  highlight: {
375
560
  srgb: "#de002c",
376
561
  p3: "color(display-p3 0.7978 0.0509 0.2035)"
@@ -379,12 +564,27 @@ const DefaultColorThemePalette = {
379
564
  violet: {
380
565
  solid: "#ae3ec9",
381
566
  fill: "#ae3ec9",
567
+ frame: {
568
+ headingStroke: "#6d1583",
569
+ // Darker, muted variation of solid
570
+ headingFill: "#27152e",
571
+ // Deep, rich muted violet backdrop
572
+ stroke: "#6d1583",
573
+ // Matches headingStroke
574
+ fill: "#1b0f21",
575
+ // Darker muted violet background
576
+ text: "#f2f2f2"
577
+ // Consistent bright text color
578
+ },
382
579
  note: {
383
- fill: "#681683",
580
+ fill: "#5f1c70",
581
+ // Muted dark variant for note fill
384
582
  text: "#f2f2f2"
385
583
  },
386
- semi: "#31293c",
584
+ semi: "#342938",
585
+ // Dark neutral-violet tone
387
586
  pattern: "#763a8b",
587
+ // Retained existing pattern color
388
588
  highlight: {
389
589
  srgb: "#9e00ee",
390
590
  p3: "color(display-p3 0.5651 0.0079 0.8986)"
@@ -393,12 +593,27 @@ const DefaultColorThemePalette = {
393
593
  yellow: {
394
594
  solid: "#ffc034",
395
595
  fill: "#ffc034",
596
+ frame: {
597
+ headingStroke: "#684e12",
598
+ // Darker, muted variant of solid
599
+ headingFill: "#2a2113",
600
+ // Rich, muted dark-yellow background
601
+ stroke: "#684e12",
602
+ // Matches headingStroke
603
+ fill: "#1e1911",
604
+ // Darker muted shade for background fill
605
+ text: "#f2f2f2"
606
+ // Bright text color for readability
607
+ },
396
608
  note: {
397
- fill: "#98571B",
609
+ fill: "#8a5e1c",
610
+ // Muted, dark complementary variant
398
611
  text: "#f2f2f2"
399
612
  },
400
- semi: "#3c3934",
613
+ semi: "#3b352b",
614
+ // Dark muted neutral-yellow tone
401
615
  pattern: "#fecb92",
616
+ // Existing shade retained
402
617
  highlight: {
403
618
  srgb: "#d2b700",
404
619
  p3: "color(display-p3 0.8078 0.7225 0.0312)"
@@ -409,6 +624,13 @@ const DefaultColorThemePalette = {
409
624
  fill: "#f3f3f3",
410
625
  semi: "#f5f5f5",
411
626
  pattern: "#f9f9f9",
627
+ frame: {
628
+ headingStroke: "#ffffff",
629
+ headingFill: "#ffffff",
630
+ stroke: "#ffffff",
631
+ fill: "#ffffff",
632
+ text: "#000000"
633
+ },
412
634
  note: {
413
635
  fill: "#eaeaea",
414
636
  text: "#1d1d1d"