Composable custom UI (#2796)
This PR refactors our menu systems and provides an interface to hide or
replace individual user interface elements.
# Background
Previously, we've had two types of overrides:
- "schema" overrides that would allow insertion or replacement of items
in the different menus
- "component" overrides that would replace components in the editor's
user interface
This PR is an attempt to unify the two and to provide for additional
cases where the "schema-based" user interface had begun to break down.
# Approach
This PR makes no attempt to change the `actions` or `tools`
overrides—the current system seems to be correct for those because they
are not reactive. The challenge with the other ui schemas is that they
_are_ reactive, and thus the overrides both need to a) be fed in from
outside of the editor as props, and b) react to changes from the editor,
which is an impossible situation.
The new approach is to use React to declare menu items. (Surprise!)
```tsx
function CustomHelpMenuContent() {
return (
<>
<DefaultHelpMenuContent />
<TldrawUiMenuGroup id="custom stuff">
<TldrawUiMenuItem
id="about"
label="Like my posts"
icon="external-link"
readonlyOk
onSelect={() => {
window.open('https://x.com/tldraw', '_blank')
}}
/>
</TldrawUiMenuGroup>
</>
)
}
const components: TLComponents = {
HelpMenuContent: CustomHelpMenuContent,
}
export default function CustomHelpMenuContentExample() {
return (
<div className="tldraw__editor">
<Tldraw components={components} />
</div>
)
}
```
We use a `components` prop with the combined editor and ui components.
- [ ] Create a "layout" component?
- [ ] Make UI components more isolated? If possible, they shouldn't
depend on styles outside of themselves, so that they can be used in
other layouts. Maybe we wait on this because I'm feeling a slippery
slope toward presumptions about configurability.
- [ ] OTOH maybe we go hard and consider these things as separate
components, even packages, with their own interfaces for customizability
/ configurability, just go all the way with it, and see what that looks
like.
# Pros
Top line: you can customize tldraw's user interface in a MUCH more
granular / powerful way than before.
It solves a case where menu items could not be made stateful from
outside of the editor context, and provides the option to do things in
the menus that we couldn't allow previously with the "schema-based"
approach.
It also may (who knows) be more performant because we can locate the
state inside of the components for individual buttons and groups,
instead of all at the top level above the "schema". Because items /
groups decide their own state, we don't have to have big checks on how
many items are selected, or whether we have a flippable state. Items and
groups themselves are allowed to re-build as part of the regular React
lifecycle. Menus aren't constantly being rebuilt, if that were ever an
issue.
Menu items can be shared between different menu types. We'll are
sometimes able to re-use items between, for example, the menu and the
context menu and the actions menu.
Our overrides no longer mutate anything, so there's less weird searching
and finding.
# Cons
This approach can make customization menu contents significantly more
complex, as an end user would need to re-declare most of a menu in order
to make any change to it. Luckily a user can add things to the top or
bottom of the context menu fairly easily. (And who knows, folks may
actually want to do deep customization, and this allows for it.)
It's more code. We are shipping more react components, basically one for
each menu item / group.
Currently this PR does not export the subcomponents, i.e. menu items. If
we do want to export these, then heaven help us, it's going to be a
_lot_ of exports.
# Progress
- [x] Context menu
- [x] Main menu
- [x] Zoom menu
- [x] Help menu
- [x] Actions menu
- [x] Keyboard shortcuts menu
- [x] Quick actions in main menu? (new)
- [x] Helper buttons? (new)
- [x] Debug Menu
And potentially
- [x] Toolbar
- [x] Style menu
- [ ] Share zone
- [x] Navigation zone
- [ ] Other zones
### Change Type
- [x] `major` — Breaking change
### Test Plan
1. use the context menu
2. use the custom context menu example
3. use cursor chat in the context menu
- [x] Unit Tests
- [ ] End to end tests
### Release Notes
- Add a brief release note for your PR here.
2024-02-15 12:10:09 +00:00
|
|
|
import test from '@playwright/test'
|
|
|
|
import { TLShapeId, TLShapePartial } from '@tldraw/tldraw'
|
2023-11-15 18:06:02 +00:00
|
|
|
|
Composable custom UI (#2796)
This PR refactors our menu systems and provides an interface to hide or
replace individual user interface elements.
# Background
Previously, we've had two types of overrides:
- "schema" overrides that would allow insertion or replacement of items
in the different menus
- "component" overrides that would replace components in the editor's
user interface
This PR is an attempt to unify the two and to provide for additional
cases where the "schema-based" user interface had begun to break down.
# Approach
This PR makes no attempt to change the `actions` or `tools`
overrides—the current system seems to be correct for those because they
are not reactive. The challenge with the other ui schemas is that they
_are_ reactive, and thus the overrides both need to a) be fed in from
outside of the editor as props, and b) react to changes from the editor,
which is an impossible situation.
The new approach is to use React to declare menu items. (Surprise!)
```tsx
function CustomHelpMenuContent() {
return (
<>
<DefaultHelpMenuContent />
<TldrawUiMenuGroup id="custom stuff">
<TldrawUiMenuItem
id="about"
label="Like my posts"
icon="external-link"
readonlyOk
onSelect={() => {
window.open('https://x.com/tldraw', '_blank')
}}
/>
</TldrawUiMenuGroup>
</>
)
}
const components: TLComponents = {
HelpMenuContent: CustomHelpMenuContent,
}
export default function CustomHelpMenuContentExample() {
return (
<div className="tldraw__editor">
<Tldraw components={components} />
</div>
)
}
```
We use a `components` prop with the combined editor and ui components.
- [ ] Create a "layout" component?
- [ ] Make UI components more isolated? If possible, they shouldn't
depend on styles outside of themselves, so that they can be used in
other layouts. Maybe we wait on this because I'm feeling a slippery
slope toward presumptions about configurability.
- [ ] OTOH maybe we go hard and consider these things as separate
components, even packages, with their own interfaces for customizability
/ configurability, just go all the way with it, and see what that looks
like.
# Pros
Top line: you can customize tldraw's user interface in a MUCH more
granular / powerful way than before.
It solves a case where menu items could not be made stateful from
outside of the editor context, and provides the option to do things in
the menus that we couldn't allow previously with the "schema-based"
approach.
It also may (who knows) be more performant because we can locate the
state inside of the components for individual buttons and groups,
instead of all at the top level above the "schema". Because items /
groups decide their own state, we don't have to have big checks on how
many items are selected, or whether we have a flippable state. Items and
groups themselves are allowed to re-build as part of the regular React
lifecycle. Menus aren't constantly being rebuilt, if that were ever an
issue.
Menu items can be shared between different menu types. We'll are
sometimes able to re-use items between, for example, the menu and the
context menu and the actions menu.
Our overrides no longer mutate anything, so there's less weird searching
and finding.
# Cons
This approach can make customization menu contents significantly more
complex, as an end user would need to re-declare most of a menu in order
to make any change to it. Luckily a user can add things to the top or
bottom of the context menu fairly easily. (And who knows, folks may
actually want to do deep customization, and this allows for it.)
It's more code. We are shipping more react components, basically one for
each menu item / group.
Currently this PR does not export the subcomponents, i.e. menu items. If
we do want to export these, then heaven help us, it's going to be a
_lot_ of exports.
# Progress
- [x] Context menu
- [x] Main menu
- [x] Zoom menu
- [x] Help menu
- [x] Actions menu
- [x] Keyboard shortcuts menu
- [x] Quick actions in main menu? (new)
- [x] Helper buttons? (new)
- [x] Debug Menu
And potentially
- [x] Toolbar
- [x] Style menu
- [ ] Share zone
- [x] Navigation zone
- [ ] Other zones
### Change Type
- [x] `major` — Breaking change
### Test Plan
1. use the context menu
2. use the custom context menu example
3. use cursor chat in the context menu
- [x] Unit Tests
- [ ] End to end tests
### Release Notes
- Add a brief release note for your PR here.
2024-02-15 12:10:09 +00:00
|
|
|
// import test, { Page, expect } from '@playwright/test'
|
|
|
|
// import assert from 'assert'
|
|
|
|
// import { rename, writeFile } from 'fs/promises'
|
|
|
|
// import { setupPage } from '../shared-e2e'
|
|
|
|
// import { Editor, TLShapeId, TLShapePartial } from '@tldraw/tldraw'
|
|
|
|
|
|
|
|
// declare const editor: Editor
|
2023-11-15 18:06:02 +00:00
|
|
|
|
|
|
|
test.describe('Export snapshots', () => {
|
|
|
|
const snapshots = {
|
|
|
|
'Exports geo text with leading line breaks': [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'geo',
|
|
|
|
props: {
|
|
|
|
w: 100,
|
|
|
|
h: 30,
|
|
|
|
text: '\n\n\n\n\n\ntext',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'Exports geo text with trailing line breaks': [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'geo',
|
|
|
|
props: {
|
|
|
|
w: 100,
|
|
|
|
h: 30,
|
|
|
|
text: 'text\n\n\n\n\n\n',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} as Record<string, TLShapePartial[]>
|
|
|
|
|
|
|
|
for (const fill of ['none', 'semi', 'solid', 'pattern']) {
|
|
|
|
snapshots[`geo fill=${fill}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'geo',
|
|
|
|
props: {
|
|
|
|
fill,
|
|
|
|
color: 'green',
|
|
|
|
w: 100,
|
|
|
|
h: 100,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
snapshots[`arrow fill=${fill}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'arrow',
|
|
|
|
props: {
|
|
|
|
color: 'light-green',
|
|
|
|
fill: fill,
|
|
|
|
arrowheadStart: 'square',
|
|
|
|
arrowheadEnd: 'dot',
|
|
|
|
start: { type: 'point', x: 0, y: 0 },
|
|
|
|
end: { type: 'point', x: 100, y: 100 },
|
|
|
|
bend: 20,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
snapshots[`draw fill=${fill}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'draw',
|
|
|
|
props: {
|
|
|
|
color: 'light-violet',
|
|
|
|
fill: fill,
|
|
|
|
segments: [
|
|
|
|
{
|
|
|
|
type: 'straight',
|
|
|
|
points: [{ x: 0, y: 0 }],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'straight',
|
|
|
|
points: [
|
|
|
|
{ x: 0, y: 0 },
|
|
|
|
{ x: 100, y: 0 },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'straight',
|
|
|
|
points: [
|
|
|
|
{ x: 100, y: 0 },
|
|
|
|
{ x: 0, y: 100 },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'straight',
|
|
|
|
points: [
|
|
|
|
{ x: 0, y: 100 },
|
|
|
|
{ x: 100, y: 100 },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'straight',
|
|
|
|
points: [
|
|
|
|
{ x: 100, y: 100 },
|
|
|
|
{ x: 0, y: 0 },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
isClosed: true,
|
|
|
|
isComplete: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
for (const font of ['draw', 'sans', 'serif', 'mono']) {
|
|
|
|
snapshots[`geo font=${font}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'geo',
|
|
|
|
props: {
|
|
|
|
text: 'test',
|
|
|
|
color: 'blue',
|
|
|
|
font,
|
|
|
|
w: 100,
|
|
|
|
h: 100,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
snapshots[`arrow font=${font}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'arrow',
|
|
|
|
props: {
|
|
|
|
color: 'blue',
|
|
|
|
fill: 'solid',
|
|
|
|
arrowheadStart: 'square',
|
|
|
|
arrowheadEnd: 'arrow',
|
|
|
|
font,
|
|
|
|
start: { type: 'point', x: 0, y: 0 },
|
|
|
|
end: { type: 'point', x: 100, y: 100 },
|
|
|
|
bend: 20,
|
|
|
|
text: 'test',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
snapshots[`arrow font=${font}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'arrow',
|
|
|
|
props: {
|
|
|
|
color: 'blue',
|
|
|
|
fill: 'solid',
|
|
|
|
arrowheadStart: 'square',
|
|
|
|
arrowheadEnd: 'arrow',
|
|
|
|
font,
|
|
|
|
start: { type: 'point', x: 0, y: 0 },
|
|
|
|
end: { type: 'point', x: 100, y: 100 },
|
|
|
|
bend: 20,
|
|
|
|
text: 'test',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
snapshots[`note font=${font}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'note',
|
|
|
|
props: {
|
|
|
|
color: 'violet',
|
|
|
|
font,
|
|
|
|
text: 'test',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
snapshots[`text font=${font}`] = [
|
|
|
|
{
|
|
|
|
id: 'shape:testShape' as TLShapeId,
|
|
|
|
type: 'text',
|
|
|
|
props: {
|
|
|
|
color: 'red',
|
|
|
|
font,
|
|
|
|
text: 'test',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
Composable custom UI (#2796)
This PR refactors our menu systems and provides an interface to hide or
replace individual user interface elements.
# Background
Previously, we've had two types of overrides:
- "schema" overrides that would allow insertion or replacement of items
in the different menus
- "component" overrides that would replace components in the editor's
user interface
This PR is an attempt to unify the two and to provide for additional
cases where the "schema-based" user interface had begun to break down.
# Approach
This PR makes no attempt to change the `actions` or `tools`
overrides—the current system seems to be correct for those because they
are not reactive. The challenge with the other ui schemas is that they
_are_ reactive, and thus the overrides both need to a) be fed in from
outside of the editor as props, and b) react to changes from the editor,
which is an impossible situation.
The new approach is to use React to declare menu items. (Surprise!)
```tsx
function CustomHelpMenuContent() {
return (
<>
<DefaultHelpMenuContent />
<TldrawUiMenuGroup id="custom stuff">
<TldrawUiMenuItem
id="about"
label="Like my posts"
icon="external-link"
readonlyOk
onSelect={() => {
window.open('https://x.com/tldraw', '_blank')
}}
/>
</TldrawUiMenuGroup>
</>
)
}
const components: TLComponents = {
HelpMenuContent: CustomHelpMenuContent,
}
export default function CustomHelpMenuContentExample() {
return (
<div className="tldraw__editor">
<Tldraw components={components} />
</div>
)
}
```
We use a `components` prop with the combined editor and ui components.
- [ ] Create a "layout" component?
- [ ] Make UI components more isolated? If possible, they shouldn't
depend on styles outside of themselves, so that they can be used in
other layouts. Maybe we wait on this because I'm feeling a slippery
slope toward presumptions about configurability.
- [ ] OTOH maybe we go hard and consider these things as separate
components, even packages, with their own interfaces for customizability
/ configurability, just go all the way with it, and see what that looks
like.
# Pros
Top line: you can customize tldraw's user interface in a MUCH more
granular / powerful way than before.
It solves a case where menu items could not be made stateful from
outside of the editor context, and provides the option to do things in
the menus that we couldn't allow previously with the "schema-based"
approach.
It also may (who knows) be more performant because we can locate the
state inside of the components for individual buttons and groups,
instead of all at the top level above the "schema". Because items /
groups decide their own state, we don't have to have big checks on how
many items are selected, or whether we have a flippable state. Items and
groups themselves are allowed to re-build as part of the regular React
lifecycle. Menus aren't constantly being rebuilt, if that were ever an
issue.
Menu items can be shared between different menu types. We'll are
sometimes able to re-use items between, for example, the menu and the
context menu and the actions menu.
Our overrides no longer mutate anything, so there's less weird searching
and finding.
# Cons
This approach can make customization menu contents significantly more
complex, as an end user would need to re-declare most of a menu in order
to make any change to it. Luckily a user can add things to the top or
bottom of the context menu fairly easily. (And who knows, folks may
actually want to do deep customization, and this allows for it.)
It's more code. We are shipping more react components, basically one for
each menu item / group.
Currently this PR does not export the subcomponents, i.e. menu items. If
we do want to export these, then heaven help us, it's going to be a
_lot_ of exports.
# Progress
- [x] Context menu
- [x] Main menu
- [x] Zoom menu
- [x] Help menu
- [x] Actions menu
- [x] Keyboard shortcuts menu
- [x] Quick actions in main menu? (new)
- [x] Helper buttons? (new)
- [x] Debug Menu
And potentially
- [x] Toolbar
- [x] Style menu
- [ ] Share zone
- [x] Navigation zone
- [ ] Other zones
### Change Type
- [x] `major` — Breaking change
### Test Plan
1. use the context menu
2. use the custom context menu example
3. use cursor chat in the context menu
- [x] Unit Tests
- [ ] End to end tests
### Release Notes
- Add a brief release note for your PR here.
2024-02-15 12:10:09 +00:00
|
|
|
// const snapshotsToTest = Object.entries(snapshots)
|
|
|
|
// const filteredSnapshots = snapshotsToTest // maybe we filter these down, there are a lot of them
|
2023-11-15 18:06:02 +00:00
|
|
|
|
Composable custom UI (#2796)
This PR refactors our menu systems and provides an interface to hide or
replace individual user interface elements.
# Background
Previously, we've had two types of overrides:
- "schema" overrides that would allow insertion or replacement of items
in the different menus
- "component" overrides that would replace components in the editor's
user interface
This PR is an attempt to unify the two and to provide for additional
cases where the "schema-based" user interface had begun to break down.
# Approach
This PR makes no attempt to change the `actions` or `tools`
overrides—the current system seems to be correct for those because they
are not reactive. The challenge with the other ui schemas is that they
_are_ reactive, and thus the overrides both need to a) be fed in from
outside of the editor as props, and b) react to changes from the editor,
which is an impossible situation.
The new approach is to use React to declare menu items. (Surprise!)
```tsx
function CustomHelpMenuContent() {
return (
<>
<DefaultHelpMenuContent />
<TldrawUiMenuGroup id="custom stuff">
<TldrawUiMenuItem
id="about"
label="Like my posts"
icon="external-link"
readonlyOk
onSelect={() => {
window.open('https://x.com/tldraw', '_blank')
}}
/>
</TldrawUiMenuGroup>
</>
)
}
const components: TLComponents = {
HelpMenuContent: CustomHelpMenuContent,
}
export default function CustomHelpMenuContentExample() {
return (
<div className="tldraw__editor">
<Tldraw components={components} />
</div>
)
}
```
We use a `components` prop with the combined editor and ui components.
- [ ] Create a "layout" component?
- [ ] Make UI components more isolated? If possible, they shouldn't
depend on styles outside of themselves, so that they can be used in
other layouts. Maybe we wait on this because I'm feeling a slippery
slope toward presumptions about configurability.
- [ ] OTOH maybe we go hard and consider these things as separate
components, even packages, with their own interfaces for customizability
/ configurability, just go all the way with it, and see what that looks
like.
# Pros
Top line: you can customize tldraw's user interface in a MUCH more
granular / powerful way than before.
It solves a case where menu items could not be made stateful from
outside of the editor context, and provides the option to do things in
the menus that we couldn't allow previously with the "schema-based"
approach.
It also may (who knows) be more performant because we can locate the
state inside of the components for individual buttons and groups,
instead of all at the top level above the "schema". Because items /
groups decide their own state, we don't have to have big checks on how
many items are selected, or whether we have a flippable state. Items and
groups themselves are allowed to re-build as part of the regular React
lifecycle. Menus aren't constantly being rebuilt, if that were ever an
issue.
Menu items can be shared between different menu types. We'll are
sometimes able to re-use items between, for example, the menu and the
context menu and the actions menu.
Our overrides no longer mutate anything, so there's less weird searching
and finding.
# Cons
This approach can make customization menu contents significantly more
complex, as an end user would need to re-declare most of a menu in order
to make any change to it. Luckily a user can add things to the top or
bottom of the context menu fairly easily. (And who knows, folks may
actually want to do deep customization, and this allows for it.)
It's more code. We are shipping more react components, basically one for
each menu item / group.
Currently this PR does not export the subcomponents, i.e. menu items. If
we do want to export these, then heaven help us, it's going to be a
_lot_ of exports.
# Progress
- [x] Context menu
- [x] Main menu
- [x] Zoom menu
- [x] Help menu
- [x] Actions menu
- [x] Keyboard shortcuts menu
- [x] Quick actions in main menu? (new)
- [x] Helper buttons? (new)
- [x] Debug Menu
And potentially
- [x] Toolbar
- [x] Style menu
- [ ] Share zone
- [x] Navigation zone
- [ ] Other zones
### Change Type
- [x] `major` — Breaking change
### Test Plan
1. use the context menu
2. use the custom context menu example
3. use cursor chat in the context menu
- [x] Unit Tests
- [ ] End to end tests
### Release Notes
- Add a brief release note for your PR here.
2024-02-15 12:10:09 +00:00
|
|
|
// for (const [name, shapes] of filteredSnapshots) {
|
|
|
|
// test(`Exports with ${name} in dark mode`, async ({ browser }) => {
|
|
|
|
// const page = await browser.newPage()
|
|
|
|
// await setupPage(page)
|
|
|
|
// await page.evaluate((shapes) => {
|
|
|
|
// editor.user.updateUserPreferences({ isDarkMode: true })
|
|
|
|
// editor
|
|
|
|
// .updateInstanceState({ exportBackground: false })
|
|
|
|
// .selectAll()
|
|
|
|
// .deleteShapes(editor.getSelectedShapeIds())
|
|
|
|
// .createShapes(shapes)
|
|
|
|
// }, shapes as any)
|
|
|
|
|
|
|
|
// await snapshotTest(page)
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
|
|
|
|
// async function snapshotTest(page: Page) {
|
|
|
|
// const downloadAndSnapshot = page.waitForEvent('download').then(async (download) => {
|
|
|
|
// const path = (await download.path()) as string
|
|
|
|
// assert(path)
|
|
|
|
// await rename(path, path + '.svg')
|
|
|
|
// await writeFile(
|
|
|
|
// path + '.html',
|
|
|
|
// `
|
|
|
|
// <!DOCTYPE html>
|
|
|
|
// <meta charset="utf-8" />
|
|
|
|
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
// <img src="${path}.svg" />
|
|
|
|
// `,
|
|
|
|
// 'utf-8'
|
|
|
|
// )
|
|
|
|
|
|
|
|
// await page.goto(`file://${path}.html`)
|
|
|
|
// const clip = await page.$eval('img', (img) => img.getBoundingClientRect())
|
|
|
|
// await expect(page).toHaveScreenshot({
|
|
|
|
// omitBackground: true,
|
|
|
|
// clip,
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// await page.evaluate(() => (window as any)['tldraw-export']())
|
|
|
|
// await downloadAndSnapshot
|
|
|
|
// }
|
2023-11-15 18:06:02 +00:00
|
|
|
})
|