@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.
@@ -42883,11 +42883,28 @@ var cssManager = new CssManager();
42883
42883
 
42884
42884
  // ts_web/elements/wcc-frame.ts
42885
42885
  var WccFrame = class extends DeesElement {
42886
+ constructor() {
42887
+ super(...arguments);
42888
+ this.advancedEditorOpen = false;
42889
+ this.isFullscreen = false;
42890
+ }
42886
42891
  render() {
42887
42892
  return x`
42888
42893
  <style>
42889
42894
  :host {
42890
- ${(() => {
42895
+ ${this.isFullscreen ? `
42896
+ border: none !important;
42897
+ left: 0px !important;
42898
+ right: 0px !important;
42899
+ top: 0px !important;
42900
+ bottom: 0px !important;
42901
+ ` : `
42902
+ bottom: ${this.advancedEditorOpen ? "400px" : "100px"};
42903
+ border: 10px solid #ffaeaf;
42904
+ left: 200px;
42905
+ `}
42906
+ transition: all 0.3s ease;
42907
+ ${this.isFullscreen ? "padding: 0px;" : (() => {
42891
42908
  switch (this.viewport) {
42892
42909
  case "desktop":
42893
42910
  return `
@@ -42910,7 +42927,7 @@ var WccFrame = class extends DeesElement {
42910
42927
  }
42911
42928
 
42912
42929
  .viewport {
42913
- ${this.viewport !== "desktop" ? x` border-right: 1px dotted #444; border-left: 1px dotted #444; ` : x``}
42930
+ ${!this.isFullscreen && this.viewport !== "desktop" ? x` border-right: 1px dotted #444; border-left: 1px dotted #444; ` : x``}
42914
42931
  background:
42915
42932
  ${this.goBright ? `
42916
42933
  radial-gradient(#CCCCCC 3px, transparent 4px),
@@ -42956,7 +42973,6 @@ WccFrame.styles = [
42956
42973
  left: 200px;
42957
42974
  right: 0px;
42958
42975
  top: 0px;
42959
- bottom: 100px;
42960
42976
  overflow-y: auto;
42961
42977
  overflow-x: auto;
42962
42978
  overscroll-behavior: contain;
@@ -42973,39 +42989,86 @@ WccFrame.styles = [
42973
42989
  __decorateClass([
42974
42990
  n4()
42975
42991
  ], WccFrame.prototype, "viewport", 2);
42992
+ __decorateClass([
42993
+ n4({ type: Boolean })
42994
+ ], WccFrame.prototype, "advancedEditorOpen", 2);
42995
+ __decorateClass([
42996
+ n4({ type: Boolean })
42997
+ ], WccFrame.prototype, "isFullscreen", 2);
42976
42998
  WccFrame = __decorateClass([
42977
42999
  t4("wcc-frame")
42978
43000
  ], WccFrame);
42979
43001
 
42980
43002
  // ts_web/elements/wcc-sidebar.ts
42981
43003
  var WccSidebar = class extends DeesElement {
43004
+ constructor() {
43005
+ super(...arguments);
43006
+ this.isFullscreen = false;
43007
+ }
42982
43008
  render() {
42983
43009
  return x`
42984
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
43010
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet" />
42985
43011
  <style>
42986
43012
  :host {
42987
- display: block;
42988
- border-right: 1px solid #999;
42989
- font-family: 'Roboto', 'Inter', sans-serif;
42990
- font-size: 12px;
43013
+ /* CSS Variables - Always dark theme to match wcc-properties */
43014
+ --background: #0a0a0a;
43015
+ --foreground: #e5e5e5;
43016
+ --card: #0f0f0f;
43017
+ --card-foreground: #f0f0f0;
43018
+ --muted: #1a1a1a;
43019
+ --muted-foreground: #666;
43020
+ --accent: #222;
43021
+ --accent-foreground: #fff;
43022
+ --border: rgba(255, 255, 255, 0.06);
43023
+ --input: #141414;
43024
+ --primary: #3b82f6;
43025
+ --primary-foreground: #fff;
43026
+ --ring: #3b82f6;
43027
+ --radius: 4px;
43028
+
43029
+ display: ${this.isFullscreen ? "none" : "block"};
43030
+ border-right: 1px solid rgba(255, 255, 255, 0.08);
43031
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
43032
+ font-size: 14px;
42991
43033
  box-sizing: border-box;
42992
43034
  position: absolute;
42993
43035
  left: 0px;
42994
43036
  width: 200px;
42995
43037
  top: 0px;
42996
43038
  bottom: 0px;
42997
- overflow-y: scroll;
43039
+ overflow-y: auto;
42998
43040
  overflow-x: hidden;
42999
- background: #222;
43000
- color: #fff;
43001
- padding: 5px;
43041
+ background: var(--background);
43042
+ color: var(--foreground);
43043
+ }
43044
+
43045
+ .menu {
43046
+ padding: 0.5rem 0;
43047
+ }
43048
+
43049
+ h3 {
43050
+ padding: 0.3rem 0.75rem;
43051
+ font-size: 0.65rem;
43052
+ font-weight: 500;
43053
+ text-transform: uppercase;
43054
+ letter-spacing: 0.08em;
43055
+ color: #888;
43056
+ margin: 0;
43057
+ margin-top: 0.5rem;
43058
+ background: rgba(59, 130, 246, 0.03);
43059
+ border-bottom: 1px solid var(--border);
43060
+ border-top: 1px solid var(--border);
43061
+ }
43062
+
43063
+ h3:first-child {
43064
+ margin-top: 0;
43002
43065
  }
43003
43066
 
43004
43067
  .material-symbols-outlined {
43005
43068
  font-family: 'Material Symbols Outlined';
43006
43069
  font-weight: normal;
43007
43070
  font-style: normal;
43008
- font-size: 24px; /* Preferred icon size */
43071
+ font-size: 16px;
43009
43072
  display: inline-block;
43010
43073
  line-height: 1;
43011
43074
  text-transform: none;
@@ -43013,51 +43076,75 @@ var WccSidebar = class extends DeesElement {
43013
43076
  word-wrap: normal;
43014
43077
  white-space: nowrap;
43015
43078
  direction: ltr;
43016
- font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
43079
+ font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
43080
+ opacity: 0.5;
43017
43081
  }
43018
43082
 
43019
43083
  .selectOption {
43020
43084
  user-select: none;
43021
43085
  position: relative;
43022
- line-height: 24px;
43023
- padding: 5px;
43024
- transition: all 0.2s;
43086
+ margin: 0.125rem 0.5rem;
43087
+ padding: 0.5rem 0.75rem;
43088
+ transition: all 0.15s ease;
43025
43089
  display: grid;
43026
- grid-template-columns: 28px auto;
43090
+ grid-template-columns: 20px 1fr;
43091
+ align-items: center;
43092
+ gap: 0.5rem;
43093
+ border-radius: var(--radius);
43094
+ cursor: pointer;
43095
+ font-size: 0.75rem;
43096
+ color: #999;
43097
+ background: transparent;
43027
43098
  }
43099
+
43028
43100
  .selectOption:hover {
43029
- padding: 5px;
43030
- color: #333;
43031
- background: #fff;
43101
+ background: rgba(59, 130, 246, 0.05);
43102
+ color: #bbb;
43103
+ }
43104
+
43105
+ .selectOption:hover .material-symbols-outlined {
43106
+ opacity: 0.7;
43032
43107
  }
43033
43108
 
43034
43109
  .selectOption.selected {
43035
- background: #455A64;;
43110
+ background: rgba(59, 130, 246, 0.15);
43111
+ color: var(--primary);
43112
+ }
43113
+
43114
+ .selectOption.selected .material-symbols-outlined {
43115
+ opacity: 1;
43116
+ font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
43036
43117
  }
43037
43118
 
43038
43119
  .selectOption.selected:hover {
43039
- color: #ffffff;
43040
- background: #455A64;
43120
+ background: rgba(59, 130, 246, 0.2);
43121
+ color: var(--primary);
43041
43122
  }
43042
43123
 
43043
- .selectOption .material-symbols-outlined {
43044
- color: #666;
43124
+ .selectOption .text {
43045
43125
  display: block;
43046
- transition: all 0.2s;
43126
+ overflow: hidden;
43127
+ text-overflow: ellipsis;
43128
+ white-space: nowrap;
43129
+ font-weight: 400;
43047
43130
  }
43048
43131
 
43049
- .selectOption.selected .material-symbols-outlined {
43050
- color: #000;
43132
+ ::-webkit-scrollbar {
43133
+ width: 8px;
43051
43134
  }
43052
43135
 
43053
- .selectOption .text {
43054
- display: block;
43055
- word-wrap: break-word;
43056
- word-break: break-all;
43057
- max-width: 100%;
43136
+ ::-webkit-scrollbar-track {
43137
+ background: transparent;
43058
43138
  }
43059
43139
 
43060
-
43140
+ ::-webkit-scrollbar-thumb {
43141
+ background: rgba(255, 255, 255, 0.1);
43142
+ border-radius: 4px;
43143
+ }
43144
+
43145
+ ::-webkit-scrollbar-thumb:hover {
43146
+ background: rgba(255, 255, 255, 0.2);
43147
+ }
43061
43148
  </style>
43062
43149
  <div class="menu">
43063
43150
  <h3>Pages</h3>
@@ -43134,6 +43221,9 @@ __decorateClass([
43134
43221
  __decorateClass([
43135
43222
  n4()
43136
43223
  ], WccSidebar.prototype, "dashboardRef", 2);
43224
+ __decorateClass([
43225
+ n4()
43226
+ ], WccSidebar.prototype, "isFullscreen", 2);
43137
43227
  WccSidebar = __decorateClass([
43138
43228
  t4("wcc-sidebar")
43139
43229
  ], WccSidebar);
@@ -43149,33 +43239,59 @@ var WccProperties = class extends DeesElement {
43149
43239
  this.selectedViewport = "native";
43150
43240
  this.selectedTheme = "dark";
43151
43241
  this.warning = null;
43242
+ this.isFullscreen = false;
43152
43243
  this.propertyContent = [];
43244
+ this.editingProperties = [];
43245
+ this.editorHeight = 300;
43153
43246
  }
43154
43247
  render() {
43155
43248
  return x`
43156
43249
  <style>
43157
43250
  :host {
43158
- font-family: 'Roboto', sans-serif;
43251
+ /* CSS Variables - Always dark theme */
43252
+ --background: #0a0a0a;
43253
+ --foreground: #e5e5e5;
43254
+ --card: #0f0f0f;
43255
+ --card-foreground: #f0f0f0;
43256
+ --muted: #1a1a1a;
43257
+ --muted-foreground: #666;
43258
+ --accent: #222;
43259
+ --accent-foreground: #fff;
43260
+ --border: rgba(255, 255, 255, 0.06);
43261
+ --input: #141414;
43262
+ --primary: #3b82f6;
43263
+ --primary-foreground: #fff;
43264
+ --ring: #3b82f6;
43265
+ --radius: 4px;
43266
+ --radius-sm: 2px;
43267
+ --radius-md: 4px;
43268
+ --radius-lg: 6px;
43269
+
43270
+ /* Base styles */
43271
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
43159
43272
  box-sizing: border-box;
43160
43273
  position: absolute;
43161
43274
  left: 200px;
43162
- height: 100px;
43275
+ height: ${this.editingProperties.length > 0 ? 100 + this.editorHeight : 100}px;
43163
43276
  bottom: 0px;
43164
43277
  right: 0px;
43165
43278
  overflow: hidden;
43166
- background: #111;
43167
- color: #fff;
43279
+ background: var(--background);
43280
+ color: var(--foreground);
43281
+ display: ${this.isFullscreen ? "none" : "block"};
43168
43282
  }
43169
43283
  .grid {
43170
43284
  display: grid;
43171
- grid-template-columns: auto 150px 300px 70px;
43285
+ grid-template-columns: 1fr 150px 300px 70px;
43286
+ height: 100%;
43172
43287
  }
43173
43288
  .properties {
43174
- border-right: 1px solid #999;
43175
- height: 100px;
43289
+ background: transparent;
43176
43290
  overflow-y: auto;
43177
43291
  display: grid;
43178
- grid-template-columns: 33% 33% 33%;
43292
+ grid-template-columns: repeat(3, 1fr);
43293
+ border-right: 1px solid var(--border);
43294
+ align-content: start;
43179
43295
  }
43180
43296
 
43181
43297
  .material-symbols-outlined {
@@ -43194,149 +43310,544 @@ var WccProperties = class extends DeesElement {
43194
43310
  }
43195
43311
 
43196
43312
  .properties .property {
43197
- padding: 5px;
43198
- background: #444;
43199
- border: 1px solid #000;
43313
+ padding: 0.4rem;
43314
+ background: transparent;
43315
+ border-right: 1px solid var(--border);
43316
+ border-bottom: 1px solid var(--border);
43317
+ transition: all 0.15s ease;
43318
+ }
43319
+
43320
+ .properties .property:hover {
43321
+ background: rgba(255, 255, 255, 0.02);
43322
+ }
43323
+
43324
+ .properties .property-label {
43325
+ font-size: 0.65rem;
43326
+ font-weight: 400;
43327
+ color: #888;
43328
+ margin-bottom: 0.2rem;
43329
+ text-transform: capitalize;
43330
+ white-space: nowrap;
43331
+ overflow: hidden;
43332
+ text-overflow: ellipsis;
43200
43333
  }
43201
43334
 
43202
- .properties input,
43335
+ .properties input[type="text"],
43336
+ .properties input[type="number"],
43203
43337
  .properties select {
43204
43338
  display: block;
43205
43339
  width: 100%;
43206
- background: #333;
43207
- border: none;
43208
- color: #fff;
43340
+ padding: 0.25rem 0.4rem;
43341
+ background: var(--input);
43342
+ border: 1px solid transparent;
43343
+ color: var(--foreground);
43344
+ border-radius: var(--radius-sm);
43345
+ font-size: 0.7rem;
43346
+ transition: all 0.15s ease;
43347
+ outline: none;
43348
+ }
43349
+
43350
+ .properties input[type="text"]:focus,
43351
+ .properties input[type="number"]:focus,
43352
+ .properties select:focus {
43353
+ border-color: var(--primary);
43354
+ background: rgba(59, 130, 246, 0.1);
43355
+ }
43356
+
43357
+ .properties input[type="checkbox"] {
43358
+ width: 1rem;
43359
+ height: 1rem;
43360
+ cursor: pointer;
43361
+ accent-color: var(--primary);
43362
+ }
43363
+
43364
+ .properties .editor-button {
43365
+ padding: 0.25rem 0.5rem;
43366
+ background: var(--input);
43367
+ border: 1px solid transparent;
43368
+ border-radius: var(--radius-sm);
43369
+ color: var(--foreground);
43370
+ font-size: 0.7rem;
43371
+ cursor: pointer;
43372
+ transition: all 0.15s ease;
43373
+ text-align: center;
43374
+ }
43375
+
43376
+ .properties .editor-button:hover {
43377
+ border-color: var(--primary);
43378
+ background: rgba(59, 130, 246, 0.1);
43209
43379
  }
43210
43380
 
43211
43381
  .viewportSelector,
43212
43382
  .themeSelector {
43213
43383
  user-select: none;
43214
- border-right: 1px solid #999;
43384
+ background: transparent;
43385
+ display: flex;
43386
+ flex-direction: column;
43387
+ border-right: 1px solid var(--border);
43215
43388
  }
43216
43389
  .selectorButtons2 {
43217
43390
  display: grid;
43218
- grid-template-columns: 50% 50%;
43391
+ grid-template-columns: 1fr 1fr;
43392
+ flex: 1;
43219
43393
  }
43220
43394
  .selectorButtons4 {
43221
43395
  display: grid;
43222
- grid-template-columns: 25% 25% 25% 25%;
43396
+ grid-template-columns: repeat(4, 1fr);
43397
+ flex: 1;
43223
43398
  }
43224
43399
  .button {
43225
- padding: 10px;
43400
+ display: flex;
43401
+ flex-direction: column;
43402
+ align-items: center;
43403
+ justify-content: center;
43404
+ padding: 0.5rem 0.25rem;
43226
43405
  text-align: center;
43227
- border: 1px solid #000;
43228
- transition: all 0.2s;
43406
+ background: transparent;
43407
+ border: 1px solid var(--border);
43408
+ transition: all 0.15s ease;
43409
+ cursor: pointer;
43410
+ font-size: 0.65rem;
43411
+ gap: 0.2rem;
43412
+ color: #999;
43229
43413
  }
43414
+
43230
43415
  .button:hover {
43231
- color: #333;
43232
- background: #fff;
43416
+ background: rgba(59, 130, 246, 0.05);
43417
+ color: #bbb;
43233
43418
  }
43234
43419
 
43235
43420
  .button.selected {
43236
- background: #455a64;
43421
+ background: rgba(59, 130, 246, 0.15);
43422
+ color: var(--primary);
43423
+ border-color: rgba(59, 130, 246, 0.3);
43237
43424
  }
43238
43425
 
43239
43426
  .button.selected:hover {
43240
- color: #ffffff;
43241
- background: #455a64;
43427
+ background: rgba(59, 130, 246, 0.2);
43428
+ }
43429
+
43430
+ .button .material-symbols-outlined {
43431
+ font-size: 18px;
43432
+ font-variation-settings: 'FILL' 0, 'wght' 300;
43433
+ }
43434
+
43435
+ .button.selected .material-symbols-outlined {
43436
+ font-variation-settings: 'FILL' 1, 'wght' 400;
43242
43437
  }
43243
43438
 
43244
43439
  .panelheading {
43245
- padding: 5px;
43246
- font-weight: bold;
43247
- background: #444;
43248
- border: 1px solid #000;
43440
+ padding: 0.3rem 0.5rem;
43441
+ font-weight: 500;
43442
+ font-size: 0.65rem;
43443
+ background: rgba(59, 130, 246, 0.03);
43444
+ border-bottom: 1px solid var(--border);
43445
+ color: #888;
43446
+ text-transform: uppercase;
43447
+ letter-spacing: 0.08em;
43249
43448
  }
43250
43449
  .docs {
43251
- text-align: center;
43252
- line-height: 100px;
43450
+ display: flex;
43451
+ align-items: center;
43452
+ justify-content: center;
43253
43453
  text-transform: uppercase;
43454
+ background: transparent;
43455
+ cursor: pointer;
43456
+ font-size: 0.65rem;
43457
+ font-weight: 500;
43458
+ letter-spacing: 0.08em;
43459
+ transition: all 0.15s ease;
43460
+ color: #666;
43254
43461
  }
43255
43462
 
43256
43463
  .docs:hover {
43257
- color: #333;
43258
- background: #fff;
43464
+ background: rgba(59, 130, 246, 0.05);
43465
+ color: #999;
43259
43466
  }
43260
43467
 
43261
43468
  .warning {
43262
43469
  position: absolute;
43263
- background: #222;
43264
- color: #CCC;
43265
- top: 0px;
43266
- bottom: 0px;
43267
- left: 0px;
43268
- right: 520px;
43269
- text-align: center;
43270
- padding: 35px;
43271
- font-size: 25px;
43470
+ background: rgba(20, 20, 20, 0.8);
43471
+ color: #888;
43472
+ top: 0.5rem;
43473
+ bottom: 0.5rem;
43474
+ left: 0.5rem;
43475
+ right: calc(520px + 0.5rem);
43476
+ display: flex;
43477
+ align-items: center;
43478
+ justify-content: center;
43479
+ padding: 1.5rem;
43480
+ font-size: 0.85rem;
43481
+ border-radius: var(--radius-md);
43482
+ border: 1px solid var(--border);
43483
+ backdrop-filter: blur(8px);
43484
+ }
43485
+
43486
+ .advanced-editor-container {
43487
+ position: absolute;
43488
+ left: 0;
43489
+ right: 0;
43490
+ top: 0;
43491
+ height: ${this.editorHeight}px;
43492
+ background: #050505;
43493
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
43494
+ display: flex;
43495
+ flex-direction: column;
43496
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
43497
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
43498
+ }
43499
+
43500
+ .editor-header-bar {
43501
+ padding: 0.5rem 0.75rem;
43502
+ background: transparent;
43503
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
43504
+ display: flex;
43505
+ justify-content: space-between;
43506
+ align-items: center;
43507
+ height: 36px;
43508
+ }
43509
+
43510
+ .editor-header-title {
43511
+ font-size: 0.7rem;
43512
+ font-weight: 500;
43513
+ color: #666;
43514
+ text-transform: uppercase;
43515
+ letter-spacing: 0.08em;
43516
+ }
43517
+
43518
+ .editor-close-all {
43519
+ padding: 0.25rem 0.5rem;
43520
+ background: transparent;
43521
+ border: 1px solid rgba(255, 255, 255, 0.08);
43522
+ border-radius: var(--radius-sm);
43523
+ color: #999;
43524
+ font-size: 0.65rem;
43525
+ font-weight: 500;
43526
+ cursor: pointer;
43527
+ transition: all 0.15s ease;
43528
+ }
43529
+
43530
+ .editor-close-all:hover {
43531
+ background: rgba(255, 255, 255, 0.05);
43532
+ border-color: rgba(255, 255, 255, 0.12);
43533
+ color: #f87171;
43534
+ }
43535
+
43536
+ .editors-container {
43537
+ flex: 1;
43538
+ display: flex;
43539
+ overflow-x: auto;
43540
+ overflow-y: hidden;
43541
+ gap: 0;
43542
+ background: rgba(255, 255, 255, 0.02);
43543
+ padding: 0.75rem;
43544
+ }
43545
+
43546
+ .editors-container::-webkit-scrollbar {
43547
+ height: 8px;
43548
+ }
43549
+
43550
+ .editors-container::-webkit-scrollbar-track {
43551
+ background: rgba(255, 255, 255, 0.02);
43552
+ border-radius: 4px;
43553
+ }
43554
+
43555
+ .editors-container::-webkit-scrollbar-thumb {
43556
+ background: rgba(255, 255, 255, 0.08);
43557
+ border-radius: 4px;
43558
+ }
43559
+
43560
+ .editors-container::-webkit-scrollbar-thumb:hover {
43561
+ background: rgba(255, 255, 255, 0.12);
43562
+ }
43563
+
43564
+ .editor-instance {
43565
+ min-width: 320px;
43566
+ flex: 1;
43567
+ max-width: 480px;
43568
+ background: rgba(10, 10, 10, 0.6);
43569
+ display: flex;
43570
+ flex-direction: column;
43571
+ border-radius: var(--radius);
43572
+ overflow: hidden;
43573
+ margin-right: 0.75rem;
43574
+ border: 1px solid rgba(255, 255, 255, 0.06);
43575
+ transition: all 0.2s ease;
43576
+ }
43577
+
43578
+ .editor-instance:hover {
43579
+ border-color: rgba(255, 255, 255, 0.1);
43580
+ }
43581
+
43582
+ .editor-instance:last-child {
43583
+ margin-right: 0;
43584
+ }
43585
+
43586
+ .editor-header {
43587
+ padding: 0.5rem 0.75rem;
43588
+ background: rgba(255, 255, 255, 0.02);
43589
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
43590
+ display: flex;
43591
+ justify-content: space-between;
43592
+ align-items: center;
43593
+ height: 36px;
43594
+ }
43595
+
43596
+ .editor-title {
43597
+ font-size: 0.75rem;
43598
+ font-weight: 500;
43599
+ color: #999;
43600
+ overflow: hidden;
43601
+ text-overflow: ellipsis;
43602
+ white-space: nowrap;
43603
+ font-family: 'Consolas', 'Monaco', monospace;
43604
+ }
43605
+
43606
+ .editor-actions {
43607
+ display: flex;
43608
+ gap: 0.25rem;
43609
+ }
43610
+
43611
+ .editor-button {
43612
+ width: 24px;
43613
+ height: 24px;
43614
+ padding: 0;
43615
+ background: transparent;
43616
+ border: none;
43617
+ color: #666;
43618
+ font-size: 1rem;
43619
+ cursor: pointer;
43620
+ transition: all 0.15s ease;
43621
+ border-radius: var(--radius-sm);
43622
+ display: flex;
43623
+ align-items: center;
43624
+ justify-content: center;
43625
+ }
43626
+
43627
+ .editor-button:hover {
43628
+ background: rgba(255, 255, 255, 0.05);
43629
+ color: #999;
43630
+ }
43631
+
43632
+ .editor-button.primary {
43633
+ color: #4ade80;
43634
+ }
43635
+
43636
+ .editor-button.primary:hover {
43637
+ background: rgba(74, 222, 128, 0.1);
43638
+ }
43639
+
43640
+ .editor-content {
43641
+ flex: 1;
43642
+ display: flex;
43643
+ flex-direction: column;
43644
+ overflow: hidden;
43645
+ min-height: 0;
43646
+ position: relative;
43647
+ }
43648
+
43649
+ .editor-textarea {
43650
+ width: 100%;
43651
+ height: 100%;
43652
+ background: transparent;
43653
+ border: none;
43654
+ color: #d0d0d0;
43655
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
43656
+ font-size: 0.8125rem;
43657
+ line-height: 1.6;
43658
+ padding: 0.75rem;
43659
+ resize: none;
43660
+ outline: none;
43661
+ transition: all 0.15s ease;
43662
+ overflow: auto;
43663
+ }
43664
+
43665
+ .editor-textarea:focus {
43666
+ background: rgba(255, 255, 255, 0.01);
43667
+ }
43668
+
43669
+ .editor-textarea::selection {
43670
+ background: rgba(59, 130, 246, 0.3);
43671
+ }
43672
+
43673
+ .editor-error {
43674
+ position: absolute;
43675
+ bottom: 0;
43676
+ left: 0;
43677
+ right: 0;
43678
+ padding: 0.5rem 0.75rem;
43679
+ background: rgba(239, 68, 68, 0.9);
43680
+ backdrop-filter: blur(4px);
43681
+ color: #fff;
43682
+ font-size: 0.7rem;
43683
+ font-weight: 500;
43684
+ display: flex;
43685
+ align-items: center;
43686
+ gap: 0.375rem;
43687
+ border-top: 1px solid rgba(239, 68, 68, 0.5);
43688
+ }
43689
+
43690
+ .editor-error::before {
43691
+ content: '!';
43692
+ display: inline-flex;
43693
+ width: 16px;
43694
+ height: 16px;
43695
+ align-items: center;
43696
+ justify-content: center;
43697
+ background: rgba(255, 255, 255, 0.2);
43698
+ border-radius: 50%;
43699
+ font-size: 0.65rem;
43700
+ font-weight: bold;
43701
+ }
43702
+
43703
+ .main-content {
43704
+ position: absolute;
43705
+ left: 0;
43706
+ right: 0;
43707
+ bottom: 0;
43708
+ height: 100px;
43272
43709
  }
43273
43710
  </style>
43274
- <div class="grid">
43275
- <div class="properties">
43276
- <div class="panelheading">Properties</div>
43277
- ${this.propertyContent}
43711
+ ${this.editingProperties.length > 0 ? x`
43712
+ <div class="advanced-editor-container">
43713
+ <div class="editor-header-bar">
43714
+ <div class="editor-header-title">Property Editors</div>
43715
+ <button class="editor-close-all" @click=${this.closeAllEditors}>
43716
+ Close All
43717
+ </button>
43718
+ </div>
43719
+ <div class="editors-container">
43720
+ ${this.editingProperties.length === 0 ? x`
43721
+ <div style="
43722
+ flex: 1;
43723
+ display: flex;
43724
+ align-items: center;
43725
+ justify-content: center;
43726
+ color: #666;
43727
+ font-size: 0.875rem;
43728
+ text-align: center;
43729
+ padding: 2rem;
43730
+ ">
43731
+ <div>
43732
+ <div style="margin-bottom: 0.5rem; font-size: 1.5rem; opacity: 0.5;">{ }</div>
43733
+ <div>No properties being edited</div>
43734
+ <div style="font-size: 0.75rem; margin-top: 0.25rem; opacity: 0.7;">Click "Edit Object/Array" buttons to start editing</div>
43735
+ </div>
43736
+ </div>
43737
+ ` : null}
43738
+ ${this.editingProperties.map((prop) => x`
43739
+ <div class="editor-instance">
43740
+ <div class="editor-header">
43741
+ <div class="editor-title">${prop.name}</div>
43742
+ <div class="editor-actions">
43743
+ <button class="editor-button" @click=${() => this.handleEditorCancel(prop.id)}>✕</button>
43744
+ <button class="editor-button primary" @click=${() => this.handleEditorSave(prop.id)}>✓</button>
43745
+ </div>
43746
+ </div>
43747
+ <div class="editor-content">
43748
+ <textarea
43749
+ class="editor-textarea"
43750
+ .value=${prop.editorValue}
43751
+ @input=${(e8) => {
43752
+ const editor = this.editingProperties.find((p5) => p5.id === prop.id);
43753
+ if (editor) {
43754
+ editor.editorValue = e8.target.value;
43755
+ editor.editorError = "";
43756
+ this.requestUpdate();
43757
+ }
43758
+ }}
43759
+ @keydown=${(e8) => {
43760
+ if (e8.key === "Tab") {
43761
+ e8.preventDefault();
43762
+ const target = e8.target;
43763
+ const start = target.selectionStart;
43764
+ const end = target.selectionEnd;
43765
+ const value2 = target.value;
43766
+ target.value = value2.substring(0, start) + " " + value2.substring(end);
43767
+ target.selectionStart = target.selectionEnd = start + 2;
43768
+ }
43769
+ }}
43770
+ ></textarea>
43771
+ ${prop.editorError ? x`
43772
+ <div class="editor-error">${prop.editorError}</div>
43773
+ ` : null}
43774
+ </div>
43775
+ </div>
43776
+ `)}
43777
+ </div>
43278
43778
  </div>
43279
- <div class="themeSelector">
43280
- <div class="panelheading">Theme</div>
43281
- <div class="selectorButtons2">
43282
- <div
43283
- class="button ${this.selectedTheme === "dark" ? "selected" : null}"
43284
- @click=${() => {
43779
+ ` : null}
43780
+ <div class="main-content">
43781
+ <div class="grid">
43782
+ <div class="properties">
43783
+ ${this.propertyContent}
43784
+ </div>
43785
+ <div class="themeSelector">
43786
+ <div class="panelheading">Theme</div>
43787
+ <div class="selectorButtons2">
43788
+ <div
43789
+ class="button ${this.selectedTheme === "dark" ? "selected" : null}"
43790
+ @click=${() => {
43285
43791
  this.selectTheme("dark");
43286
43792
  }}
43287
- >
43288
- Dark<br /><i class="material-symbols-outlined">brightness_3</i>
43289
- </div>
43290
- <div
43291
- class="button ${this.selectedTheme === "bright" ? "selected" : null}"
43292
- @click=${() => {
43793
+ >
43794
+ Dark<i class="material-symbols-outlined">brightness_3</i>
43795
+ </div>
43796
+ <div
43797
+ class="button ${this.selectedTheme === "bright" ? "selected" : null}"
43798
+ @click=${() => {
43293
43799
  this.selectTheme("bright");
43294
43800
  }}
43295
- >
43296
- Bright<br /><i class="material-symbols-outlined">flare</i>
43801
+ >
43802
+ Bright<i class="material-symbols-outlined">flare</i>
43803
+ </div>
43297
43804
  </div>
43298
43805
  </div>
43299
- </div>
43300
- <div class="viewportSelector">
43301
- <div class="panelheading">Viewport</div>
43302
- <div class="selectorButtons4">
43303
- <div
43304
- class="button ${this.selectedViewport === "phone" ? "selected" : null}"
43305
- @click=${() => {
43806
+ <div class="viewportSelector">
43807
+ <div class="panelheading">Viewport</div>
43808
+ <div class="selectorButtons4">
43809
+ <div
43810
+ class="button ${this.selectedViewport === "phone" ? "selected" : null}"
43811
+ @click=${() => {
43306
43812
  this.selectViewport("phone");
43307
43813
  }}
43308
- >
43309
- Phone<br /><i class="material-symbols-outlined">smartphone</i>
43310
- </div>
43311
- <div
43312
- class="button ${this.selectedViewport === "phablet" ? "selected" : null}"
43313
- @click=${() => {
43814
+ >
43815
+ Phone<i class="material-symbols-outlined">smartphone</i>
43816
+ </div>
43817
+ <div
43818
+ class="button ${this.selectedViewport === "phablet" ? "selected" : null}"
43819
+ @click=${() => {
43314
43820
  this.selectViewport("phablet");
43315
43821
  }}
43316
- >
43317
- Phablet<br /><i class="material-symbols-outlined">smartphone</i>
43318
- </div>
43319
- <div
43320
- class="button ${this.selectedViewport === "tablet" ? "selected" : null}"
43321
- @click=${() => {
43822
+ >
43823
+ Phablet<i class="material-symbols-outlined">smartphone</i>
43824
+ </div>
43825
+ <div
43826
+ class="button ${this.selectedViewport === "tablet" ? "selected" : null}"
43827
+ @click=${() => {
43322
43828
  this.selectViewport("tablet");
43323
43829
  }}
43324
- >
43325
- Tablet<br /><i class="material-symbols-outlined">tablet</i>
43326
- </div>
43327
- <div
43328
- class="button ${this.selectedViewport === "desktop" || this.selectedViewport === "native" ? "selected" : null}"
43329
- @click=${() => {
43830
+ >
43831
+ Tablet<i class="material-symbols-outlined">tablet</i>
43832
+ </div>
43833
+ <div
43834
+ class="button ${this.selectedViewport === "desktop" || this.selectedViewport === "native" ? "selected" : null}"
43835
+ @click=${() => {
43330
43836
  this.selectViewport("native");
43331
43837
  }}
43332
- >
43333
- Desktop<br /><i class="material-symbols-outlined">desktop_windows</i>
43838
+ >
43839
+ Desktop<i class="material-symbols-outlined">desktop_windows</i>
43840
+ </div>
43334
43841
  </div>
43335
43842
  </div>
43843
+ <div class="docs" @click=${() => this.toggleFullscreen()}>
43844
+ <i class="material-symbols-outlined" style="font-size: 20px;">
43845
+ ${this.isFullscreen ? "fullscreen_exit" : "fullscreen"}
43846
+ </i>
43847
+ </div>
43336
43848
  </div>
43337
- <div class="docs">Docs</div>
43849
+ ${this.warning ? x`<div class="warning">${this.warning}</div>` : null}
43338
43850
  </div>
43339
- ${this.warning ? x`<div class="warning">${this.warning}</div>` : null}
43340
43851
  `;
43341
43852
  }
43342
43853
  async findElementRecursively(container, elementClass, maxDepth = 5) {
@@ -43447,7 +43958,7 @@ var WccProperties = class extends DeesElement {
43447
43958
  propertyArray.push(
43448
43959
  x`
43449
43960
  <div class="property">
43450
- ${key2} / ${propertyTypeString}<br />
43961
+ <div class="property-label">${key2} (${propertyTypeString})</div>
43451
43962
  ${(() => {
43452
43963
  switch (propertyTypeString) {
43453
43964
  case "Boolean":
@@ -43492,6 +44003,17 @@ var WccProperties = class extends DeesElement {
43492
44003
  `;
43493
44004
  })}
43494
44005
  </select>`;
44006
+ case "Object":
44007
+ case "Array":
44008
+ return x`<button
44009
+ class="editor-button"
44010
+ style="width: 100%; margin-top: 0.25rem;"
44011
+ @click="${() => this.openAdvancedEditor(key2, firstFoundInstantiatedElement[key2], firstFoundInstantiatedElement)}"
44012
+ >
44013
+ Edit ${propertyTypeString}
44014
+ </button>`;
44015
+ default:
44016
+ return x`<div style="color: #666; font-size: 0.7rem;">Unsupported type</div>`;
43495
44017
  }
43496
44018
  })()}
43497
44019
  </div>
@@ -43537,6 +44059,80 @@ var WccProperties = class extends DeesElement {
43537
44059
  );
43538
44060
  this.dashboardRef.buildUrl();
43539
44061
  }
44062
+ openAdvancedEditor(propertyName, value2, element4) {
44063
+ const existingEditor = this.editingProperties.find((p5) => p5.name === propertyName && p5.element === element4);
44064
+ if (existingEditor) {
44065
+ return;
44066
+ }
44067
+ const newEditor = {
44068
+ id: `${propertyName}-${Date.now()}`,
44069
+ name: propertyName,
44070
+ value: value2,
44071
+ element: element4,
44072
+ editorValue: JSON.stringify(value2, null, 2),
44073
+ editorError: ""
44074
+ };
44075
+ this.editingProperties = [...this.editingProperties, newEditor];
44076
+ if (this.editingProperties.length === 1) {
44077
+ this.dispatchEvent(
44078
+ new CustomEvent("editorStateChanged", {
44079
+ detail: { isOpen: true },
44080
+ bubbles: true
44081
+ })
44082
+ );
44083
+ }
44084
+ }
44085
+ handleEditorSave(editorId) {
44086
+ const editor = this.editingProperties.find((p5) => p5.id === editorId);
44087
+ if (!editor) return;
44088
+ try {
44089
+ const parsedValue = JSON.parse(editor.editorValue);
44090
+ editor.element[editor.name] = parsedValue;
44091
+ this.editingProperties = this.editingProperties.filter((p5) => p5.id !== editorId);
44092
+ if (this.editingProperties.length === 0) {
44093
+ this.dispatchEvent(
44094
+ new CustomEvent("editorStateChanged", {
44095
+ detail: { isOpen: false },
44096
+ bubbles: true
44097
+ })
44098
+ );
44099
+ }
44100
+ this.createProperties();
44101
+ } catch (error) {
44102
+ const editorIndex = this.editingProperties.findIndex((p5) => p5.id === editorId);
44103
+ if (editorIndex !== -1) {
44104
+ this.editingProperties[editorIndex].editorError = `Invalid JSON: ${error.message}`;
44105
+ this.requestUpdate();
44106
+ }
44107
+ }
44108
+ }
44109
+ handleEditorCancel(editorId) {
44110
+ this.editingProperties = this.editingProperties.filter((p5) => p5.id !== editorId);
44111
+ if (this.editingProperties.length === 0) {
44112
+ this.dispatchEvent(
44113
+ new CustomEvent("editorStateChanged", {
44114
+ detail: { isOpen: false },
44115
+ bubbles: true
44116
+ })
44117
+ );
44118
+ }
44119
+ }
44120
+ closeAllEditors() {
44121
+ this.editingProperties = [];
44122
+ this.dispatchEvent(
44123
+ new CustomEvent("editorStateChanged", {
44124
+ detail: { isOpen: false },
44125
+ bubbles: true
44126
+ })
44127
+ );
44128
+ }
44129
+ toggleFullscreen() {
44130
+ this.dispatchEvent(
44131
+ new CustomEvent("toggleFullscreen", {
44132
+ bubbles: true
44133
+ })
44134
+ );
44135
+ }
43540
44136
  };
43541
44137
  __decorateClass([
43542
44138
  n4({
@@ -43555,9 +44151,15 @@ __decorateClass([
43555
44151
  __decorateClass([
43556
44152
  n4()
43557
44153
  ], WccProperties.prototype, "warning", 2);
44154
+ __decorateClass([
44155
+ n4()
44156
+ ], WccProperties.prototype, "isFullscreen", 2);
43558
44157
  __decorateClass([
43559
44158
  r5()
43560
44159
  ], WccProperties.prototype, "propertyContent", 2);
44160
+ __decorateClass([
44161
+ r5()
44162
+ ], WccProperties.prototype, "editingProperties", 2);
43561
44163
  WccProperties = __decorateClass([
43562
44164
  t4("wcc-properties")
43563
44165
  ], WccProperties);
@@ -43568,6 +44170,7 @@ var WccDashboard2 = class extends DeesElement {
43568
44170
  super();
43569
44171
  this.selectedViewport = "desktop";
43570
44172
  this.selectedTheme = "dark";
44173
+ this.isFullscreen = false;
43571
44174
  this.pages = {};
43572
44175
  this.elements = {};
43573
44176
  this.warning = null;
@@ -43599,6 +44202,7 @@ var WccDashboard2 = class extends DeesElement {
43599
44202
  <wcc-sidebar
43600
44203
  .dashboardRef=${this}
43601
44204
  .selectedItem=${this.selectedItem}
44205
+ .isFullscreen=${this.isFullscreen}
43602
44206
  @selectedType=${(eventArg) => {
43603
44207
  this.selectedType = eventArg.detail;
43604
44208
  }}
@@ -43615,15 +44219,26 @@ var WccDashboard2 = class extends DeesElement {
43615
44219
  .selectedItem=${this.selectedItem}
43616
44220
  .selectedViewport=${this.selectedViewport}
43617
44221
  .selectedTheme=${this.selectedTheme}
44222
+ .isFullscreen=${this.isFullscreen}
43618
44223
  @selectedViewport=${(eventArg) => {
43619
44224
  this.selectedViewport = eventArg.detail;
43620
44225
  this.scheduleUpdate();
43621
44226
  }}
43622
44227
  @selectedTheme=${(eventArg) => {
43623
44228
  this.selectedTheme = eventArg.detail;
44229
+ }}
44230
+ @editorStateChanged=${async (eventArg) => {
44231
+ const frame = await this.wccFrame;
44232
+ if (frame) {
44233
+ frame.advancedEditorOpen = eventArg.detail.isOpen;
44234
+ frame.requestUpdate();
44235
+ }
44236
+ }}
44237
+ @toggleFullscreen=${() => {
44238
+ this.toggleFullscreen();
43624
44239
  }}
43625
44240
  ></wcc-properties>
43626
- <wcc-frame id="wccFrame" viewport=${this.selectedViewport}>
44241
+ <wcc-frame id="wccFrame" viewport=${this.selectedViewport} .isFullscreen=${this.isFullscreen}>
43627
44242
  </wcc-frame>
43628
44243
  `;
43629
44244
  }
@@ -43636,8 +44251,16 @@ var WccDashboard2 = class extends DeesElement {
43636
44251
  }, 0);
43637
44252
  }
43638
44253
  }
44254
+ toggleFullscreen() {
44255
+ this.isFullscreen = !this.isFullscreen;
44256
+ }
43639
44257
  async firstUpdated() {
43640
44258
  this.domtools = await dist_ts_exports27.DomTools.setupDomTools();
44259
+ document.addEventListener("keydown", (event) => {
44260
+ if (event.key === "Escape" && this.isFullscreen) {
44261
+ this.isFullscreen = false;
44262
+ }
44263
+ });
43641
44264
  setTimeout(() => {
43642
44265
  this.setupScrollListeners();
43643
44266
  }, 500);
@@ -43790,6 +44413,9 @@ __decorateClass([
43790
44413
  __decorateClass([
43791
44414
  n4()
43792
44415
  ], WccDashboard2.prototype, "selectedTheme", 2);
44416
+ __decorateClass([
44417
+ n4()
44418
+ ], WccDashboard2.prototype, "isFullscreen", 2);
43793
44419
  __decorateClass([
43794
44420
  n4()
43795
44421
  ], WccDashboard2.prototype, "pages", 2);