@design.estate/dees-wcctools 1.0.100 → 1.1.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.
@@ -42883,10 +42883,16 @@ 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
+ }
42886
42890
  render() {
42887
42891
  return x`
42888
42892
  <style>
42889
42893
  :host {
42894
+ bottom: ${this.advancedEditorOpen ? "400px" : "100px"};
42895
+ transition: bottom 0.3s ease;
42890
42896
  ${(() => {
42891
42897
  switch (this.viewport) {
42892
42898
  case "desktop":
@@ -42956,7 +42962,6 @@ WccFrame.styles = [
42956
42962
  left: 200px;
42957
42963
  right: 0px;
42958
42964
  top: 0px;
42959
- bottom: 100px;
42960
42965
  overflow-y: auto;
42961
42966
  overflow-x: auto;
42962
42967
  overscroll-behavior: contain;
@@ -42973,6 +42978,9 @@ WccFrame.styles = [
42973
42978
  __decorateClass([
42974
42979
  n4()
42975
42980
  ], WccFrame.prototype, "viewport", 2);
42981
+ __decorateClass([
42982
+ n4({ type: Boolean })
42983
+ ], WccFrame.prototype, "advancedEditorOpen", 2);
42976
42984
  WccFrame = __decorateClass([
42977
42985
  t4("wcc-frame")
42978
42986
  ], WccFrame);
@@ -42981,31 +42989,68 @@ WccFrame = __decorateClass([
42981
42989
  var WccSidebar = class extends DeesElement {
42982
42990
  render() {
42983
42991
  return x`
42984
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
42992
+ <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
42993
  <style>
42986
42994
  :host {
42995
+ /* CSS Variables - Always dark theme to match wcc-properties */
42996
+ --background: #0a0a0a;
42997
+ --foreground: #e5e5e5;
42998
+ --card: #0f0f0f;
42999
+ --card-foreground: #f0f0f0;
43000
+ --muted: #1a1a1a;
43001
+ --muted-foreground: #666;
43002
+ --accent: #222;
43003
+ --accent-foreground: #fff;
43004
+ --border: rgba(255, 255, 255, 0.06);
43005
+ --input: #141414;
43006
+ --primary: #3b82f6;
43007
+ --primary-foreground: #fff;
43008
+ --ring: #3b82f6;
43009
+ --radius: 4px;
43010
+
42987
43011
  display: block;
42988
- border-right: 1px solid #999;
42989
- font-family: 'Roboto', 'Inter', sans-serif;
42990
- font-size: 12px;
43012
+ border-right: 1px solid rgba(255, 255, 255, 0.08);
43013
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
43014
+ font-size: 14px;
42991
43015
  box-sizing: border-box;
42992
43016
  position: absolute;
42993
43017
  left: 0px;
42994
43018
  width: 200px;
42995
43019
  top: 0px;
42996
43020
  bottom: 0px;
42997
- overflow-y: scroll;
43021
+ overflow-y: auto;
42998
43022
  overflow-x: hidden;
42999
- background: #222;
43000
- color: #fff;
43001
- padding: 5px;
43023
+ background: var(--background);
43024
+ color: var(--foreground);
43025
+ }
43026
+
43027
+ .menu {
43028
+ padding: 0.5rem 0;
43029
+ }
43030
+
43031
+ h3 {
43032
+ padding: 0.3rem 0.75rem;
43033
+ font-size: 0.65rem;
43034
+ font-weight: 500;
43035
+ text-transform: uppercase;
43036
+ letter-spacing: 0.08em;
43037
+ color: #888;
43038
+ margin: 0;
43039
+ margin-top: 0.5rem;
43040
+ background: rgba(59, 130, 246, 0.03);
43041
+ border-bottom: 1px solid var(--border);
43042
+ border-top: 1px solid var(--border);
43043
+ }
43044
+
43045
+ h3:first-child {
43046
+ margin-top: 0;
43002
43047
  }
43003
43048
 
43004
43049
  .material-symbols-outlined {
43005
43050
  font-family: 'Material Symbols Outlined';
43006
43051
  font-weight: normal;
43007
43052
  font-style: normal;
43008
- font-size: 24px; /* Preferred icon size */
43053
+ font-size: 16px;
43009
43054
  display: inline-block;
43010
43055
  line-height: 1;
43011
43056
  text-transform: none;
@@ -43013,51 +43058,75 @@ var WccSidebar = class extends DeesElement {
43013
43058
  word-wrap: normal;
43014
43059
  white-space: nowrap;
43015
43060
  direction: ltr;
43016
- font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
43061
+ font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
43062
+ opacity: 0.5;
43017
43063
  }
43018
43064
 
43019
43065
  .selectOption {
43020
43066
  user-select: none;
43021
43067
  position: relative;
43022
- line-height: 24px;
43023
- padding: 5px;
43024
- transition: all 0.2s;
43068
+ margin: 0.125rem 0.5rem;
43069
+ padding: 0.5rem 0.75rem;
43070
+ transition: all 0.15s ease;
43025
43071
  display: grid;
43026
- grid-template-columns: 28px auto;
43072
+ grid-template-columns: 20px 1fr;
43073
+ align-items: center;
43074
+ gap: 0.5rem;
43075
+ border-radius: var(--radius);
43076
+ cursor: pointer;
43077
+ font-size: 0.75rem;
43078
+ color: #999;
43079
+ background: transparent;
43027
43080
  }
43081
+
43028
43082
  .selectOption:hover {
43029
- padding: 5px;
43030
- color: #333;
43031
- background: #fff;
43083
+ background: rgba(59, 130, 246, 0.05);
43084
+ color: #bbb;
43085
+ }
43086
+
43087
+ .selectOption:hover .material-symbols-outlined {
43088
+ opacity: 0.7;
43032
43089
  }
43033
43090
 
43034
43091
  .selectOption.selected {
43035
- background: #455A64;;
43092
+ background: rgba(59, 130, 246, 0.15);
43093
+ color: var(--primary);
43094
+ }
43095
+
43096
+ .selectOption.selected .material-symbols-outlined {
43097
+ opacity: 1;
43098
+ font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
43036
43099
  }
43037
43100
 
43038
43101
  .selectOption.selected:hover {
43039
- color: #ffffff;
43040
- background: #455A64;
43102
+ background: rgba(59, 130, 246, 0.2);
43103
+ color: var(--primary);
43041
43104
  }
43042
43105
 
43043
- .selectOption .material-symbols-outlined {
43044
- color: #666;
43106
+ .selectOption .text {
43045
43107
  display: block;
43046
- transition: all 0.2s;
43108
+ overflow: hidden;
43109
+ text-overflow: ellipsis;
43110
+ white-space: nowrap;
43111
+ font-weight: 400;
43047
43112
  }
43048
43113
 
43049
- .selectOption.selected .material-symbols-outlined {
43050
- color: #000;
43114
+ ::-webkit-scrollbar {
43115
+ width: 8px;
43051
43116
  }
43052
43117
 
43053
- .selectOption .text {
43054
- display: block;
43055
- word-wrap: break-word;
43056
- word-break: break-all;
43057
- max-width: 100%;
43118
+ ::-webkit-scrollbar-track {
43119
+ background: transparent;
43058
43120
  }
43059
43121
 
43060
-
43122
+ ::-webkit-scrollbar-thumb {
43123
+ background: rgba(255, 255, 255, 0.1);
43124
+ border-radius: 4px;
43125
+ }
43126
+
43127
+ ::-webkit-scrollbar-thumb:hover {
43128
+ background: rgba(255, 255, 255, 0.2);
43129
+ }
43061
43130
  </style>
43062
43131
  <div class="menu">
43063
43132
  <h3>Pages</h3>
@@ -43150,32 +43219,56 @@ var WccProperties = class extends DeesElement {
43150
43219
  this.selectedTheme = "dark";
43151
43220
  this.warning = null;
43152
43221
  this.propertyContent = [];
43222
+ this.editingProperties = [];
43223
+ this.editorHeight = 300;
43153
43224
  }
43154
43225
  render() {
43155
43226
  return x`
43156
43227
  <style>
43157
43228
  :host {
43158
- font-family: 'Roboto', sans-serif;
43229
+ /* CSS Variables - Always dark theme */
43230
+ --background: #0a0a0a;
43231
+ --foreground: #e5e5e5;
43232
+ --card: #0f0f0f;
43233
+ --card-foreground: #f0f0f0;
43234
+ --muted: #1a1a1a;
43235
+ --muted-foreground: #666;
43236
+ --accent: #222;
43237
+ --accent-foreground: #fff;
43238
+ --border: rgba(255, 255, 255, 0.06);
43239
+ --input: #141414;
43240
+ --primary: #3b82f6;
43241
+ --primary-foreground: #fff;
43242
+ --ring: #3b82f6;
43243
+ --radius: 4px;
43244
+ --radius-sm: 2px;
43245
+ --radius-md: 4px;
43246
+ --radius-lg: 6px;
43247
+
43248
+ /* Base styles */
43249
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
43159
43250
  box-sizing: border-box;
43160
43251
  position: absolute;
43161
43252
  left: 200px;
43162
- height: 100px;
43253
+ height: ${this.editingProperties.length > 0 ? 100 + this.editorHeight : 100}px;
43163
43254
  bottom: 0px;
43164
43255
  right: 0px;
43165
43256
  overflow: hidden;
43166
- background: #111;
43167
- color: #fff;
43257
+ background: var(--background);
43258
+ color: var(--foreground);
43168
43259
  }
43169
43260
  .grid {
43170
43261
  display: grid;
43171
- grid-template-columns: auto 150px 300px 70px;
43262
+ grid-template-columns: 1fr 150px 300px 70px;
43263
+ height: 100%;
43172
43264
  }
43173
43265
  .properties {
43174
- border-right: 1px solid #999;
43175
- height: 100px;
43266
+ background: transparent;
43176
43267
  overflow-y: auto;
43177
43268
  display: grid;
43178
- grid-template-columns: 33% 33% 33%;
43269
+ grid-template-columns: repeat(3, 1fr);
43270
+ border-right: 1px solid var(--border);
43271
+ align-content: start;
43179
43272
  }
43180
43273
 
43181
43274
  .material-symbols-outlined {
@@ -43194,149 +43287,540 @@ var WccProperties = class extends DeesElement {
43194
43287
  }
43195
43288
 
43196
43289
  .properties .property {
43197
- padding: 5px;
43198
- background: #444;
43199
- border: 1px solid #000;
43290
+ padding: 0.4rem;
43291
+ background: transparent;
43292
+ border-right: 1px solid var(--border);
43293
+ border-bottom: 1px solid var(--border);
43294
+ transition: all 0.15s ease;
43295
+ }
43296
+
43297
+ .properties .property:hover {
43298
+ background: rgba(255, 255, 255, 0.02);
43299
+ }
43300
+
43301
+ .properties .property-label {
43302
+ font-size: 0.65rem;
43303
+ font-weight: 400;
43304
+ color: #888;
43305
+ margin-bottom: 0.2rem;
43306
+ text-transform: capitalize;
43307
+ white-space: nowrap;
43308
+ overflow: hidden;
43309
+ text-overflow: ellipsis;
43200
43310
  }
43201
43311
 
43202
- .properties input,
43312
+ .properties input[type="text"],
43313
+ .properties input[type="number"],
43203
43314
  .properties select {
43204
43315
  display: block;
43205
43316
  width: 100%;
43206
- background: #333;
43207
- border: none;
43208
- color: #fff;
43317
+ padding: 0.25rem 0.4rem;
43318
+ background: var(--input);
43319
+ border: 1px solid transparent;
43320
+ color: var(--foreground);
43321
+ border-radius: var(--radius-sm);
43322
+ font-size: 0.7rem;
43323
+ transition: all 0.15s ease;
43324
+ outline: none;
43325
+ }
43326
+
43327
+ .properties input[type="text"]:focus,
43328
+ .properties input[type="number"]:focus,
43329
+ .properties select:focus {
43330
+ border-color: var(--primary);
43331
+ background: rgba(59, 130, 246, 0.1);
43332
+ }
43333
+
43334
+ .properties input[type="checkbox"] {
43335
+ width: 1rem;
43336
+ height: 1rem;
43337
+ cursor: pointer;
43338
+ accent-color: var(--primary);
43339
+ }
43340
+
43341
+ .properties .editor-button {
43342
+ padding: 0.25rem 0.5rem;
43343
+ background: var(--input);
43344
+ border: 1px solid transparent;
43345
+ border-radius: var(--radius-sm);
43346
+ color: var(--foreground);
43347
+ font-size: 0.7rem;
43348
+ cursor: pointer;
43349
+ transition: all 0.15s ease;
43350
+ text-align: center;
43351
+ }
43352
+
43353
+ .properties .editor-button:hover {
43354
+ border-color: var(--primary);
43355
+ background: rgba(59, 130, 246, 0.1);
43209
43356
  }
43210
43357
 
43211
43358
  .viewportSelector,
43212
43359
  .themeSelector {
43213
43360
  user-select: none;
43214
- border-right: 1px solid #999;
43361
+ background: transparent;
43362
+ display: flex;
43363
+ flex-direction: column;
43364
+ border-right: 1px solid var(--border);
43215
43365
  }
43216
43366
  .selectorButtons2 {
43217
43367
  display: grid;
43218
- grid-template-columns: 50% 50%;
43368
+ grid-template-columns: 1fr 1fr;
43369
+ flex: 1;
43219
43370
  }
43220
43371
  .selectorButtons4 {
43221
43372
  display: grid;
43222
- grid-template-columns: 25% 25% 25% 25%;
43373
+ grid-template-columns: repeat(4, 1fr);
43374
+ flex: 1;
43223
43375
  }
43224
43376
  .button {
43225
- padding: 10px;
43377
+ display: flex;
43378
+ flex-direction: column;
43379
+ align-items: center;
43380
+ justify-content: center;
43381
+ padding: 0.5rem 0.25rem;
43226
43382
  text-align: center;
43227
- border: 1px solid #000;
43228
- transition: all 0.2s;
43383
+ background: transparent;
43384
+ border: 1px solid var(--border);
43385
+ transition: all 0.15s ease;
43386
+ cursor: pointer;
43387
+ font-size: 0.65rem;
43388
+ gap: 0.2rem;
43389
+ color: #999;
43229
43390
  }
43391
+
43230
43392
  .button:hover {
43231
- color: #333;
43232
- background: #fff;
43393
+ background: rgba(59, 130, 246, 0.05);
43394
+ color: #bbb;
43233
43395
  }
43234
43396
 
43235
43397
  .button.selected {
43236
- background: #455a64;
43398
+ background: rgba(59, 130, 246, 0.15);
43399
+ color: var(--primary);
43400
+ border-color: rgba(59, 130, 246, 0.3);
43237
43401
  }
43238
43402
 
43239
43403
  .button.selected:hover {
43240
- color: #ffffff;
43241
- background: #455a64;
43404
+ background: rgba(59, 130, 246, 0.2);
43405
+ }
43406
+
43407
+ .button .material-symbols-outlined {
43408
+ font-size: 18px;
43409
+ font-variation-settings: 'FILL' 0, 'wght' 300;
43410
+ }
43411
+
43412
+ .button.selected .material-symbols-outlined {
43413
+ font-variation-settings: 'FILL' 1, 'wght' 400;
43242
43414
  }
43243
43415
 
43244
43416
  .panelheading {
43245
- padding: 5px;
43246
- font-weight: bold;
43247
- background: #444;
43248
- border: 1px solid #000;
43417
+ padding: 0.3rem 0.5rem;
43418
+ font-weight: 500;
43419
+ font-size: 0.65rem;
43420
+ background: rgba(59, 130, 246, 0.03);
43421
+ border-bottom: 1px solid var(--border);
43422
+ color: #888;
43423
+ text-transform: uppercase;
43424
+ letter-spacing: 0.08em;
43249
43425
  }
43250
43426
  .docs {
43251
- text-align: center;
43252
- line-height: 100px;
43427
+ display: flex;
43428
+ align-items: center;
43429
+ justify-content: center;
43253
43430
  text-transform: uppercase;
43431
+ background: transparent;
43432
+ cursor: pointer;
43433
+ font-size: 0.65rem;
43434
+ font-weight: 500;
43435
+ letter-spacing: 0.08em;
43436
+ transition: all 0.15s ease;
43437
+ color: #666;
43254
43438
  }
43255
43439
 
43256
43440
  .docs:hover {
43257
- color: #333;
43258
- background: #fff;
43441
+ background: rgba(59, 130, 246, 0.05);
43442
+ color: #999;
43259
43443
  }
43260
43444
 
43261
43445
  .warning {
43262
43446
  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;
43447
+ background: rgba(20, 20, 20, 0.8);
43448
+ color: #888;
43449
+ top: 0.5rem;
43450
+ bottom: 0.5rem;
43451
+ left: 0.5rem;
43452
+ right: calc(520px + 0.5rem);
43453
+ display: flex;
43454
+ align-items: center;
43455
+ justify-content: center;
43456
+ padding: 1.5rem;
43457
+ font-size: 0.85rem;
43458
+ border-radius: var(--radius-md);
43459
+ border: 1px solid var(--border);
43460
+ backdrop-filter: blur(8px);
43461
+ }
43462
+
43463
+ .advanced-editor-container {
43464
+ position: absolute;
43465
+ left: 0;
43466
+ right: 0;
43467
+ top: 0;
43468
+ height: ${this.editorHeight}px;
43469
+ background: #050505;
43470
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
43471
+ display: flex;
43472
+ flex-direction: column;
43473
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
43474
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
43475
+ }
43476
+
43477
+ .editor-header-bar {
43478
+ padding: 0.5rem 0.75rem;
43479
+ background: transparent;
43480
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
43481
+ display: flex;
43482
+ justify-content: space-between;
43483
+ align-items: center;
43484
+ height: 36px;
43485
+ }
43486
+
43487
+ .editor-header-title {
43488
+ font-size: 0.7rem;
43489
+ font-weight: 500;
43490
+ color: #666;
43491
+ text-transform: uppercase;
43492
+ letter-spacing: 0.08em;
43493
+ }
43494
+
43495
+ .editor-close-all {
43496
+ padding: 0.25rem 0.5rem;
43497
+ background: transparent;
43498
+ border: 1px solid rgba(255, 255, 255, 0.08);
43499
+ border-radius: var(--radius-sm);
43500
+ color: #999;
43501
+ font-size: 0.65rem;
43502
+ font-weight: 500;
43503
+ cursor: pointer;
43504
+ transition: all 0.15s ease;
43505
+ }
43506
+
43507
+ .editor-close-all:hover {
43508
+ background: rgba(255, 255, 255, 0.05);
43509
+ border-color: rgba(255, 255, 255, 0.12);
43510
+ color: #f87171;
43511
+ }
43512
+
43513
+ .editors-container {
43514
+ flex: 1;
43515
+ display: flex;
43516
+ overflow-x: auto;
43517
+ overflow-y: hidden;
43518
+ gap: 0;
43519
+ background: rgba(255, 255, 255, 0.02);
43520
+ padding: 0.75rem;
43521
+ }
43522
+
43523
+ .editors-container::-webkit-scrollbar {
43524
+ height: 8px;
43525
+ }
43526
+
43527
+ .editors-container::-webkit-scrollbar-track {
43528
+ background: rgba(255, 255, 255, 0.02);
43529
+ border-radius: 4px;
43530
+ }
43531
+
43532
+ .editors-container::-webkit-scrollbar-thumb {
43533
+ background: rgba(255, 255, 255, 0.08);
43534
+ border-radius: 4px;
43535
+ }
43536
+
43537
+ .editors-container::-webkit-scrollbar-thumb:hover {
43538
+ background: rgba(255, 255, 255, 0.12);
43539
+ }
43540
+
43541
+ .editor-instance {
43542
+ min-width: 320px;
43543
+ flex: 1;
43544
+ max-width: 480px;
43545
+ background: rgba(10, 10, 10, 0.6);
43546
+ display: flex;
43547
+ flex-direction: column;
43548
+ border-radius: var(--radius);
43549
+ overflow: hidden;
43550
+ margin-right: 0.75rem;
43551
+ border: 1px solid rgba(255, 255, 255, 0.06);
43552
+ transition: all 0.2s ease;
43553
+ }
43554
+
43555
+ .editor-instance:hover {
43556
+ border-color: rgba(255, 255, 255, 0.1);
43557
+ }
43558
+
43559
+ .editor-instance:last-child {
43560
+ margin-right: 0;
43561
+ }
43562
+
43563
+ .editor-header {
43564
+ padding: 0.5rem 0.75rem;
43565
+ background: rgba(255, 255, 255, 0.02);
43566
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
43567
+ display: flex;
43568
+ justify-content: space-between;
43569
+ align-items: center;
43570
+ height: 36px;
43571
+ }
43572
+
43573
+ .editor-title {
43574
+ font-size: 0.75rem;
43575
+ font-weight: 500;
43576
+ color: #999;
43577
+ overflow: hidden;
43578
+ text-overflow: ellipsis;
43579
+ white-space: nowrap;
43580
+ font-family: 'Consolas', 'Monaco', monospace;
43581
+ }
43582
+
43583
+ .editor-actions {
43584
+ display: flex;
43585
+ gap: 0.25rem;
43586
+ }
43587
+
43588
+ .editor-button {
43589
+ width: 24px;
43590
+ height: 24px;
43591
+ padding: 0;
43592
+ background: transparent;
43593
+ border: none;
43594
+ color: #666;
43595
+ font-size: 1rem;
43596
+ cursor: pointer;
43597
+ transition: all 0.15s ease;
43598
+ border-radius: var(--radius-sm);
43599
+ display: flex;
43600
+ align-items: center;
43601
+ justify-content: center;
43602
+ }
43603
+
43604
+ .editor-button:hover {
43605
+ background: rgba(255, 255, 255, 0.05);
43606
+ color: #999;
43607
+ }
43608
+
43609
+ .editor-button.primary {
43610
+ color: #4ade80;
43611
+ }
43612
+
43613
+ .editor-button.primary:hover {
43614
+ background: rgba(74, 222, 128, 0.1);
43615
+ }
43616
+
43617
+ .editor-content {
43618
+ flex: 1;
43619
+ display: flex;
43620
+ flex-direction: column;
43621
+ overflow: hidden;
43622
+ min-height: 0;
43623
+ position: relative;
43624
+ }
43625
+
43626
+ .editor-textarea {
43627
+ width: 100%;
43628
+ height: 100%;
43629
+ background: transparent;
43630
+ border: none;
43631
+ color: #d0d0d0;
43632
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
43633
+ font-size: 0.8125rem;
43634
+ line-height: 1.6;
43635
+ padding: 0.75rem;
43636
+ resize: none;
43637
+ outline: none;
43638
+ transition: all 0.15s ease;
43639
+ overflow: auto;
43640
+ }
43641
+
43642
+ .editor-textarea:focus {
43643
+ background: rgba(255, 255, 255, 0.01);
43644
+ }
43645
+
43646
+ .editor-textarea::selection {
43647
+ background: rgba(59, 130, 246, 0.3);
43648
+ }
43649
+
43650
+ .editor-error {
43651
+ position: absolute;
43652
+ bottom: 0;
43653
+ left: 0;
43654
+ right: 0;
43655
+ padding: 0.5rem 0.75rem;
43656
+ background: rgba(239, 68, 68, 0.9);
43657
+ backdrop-filter: blur(4px);
43658
+ color: #fff;
43659
+ font-size: 0.7rem;
43660
+ font-weight: 500;
43661
+ display: flex;
43662
+ align-items: center;
43663
+ gap: 0.375rem;
43664
+ border-top: 1px solid rgba(239, 68, 68, 0.5);
43665
+ }
43666
+
43667
+ .editor-error::before {
43668
+ content: '!';
43669
+ display: inline-flex;
43670
+ width: 16px;
43671
+ height: 16px;
43672
+ align-items: center;
43673
+ justify-content: center;
43674
+ background: rgba(255, 255, 255, 0.2);
43675
+ border-radius: 50%;
43676
+ font-size: 0.65rem;
43677
+ font-weight: bold;
43678
+ }
43679
+
43680
+ .main-content {
43681
+ position: absolute;
43682
+ left: 0;
43683
+ right: 0;
43684
+ bottom: 0;
43685
+ height: 100px;
43272
43686
  }
43273
43687
  </style>
43274
- <div class="grid">
43275
- <div class="properties">
43276
- <div class="panelheading">Properties</div>
43277
- ${this.propertyContent}
43688
+ ${this.editingProperties.length > 0 ? x`
43689
+ <div class="advanced-editor-container">
43690
+ <div class="editor-header-bar">
43691
+ <div class="editor-header-title">Property Editors</div>
43692
+ <button class="editor-close-all" @click=${this.closeAllEditors}>
43693
+ Close All
43694
+ </button>
43695
+ </div>
43696
+ <div class="editors-container">
43697
+ ${this.editingProperties.length === 0 ? x`
43698
+ <div style="
43699
+ flex: 1;
43700
+ display: flex;
43701
+ align-items: center;
43702
+ justify-content: center;
43703
+ color: #666;
43704
+ font-size: 0.875rem;
43705
+ text-align: center;
43706
+ padding: 2rem;
43707
+ ">
43708
+ <div>
43709
+ <div style="margin-bottom: 0.5rem; font-size: 1.5rem; opacity: 0.5;">{ }</div>
43710
+ <div>No properties being edited</div>
43711
+ <div style="font-size: 0.75rem; margin-top: 0.25rem; opacity: 0.7;">Click "Edit Object/Array" buttons to start editing</div>
43712
+ </div>
43713
+ </div>
43714
+ ` : null}
43715
+ ${this.editingProperties.map((prop) => x`
43716
+ <div class="editor-instance">
43717
+ <div class="editor-header">
43718
+ <div class="editor-title">${prop.name}</div>
43719
+ <div class="editor-actions">
43720
+ <button class="editor-button" @click=${() => this.handleEditorCancel(prop.id)}>✕</button>
43721
+ <button class="editor-button primary" @click=${() => this.handleEditorSave(prop.id)}>✓</button>
43722
+ </div>
43723
+ </div>
43724
+ <div class="editor-content">
43725
+ <textarea
43726
+ class="editor-textarea"
43727
+ .value=${prop.editorValue}
43728
+ @input=${(e8) => {
43729
+ const editor = this.editingProperties.find((p5) => p5.id === prop.id);
43730
+ if (editor) {
43731
+ editor.editorValue = e8.target.value;
43732
+ editor.editorError = "";
43733
+ this.requestUpdate();
43734
+ }
43735
+ }}
43736
+ @keydown=${(e8) => {
43737
+ if (e8.key === "Tab") {
43738
+ e8.preventDefault();
43739
+ const target = e8.target;
43740
+ const start = target.selectionStart;
43741
+ const end = target.selectionEnd;
43742
+ const value2 = target.value;
43743
+ target.value = value2.substring(0, start) + " " + value2.substring(end);
43744
+ target.selectionStart = target.selectionEnd = start + 2;
43745
+ }
43746
+ }}
43747
+ ></textarea>
43748
+ ${prop.editorError ? x`
43749
+ <div class="editor-error">${prop.editorError}</div>
43750
+ ` : null}
43751
+ </div>
43752
+ </div>
43753
+ `)}
43754
+ </div>
43278
43755
  </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=${() => {
43756
+ ` : null}
43757
+ <div class="main-content">
43758
+ <div class="grid">
43759
+ <div class="properties">
43760
+ ${this.propertyContent}
43761
+ </div>
43762
+ <div class="themeSelector">
43763
+ <div class="panelheading">Theme</div>
43764
+ <div class="selectorButtons2">
43765
+ <div
43766
+ class="button ${this.selectedTheme === "dark" ? "selected" : null}"
43767
+ @click=${() => {
43285
43768
  this.selectTheme("dark");
43286
43769
  }}
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=${() => {
43770
+ >
43771
+ Dark<i class="material-symbols-outlined">brightness_3</i>
43772
+ </div>
43773
+ <div
43774
+ class="button ${this.selectedTheme === "bright" ? "selected" : null}"
43775
+ @click=${() => {
43293
43776
  this.selectTheme("bright");
43294
43777
  }}
43295
- >
43296
- Bright<br /><i class="material-symbols-outlined">flare</i>
43778
+ >
43779
+ Bright<i class="material-symbols-outlined">flare</i>
43780
+ </div>
43297
43781
  </div>
43298
43782
  </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=${() => {
43783
+ <div class="viewportSelector">
43784
+ <div class="panelheading">Viewport</div>
43785
+ <div class="selectorButtons4">
43786
+ <div
43787
+ class="button ${this.selectedViewport === "phone" ? "selected" : null}"
43788
+ @click=${() => {
43306
43789
  this.selectViewport("phone");
43307
43790
  }}
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=${() => {
43791
+ >
43792
+ Phone<i class="material-symbols-outlined">smartphone</i>
43793
+ </div>
43794
+ <div
43795
+ class="button ${this.selectedViewport === "phablet" ? "selected" : null}"
43796
+ @click=${() => {
43314
43797
  this.selectViewport("phablet");
43315
43798
  }}
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=${() => {
43799
+ >
43800
+ Phablet<i class="material-symbols-outlined">smartphone</i>
43801
+ </div>
43802
+ <div
43803
+ class="button ${this.selectedViewport === "tablet" ? "selected" : null}"
43804
+ @click=${() => {
43322
43805
  this.selectViewport("tablet");
43323
43806
  }}
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=${() => {
43807
+ >
43808
+ Tablet<i class="material-symbols-outlined">tablet</i>
43809
+ </div>
43810
+ <div
43811
+ class="button ${this.selectedViewport === "desktop" || this.selectedViewport === "native" ? "selected" : null}"
43812
+ @click=${() => {
43330
43813
  this.selectViewport("native");
43331
43814
  }}
43332
- >
43333
- Desktop<br /><i class="material-symbols-outlined">desktop_windows</i>
43815
+ >
43816
+ Desktop<i class="material-symbols-outlined">desktop_windows</i>
43817
+ </div>
43334
43818
  </div>
43335
43819
  </div>
43820
+ <div class="docs">Docs</div>
43336
43821
  </div>
43337
- <div class="docs">Docs</div>
43822
+ ${this.warning ? x`<div class="warning">${this.warning}</div>` : null}
43338
43823
  </div>
43339
- ${this.warning ? x`<div class="warning">${this.warning}</div>` : null}
43340
43824
  `;
43341
43825
  }
43342
43826
  async findElementRecursively(container, elementClass, maxDepth = 5) {
@@ -43447,7 +43931,7 @@ var WccProperties = class extends DeesElement {
43447
43931
  propertyArray.push(
43448
43932
  x`
43449
43933
  <div class="property">
43450
- ${key2} / ${propertyTypeString}<br />
43934
+ <div class="property-label">${key2} (${propertyTypeString})</div>
43451
43935
  ${(() => {
43452
43936
  switch (propertyTypeString) {
43453
43937
  case "Boolean":
@@ -43492,6 +43976,17 @@ var WccProperties = class extends DeesElement {
43492
43976
  `;
43493
43977
  })}
43494
43978
  </select>`;
43979
+ case "Object":
43980
+ case "Array":
43981
+ return x`<button
43982
+ class="editor-button"
43983
+ style="width: 100%; margin-top: 0.25rem;"
43984
+ @click="${() => this.openAdvancedEditor(key2, firstFoundInstantiatedElement[key2], firstFoundInstantiatedElement)}"
43985
+ >
43986
+ Edit ${propertyTypeString}
43987
+ </button>`;
43988
+ default:
43989
+ return x`<div style="color: #666; font-size: 0.7rem;">Unsupported type</div>`;
43495
43990
  }
43496
43991
  })()}
43497
43992
  </div>
@@ -43537,6 +44032,73 @@ var WccProperties = class extends DeesElement {
43537
44032
  );
43538
44033
  this.dashboardRef.buildUrl();
43539
44034
  }
44035
+ openAdvancedEditor(propertyName, value2, element4) {
44036
+ const existingEditor = this.editingProperties.find((p5) => p5.name === propertyName && p5.element === element4);
44037
+ if (existingEditor) {
44038
+ return;
44039
+ }
44040
+ const newEditor = {
44041
+ id: `${propertyName}-${Date.now()}`,
44042
+ name: propertyName,
44043
+ value: value2,
44044
+ element: element4,
44045
+ editorValue: JSON.stringify(value2, null, 2),
44046
+ editorError: ""
44047
+ };
44048
+ this.editingProperties = [...this.editingProperties, newEditor];
44049
+ if (this.editingProperties.length === 1) {
44050
+ this.dispatchEvent(
44051
+ new CustomEvent("editorStateChanged", {
44052
+ detail: { isOpen: true },
44053
+ bubbles: true
44054
+ })
44055
+ );
44056
+ }
44057
+ }
44058
+ handleEditorSave(editorId) {
44059
+ const editor = this.editingProperties.find((p5) => p5.id === editorId);
44060
+ if (!editor) return;
44061
+ try {
44062
+ const parsedValue = JSON.parse(editor.editorValue);
44063
+ editor.element[editor.name] = parsedValue;
44064
+ this.editingProperties = this.editingProperties.filter((p5) => p5.id !== editorId);
44065
+ if (this.editingProperties.length === 0) {
44066
+ this.dispatchEvent(
44067
+ new CustomEvent("editorStateChanged", {
44068
+ detail: { isOpen: false },
44069
+ bubbles: true
44070
+ })
44071
+ );
44072
+ }
44073
+ this.createProperties();
44074
+ } catch (error) {
44075
+ const editorIndex = this.editingProperties.findIndex((p5) => p5.id === editorId);
44076
+ if (editorIndex !== -1) {
44077
+ this.editingProperties[editorIndex].editorError = `Invalid JSON: ${error.message}`;
44078
+ this.requestUpdate();
44079
+ }
44080
+ }
44081
+ }
44082
+ handleEditorCancel(editorId) {
44083
+ this.editingProperties = this.editingProperties.filter((p5) => p5.id !== editorId);
44084
+ if (this.editingProperties.length === 0) {
44085
+ this.dispatchEvent(
44086
+ new CustomEvent("editorStateChanged", {
44087
+ detail: { isOpen: false },
44088
+ bubbles: true
44089
+ })
44090
+ );
44091
+ }
44092
+ }
44093
+ closeAllEditors() {
44094
+ this.editingProperties = [];
44095
+ this.dispatchEvent(
44096
+ new CustomEvent("editorStateChanged", {
44097
+ detail: { isOpen: false },
44098
+ bubbles: true
44099
+ })
44100
+ );
44101
+ }
43540
44102
  };
43541
44103
  __decorateClass([
43542
44104
  n4({
@@ -43558,6 +44120,9 @@ __decorateClass([
43558
44120
  __decorateClass([
43559
44121
  r5()
43560
44122
  ], WccProperties.prototype, "propertyContent", 2);
44123
+ __decorateClass([
44124
+ r5()
44125
+ ], WccProperties.prototype, "editingProperties", 2);
43561
44126
  WccProperties = __decorateClass([
43562
44127
  t4("wcc-properties")
43563
44128
  ], WccProperties);
@@ -43571,6 +44136,10 @@ var WccDashboard2 = class extends DeesElement {
43571
44136
  this.pages = {};
43572
44137
  this.elements = {};
43573
44138
  this.warning = null;
44139
+ this.frameScrollY = 0;
44140
+ this.sidebarScrollY = 0;
44141
+ this.scrollPositionsApplied = false;
44142
+ this.scrollListenersAttached = false;
43574
44143
  if (elementsArg) {
43575
44144
  this.elements = elementsArg;
43576
44145
  console.log("got elements:");
@@ -43617,6 +44186,13 @@ var WccDashboard2 = class extends DeesElement {
43617
44186
  }}
43618
44187
  @selectedTheme=${(eventArg) => {
43619
44188
  this.selectedTheme = eventArg.detail;
44189
+ }}
44190
+ @editorStateChanged=${async (eventArg) => {
44191
+ const frame = await this.wccFrame;
44192
+ if (frame) {
44193
+ frame.advancedEditorOpen = eventArg.detail.isOpen;
44194
+ frame.requestUpdate();
44195
+ }
43620
44196
  }}
43621
44197
  ></wcc-properties>
43622
44198
  <wcc-frame id="wccFrame" viewport=${this.selectedViewport}>
@@ -43634,6 +44210,9 @@ var WccDashboard2 = class extends DeesElement {
43634
44210
  }
43635
44211
  async firstUpdated() {
43636
44212
  this.domtools = await dist_ts_exports27.DomTools.setupDomTools();
44213
+ setTimeout(() => {
44214
+ this.setupScrollListeners();
44215
+ }, 500);
43637
44216
  this.domtools.router.on(
43638
44217
  "/wcctools-route/:itemType/:itemName/:viewport/:theme",
43639
44218
  async (routeInfo) => {
@@ -43646,6 +44225,19 @@ var WccDashboard2 = class extends DeesElement {
43646
44225
  } else if (routeInfo.params.itemType === "page") {
43647
44226
  this.selectedItem = this.pages[routeInfo.params.itemName];
43648
44227
  }
44228
+ if (routeInfo.queryParams) {
44229
+ const frameScrollY = routeInfo.queryParams.frameScrollY;
44230
+ const sidebarScrollY = routeInfo.queryParams.sidebarScrollY;
44231
+ if (frameScrollY) {
44232
+ this.frameScrollY = parseInt(frameScrollY);
44233
+ }
44234
+ if (sidebarScrollY) {
44235
+ this.sidebarScrollY = parseInt(sidebarScrollY);
44236
+ }
44237
+ setTimeout(() => {
44238
+ this.applyScrollPositions();
44239
+ }, 100);
44240
+ }
43649
44241
  const domtoolsInstance = await dist_ts_exports27.elementBasic.setup();
43650
44242
  this.selectedTheme === "bright" ? domtoolsInstance.themeManager.goBright() : domtoolsInstance.themeManager.goDark();
43651
44243
  }
@@ -43654,7 +44246,6 @@ var WccDashboard2 = class extends DeesElement {
43654
44246
  async updated(changedPropertiesArg) {
43655
44247
  this.domtools = await dist_ts_exports27.DomTools.setupDomTools();
43656
44248
  await this.domtools.router._handleRouteState();
43657
- const storeElement = this.selectedItem;
43658
44249
  const wccFrame = this.shadowRoot.querySelector("wcc-frame");
43659
44250
  if (changedPropertiesArg.has("selectedItemName")) {
43660
44251
  document.title = this.selectedItemName;
@@ -43690,9 +44281,70 @@ var WccDashboard2 = class extends DeesElement {
43690
44281
  }
43691
44282
  }
43692
44283
  buildUrl() {
43693
- this.domtools.router.pushUrl(
43694
- `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedViewport}/${this.selectedTheme}`
43695
- );
44284
+ const baseUrl = `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedViewport}/${this.selectedTheme}`;
44285
+ const queryParams = new URLSearchParams();
44286
+ if (this.frameScrollY > 0) {
44287
+ queryParams.set("frameScrollY", this.frameScrollY.toString());
44288
+ }
44289
+ if (this.sidebarScrollY > 0) {
44290
+ queryParams.set("sidebarScrollY", this.sidebarScrollY.toString());
44291
+ }
44292
+ const queryString = queryParams.toString();
44293
+ const fullUrl = queryString ? `${baseUrl}?${queryString}` : baseUrl;
44294
+ this.domtools.router.pushUrl(fullUrl);
44295
+ }
44296
+ async setupScrollListeners() {
44297
+ if (this.scrollListenersAttached) {
44298
+ return;
44299
+ }
44300
+ const wccFrame = await this.wccFrame;
44301
+ const wccSidebar = this.shadowRoot.querySelector("wcc-sidebar");
44302
+ if (wccFrame) {
44303
+ wccFrame.addEventListener("scroll", () => {
44304
+ this.frameScrollY = wccFrame.scrollTop;
44305
+ this.debouncedScrollUpdate();
44306
+ });
44307
+ this.scrollListenersAttached = true;
44308
+ }
44309
+ if (wccSidebar) {
44310
+ wccSidebar.addEventListener("scroll", () => {
44311
+ this.sidebarScrollY = wccSidebar.scrollTop;
44312
+ this.debouncedScrollUpdate();
44313
+ });
44314
+ }
44315
+ }
44316
+ debouncedScrollUpdate() {
44317
+ clearTimeout(this.scrollUpdateTimeout);
44318
+ this.scrollUpdateTimeout = setTimeout(() => {
44319
+ this.updateUrlWithScrollState();
44320
+ }, 300);
44321
+ }
44322
+ updateUrlWithScrollState() {
44323
+ const baseUrl = `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedViewport}/${this.selectedTheme}`;
44324
+ const queryParams = new URLSearchParams();
44325
+ if (this.frameScrollY > 0) {
44326
+ queryParams.set("frameScrollY", this.frameScrollY.toString());
44327
+ }
44328
+ if (this.sidebarScrollY > 0) {
44329
+ queryParams.set("sidebarScrollY", this.sidebarScrollY.toString());
44330
+ }
44331
+ const queryString = queryParams.toString();
44332
+ const fullUrl = queryString ? `${baseUrl}?${queryString}` : baseUrl;
44333
+ window.history.replaceState(null, "", fullUrl);
44334
+ }
44335
+ async applyScrollPositions() {
44336
+ if (this.scrollPositionsApplied) {
44337
+ return;
44338
+ }
44339
+ const wccFrame = await this.wccFrame;
44340
+ const wccSidebar = this.shadowRoot.querySelector("wcc-sidebar");
44341
+ if (wccFrame && this.frameScrollY > 0) {
44342
+ wccFrame.scrollTop = this.frameScrollY;
44343
+ }
44344
+ if (wccSidebar && this.sidebarScrollY > 0) {
44345
+ wccSidebar.scrollTop = this.sidebarScrollY;
44346
+ }
44347
+ this.scrollPositionsApplied = true;
43696
44348
  }
43697
44349
  };
43698
44350
  __decorateClass([
@@ -44480,12 +45132,151 @@ TestNested = __decorateClass([
44480
45132
  // test/pages/index.ts
44481
45133
  var pages_exports = {};
44482
45134
  __export(pages_exports, {
44483
- page1: () => page1
45135
+ page1: () => page1,
45136
+ pageLongScroll: () => pageLongScroll
44484
45137
  });
44485
45138
 
44486
45139
  // test/pages/page1.ts
44487
45140
  var page1 = () => x` <test-demoelement></test-demoelement> `;
44488
45141
 
45142
+ // test/pages/pageLongScroll.ts
45143
+ var pageLongScroll = () => x`
45144
+ <style>
45145
+ .long-scroll-container {
45146
+ padding: 40px;
45147
+ max-width: 800px;
45148
+ margin: 0 auto;
45149
+ }
45150
+
45151
+ .section {
45152
+ margin-bottom: 60px;
45153
+ padding: 20px;
45154
+ background: rgba(255, 255, 255, 0.05);
45155
+ border-radius: 8px;
45156
+ }
45157
+
45158
+ h1 {
45159
+ font-size: 2.5em;
45160
+ margin-bottom: 20px;
45161
+ color: #fff;
45162
+ }
45163
+
45164
+ h2 {
45165
+ font-size: 1.8em;
45166
+ margin-bottom: 15px;
45167
+ color: #ddd;
45168
+ }
45169
+
45170
+ p {
45171
+ line-height: 1.6;
45172
+ color: #ccc;
45173
+ margin-bottom: 15px;
45174
+ }
45175
+
45176
+ .placeholder-content {
45177
+ height: 300px;
45178
+ background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
45179
+ border-radius: 8px;
45180
+ display: flex;
45181
+ align-items: center;
45182
+ justify-content: center;
45183
+ color: #888;
45184
+ font-size: 1.2em;
45185
+ margin: 20px 0;
45186
+ }
45187
+ </style>
45188
+
45189
+ <div class="long-scroll-container">
45190
+ <h1>Long Scroll Test Page</h1>
45191
+
45192
+ <div class="section">
45193
+ <h2>Section 1: Introduction</h2>
45194
+ <p>This is a long page designed to test scroll position preservation. Scroll down to see more content and then reload the page to verify that the scroll position is restored correctly.</p>
45195
+ <p>The URL should update with scroll position parameters as you scroll, and when you reload the page, it should automatically scroll to the last position.</p>
45196
+ </div>
45197
+
45198
+ <div class="placeholder-content">
45199
+ <span>Placeholder Content Block 1</span>
45200
+ </div>
45201
+
45202
+ <div class="section">
45203
+ <h2>Section 2: Testing Scroll Behavior</h2>
45204
+ <p>As you scroll through this page, the dashboard should track your scroll position and update the URL accordingly. The updates should be debounced to avoid excessive URL changes.</p>
45205
+ <p>Try scrolling quickly and slowly to see how the debouncing works. The URL should update smoothly without interfering with your scrolling experience.</p>
45206
+ </div>
45207
+
45208
+ <div class="placeholder-content">
45209
+ <span>Placeholder Content Block 2</span>
45210
+ </div>
45211
+
45212
+ <div class="section">
45213
+ <h2>Section 3: Reload Testing</h2>
45214
+ <p>Once you've scrolled to this section, try reloading the page. The page should automatically scroll back to this position after the content loads.</p>
45215
+ <p>This demonstrates that the scroll position is being preserved across page reloads using URL parameters.</p>
45216
+ </div>
45217
+
45218
+ <div class="placeholder-content">
45219
+ <span>Placeholder Content Block 3</span>
45220
+ </div>
45221
+
45222
+ <div class="section">
45223
+ <h2>Section 4: Navigation Testing</h2>
45224
+ <p>Try navigating to a different element or page in the sidebar, then use the browser's back button to return here. The scroll position should be preserved.</p>
45225
+ <p>This tests that the browser history correctly maintains scroll state for each navigation entry.</p>
45226
+ </div>
45227
+
45228
+ <div class="placeholder-content">
45229
+ <span>Placeholder Content Block 4</span>
45230
+ </div>
45231
+
45232
+ <div class="section">
45233
+ <h2>Section 5: Deep Scroll Testing</h2>
45234
+ <p>Keep scrolling! This page has plenty of content to ensure we can test scroll positions at various depths.</p>
45235
+ <p>The scroll tracking should work reliably regardless of how far down the page you scroll.</p>
45236
+ </div>
45237
+
45238
+ <div class="placeholder-content">
45239
+ <span>Placeholder Content Block 5</span>
45240
+ </div>
45241
+
45242
+ <div class="section">
45243
+ <h2>Section 6: Performance Testing</h2>
45244
+ <p>Even with continuous scroll tracking, the page should remain responsive and smooth. The debouncing mechanism ensures that URL updates don't impact scrolling performance.</p>
45245
+ <p>Try scrolling rapidly up and down to verify that the scrolling remains smooth.</p>
45246
+ </div>
45247
+
45248
+ <div class="placeholder-content">
45249
+ <span>Placeholder Content Block 6</span>
45250
+ </div>
45251
+
45252
+ <div class="section">
45253
+ <h2>Section 7: Sidebar Scroll Testing</h2>
45254
+ <p>Don't forget to test the sidebar scrolling as well! If the sidebar has enough items to scroll, its position should also be tracked and restored.</p>
45255
+ <p>Both the main content and sidebar scroll positions should be preserved independently.</p>
45256
+ </div>
45257
+
45258
+ <div class="placeholder-content">
45259
+ <span>Placeholder Content Block 7</span>
45260
+ </div>
45261
+
45262
+ <div class="section">
45263
+ <h2>Section 8: Edge Cases</h2>
45264
+ <p>This section tests edge cases like scrolling to the very bottom of the page, then reloading.</p>
45265
+ <p>The scroll restoration should handle these cases gracefully without any visual glitches or errors.</p>
45266
+ </div>
45267
+
45268
+ <div class="placeholder-content">
45269
+ <span>Placeholder Content Block 8</span>
45270
+ </div>
45271
+
45272
+ <div class="section">
45273
+ <h2>Section 9: Final Section</h2>
45274
+ <p>You've reached the end of the scroll test page! Try reloading from here to ensure that even the bottom-most scroll positions are correctly preserved.</p>
45275
+ <p>The scroll position tracking has been successfully implemented if you can reload and return to this exact position.</p>
45276
+ </div>
45277
+ </div>
45278
+ `;
45279
+
44489
45280
  // html/index.ts
44490
45281
  setupWccTools(elements_exports, pages_exports);
44491
45282
  domtools_elementbasic_exports.setup();