@design.estate/dees-wcctools 1.0.101 → 1.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-wcctools",
3
- "version": "1.0.101",
3
+ "version": "1.1.1",
4
4
  "private": false,
5
5
  "description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
6
6
  "exports": {
package/readme.hints.md CHANGED
@@ -1,5 +1,107 @@
1
1
  # Project Hints and Findings
2
2
 
3
+ ## UI Redesign with Shadcn-like Styles (2025-06-27)
4
+
5
+ ### Changes Made
6
+ Updated the WCC Dashboard UI components (properties and sidebar) to use shadcn-like design patterns:
7
+
8
+ 1. **Color System**: Implemented CSS variables for theming:
9
+ - `--background`, `--foreground`, `--card`, `--primary`, `--secondary`
10
+ - `--muted`, `--accent`, `--border`, `--input`, `--ring`
11
+ - Consistent dark theme with subtle borders and proper contrast
12
+ - Dynamic theme switching between light and dark modes
13
+
14
+ 2. **Properties Panel Improvements (Updated)**:
15
+ - Changed from fixed 3-column grid to flexible flexbox layout
16
+ - Properties now wrap and use space more efficiently
17
+ - Added rounded corners (using --radius-md) and better spacing
18
+ - Property items use flexbox with min-width for responsive layout
19
+ - Property labels now show as styled headers with type info
20
+ - Form controls updated with shadcn-style focus states and transitions
21
+ - Complex properties (Objects/Arrays) show "Edit" button
22
+ - Advanced JSON editor appears above properties panel when editing complex types
23
+ - Dynamic height adjustment (50px when editor is open, 120px normally)
24
+
25
+ 3. **Sidebar Styling**:
26
+ - Updated with consistent color scheme
27
+ - Added rounded corners to menu items
28
+ - Improved hover states with smooth transitions
29
+ - Better typography with proper font weights
30
+
31
+ 4. **Advanced Property Editor**:
32
+ - JSON editor for complex types (Objects and Arrays)
33
+ - Monaco-style monospace font for code editing
34
+ - Live updates to element properties
35
+ - Positioned above the properties panel with smooth transitions
36
+
37
+ 5. **Theme and Viewport Selectors (New)**:
38
+ - Redesigned buttons with flexbox layout for better icon/text alignment
39
+ - Added hover effects with transform and shadow
40
+ - Smooth transitions on all interactive elements
41
+ - Selected state uses primary color variables
42
+ - Icons reduced in size for better balance
43
+
44
+ 6. **Form Controls (New)**:
45
+ - Input fields and selects now have:
46
+ - Rounded corners (--radius-sm)
47
+ - Consistent padding (0.5rem 0.75rem)
48
+ - Focus states with ring effect using box-shadow
49
+ - Smooth transition animations
50
+ - Checkboxes use accent-color for theming
51
+
52
+ ### Technical Details
53
+ - Uses system font stack ('Inter' preferred) for better native appearance
54
+ - Subtle borders with CSS variables for consistency
55
+ - Consistent spacing using rem units
56
+ - Smooth transitions (0.2s ease) for interactive elements
57
+ - Custom scrollbar styling for better visual integration
58
+ - Grid layout with 1px gaps creating subtle dividers
59
+ - Warning display with backdrop blur and rounded corners
60
+
61
+ ## Advanced Complex Properties Editor (2025-06-27)
62
+
63
+ ### Overview
64
+ Implemented an advanced editor for complex properties (Arrays and Objects) that appears between the wcc-properties panel and frame when activated.
65
+
66
+ ### Features
67
+ 1. **Dynamic Layout**: Frame shrinks by 300px from bottom when editor opens
68
+ 2. **Multiple Editors**: Can edit multiple properties simultaneously side by side
69
+ 3. **JSON Editor**:
70
+ - Monospace font for code editing
71
+ - Tab key support for indentation
72
+ - Syntax validation with error messages
73
+ - Live preview of changes
74
+ 4. **Smooth Transitions**: Animated opening/closing with 0.3s ease
75
+ 5. **Error Handling**: Invalid JSON shows clear error messages that disappear on typing
76
+ 6. **Close All Button**: Single button to close all open editors at once
77
+
78
+ ### Technical Implementation (Updated)
79
+ - **State Management**: Changed from single editor to array of editors with unique IDs
80
+ - **Editor Structure**: Each editor instance contains:
81
+ - `id`: Unique identifier (`propertyName-timestamp`)
82
+ - `name`: Property name
83
+ - `value`: Original value
84
+ - `element`: Reference to the element
85
+ - `editorValue`: Current JSON string
86
+ - `editorError`: Validation error message
87
+ - **Event System**: Uses custom 'editorStateChanged' event to communicate with parent dashboard
88
+ - **Dynamic Styling**: wcc-frame's bottom position changes from 100px to 400px when any editor is open
89
+ - **Property Types**: Object and Array properties show "Edit Object/Array" button instead of inline controls
90
+
91
+ ### User Flow
92
+ 1. Click "Edit Object/Array" button on complex property
93
+ 2. Editor slides up between properties panel and frame
94
+ 3. Click additional "Edit" buttons to open more properties side by side
95
+ 4. Each editor can be saved/cancelled independently
96
+ 5. "Close All" button dismisses all editors at once
97
+ 6. Frame automatically resizes back when all editors are closed
98
+
99
+ ### Layout Details
100
+ - **Container**: Flexbox with horizontal scrolling when multiple editors overflow
101
+ - **Editor Width**: Min 300px, max 500px, flexible between
102
+ - **Scrollbar**: Custom styled thin scrollbar for horizontal overflow
103
+ - **Header Bar**: Fixed top bar with "Property Editors" title and "Close All" button
104
+
3
105
  ## Properties Panel Element Detection Issue (Fixed)
4
106
 
5
107
  ### Problem
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-wcctools',
6
- version: '1.0.101',
6
+ version: '1.1.0',
7
7
  description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
8
8
  }
