@design.estate/dees-catalog 3.94.0 → 3.95.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/dist_bundle/bundle.js +1711 -779
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-layout/dees-mosaic/dees-mosaic.d.ts +49 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/dees-mosaic.demo.d.ts +1 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/dees-mosaic.demo.js +82 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/dees-mosaic.js +622 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/index.d.ts +3 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/index.js +4 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/interaction.d.ts +37 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/interaction.js +174 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/tree.d.ts +33 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/tree.js +199 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/types.d.ts +52 -0
- package/dist_ts_web/elements/00group-layout/dees-mosaic/types.js +8 -0
- package/dist_ts_web/elements/00group-layout/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-layout/index.js +2 -1
- package/dist_watch/bundle.js +1712 -780
- package/dist_watch/bundle.js.map +4 -4
- package/package.json +1 -1
- package/readme.md +28 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-layout/dees-mosaic/dees-mosaic.demo.ts +87 -0
- package/ts_web/elements/00group-layout/dees-mosaic/dees-mosaic.ts +562 -0
- package/ts_web/elements/00group-layout/dees-mosaic/index.ts +3 -0
- package/ts_web/elements/00group-layout/dees-mosaic/interaction.ts +187 -0
- package/ts_web/elements/00group-layout/dees-mosaic/tree.ts +239 -0
- package/ts_web/elements/00group-layout/dees-mosaic/types.ts +63 -0
- package/ts_web/elements/00group-layout/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-catalog",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.95.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
|
6
6
|
"main": "dist_ts_web/index.js",
|
package/readme.md
CHANGED
|
@@ -57,7 +57,7 @@ For developers working on this library, please refer to the [UI Components Playb
|
|
|
57
57
|
|----------|------------|
|
|
58
58
|
| **Core UI** | [`DeesButton`](#deesbutton), [`DeesButtonExit`](#deesbuttonexit), [`DeesButtonGroup`](#deesbuttongroup), [`DeesBadge`](#deesbadge), [`DeesChips`](#deeschips), [`DeesHeading`](#deesheading), [`DeesHint`](#deeshint), [`DeesIcon`](#deesicon), [`DeesLabel`](#deeslabel), [`DeesPanel`](#deespanel), [`DeesSearchbar`](#deessearchbar), [`DeesSpinner`](#deesspinner), [`DeesToast`](#deestoast), [`DeesWindowcontrols`](#deeswindowcontrols), [`DeesActionbar`](#deesactionbar) |
|
|
59
59
|
| **Forms** | [`DeesForm`](#deesform), [`DeesInputText`](#deesinputtext), [`DeesInputCheckbox`](#deesinputcheckbox), [`DeesInputDropdown`](#deesinputdropdown), [`DeesInputRadiogroup`](#deesinputradiogroup), [`DeesInputFileupload`](#deesinputfileupload), [`DeesInputIban`](#deesinputiban), [`DeesInputPhone`](#deesinputphone), [`DeesInputQuantitySelector`](#deesinputquantityselector), [`DeesInputMultitoggle`](#deesinputmultitoggle), [`DeesInputToggle`](#deesinputtoggle), [`DeesInputTags`](#deesinputtags), [`DeesInputTypelist`](#deesinputtypelist), [`DeesInputList`](#deesinputlist), [`DeesInputProfilepicture`](#deesinputprofilepicture), [`DeesInputRichtext`](#deesinputrichtext), [`DeesInputWysiwyg`](#deesinputwysiwyg), [`DeesInputDatepicker`](#deesinputdatepicker), [`DeesInputSearchselect`](#deesinputsearchselect), [`DeesInputCode`](#deesinputcode), [`DeesFormSubmit`](#deesformsubmit) |
|
|
60
|
-
| **App Shell (Layout)** | [`DeesAppui`](#deesappui-️), [`DeesAppuiMainmenu`](#deesappuimainmenu), [`DeesAppuiSecondarymenu`](#deesappuisecondarymenu), [`DeesAppuiMaincontent`](#deesappuimaincontent), [`DeesAppuiAppbar`](#deesappuiappbar), [`DeesAppuiActivitylog`](#deesappuiactivitylog), [`DeesAppuiBottombar`](#deesappuibottombar), [`DeesAppuiProfiledropdown`](#deesappuiprofiledropdown), [`DeesAppuiTabs`](#deesappuitabs), [`DeesMobileNavigation`](#deesmobilenavigation), [`DeesDashboardGrid`](#deesdashboardgrid) |
|
|
60
|
+
| **App Shell (Layout)** | [`DeesMosaic`](#deesmosaic), [`DeesAppui`](#deesappui-️), [`DeesAppuiMainmenu`](#deesappuimainmenu), [`DeesAppuiSecondarymenu`](#deesappuisecondarymenu), [`DeesAppuiMaincontent`](#deesappuimaincontent), [`DeesAppuiAppbar`](#deesappuiappbar), [`DeesAppuiActivitylog`](#deesappuiactivitylog), [`DeesAppuiBottombar`](#deesappuibottombar), [`DeesAppuiProfiledropdown`](#deesappuiprofiledropdown), [`DeesAppuiTabs`](#deesappuitabs), [`DeesMobileNavigation`](#deesmobilenavigation), [`DeesDashboardGrid`](#deesdashboardgrid) |
|
|
61
61
|
| **Data Display** | [`DeesTable`](#deestable), [`DeesDataviewCodebox`](#deesdataviewcodebox), [`DeesDataviewStatusobject`](#deesdataviewstatusobject), [`DeesPdf`](#deespdf), [`DeesStatsGrid`](#deesstatsgrid), [`DeesPagination`](#deespagination), [`DeesStorageBrowser`](#deesstorgebrowser) |
|
|
62
62
|
| **Media & Thumbnails** | [`DeesThumbnailPdf`](#deesthumbnailpdf), [`DeesThumbnailImage`](#deesthumbnailimage), [`DeesThumbnailAudio`](#deesthumbnailaudio), [`DeesThumbnailVideo`](#deesthumbnalvideo), [`DeesThumbnailNote`](#deesthumbnailnote), [`DeesThumbnailFolder`](#deesthumbnailfolder), [`DeesPreview`](#deespreview), [`DeesPdfViewer`](#deespdfviewer), [`DeesImageViewer`](#deesimageviewer), [`DeesAudioViewer`](#deesaudioviewer), [`DeesVideoViewer`](#deesvideoviewer) |
|
|
63
63
|
| **Visualization** | [`DeesChartArea`](#deeschartarea), [`DeesChartBar`](#deeschartbar), [`DeesChartDonut`](#deeschartdonut), [`DeesChartGauge`](#deeschartgauge), [`DeesChartRadar`](#deeschartradar), [`DeesChartLog`](#deeschartlog) |
|
|
@@ -713,6 +713,33 @@ Submit button component specifically designed for `DeesForm`.
|
|
|
713
713
|
|
|
714
714
|
### App Shell (Layout) Components
|
|
715
715
|
|
|
716
|
+
#### `DeesMosaic`
|
|
717
|
+
|
|
718
|
+
Sway-like tiling workspace: a controlled split-tree layout where tiles resize against each other, drag by a slim tilebar (which also closes them), and dock onto any edge of another tile with a live drop preview. Content projects through named slots, so hosts keep light-DOM ownership — Electron `<webview>` content survives every layout change because slot reassignment never moves the light-DOM node.
|
|
719
|
+
|
|
720
|
+
```typescript
|
|
721
|
+
import { createMosaicLeaf, mosaicInsert, type IMosaicLayout } from '@design.estate/dees-catalog';
|
|
722
|
+
|
|
723
|
+
let layout: IMosaicLayout = mosaicInsert({ root: null }, null, 'right', createMosaicLeaf('editor', 'l-editor'));
|
|
724
|
+
layout = mosaicInsert(layout, 'l-editor', 'right', createMosaicLeaf('chat', 'l-chat'));
|
|
725
|
+
layout = mosaicInsert(layout, null, 'bottom', createMosaicLeaf('terminal', 'l-term'));
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
```html
|
|
729
|
+
<dees-mosaic
|
|
730
|
+
.layout=${layout}
|
|
731
|
+
.surfaces=${{ editor: { title: 'Editor', icon: 'lucide:Code' }, chat: { title: 'AI Chat' }, terminal: { title: 'Terminal' } }}
|
|
732
|
+
@mosaic-layout-change=${(e) => { layout = e.detail.layout; /* persist */ }}
|
|
733
|
+
>
|
|
734
|
+
<my-editor slot="tile-l-editor"></my-editor>
|
|
735
|
+
<my-chat slot="tile-l-chat"></my-chat>
|
|
736
|
+
<my-terminal slot="tile-l-term"></my-terminal>
|
|
737
|
+
<div slot="empty">Workspace is empty.</div>
|
|
738
|
+
</dees-mosaic>
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
The component is controlled: apply `e.detail.layout` back (and persist it) on every `mosaic-layout-change` (`reason: 'resize' | 'drop' | 'close' | 'equalize'`). Other events: cancelable `mosaic-tile-close`, `mosaic-tile-focus`, throttled `mosaic-resizing` (re-measure embedded content), `mosaic-drag-state`. Methods: `getLeafRects()` (viewport rect per leaf content area), `equalize(splitId?)`, `focusTile(id)`. Pure helpers (`mosaicInsert/mosaicRemove/mosaicMove/mosaicResize/mosaicEqualize/mosaicNormalize/mosaicLeaves`) are exported for host-side layout logic. Splitters are keyboard-accessible (`role="separator"`, arrow keys resize, double-click equalizes); Escape cancels drags.
|
|
742
|
+
|
|
716
743
|
#### `DeesAppui` 🏗️
|
|
717
744
|
A comprehensive application shell component providing a complete UI framework with navigation, menus, activity logging, bottom bar, and view management.
|
|
718
745
|
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '3.
|
|
6
|
+
version: '3.95.0',
|
|
7
7
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
|
8
8
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { html } from '@design.estate/dees-element';
|
|
2
|
+
import type { DeesMosaic } from './dees-mosaic.js';
|
|
3
|
+
import type { IMosaicLayout } from './types.js';
|
|
4
|
+
import { createMosaicLeaf, mosaicInsert } from './tree.js';
|
|
5
|
+
|
|
6
|
+
const buildDefaultLayout = (): IMosaicLayout => {
|
|
7
|
+
let layout = mosaicInsert({ root: null }, null, 'right', createMosaicLeaf('editor', 'leaf-editor'));
|
|
8
|
+
layout = mosaicInsert(layout, 'leaf-editor', 'right', createMosaicLeaf('chat', 'leaf-chat'));
|
|
9
|
+
layout = mosaicInsert(layout, null, 'bottom', createMosaicLeaf('terminal', 'leaf-terminal'));
|
|
10
|
+
return layout;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const surfaceMeta = {
|
|
14
|
+
editor: { title: 'Editor', icon: 'lucide:Code' },
|
|
15
|
+
chat: { title: 'AI Chat', icon: 'lucide:BotMessageSquare' },
|
|
16
|
+
terminal: { title: 'Terminal', icon: 'lucide:SquareTerminal' },
|
|
17
|
+
browser: { title: 'Browser', icon: 'lucide:Globe' },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
let tileCounter = 0;
|
|
21
|
+
|
|
22
|
+
const addBrowserTile = (event: MouseEvent) => {
|
|
23
|
+
const mosaic = (event.target as HTMLElement).closest('.mosaicDemo')?.querySelector('dees-mosaic') as DeesMosaic | null;
|
|
24
|
+
if (!mosaic) return;
|
|
25
|
+
tileCounter += 1;
|
|
26
|
+
const leaf = createMosaicLeaf('browser', `leaf-browser-${tileCounter}`);
|
|
27
|
+
mosaic.layout = mosaicInsert(mosaic.layout, 'leaf-chat', 'bottom', leaf);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const demoFunc = () => html`
|
|
31
|
+
<style>
|
|
32
|
+
.mosaicDemo {
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
35
|
+
gap: 12px;
|
|
36
|
+
height: 640px;
|
|
37
|
+
max-width: 1000px;
|
|
38
|
+
margin: 40px auto;
|
|
39
|
+
}
|
|
40
|
+
.mosaicDemo .surfaceBody {
|
|
41
|
+
display: grid;
|
|
42
|
+
place-content: center;
|
|
43
|
+
gap: 6px;
|
|
44
|
+
height: 100%;
|
|
45
|
+
text-align: center;
|
|
46
|
+
color: var(--dees-color-text-secondary);
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
background: var(--dees-color-bg-primary);
|
|
49
|
+
}
|
|
50
|
+
.mosaicDemo .surfaceBody strong {
|
|
51
|
+
color: var(--dees-color-text-primary);
|
|
52
|
+
font-size: 14px;
|
|
53
|
+
}
|
|
54
|
+
.mosaicDemo .emptyHint {
|
|
55
|
+
color: var(--dees-color-text-secondary);
|
|
56
|
+
font-size: 13px;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
59
|
+
<div
|
|
60
|
+
class="mosaicDemo"
|
|
61
|
+
@mosaic-layout-change=${(event: CustomEvent) => {
|
|
62
|
+
const mosaic = (event.target as HTMLElement);
|
|
63
|
+
(mosaic as DeesMosaic).layout = event.detail.layout;
|
|
64
|
+
console.log('mosaic-layout-change', event.detail.reason, event.detail.layout);
|
|
65
|
+
}}
|
|
66
|
+
@mosaic-tile-close=${(event: CustomEvent) => console.log('mosaic-tile-close', event.detail)}
|
|
67
|
+
@mosaic-tile-focus=${(event: CustomEvent) => {
|
|
68
|
+
((event.target as HTMLElement) as DeesMosaic).focusedLeafId = event.detail.leafId;
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
<div>
|
|
72
|
+
<dees-button @clicked=${addBrowserTile}>Add browser tile below chat</dees-button>
|
|
73
|
+
</div>
|
|
74
|
+
<dees-mosaic
|
|
75
|
+
.layout=${buildDefaultLayout()}
|
|
76
|
+
.surfaces=${surfaceMeta}
|
|
77
|
+
focusedLeafId="leaf-editor"
|
|
78
|
+
>
|
|
79
|
+
<div slot="tile-leaf-editor" class="surfaceBody"><strong>Editor</strong><span>drag my tilebar; resize the shared edges</span></div>
|
|
80
|
+
<div slot="tile-leaf-chat" class="surfaceBody"><strong>AI Chat</strong><span>docked right</span></div>
|
|
81
|
+
<div slot="tile-leaf-terminal" class="surfaceBody"><strong>Terminal</strong><span>stacked from below</span></div>
|
|
82
|
+
<div slot="tile-leaf-browser-1" class="surfaceBody"><strong>Browser 1</strong></div>
|
|
83
|
+
<div slot="tile-leaf-browser-2" class="surfaceBody"><strong>Browser 2</strong></div>
|
|
84
|
+
<div slot="empty" class="emptyHint">Workspace is empty — add a tile.</div>
|
|
85
|
+
</dees-mosaic>
|
|
86
|
+
</div>
|
|
87
|
+
`;
|