@designbasekorea/ui-wc 0.14.0 → 0.16.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/CHANGELOG.md +14 -0
- package/README.md +2 -0
- package/dist/esm/components/db-design-canvas.js +1 -1
- package/dist/esm/components/db-layer-list.d.ts +71 -0
- package/dist/esm/components/db-layer-list.js +1 -0
- package/dist/esm/components/db-video-timeline.d.ts +5 -0
- package/dist/esm/components/db-video-timeline.js +1 -1
- package/dist/esm/core/i18n-copy.js +1 -1
- package/dist/esm/core/i18n-en.js +1 -1
- package/dist/esm/core/i18n.d.ts +8 -0
- package/dist/esm/core/i18n.js +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +80 -2
- package/dist/index.esm.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +54 -2
- package/dist/react/index.esm.js +1 -1
- package/docs/LAYER-LIST.md +31 -0
- package/docs/MEDIA-EDITORS.md +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Generated from docs/LAYER-LIST.md by scripts/sync-package-docs.mjs. -->
|
|
2
|
+
# Layer List
|
|
3
|
+
|
|
4
|
+
`db-layer-list` / React `LayerList` is a compact list for editor layers and effect stacks. It composes native Designbase ghost buttons and outline icons. Default labels follow `dbSetLocale`; item labels and custom action labels belong to the host document.
|
|
5
|
+
|
|
6
|
+
```tsx
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { LayerList, type LayerListItem } from '@designbasekorea/ui-wc/react';
|
|
9
|
+
const initial: LayerListItem[] = [
|
|
10
|
+
{ id:'color', label:'Color grade', visible:true },
|
|
11
|
+
{ id:'grain', label:'Film grain', locked:true },
|
|
12
|
+
];
|
|
13
|
+
export function Effects() {
|
|
14
|
+
const [items,setItems] = useState(initial);
|
|
15
|
+
return <LayerList items={items} dragMode="handle"
|
|
16
|
+
onChange={e => { setItems(e.detail.items); /* persist complete document state */ }} />;
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- `items`: array or JSON string, unique stable `id`, `label`, optional `description`, official `icon`, `visible` (default true), `locked`, `removable` (default true), `actions: {id,label,icon,disabled?}[]`.
|
|
21
|
+
- `drag-mode`: `handle` (default) or `row`. Row mode omits the grip; mouse/touch can drag anywhere except action buttons. Use handle mode when touch users need to scroll by swiping rows.
|
|
22
|
+
- `selected-id` / `selectedId`: selected item. Selection does not change visibility or lock.
|
|
23
|
+
- `actions-visibility` / `actionsVisibility`: `always` (default) or `hover`. Hover mode reveals controls on row hover or keyboard focus, keeps label space stable, and always displays actions on touch devices.
|
|
24
|
+
- `disabled`, `hide-visibility`, `hide-lock`, `hide-delete` are boolean options.
|
|
25
|
+
- `--db-layer-list-max-height`: opt-in scrolling height, e.g. `240px`. Dragging at an overflowing ancestor's top/bottom scrolls it. Width always stays inside the parent.
|
|
26
|
+
|
|
27
|
+
`db-change` delivers `{items,itemId,action,fromIndex?,toIndex?}`, where action is `reorder`, `visibility`, `lock`, or `delete`. `db-reorder` also reports reorder only. `db-selection-change` reports `{itemId}`. `db-action` reports custom `{itemId,actionId}`; the owner implements duplication, settings, etc. React maps these to `onChange`, `onReorder`, `onSelectionChange`, `onAction`. Persist only once through `onChange`; subscribing to both change and reorder must not produce two history entries.
|
|
28
|
+
|
|
29
|
+
A locked item cannot initiate drag or be deleted, but can be unlocked or hidden. Other items may reorder around it. `removable:false` removes delete entirely. No network or project deletion occurs automatically; the component only changes its local list and emits the result. Supply saved items on remount.
|
|
30
|
+
|
|
31
|
+
Keyboard on a focused row: arrows focus previous/next, Enter/Space select, Alt+Up/Down reorder, Delete/Backspace delete when allowed, Escape cancels an active drag. Buttons retain their own normal keyboard behavior. Pointer cancellation and disconnection cancel uncommitted reorder. One drop produces one change; clicking an action never initiates row drag.
|
package/docs/MEDIA-EDITORS.md
CHANGED
|
@@ -61,3 +61,12 @@ The Effects/property-keyframes demo drives a live X/Y/scale/opacity sample. It u
|
|
|
61
61
|
U, while the timeline is focused outside text inputs, expands/collapses the selected clip's effect properties. Click a key to select it; Shift toggles additive selection. Drag empty property-lane space to box-select visible keys across rows (Shift adds). Selected diamonds are filled and outlined. Drag a selected key to move the selection by one shared frame-quantized delta, bounded by clip edges and unselected neighbors. Delete/Backspace removes selected keys; the two-level Context Menu applies easing presets to their outgoing segments. Detailed property graphs still expose exact values and Bezier tangents. Escape rolls back timing drags or box selection. Timeline tool text is nonselectable; actual text-entry controls remain selectable. Value readouts target a dedicated class and never replace Button icon nodes.
|
|
62
62
|
|
|
63
63
|
Alt/Option + key drag duplicates the entire selected key group, preserving original IDs, values and tangent data. Copies receive new IDs and a shared frame offset; landing on an existing key frame is rejected. Duplicate, delete and easing actions are available from the real ContextMenu with an Easing submenu. Plain dragging anywhere in blank effect content starts a marquee. Cmd/Ctrl+Z undoes committed timeline edits and Shift+Cmd/Ctrl+Z redoes them (up to 100 snapshots); optimistic moves and selection changes do not create history. External clip replacements reset native history; own controlled commit echoes do not. Undo/redo emits db-change actions undo/redo for consumers with their own history integration.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Label panel and composition boundary
|
|
67
|
+
|
|
68
|
+
`label-width` / React `labelWidth` defaults to 144px (120–480px). Drag any vertical divider on the ruler, track name, or effect property label. Arrow keys resize a focused divider, Shift uses larger steps, Home resets; Escape cancels pointer resizing. Persist `db-label-resize.detail.width` / `onLabelResize` alongside editor preferences. Long names use single-line ellipsis and retain their complete title for inspection.
|
|
69
|
+
|
|
70
|
+
Single-effect clips use one Effects disclosure; multiple effects retain per-effect grouping. `U` expands/collapses the active clip's effect controls.
|
|
71
|
+
|
|
72
|
+
`duration` remains the composition/playback boundary. Moving a clip beyond it preserves its start and full duration, including when controlled hosts reapply `clips`; the canvas expands to show the clip, and only the part after the boundary is faded. Playback remains bounded by `duration`; exporting/rendering outside the composition remains a host decision. Media source limits still apply to trimming. Collision protection remains active; Cmd/Ctrl insert moves following clips when required.
|