@tldraw/tlschema 5.3.0-next.fc37bd96825b → 5.3.1
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 +265 -1
- package/dist-cjs/index.js +15 -1
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/misc/TLCursor.js +1 -0
- package/dist-cjs/misc/TLCursor.js.map +2 -2
- package/dist-cjs/records/TLComment.js +232 -0
- package/dist-cjs/records/TLComment.js.map +7 -0
- package/dist-cjs/shapes/TLGeoShape.js +15 -1
- package/dist-cjs/shapes/TLGeoShape.js.map +2 -2
- package/dist-esm/index.d.mts +265 -1
- package/dist-esm/index.mjs +29 -1
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/misc/TLCursor.mjs +1 -0
- package/dist-esm/misc/TLCursor.mjs.map +2 -2
- package/dist-esm/records/TLComment.mjs +212 -0
- package/dist-esm/records/TLComment.mjs.map +7 -0
- package/dist-esm/shapes/TLGeoShape.mjs +15 -1
- package/dist-esm/shapes/TLGeoShape.mjs.map +2 -2
- package/package.json +5 -5
- package/src/index.ts +22 -0
- package/src/migrations.test.ts +12 -0
- package/src/misc/TLCursor.ts +1 -0
- package/src/records/TLComment.test.ts +255 -0
- package/src/records/TLComment.ts +446 -0
- package/src/shapes/TLGeoShape.ts +21 -1
package/src/shapes/TLGeoShape.ts
CHANGED
|
@@ -90,6 +90,10 @@ export interface TLGeoShapeProps {
|
|
|
90
90
|
growY: number
|
|
91
91
|
/** Scale factor applied to the shape */
|
|
92
92
|
scale: number
|
|
93
|
+
/** Whether to mirror the shape horizontally */
|
|
94
|
+
flipX: boolean
|
|
95
|
+
/** Whether to mirror the shape vertically */
|
|
96
|
+
flipY: boolean
|
|
93
97
|
|
|
94
98
|
/** Color style for text label */
|
|
95
99
|
labelColor: TLDefaultColorStyle
|
|
@@ -142,7 +146,9 @@ export interface TLGeoShapeProps {
|
|
|
142
146
|
* labelColor: 'black',
|
|
143
147
|
* url: '',
|
|
144
148
|
* growY: 0,
|
|
145
|
-
* scale: 1
|
|
149
|
+
* scale: 1,
|
|
150
|
+
* flipX: false,
|
|
151
|
+
* flipY: false
|
|
146
152
|
* },
|
|
147
153
|
* meta: {}
|
|
148
154
|
* }
|
|
@@ -170,6 +176,8 @@ export const geoShapeProps: RecordProps<TLGeoShape> = {
|
|
|
170
176
|
h: T.nonZeroNumber,
|
|
171
177
|
growY: T.positiveNumber,
|
|
172
178
|
scale: T.nonZeroNumber,
|
|
179
|
+
flipX: T.boolean,
|
|
180
|
+
flipY: T.boolean,
|
|
173
181
|
|
|
174
182
|
// Text properties
|
|
175
183
|
labelColor: DefaultLabelColorStyle,
|
|
@@ -194,6 +202,7 @@ const geoShapeVersions = createShapePropsMigrationIds('geo', {
|
|
|
194
202
|
AddScale: 9,
|
|
195
203
|
AddRichText: 10,
|
|
196
204
|
AddRichTextAttrs: 11,
|
|
205
|
+
AddFlipProps: 12,
|
|
197
206
|
})
|
|
198
207
|
|
|
199
208
|
/**
|
|
@@ -318,5 +327,16 @@ export const geoShapeMigrations = createShapePropsMigrationSequence({
|
|
|
318
327
|
}
|
|
319
328
|
},
|
|
320
329
|
},
|
|
330
|
+
{
|
|
331
|
+
id: geoShapeVersions.AddFlipProps,
|
|
332
|
+
up: (props) => {
|
|
333
|
+
props.flipX = false
|
|
334
|
+
props.flipY = false
|
|
335
|
+
},
|
|
336
|
+
down: (props) => {
|
|
337
|
+
delete props.flipX
|
|
338
|
+
delete props.flipY
|
|
339
|
+
},
|
|
340
|
+
},
|
|
321
341
|
],
|
|
322
342
|
})
|