@tldraw/tlschema 3.14.0-canary.fd2ad122b803 → 3.14.0-canary.ff61ab6deaa2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.d.ts +1 -0
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/shapes/TLVideoShape.js +12 -1
- package/dist-cjs/shapes/TLVideoShape.js.map +2 -2
- package/dist-esm/index.d.mts +1 -0
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/shapes/TLVideoShape.mjs +12 -1
- package/dist-esm/shapes/TLVideoShape.mjs.map +2 -2
- package/package.json +5 -5
- package/src/migrations.test.ts +9 -0
- package/src/shapes/TLVideoShape.ts +12 -0
package/dist-cjs/index.d.ts
CHANGED
package/dist-cjs/index.js
CHANGED
|
@@ -176,7 +176,7 @@ var import_TLVerticalAlignStyle = require("./styles/TLVerticalAlignStyle");
|
|
|
176
176
|
var import_translations = require("./translations/translations");
|
|
177
177
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
178
178
|
"@tldraw/tlschema",
|
|
179
|
-
"3.14.0-canary.
|
|
179
|
+
"3.14.0-canary.ff61ab6deaa2",
|
|
180
180
|
"cjs"
|
|
181
181
|
);
|
|
182
182
|
//# sourceMappingURL=index.js.map
|
|
@@ -31,6 +31,7 @@ const videoShapeProps = {
|
|
|
31
31
|
h: import_validate.T.nonZeroNumber,
|
|
32
32
|
time: import_validate.T.number,
|
|
33
33
|
playing: import_validate.T.boolean,
|
|
34
|
+
autoplay: import_validate.T.boolean,
|
|
34
35
|
url: import_validate.T.linkUrl,
|
|
35
36
|
assetId: import_TLBaseAsset.assetIdValidator.nullable(),
|
|
36
37
|
altText: import_validate.T.string
|
|
@@ -38,7 +39,8 @@ const videoShapeProps = {
|
|
|
38
39
|
const Versions = (0, import_TLShape.createShapePropsMigrationIds)("video", {
|
|
39
40
|
AddUrlProp: 1,
|
|
40
41
|
MakeUrlsValid: 2,
|
|
41
|
-
AddAltText: 3
|
|
42
|
+
AddAltText: 3,
|
|
43
|
+
AddAutoplay: 4
|
|
42
44
|
});
|
|
43
45
|
const videoShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequence)({
|
|
44
46
|
sequence: [
|
|
@@ -67,6 +69,15 @@ const videoShapeMigrations = (0, import_TLShape.createShapePropsMigrationSequenc
|
|
|
67
69
|
down: (props) => {
|
|
68
70
|
delete props.altText;
|
|
69
71
|
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: Versions.AddAutoplay,
|
|
75
|
+
up: (props) => {
|
|
76
|
+
props.autoplay = true;
|
|
77
|
+
},
|
|
78
|
+
down: (props) => {
|
|
79
|
+
delete props.autoplay;
|
|
80
|
+
}
|
|
70
81
|
}
|
|
71
82
|
]
|
|
72
83
|
});
|
|
@@ -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\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;
|
|
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\tautoplay: 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\tautoplay: 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\tAddAutoplay: 4,\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\t{\n\t\t\tid: Versions.AddAutoplay,\n\t\t\tup: (props) => {\n\t\t\t\tprops.autoplay = true\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.autoplay\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;AAoBzE,MAAM,kBAA6C;AAAA,EACzD,GAAG,kBAAE;AAAA,EACL,GAAG,kBAAE;AAAA,EACL,MAAM,kBAAE;AAAA,EACR,SAAS,kBAAE;AAAA,EACX,UAAU,kBAAE;AAAA,EACZ,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;AAAA,EACZ,aAAa;AACd,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,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,WAAW;AAAA,MAClB;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist-esm/index.d.mts
CHANGED
package/dist-esm/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ const videoShapeProps = {
|
|
|
6
6
|
h: T.nonZeroNumber,
|
|
7
7
|
time: T.number,
|
|
8
8
|
playing: T.boolean,
|
|
9
|
+
autoplay: T.boolean,
|
|
9
10
|
url: T.linkUrl,
|
|
10
11
|
assetId: assetIdValidator.nullable(),
|
|
11
12
|
altText: T.string
|
|
@@ -13,7 +14,8 @@ const videoShapeProps = {
|
|
|
13
14
|
const Versions = createShapePropsMigrationIds("video", {
|
|
14
15
|
AddUrlProp: 1,
|
|
15
16
|
MakeUrlsValid: 2,
|
|
16
|
-
AddAltText: 3
|
|
17
|
+
AddAltText: 3,
|
|
18
|
+
AddAutoplay: 4
|
|
17
19
|
});
|
|
18
20
|
const videoShapeMigrations = createShapePropsMigrationSequence({
|
|
19
21
|
sequence: [
|
|
@@ -42,6 +44,15 @@ const videoShapeMigrations = createShapePropsMigrationSequence({
|
|
|
42
44
|
down: (props) => {
|
|
43
45
|
delete props.altText;
|
|
44
46
|
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: Versions.AddAutoplay,
|
|
50
|
+
up: (props) => {
|
|
51
|
+
props.autoplay = true;
|
|
52
|
+
},
|
|
53
|
+
down: (props) => {
|
|
54
|
+
delete props.autoplay;
|
|
55
|
+
}
|
|
45
56
|
}
|
|
46
57
|
]
|
|
47
58
|
});
|
|
@@ -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\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,SAAS,SAAS;AAClB,SAAS,wBAAwB;AAEjC,SAAS,8BAA8B,yCAAyC;
|
|
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\tautoplay: 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\tautoplay: 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\tAddAutoplay: 4,\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\t{\n\t\t\tid: Versions.AddAutoplay,\n\t\t\tup: (props) => {\n\t\t\t\tprops.autoplay = true\n\t\t\t},\n\t\t\tdown: (props) => {\n\t\t\t\tdelete props.autoplay\n\t\t\t},\n\t\t},\n\t],\n})\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,wBAAwB;AAEjC,SAAS,8BAA8B,yCAAyC;AAoBzE,MAAM,kBAA6C;AAAA,EACzD,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AAAA,EACL,MAAM,EAAE;AAAA,EACR,SAAS,EAAE;AAAA,EACX,UAAU,EAAE;AAAA,EACZ,KAAK,EAAE;AAAA,EACP,SAAS,iBAAiB,SAAS;AAAA,EACnC,SAAS,EAAE;AACZ;AAEA,MAAM,WAAW,6BAA6B,SAAS;AAAA,EACtD,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,aAAa;AACd,CAAC;AAKM,MAAM,uBAAuB,kCAAkC;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,EAAE,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,IACA;AAAA,MACC,IAAI,SAAS;AAAA,MACb,IAAI,CAAC,UAAU;AACd,cAAM,WAAW;AAAA,MAClB;AAAA,MACA,MAAM,CAAC,UAAU;AAChB,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tldraw/tlschema",
|
|
3
3
|
"description": "A tiny little drawing app (schema).",
|
|
4
|
-
"version": "3.14.0-canary.
|
|
4
|
+
"version": "3.14.0-canary.ff61ab6deaa2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@tldraw/state": "3.14.0-canary.
|
|
58
|
-
"@tldraw/store": "3.14.0-canary.
|
|
59
|
-
"@tldraw/utils": "3.14.0-canary.
|
|
60
|
-
"@tldraw/validate": "3.14.0-canary.
|
|
57
|
+
"@tldraw/state": "3.14.0-canary.ff61ab6deaa2",
|
|
58
|
+
"@tldraw/store": "3.14.0-canary.ff61ab6deaa2",
|
|
59
|
+
"@tldraw/utils": "3.14.0-canary.ff61ab6deaa2",
|
|
60
|
+
"@tldraw/validate": "3.14.0-canary.ff61ab6deaa2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"react": "^18.2.0 || ^19.0.0",
|
package/src/migrations.test.ts
CHANGED
|
@@ -2188,6 +2188,15 @@ describe('Add side to arrow binding', () => {
|
|
|
2188
2188
|
})
|
|
2189
2189
|
})
|
|
2190
2190
|
|
|
2191
|
+
describe('TLVideoAsset AddAutoplay', () => {
|
|
2192
|
+
const { up, down } = getTestMigration(videoShapeVersions.AddAutoplay)
|
|
2193
|
+
|
|
2194
|
+
test('down works as expected', () => {
|
|
2195
|
+
expect(up({ props: {} })).toEqual({ props: { autoplay: true } })
|
|
2196
|
+
expect(down({ props: { autoplay: true } })).toEqual({ props: {} })
|
|
2197
|
+
})
|
|
2198
|
+
})
|
|
2199
|
+
|
|
2191
2200
|
/* --- PUT YOUR MIGRATIONS TESTS ABOVE HERE --- */
|
|
2192
2201
|
|
|
2193
2202
|
// check that all migrator fns were called at least once
|
|
@@ -11,6 +11,7 @@ export interface TLVideoShapeProps {
|
|
|
11
11
|
h: number
|
|
12
12
|
time: number
|
|
13
13
|
playing: boolean
|
|
14
|
+
autoplay: boolean
|
|
14
15
|
url: string
|
|
15
16
|
assetId: TLAssetId | null
|
|
16
17
|
altText: string
|
|
@@ -25,6 +26,7 @@ export const videoShapeProps: RecordProps<TLVideoShape> = {
|
|
|
25
26
|
h: T.nonZeroNumber,
|
|
26
27
|
time: T.number,
|
|
27
28
|
playing: T.boolean,
|
|
29
|
+
autoplay: T.boolean,
|
|
28
30
|
url: T.linkUrl,
|
|
29
31
|
assetId: assetIdValidator.nullable(),
|
|
30
32
|
altText: T.string,
|
|
@@ -34,6 +36,7 @@ const Versions = createShapePropsMigrationIds('video', {
|
|
|
34
36
|
AddUrlProp: 1,
|
|
35
37
|
MakeUrlsValid: 2,
|
|
36
38
|
AddAltText: 3,
|
|
39
|
+
AddAutoplay: 4,
|
|
37
40
|
})
|
|
38
41
|
|
|
39
42
|
export { Versions as videoShapeVersions }
|
|
@@ -68,5 +71,14 @@ export const videoShapeMigrations = createShapePropsMigrationSequence({
|
|
|
68
71
|
delete props.altText
|
|
69
72
|
},
|
|
70
73
|
},
|
|
74
|
+
{
|
|
75
|
+
id: Versions.AddAutoplay,
|
|
76
|
+
up: (props) => {
|
|
77
|
+
props.autoplay = true
|
|
78
|
+
},
|
|
79
|
+
down: (props) => {
|
|
80
|
+
delete props.autoplay
|
|
81
|
+
},
|
|
82
|
+
},
|
|
71
83
|
],
|
|
72
84
|
})
|