@@ -29,6 +29,9 @@ export class WccDashboard extends DeesElement {
29
29
  @property()
30
30
  public selectedTheme: TTheme = 'dark';
31
31
 
32
+ @property()
33
+ public isFullscreen: boolean = false;
34
+
32
35
  @property()
33
36
  public pages: { [key: string]: () => TemplateResult } = {};
34
37
 
@@ -76,6 +79,7 @@ export class WccDashboard extends DeesElement {
76
79
  <wcc-sidebar
77
80
  .dashboardRef=${this}
78
81
  .selectedItem=${this.selectedItem}
82
+ .isFullscreen=${this.isFullscreen}
79
83
  @selectedType=${(eventArg) => {
80
84
  this.selectedType = eventArg.detail;
81
85
  }}
@@ -92,6 +96,7 @@ export class WccDashboard extends DeesElement {
92
96
  .selectedItem=${this.selectedItem}
93
97
  .selectedViewport=${this.selectedViewport}
94
98
  .selectedTheme=${this.selectedTheme}
99
+ .isFullscreen=${this.isFullscreen}
95
100
  @selectedViewport=${(eventArg) => {
96
101
  this.selectedViewport = eventArg.detail;
97
102
  this.scheduleUpdate();
@@ -99,8 +104,18 @@ export class WccDashboard extends DeesElement {
99
104
  @selectedTheme=${(eventArg) => {
100
105
  this.selectedTheme = eventArg.detail;
101
106
  }}
107
+ @editorStateChanged=${async (eventArg) => {
108
+ const frame = await this.wccFrame;
109
+ if (frame) {
110
+ frame.advancedEditorOpen = eventArg.detail.isOpen;
111
+ frame.requestUpdate();
112
+ }
113
+ }}
114
+ @toggleFullscreen=${() => {
115
+ this.toggleFullscreen();
116
+ }}
102
117
  ></wcc-properties>
103
- <wcc-frame id="wccFrame" viewport=${this.selectedViewport}>
118
+ <wcc-frame id="wccFrame" viewport=${this.selectedViewport} .isFullscreen=${this.isFullscreen}>
104
119
  </wcc-frame>
105
120
  `;
106
121
  }
@@ -115,9 +130,20 @@ export class WccDashboard extends DeesElement {
115
130
  }
116
131
  }
117
132
 
133
+ public toggleFullscreen() {
134
+ this.isFullscreen = !this.isFullscreen;
135
+ }
136
+
118
137
  public async firstUpdated() {
119
138
  this.domtools = await plugins.deesDomtools.DomTools.setupDomTools();
120
139
 
140
+ // Add ESC key handler for fullscreen mode
141
+ document.addEventListener('keydown', (event) => {
142
+ if (event.key === 'Escape' && this.isFullscreen) {
143
+ this.isFullscreen = false;
144
+ }
145
+ });
146
+
121
147
  // Set up scroll listeners after DOM is ready
122
148
  setTimeout(() => {
123
149
  this.setupScrollListeners();
@@ -13,6 +13,12 @@ export class WccFrame extends DeesElement {
13
13
  @property()
14
14
  public viewport: string;
15
15
 
16
+ @property({ type: Boolean })
17
+ public advancedEditorOpen: boolean = false;
18
+
19
+ @property({ type: Boolean })
20
+ public isFullscreen: boolean = false;
21
+
16
22
  public static styles = [
17
23
  css`
18
24
  :host {
@@ -22,7 +28,6 @@ export class WccFrame extends DeesElement {
22
28
  left: 200px;
23
29
  right: 0px;
24
30
  top: 0px;
25
- bottom: 100px;
26
31
  overflow-y: auto;
27
32
  overflow-x: auto;
28
33
  overscroll-behavior: contain;
@@ -41,7 +46,19 @@ export class WccFrame extends DeesElement {
41
46
  return html`
42
47
  <style>
43
48
  :host {
44
- ${(() => {
49
+ ${this.isFullscreen ? `
50
+ border: none !important;
51
+ left: 0px !important;
52
+ right: 0px !important;
53
+ top: 0px !important;
54
+ bottom: 0px !important;
55
+ ` : `
56
+ bottom: ${this.advancedEditorOpen ? '400px' : '100px'};
57
+ border: 10px solid #ffaeaf;
58
+ left: 200px;
59
+ `}
60
+ transition: all 0.3s ease;
61
+ ${this.isFullscreen ? 'padding: 0px;' : (() => {
45
62
  switch (this.viewport) {
46
63
  case 'desktop':
47
64
  return `
@@ -70,7 +87,7 @@ export class WccFrame extends DeesElement {
70
87
  }
71
88
 
72
89
  .viewport {
73
- ${this.viewport !== 'desktop'
90
+ ${!this.isFullscreen && this.viewport !== 'desktop'
74
91
  ? html` border-right: 1px dotted #444; border-left: 1px dotted #444; `
75
92
  : html``
76
93
  }