Skip to content

Commit cb45622

Browse files
SomeHatsmimecuvaloSergioRiquelmeSanchez
authored
Workflow builder starter kit (tldraw#6412)
Adds a workflow builder template. See the README for more information. ### Change type - [x] `other` ### Release notes ### API Changes - `TldrawUiToolbar` now accepts an optional `orientation` prop, which can be either horizontal or vertical. It's horizontal by default. --------- Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com> Co-authored-by: SergioRiquelmeSanchez <sergioriquelmesanchez@gmail.com>
1 parent 03deb7f commit cb45622

60 files changed

Lines changed: 4813 additions & 326 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/analytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"js-cookie": "^3.0.5",
1414
"posthog-js": "^1.248.1",
15-
"radix-ui": "^1.3.4",
15+
"radix-ui": "^1.4.2",
1616
"react": "^18.3.1",
1717
"react-dom": "^18.3.1",
1818
"react-ga4": "^2.1.0"

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"next-themes": "^0.3.0",
7373
"openai": "^4.96.0",
7474
"query-string": "^9.1.1",
75-
"radix-ui": "^1.3.4",
75+
"radix-ui": "^1.4.2",
7676
"react": "^18.3.1",
7777
"react-dom": "^18.3.1",
7878
"react-instantsearch": "^7.15.1",

apps/dotcom/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"lodash.pick": "^4.4.0",
4646
"posthog-js": "^1.248.1",
4747
"qrcode": "^1.5.4",
48-
"radix-ui": "^1.3.4",
48+
"radix-ui": "^1.4.2",
4949
"react": "^18.3.1",
5050
"react-dom": "^18.3.1",
5151
"react-ga4": "^2.1.0",

apps/dotcom/client/src/tla/utils/i18n.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable no-restricted-imports */
2-
2+
import { FormatXMLElementFn } from 'intl-messageformat'
3+
import { ComponentPropsWithoutRef } from 'react'
34
import {
45
FormattedMessage,
56
IntlConfig,
@@ -12,9 +13,6 @@ import {
1213
useIntl,
1314
} from 'react-intl'
1415

15-
import { FormatXMLElementFn } from 'intl-messageformat'
16-
import { ComponentPropsWithoutRef } from 'react'
17-
1816
// Re-export everything and override below what we want to override.
1917
// eslint-disable-next-line
2018
export * from 'react-intl'

apps/examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"lodash": "^4.17.21",
5555
"pdf-lib": "^1.17.1",
5656
"pdfjs-dist": "^4.10.38",
57-
"radix-ui": "^1.3.4",
57+
"radix-ui": "^1.4.2",
5858
"react": "^18.3.1",
5959
"react-dom": "^18.3.1",
6060
"react-helmet-async": "^1.3.0",

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ export default [
400400
'local/prefer-class-methods': 'off',
401401
'no-restricted-syntax': 'off',
402402
'no-console': 'off',
403+
'@typescript-eslint/method-signature-style': 'off',
403404
},
404405
},
405406
]

internal/scripts/dev-template.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ if [ -z "$template_name" ]; then
99
exit 1
1010
fi
1111

12-
LAZYREPO_PRETTY_OUTPUT=0 lazy run dev --filter="templates/$template_name" --filter='packages/tldraw' --filter='apps/bemo-worker'
12+
if [ ! -d "templates/$template_name" ]; then
13+
echo "Template $template_name does not exist"
14+
echo "Available templates: $(ls templates | awk 'ORS=", "' | sed 's/, $//')"
15+
exit 1
16+
fi
17+
18+
LAZYREPO_PRETTY_OUTPUT=0 lazy run dev --filter="templates/$template_name" --filter='packages/tldraw' --filter='apps/bemo-worker'

packages/editor/src/lib/editor/Editor.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6333,7 +6333,17 @@ export class Editor extends EventEmitter<TLEventMap> {
63336333

63346334
this.createShapes(shapesToCreate)
63356335
this.createBindings(bindingsToCreate)
6336-
this.setSelectedShapes(compact(ids.map((id) => shapeIds.get(id))))
6336+
6337+
this.setSelectedShapes(
6338+
compact(
6339+
ids.map((oldId) => {
6340+
const newId = shapeIds.get(oldId)
6341+
if (!newId) return null
6342+
if (!this.getShape(newId)) return null
6343+
return newId
6344+
})
6345+
)
6346+
)
63376347

63386348
if (offset !== undefined) {
63396349
// If we've offset the duplicated shapes, check to see whether their new bounds is entirely

packages/tldraw/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"hotkeys-js": "^3.13.9",
6060
"idb": "^7.1.1",
6161
"lz-string": "^1.5.0",
62-
"radix-ui": "^1.3.4"
62+
"radix-ui": "^1.4.2"
6363
},
6464
"peerDependencies": {
6565
"react": "^18.2.0 || ^19.0.0",

packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ function useDraggableEvents(
350350
})
351351

352352
tooltipManager.hideAllTooltips()
353+
editor.getContainer().focus()
353354
})
354355
}
355356
}

0 commit comments

Comments
 (0)