@kubohiroya/turbowarp-plus-editor-workbench 0.11.1 → 0.12.0

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/README.ja.md CHANGED
@@ -136,3 +136,8 @@ Web 版の Plus 標準配置で `twPlusDockview=1` を付けて起動すると
136
136
  `broadcast_msg` はステージ所有なので、メッセージ名の変更は作品全体に及ぶ。
137
137
  送受信の判定は `@kubohiroya/turbowarp-plus-editor-project-model` の `messageReference` だけが持ち、Editor の作品内検索も同じ関数を使う。
138
138
  このパッケージの `./project-messages` は、既存の import のためにそれを再 export している。
139
+
140
+ ホストが `getFunctions` を渡すと、「音」と「変数など」の間に「関数」がある(ボタンの並びは
141
+ `@kubohiroya/turbowarp-plus-editor-sprite-panes` のツールバーが決め、保存済みのレイアウトが持つセクションの番号は変わらない)。`SpriteFunctionPane` が対象のブロック定義を
142
+ アコーディオンで一覧し、並べ方は名前順・Z順・N順から選び、LR・TD の呼び出し図にも切り替えられる(図の関数はダイアログで開く)。表示・並べ方・流れはビューごとに保つ。開いた項目はホストの
143
+ `mountFunctionEditor` を呼び、その定義のコード編集画面はホストが持つ。このパッケージは Scratch Blocks のコードを持たないためである。
package/README.md CHANGED
@@ -134,3 +134,10 @@ Variables, drawn by `SpriteMessagePane` from `@kubohiroya/turbowarp-plus-editor-
134
134
  `broadcast_msg` variables, so a rename applies project-wide. `messageReference` in `@kubohiroya/turbowarp-plus-editor-project-model` is the only place that decides what
135
135
  sends or receives a message, and the editor's project search calls the same function. This package's
136
136
  `./project-messages` re-exports it for existing imports.
137
+
138
+ When the host passes `getFunctions`, a Functions section appears between Sounds and Variables (the
139
+ toolbar of `@kubohiroya/turbowarp-plus-editor-sprite-panes` sets the button order; the section numbers stored in
140
+ saved layouts do not change). `SpriteFunctionPane` lists the
141
+ target's custom block definitions as an accordion, ordered by name, in Z order or in N order, or as a call graph flowing LR or TD whose
142
+ functions open in a dialog; each view keeps the mode, order and flow it chose. Each open item calls the host's `mountFunctionEditor`, which owns the code workspace of that
143
+ definition, because this package carries no Scratch Blocks code.
@@ -7,6 +7,7 @@ import type { DockviewStagePane } from './dockview-stage.ts';
7
7
  import type { WorkspaceLayoutStore, WorkspaceProjectIdentity } from './workspace-layout-store.ts';
8
8
  import type { SpriteVariableEdit, SpriteVariableEditError } from '@kubohiroya/turbowarp-plus-editor-project-model/sprite-variable-edit';
9
9
  import type { MessageRenameError } from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-message-pane';
10
+ import type { FunctionPaneData, MountFunctionEditor } from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-function-pane';
10
11
  import type { MessageUse, ProjectMessage, TargetMessages } from '@kubohiroya/turbowarp-plus-editor-project-model/project-messages';
11
12
  export { getDocumentWorkspace } from './document-workspace.ts';
12
13
  export { createWorkspaceLayoutStore, workspaceLayoutDatabase, workspaceLayoutLimit } from './workspace-layout-store.ts';
@@ -92,6 +93,7 @@ interface TabOptions<Snapshot = unknown> {
92
93
  stagePane?: DockviewStagePane;
93
94
  variables?: boolean;
94
95
  messages?: boolean;
96
+ functions?: boolean;
95
97
  locale?: string;
96
98
  viewAdapter?: SpriteTabAdapter<Snapshot>;
97
99
  popouts?: {
@@ -115,7 +117,7 @@ interface ToolbarSlot {
115
117
  interface AssetPreviewSlot {
116
118
  id: string;
117
119
  targetId: string;
118
- kind: AssetKind | 'variables' | 'messages';
120
+ kind: AssetKind | 'variables' | 'messages' | 'functions';
119
121
  editable: boolean;
120
122
  selected?: object;
121
123
  renderLayout?: SpriteAssetLayout;
@@ -187,6 +189,10 @@ type SpriteTabsProps<Snapshot> = Omit<TabOptions<Snapshot>, 'activateSection' |
187
189
  openMessageTarget?(targetId: string): void;
188
190
  /** Rename a message everywhere in the project. The stage owns broadcast_msg variables. */
189
191
  renameMessage?(message: ProjectMessage, name: string): MessageRenameError | void;
192
+ /** The custom block definitions of this target. `readTargetFunctions` builds it from the runtime. */
193
+ getFunctions?(targetId: string): FunctionPaneData;
194
+ /** Mount an editor of one definition script in an open item of the functions pane. */
195
+ mountFunctionEditor?: MountFunctionEditor;
190
196
  getCodeSearchItems?(targetId: string): readonly SpriteSearchResult[];
191
197
  openCodeSearchResult?(targetId: string, id: string): void;
192
198
  };
@@ -9,6 +9,7 @@ import { projectFolderIconPath } from "./drawer-views.js";
9
9
  import { dockPopoutGroups, positionOnScreen, readWorkspaceLayout, workspaceWithoutTransientPanels } from "./workspace-layout.js";
10
10
  import { createWorkspaceLayoutStore } from "./workspace-layout-store.js";
11
11
  import { SpriteMessagePane } from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-message-pane';
12
+ import { functionLabel, SpriteFunctionPane } from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-function-pane';
12
13
  import { createTargetTabMenuItem, spriteRenameLabel } from "./target-tab-menu.js";
13
14
  export { getDocumentWorkspace } from "./document-workspace.js";
14
15
  export { createWorkspaceLayoutStore, workspaceLayoutDatabase, workspaceLayoutLimit } from "./workspace-layout-store.js";
@@ -17,6 +18,7 @@ export { useDockviewStage } from "./dockview-stage.js";
17
18
  export { SpriteTargetTabsContext, useTargetTabMenu } from "./target-tab-menu.js";
18
19
  const variableSection = spriteEditorSections.indexOf('variables');
19
20
  const messageSection = spriteEditorSections.indexOf('messages');
21
+ const functionSection = spriteEditorSections.indexOf('functions');
20
22
  // The first three sections are the GUI's own panels; the rest are rendered by this package.
21
23
  const lastNativeSection = 2;
22
24
  function createAssetSelections(target, locale, source) {
@@ -115,7 +117,8 @@ export function mountSpriteTabs(root, content, options) {
115
117
  const viewAdapter = multiView ? options.viewAdapter : undefined;
116
118
  const stagePane = multiView ? options.stagePane : undefined;
117
119
  const ownSection = (section) => (section === variableSection && Boolean(options.variables)) ||
118
- (section === messageSection && Boolean(options.messages));
120
+ (section === messageSection && Boolean(options.messages)) ||
121
+ (section === functionSection && Boolean(options.functions));
119
122
  const usesNativeSection = (section) => !ownSection(section);
120
123
  const sectionAvailable = (section) => section <= lastNativeSection || ownSection(section);
121
124
  const document = root.ownerDocument;
@@ -479,7 +482,8 @@ export function mountSpriteTabs(root, content, options) {
479
482
  if (ownSection(view.section) && slot.assetPreview) {
480
483
  slot.assetPreview.hidden = false;
481
484
  assetPreviews.push({ id, targetId: descriptor.targetId,
482
- kind: view.section === messageSection ? 'messages' : 'variables', editable: active === view,
485
+ kind: view.section === messageSection ? 'messages' : view.section === functionSection ? 'functions' : 'variables',
486
+ editable: active === view,
483
487
  element: slot.assetPreview });
484
488
  continue;
485
489
  }
@@ -1357,11 +1361,14 @@ function SpriteTabs(props) {
1357
1361
  });
1358
1362
  const [toolbarSlots, setToolbarSlots] = React.useState([]);
1359
1363
  const [assetPreviewSlots, setAssetPreviewSlots] = React.useState([]);
1364
+ // The functions pane remounts when its view switches sections; keep the view, order and flow each view chose.
1365
+ const [functionSettings] = React.useState(() => new Map());
1360
1366
  const controller = React.useRef(null);
1361
1367
  const hasVariables = Boolean(props.getVariables);
1362
1368
  const hasMessages = Boolean(props.getMessages);
1369
+ const hasFunctions = Boolean(props.getFunctions);
1363
1370
  const hasToolbar = Boolean(props.renderToolbar) || hasVariables;
1364
- const hasAssetPreview = Boolean(props.getAssetPreview) || hasVariables || hasMessages;
1371
+ const hasAssetPreview = Boolean(props.getAssetPreview) || hasVariables || hasMessages || hasFunctions;
1365
1372
  React.useLayoutEffect(() => {
1366
1373
  sections.current.append(...props.slots);
1367
1374
  parking.current.appendChild(content);
@@ -1409,6 +1416,7 @@ function SpriteTabs(props) {
1409
1416
  stagePane: props.stagePane,
1410
1417
  variables: hasVariables,
1411
1418
  messages: hasMessages,
1419
+ functions: hasFunctions,
1412
1420
  locale: props.locale,
1413
1421
  viewAdapter: props.viewAdapter,
1414
1422
  popouts: props.popouts && { ...props.popouts, className: props.className },
@@ -1428,7 +1436,7 @@ function SpriteTabs(props) {
1428
1436
  };
1429
1437
  }, [content, props.enabled, props.vm, props.reopenLabel, props.multiView, props.locale,
1430
1438
  props.viewAdapter, props.stagePane, props.workspaceLayout, props.renameLabels, props.popouts, props.className,
1431
- hasVariables, hasMessages, hasToolbar, hasAssetPreview]);
1439
+ hasVariables, hasMessages, hasFunctions, hasToolbar, hasAssetPreview]);
1432
1440
  React.useLayoutEffect(() => {
1433
1441
  controller.current?.syncActiveSection(props.activeSection);
1434
1442
  }, [props.activeSection]);
@@ -1453,7 +1461,8 @@ function SpriteTabs(props) {
1453
1461
  viewId: view.id, locale: props.locale, section: currentSection, isStage: view.isStage,
1454
1462
  activeGroup: view.groupActive, propertiesInVariables: Boolean(props.getProperties),
1455
1463
  // A section with no port behind it would open an empty panel.
1456
- availableSections: spriteEditorSections.filter(section => section !== 'messages' || Boolean(props.getMessages)),
1464
+ availableSections: spriteEditorSections.filter(section => (section !== 'messages' || Boolean(props.getMessages)) &&
1465
+ (section !== 'functions' || Boolean(props.getFunctions))),
1457
1466
  actions: view.active && currentSection !== 'variables' ? props.activeTools : undefined,
1458
1467
  onSectionChange: section => actions.setSection(spriteEditorSections.indexOf(section)),
1459
1468
  search: {
@@ -1469,6 +1478,10 @@ function SpriteTabs(props) {
1469
1478
  items = (props.getMessages?.(view.targetId).messages ?? [])
1470
1479
  .map(message => ({ id: message.key, label: message.name }));
1471
1480
  }
1481
+ else if (section === 'functions') {
1482
+ items = (props.getFunctions?.(view.targetId).functions ?? [])
1483
+ .map(fn => ({ id: fn.id, label: functionLabel(fn) }));
1484
+ }
1472
1485
  else {
1473
1486
  items = props.getAssetPreview?.(view.targetId, section).items.map((item, index) => ({ id: String(index), label: item.name })) ?? [];
1474
1487
  }
@@ -1489,6 +1502,11 @@ function SpriteTabs(props) {
1489
1502
  [...(pane?.querySelectorAll('[data-message-key]') ?? [])]
1490
1503
  .find(node => node.dataset.messageKey === result.id)?.focus();
1491
1504
  }
1505
+ else if (section === 'functions') {
1506
+ const pane = assetPreviewSlots.find(slot => slot.id === view.id)?.element;
1507
+ [...(pane?.querySelectorAll('[data-function-key]') ?? [])]
1508
+ .find(node => node.dataset.functionKey === result.id)?.focus();
1509
+ }
1492
1510
  else
1493
1511
  workspace?.selectAsset(view.id, section, Number(result.id));
1494
1512
  }
@@ -1505,6 +1523,11 @@ function SpriteTabs(props) {
1505
1523
  workspace?.refreshSurfaces();
1506
1524
  return result;
1507
1525
  })
1526
+ }) : kind === 'functions' ? React.createElement(SpriteFunctionPane, {
1527
+ kind, locale: props.locale, editable, data: props.getFunctions(targetId),
1528
+ defaultSettings: functionSettings.get(id),
1529
+ onSettingsChange: (settings) => functionSettings.set(id, settings),
1530
+ mountEditor: props.mountFunctionEditor
1508
1531
  }) : kind === 'variables' ? renderVariablePane(id, targetId, editable) :
1509
1532
  props.getAssetPreview && React.createElement(AssetPreview, {
1510
1533
  locale: props.locale, kind, selected, renderLayout, scrollTop, data: props.getAssetPreview(targetId, kind)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-plus-editor-workbench",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "The TurboWarp Plus Editor workbench: layout, dockable sprite tabs, stage, debugger tab and file menu",
5
5
  "type": "module",
6
6
  "license": "MPL-2.0",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "dependencies": {
75
75
  "@kubohiroya/turbowarp-plus-editor-project-model": "0.1.0",
76
- "@kubohiroya/turbowarp-plus-editor-sprite-panes": "0.1.1",
76
+ "@kubohiroya/turbowarp-plus-editor-sprite-panes": "0.2.1",
77
77
  "dockview": "8.8.3"
78
78
  },
79
79
  "peerDependencies": {
@@ -21,6 +21,8 @@ import type {WorkspaceLayoutSession, WorkspaceLayoutStore, WorkspaceProjectIdent
21
21
  import type {SpriteVariableEdit, SpriteVariableEditError} from '@kubohiroya/turbowarp-plus-editor-project-model/sprite-variable-edit';
22
22
  import {SpriteMessagePane} from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-message-pane';
23
23
  import type {MessageRenameError} from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-message-pane';
24
+ import {functionLabel, SpriteFunctionPane} from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-function-pane';
25
+ import type {FunctionPaneData, FunctionPaneSettings, MountFunctionEditor} from '@kubohiroya/turbowarp-plus-editor-sprite-panes/sprite-function-pane';
24
26
  import type {MessageUse, ProjectMessage, TargetMessages} from '@kubohiroya/turbowarp-plus-editor-project-model/project-messages';
25
27
  import {createTargetTabMenuItem, spriteRenameLabel} from './target-tab-menu.ts';
26
28
 
@@ -88,6 +90,7 @@ type AssetKind = SpriteAssetKind;
88
90
 
89
91
  const variableSection = spriteEditorSections.indexOf('variables');
90
92
  const messageSection = spriteEditorSections.indexOf('messages');
93
+ const functionSection = spriteEditorSections.indexOf('functions');
91
94
  // The first three sections are the GUI's own panels; the rest are rendered by this package.
92
95
  const lastNativeSection = 2;
93
96
 
@@ -162,6 +165,7 @@ interface TabOptions<Snapshot = unknown> {
162
165
  stagePane?: DockviewStagePane;
163
166
  variables?: boolean;
164
167
  messages?: boolean;
168
+ functions?: boolean;
165
169
  locale?: string;
166
170
  viewAdapter?: SpriteTabAdapter<Snapshot>;
167
171
  popouts?: {url: string; className?: string; openPalette?(view: SpriteTabView): void};
@@ -184,7 +188,7 @@ interface ToolbarSlot {
184
188
  interface AssetPreviewSlot {
185
189
  id: string;
186
190
  targetId: string;
187
- kind: AssetKind | 'variables' | 'messages';
191
+ kind: AssetKind | 'variables' | 'messages' | 'functions';
188
192
  editable: boolean;
189
193
  selected?: object;
190
194
  renderLayout?: SpriteAssetLayout;
@@ -266,7 +270,8 @@ export function mountSpriteTabs<Snapshot>(root: HTMLElement, content: HTMLElemen
266
270
  const viewAdapter = multiView ? options.viewAdapter : undefined;
267
271
  const stagePane = multiView ? options.stagePane : undefined;
268
272
  const ownSection = (section: number) => (section === variableSection && Boolean(options.variables)) ||
269
- (section === messageSection && Boolean(options.messages));
273
+ (section === messageSection && Boolean(options.messages)) ||
274
+ (section === functionSection && Boolean(options.functions));
270
275
  const usesNativeSection = (section: number) => !ownSection(section);
271
276
  const sectionAvailable = (section: number) => section <= lastNativeSection || ownSection(section);
272
277
  const document = root.ownerDocument;
@@ -609,7 +614,8 @@ export function mountSpriteTabs<Snapshot>(root: HTMLElement, content: HTMLElemen
609
614
  if (ownSection(view.section) && slot.assetPreview) {
610
615
  slot.assetPreview.hidden = false;
611
616
  assetPreviews.push({id, targetId: descriptor.targetId,
612
- kind: view.section === messageSection ? 'messages' : 'variables', editable: active === view,
617
+ kind: view.section === messageSection ? 'messages' : view.section === functionSection ? 'functions' : 'variables',
618
+ editable: active === view,
613
619
  element: slot.assetPreview});
614
620
  continue;
615
621
  }
@@ -1401,6 +1407,10 @@ type SpriteTabsProps<Snapshot> = Omit<TabOptions<Snapshot>, 'activateSection' |
1401
1407
  openMessageTarget?(targetId: string): void;
1402
1408
  /** Rename a message everywhere in the project. The stage owns broadcast_msg variables. */
1403
1409
  renameMessage?(message: ProjectMessage, name: string): MessageRenameError | void;
1410
+ /** The custom block definitions of this target. `readTargetFunctions` builds it from the runtime. */
1411
+ getFunctions?(targetId: string): FunctionPaneData;
1412
+ /** Mount an editor of one definition script in an open item of the functions pane. */
1413
+ mountFunctionEditor?: MountFunctionEditor;
1404
1414
  getCodeSearchItems?(targetId: string): readonly SpriteSearchResult[];
1405
1415
  openCodeSearchResult?(targetId: string, id: string): void;
1406
1416
  };
@@ -1455,11 +1465,14 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1455
1465
  });
1456
1466
  const [toolbarSlots, setToolbarSlots] = React.useState<readonly ToolbarSlot[]>([]);
1457
1467
  const [assetPreviewSlots, setAssetPreviewSlots] = React.useState<readonly AssetPreviewSlot[]>([]);
1468
+ // The functions pane remounts when its view switches sections; keep the view, order and flow each view chose.
1469
+ const [functionSettings] = React.useState(() => new Map<string, FunctionPaneSettings>());
1458
1470
  const controller = React.useRef<SpriteTabsController<Snapshot>>(null);
1459
1471
  const hasVariables = Boolean(props.getVariables);
1460
1472
  const hasMessages = Boolean(props.getMessages);
1473
+ const hasFunctions = Boolean(props.getFunctions);
1461
1474
  const hasToolbar = Boolean(props.renderToolbar) || hasVariables;
1462
- const hasAssetPreview = Boolean(props.getAssetPreview) || hasVariables || hasMessages;
1475
+ const hasAssetPreview = Boolean(props.getAssetPreview) || hasVariables || hasMessages || hasFunctions;
1463
1476
  React.useLayoutEffect(() => {
1464
1477
  sections.current.append(...props.slots);
1465
1478
  parking.current.appendChild(content);
@@ -1507,6 +1520,7 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1507
1520
  stagePane: props.stagePane,
1508
1521
  variables: hasVariables,
1509
1522
  messages: hasMessages,
1523
+ functions: hasFunctions,
1510
1524
  locale: props.locale,
1511
1525
  viewAdapter: props.viewAdapter,
1512
1526
  popouts: props.popouts && {...props.popouts, className: props.className},
@@ -1525,7 +1539,7 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1525
1539
  };
1526
1540
  }, [content, props.enabled, props.vm, props.reopenLabel, props.multiView, props.locale,
1527
1541
  props.viewAdapter, props.stagePane, props.workspaceLayout, props.renameLabels, props.popouts, props.className,
1528
- hasVariables, hasMessages, hasToolbar, hasAssetPreview]);
1542
+ hasVariables, hasMessages, hasFunctions, hasToolbar, hasAssetPreview]);
1529
1543
  React.useLayoutEffect(() => {
1530
1544
  controller.current?.syncActiveSection(props.activeSection);
1531
1545
  }, [props.activeSection]);
@@ -1555,7 +1569,8 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1555
1569
  activeGroup: view.groupActive, propertiesInVariables: Boolean(props.getProperties),
1556
1570
  // A section with no port behind it would open an empty panel.
1557
1571
  availableSections: spriteEditorSections.filter(section =>
1558
- section !== 'messages' || Boolean(props.getMessages)),
1572
+ (section !== 'messages' || Boolean(props.getMessages)) &&
1573
+ (section !== 'functions' || Boolean(props.getFunctions))),
1559
1574
  actions: view.active && currentSection !== 'variables' ? props.activeTools : undefined,
1560
1575
  onSectionChange: section => actions.setSection(spriteEditorSections.indexOf(section)),
1561
1576
  search: {
@@ -1568,6 +1583,9 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1568
1583
  } else if (section === 'messages') {
1569
1584
  items = (props.getMessages?.(view.targetId).messages ?? [])
1570
1585
  .map(message => ({id: message.key, label: message.name}));
1586
+ } else if (section === 'functions') {
1587
+ items = (props.getFunctions?.(view.targetId).functions ?? [])
1588
+ .map(fn => ({id: fn.id, label: functionLabel(fn)}));
1571
1589
  } else {
1572
1590
  items = props.getAssetPreview?.(view.targetId, section).items.map((item, index) =>
1573
1591
  ({id: String(index), label: item.name})) ?? [];
@@ -1586,6 +1604,10 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1586
1604
  const pane = assetPreviewSlots.find(slot => slot.id === view.id)?.element;
1587
1605
  [...(pane?.querySelectorAll<HTMLElement>('[data-message-key]') ?? [])]
1588
1606
  .find(node => node.dataset.messageKey === result.id)?.focus();
1607
+ } else if (section === 'functions') {
1608
+ const pane = assetPreviewSlots.find(slot => slot.id === view.id)?.element;
1609
+ [...(pane?.querySelectorAll<HTMLElement>('[data-function-key]') ?? [])]
1610
+ .find(node => node.dataset.functionKey === result.id)?.focus();
1589
1611
  } else workspace?.selectAsset(view.id, section, Number(result.id));
1590
1612
  }
1591
1613
  }
@@ -1601,6 +1623,11 @@ function SpriteTabs<Snapshot>(props: SpriteTabsProps<Snapshot>) {
1601
1623
  if (!result) workspace?.refreshSurfaces();
1602
1624
  return result;
1603
1625
  })
1626
+ }) : kind === 'functions' ? React.createElement(SpriteFunctionPane, {
1627
+ kind, locale: props.locale, editable, data: props.getFunctions!(targetId),
1628
+ defaultSettings: functionSettings.get(id),
1629
+ onSettingsChange: (settings: FunctionPaneSettings) => functionSettings.set(id, settings),
1630
+ mountEditor: props.mountFunctionEditor
1604
1631
  }) : kind === 'variables' ? renderVariablePane(id, targetId, editable) :
1605
1632
  props.getAssetPreview && React.createElement(AssetPreview, {
1606
1633
  locale: props.locale, kind, selected, renderLayout, scrollTop, data: props.getAssetPreview(targetId, kind)