fix migration exports (#3586)
We're missing the export for `createShapePropsMigrationIds`, so lets add it. This also fixes some other bits that were used in examples but not exported properly from tldraw. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix ### Release Notes - Expose `createShapePropsMigrationIds`, `defaultEditorAssetUrls`, `PORTRAIT_BREAKPOINT`, `useDefaultColorTheme`, & `getPerfectDashProps`
This commit is contained in:
parent
a319ad9497
commit
bfc8b6a901
22 changed files with 782 additions and 89 deletions
|
@ -59,4 +59,48 @@ exports.rules = {
|
|||
},
|
||||
defaultOptions: [],
|
||||
}),
|
||||
'no-internal-imports': ESLintUtils.RuleCreator.withoutDocs({
|
||||
create(context) {
|
||||
return {
|
||||
ImportDeclaration(node) {
|
||||
const path = node.source.value
|
||||
|
||||
const parts = path.split('/')
|
||||
|
||||
switch (parts[0]) {
|
||||
case 'tldraw':
|
||||
// 'tldraw'
|
||||
if (parts.length === 1) return
|
||||
// 'tldraw/**/*.css'
|
||||
if (path.endsWith('.css')) return
|
||||
break
|
||||
case '@tldraw':
|
||||
// '@tldraw/*'
|
||||
if (parts.length === 2) return
|
||||
// '@tldraw/**/*.css'
|
||||
if (path.endsWith('.css')) return
|
||||
// '@tldraw/assets/*'
|
||||
if (parts[1] === 'assets' && parts.length === 3) return
|
||||
break
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
context.report({
|
||||
messageId: 'internal',
|
||||
node: node.source,
|
||||
data: { path },
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
meta: {
|
||||
messages: {
|
||||
internal: "Don't import from internal tldraw source ({{path}})",
|
||||
},
|
||||
type: 'problem',
|
||||
schema: [],
|
||||
},
|
||||
defaultOptions: [],
|
||||
}),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue