@svelte-devtools/vite-plugin 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/overlay.js +113 -108
  2. package/package.json +1 -1
package/dist/overlay.js CHANGED
@@ -3149,13 +3149,6 @@ function from_namespace(content, flags2, ns = "svg") {
3149
3149
  function from_svg(content, flags2) {
3150
3150
  return /* @__PURE__ */ from_namespace(content, flags2, "svg");
3151
3151
  }
3152
- function text(value = "") {
3153
- {
3154
- var t = create_text(value + "");
3155
- assign_nodes(t, t);
3156
- return t;
3157
- }
3158
- }
3159
3152
  function comment() {
3160
3153
  var frag = document.createDocumentFragment();
3161
3154
  var start = document.createComment("");
@@ -3173,12 +3166,12 @@ function append(anchor, dom) {
3173
3166
  dom
3174
3167
  );
3175
3168
  }
3176
- function set_text(text2, value) {
3169
+ function set_text(text, value) {
3177
3170
  var str = value == null ? "" : typeof value === "object" ? `${value}` : value;
3178
3171
  if (str !== /** @type {any} */
3179
- (text2[TEXT_CACHE] ?? (text2[TEXT_CACHE] = text2.nodeValue))) {
3180
- text2[TEXT_CACHE] = str;
3181
- text2.nodeValue = `${str}`;
3172
+ (text[TEXT_CACHE] ?? (text[TEXT_CACHE] = text.nodeValue))) {
3173
+ text[TEXT_CACHE] = str;
3174
+ text.nodeValue = `${str}`;
3182
3175
  }
3183
3176
  }
3184
3177
  function mount(component, options) {
@@ -4244,7 +4237,7 @@ const CSS = `
4244
4237
  /* ── Toggle button ── */
4245
4238
  .sdt-toggle {
4246
4239
  position: absolute;
4247
- bottom: 20px;
4240
+ bottom: max(20px, calc(env(safe-area-inset-bottom) + 8px));
4248
4241
  left: 0;
4249
4242
  right: 0;
4250
4243
  margin: 0 auto;
@@ -4301,6 +4294,7 @@ const CSS = `
4301
4294
  left: auto;
4302
4295
  bottom: 0;
4303
4296
  right: 0;
4297
+ max-width: 92dvw;
4304
4298
  animation: sdt-slide-right 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
4305
4299
  }
4306
4300
 
@@ -4316,6 +4310,7 @@ const CSS = `
4316
4310
 
4317
4311
  /* ── Panel ── */
4318
4312
  .sdt-panel {
4313
+ container-type: inline-size;
4319
4314
  background: #1e1e2e;
4320
4315
  color: #cdd6f4;
4321
4316
  display: flex;
@@ -4356,13 +4351,14 @@ const CSS = `
4356
4351
  }
4357
4352
 
4358
4353
  .sdt-resize-handle:hover { background: rgba(255 62 0 / 0.15); }
4354
+ .sdt-resize-handle, .sdt-resize-handle--right { touch-action: none; }
4359
4355
 
4360
4356
  /* ── Position toggle ── */
4361
4357
  .sdt-position-toggle {
4362
4358
  background: transparent;
4363
4359
  border: none;
4364
4360
  color: #45475a;
4365
- width: 32px;
4361
+ width: 44px;
4366
4362
  height: 44px;
4367
4363
  cursor: pointer;
4368
4364
  display: flex;
@@ -4456,6 +4452,14 @@ const CSS = `
4456
4452
 
4457
4453
  .sdt-close:hover { color: #cdd6f4; background: #1e1e2e; }
4458
4454
 
4455
+ /* ── Narrow panel: hide text labels, tighten spacing ── */
4456
+ @container (max-width: 480px) {
4457
+ .sdt-logo-text { display: none; }
4458
+ .sdt-tab-label { display: none; }
4459
+ .sdt-logo { padding: 0 10px; }
4460
+ .sdt-tab { padding: 0 10px; }
4461
+ }
4462
+
4459
4463
  /* ── Content area ── */
4460
4464
  .sdt-content {
4461
4465
  flex: 1;
@@ -4463,6 +4467,8 @@ const CSS = `
4463
4467
  min-height: 0;
4464
4468
  scrollbar-width: thin;
4465
4469
  scrollbar-color: #313244 transparent;
4470
+ overscroll-behavior: contain;
4471
+ padding-bottom: env(safe-area-inset-bottom);
4466
4472
  }
4467
4473
 
4468
4474
  /* ── Routes tab ── */
@@ -4581,11 +4587,16 @@ const CSS = `
4581
4587
  border: none;
4582
4588
  color: #45475a;
4583
4589
  font-size: 10px;
4584
- width: 14px;
4590
+ width: 28px;
4591
+ height: 28px;
4592
+ margin: -6px -7px -6px -7px;
4585
4593
  cursor: pointer;
4586
4594
  flex-shrink: 0;
4587
4595
  line-height: 1;
4588
4596
  font-family: inherit;
4597
+ display: flex;
4598
+ align-items: center;
4599
+ justify-content: center;
4589
4600
  }
4590
4601
 
4591
4602
  .sdt-tag-name { color: #f38ba8; font-family: monospace; font-size: 12.5px; }
@@ -4633,12 +4644,17 @@ const CSS = `
4633
4644
  border: none;
4634
4645
  color: #45475a;
4635
4646
  font-size: 10px;
4636
- width: 14px;
4647
+ width: 28px;
4648
+ height: 28px;
4649
+ margin: -6px -7px -6px -7px;
4637
4650
  cursor: pointer;
4638
4651
  flex-shrink: 0;
4639
- line-height: 20px;
4652
+ line-height: 1;
4640
4653
  font-family: monospace;
4641
4654
  padding: 0;
4655
+ display: flex;
4656
+ align-items: center;
4657
+ justify-content: center;
4642
4658
  }
4643
4659
 
4644
4660
  .sdt-json-toggle--summary { width: auto; color: #6c7086; }
@@ -4700,14 +4716,14 @@ if (typeof window !== "undefined") {
4700
4716
  ((_b = window.__svelte ?? (window.__svelte = {})).v ?? (_b.v = /* @__PURE__ */ new Set())).add(PUBLIC_VERSION);
4701
4717
  }
4702
4718
  var root_2$3 = /* @__PURE__ */ from_html(`<div class="sdt-nav-indicator"><span class="sdt-spinner"></span> Navigating to <span class="sdt-mono" style="color:inherit"> </span></div>`);
4703
- var root_4$3 = /* @__PURE__ */ from_html(`<span class="sdt-key"> </span> <code class="sdt-val sdt-val-str"> </code>`, 1);
4704
- var root_3$3 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title">Route Params</div> <div class="sdt-kv"></div></div>`);
4719
+ var root_4$2 = /* @__PURE__ */ from_html(`<span class="sdt-key"> </span> <code class="sdt-val sdt-val-str"> </code>`, 1);
4720
+ var root_3$4 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title">Route Params</div> <div class="sdt-kv"></div></div>`);
4705
4721
  var root_6$2 = /* @__PURE__ */ from_html(`<span class="sdt-key"> </span> <code> </code>`, 1);
4706
- var root_5$3 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title">Page Data</div> <div class="sdt-kv"></div></div>`);
4722
+ var root_5$2 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title">Page Data</div> <div class="sdt-kv"></div></div>`);
4707
4723
  var root_7$2 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title">Page Data</div> <span style="color:#6c7086;font-size:12px">No data returned from load()</span></div>`);
4708
4724
  var root_8$2 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title">Form Action Data</div> <code class="sdt-val" style="font-size:11px"> </code></div>`);
4709
4725
  var root_9$2 = /* @__PURE__ */ from_html(`<div class="sdt-section"><div class="sdt-section-title" style="color:#f38ba8">Page Error</div> <code class="sdt-val sdt-val-err"> </code></div>`);
4710
- var root_1$4 = /* @__PURE__ */ from_html(`<!> <div><div class="sdt-info-row"><span class="sdt-badge">Route</span> <code class="sdt-mono"> </code></div> <div class="sdt-info-row"><span class="sdt-badge">URL</span> <code class="sdt-mono sdt-val-url"> </code></div> <div class="sdt-info-row"><span class="sdt-badge">Status</span> <code> </code></div></div> <!> <!> <!> <!>`, 1);
4726
+ var root_1$5 = /* @__PURE__ */ from_html(`<!> <div><div class="sdt-info-row"><span class="sdt-badge">Route</span> <code class="sdt-mono"> </code></div> <div class="sdt-info-row"><span class="sdt-badge">URL</span> <code class="sdt-mono sdt-val-url"> </code></div> <div class="sdt-info-row"><span class="sdt-badge">Status</span> <code> </code></div></div> <!> <!> <!> <!>`, 1);
4711
4727
  var root_10$2 = /* @__PURE__ */ from_html(`<div class="sdt-empty"><span class="sdt-empty-icon">⟨/⟩</span> <span>No SvelteKit page data detected.</span> <span style="color:#45475a;font-size:11px">Ensure the Vite plugin is installed in a SvelteKit project.</span></div>`);
4712
4728
  var root$5 = /* @__PURE__ */ from_html(`<div class="sdt-routes"><!></div>`);
4713
4729
  function RoutesTab($$anchor, $$props) {
@@ -4747,16 +4763,16 @@ function RoutesTab($$anchor, $$props) {
4747
4763
  var node = child(div);
4748
4764
  {
4749
4765
  var consequent_6 = ($$anchor2) => {
4750
- var fragment = root_1$4();
4766
+ var fragment = root_1$5();
4751
4767
  var node_1 = first_child(fragment);
4752
4768
  {
4753
4769
  var consequent = ($$anchor3) => {
4754
4770
  var div_1 = root_2$3();
4755
4771
  var span = sibling(child(div_1), 2);
4756
- var text2 = child(span);
4772
+ var text = child(span);
4757
4773
  template_effect(() => {
4758
4774
  var _a2, _b2;
4759
- return set_text(text2, ((_b2 = (_a2 = get(navigating).to) == null ? void 0 : _a2.url) == null ? void 0 : _b2.pathname) ?? "…");
4775
+ return set_text(text, ((_b2 = (_a2 = get(navigating).to) == null ? void 0 : _a2.url) == null ? void 0 : _b2.pathname) ?? "…");
4760
4776
  });
4761
4777
  append($$anchor3, div_1);
4762
4778
  };
@@ -4777,13 +4793,13 @@ function RoutesTab($$anchor, $$props) {
4777
4793
  var node_2 = sibling(div_2, 2);
4778
4794
  {
4779
4795
  var consequent_1 = ($$anchor3) => {
4780
- var div_6 = root_3$3();
4796
+ var div_6 = root_3$4();
4781
4797
  var div_7 = sibling(child(div_6), 2);
4782
4798
  each(div_7, 21, () => Object.entries(get(page).params), index, ($$anchor4, $$item) => {
4783
4799
  var $$array = /* @__PURE__ */ user_derived(() => to_array(get($$item), 2));
4784
4800
  let k = () => get($$array)[0];
4785
4801
  let v = () => get($$array)[1];
4786
- var fragment_1 = root_4$3();
4802
+ var fragment_1 = root_4$2();
4787
4803
  var span_1 = first_child(fragment_1);
4788
4804
  var text_4 = child(span_1);
4789
4805
  var code_4 = sibling(span_1, 2);
@@ -4804,7 +4820,7 @@ function RoutesTab($$anchor, $$props) {
4804
4820
  var node_3 = sibling(node_2, 2);
4805
4821
  {
4806
4822
  var consequent_2 = ($$anchor3) => {
4807
- var div_8 = root_5$3();
4823
+ var div_8 = root_5$2();
4808
4824
  var div_9 = sibling(child(div_8), 2);
4809
4825
  each(div_9, 21, () => Object.entries(get(page).data), index, ($$anchor4, $$item) => {
4810
4826
  var $$array_1 = /* @__PURE__ */ user_derived(() => to_array(get($$item), 2));
@@ -4888,14 +4904,14 @@ function RoutesTab($$anchor, $$props) {
4888
4904
  pop();
4889
4905
  }
4890
4906
  var root_2$2 = /* @__PURE__ */ from_html(`<button class="sdt-dom-node-toggle"> </button>`);
4891
- var root_3$2 = /* @__PURE__ */ from_html(`<span class="sdt-dom-node-toggle"></span>`);
4892
- var root_4$2 = /* @__PURE__ */ from_html(`<span class="sdt-component-name"> </span> <span class="sdt-dom-tag-hint"> </span>`, 1);
4893
- var root_5$2 = /* @__PURE__ */ from_html(`<span class="sdt-tag-name"> </span>`);
4907
+ var root_3$3 = /* @__PURE__ */ from_html(`<span class="sdt-dom-node-toggle"></span>`);
4908
+ var root_4$1 = /* @__PURE__ */ from_html(`<span class="sdt-component-name"> </span> <span class="sdt-dom-tag-hint"> </span>`, 1);
4909
+ var root_5$1 = /* @__PURE__ */ from_html(`<span class="sdt-tag-name"> </span>`);
4894
4910
  var root_6$1 = /* @__PURE__ */ from_html(`<span class="sdt-attr-id"> </span>`);
4895
4911
  var root_8$1 = /* @__PURE__ */ from_html(`<span class="sdt-dom-overflow"> </span>`);
4896
4912
  var root_7$1 = /* @__PURE__ */ from_html(`<span class="sdt-attr-cls"> </span> <!>`, 1);
4897
4913
  var root_9$1 = /* @__PURE__ */ from_html(`<span class="sdt-json-count"> </span>`);
4898
- var root_1$3 = /* @__PURE__ */ from_html(`<div role="treeitem"><!> <!> <!> <!> <!></div>`);
4914
+ var root_1$4 = /* @__PURE__ */ from_html(`<div role="treeitem"><!> <!> <!> <!> <!></div>`);
4899
4915
  var root_10$1 = /* @__PURE__ */ from_html(`<div class="sdt-empty"><span class="sdt-empty-icon">◈</span> <span>No elements found.</span></div>`);
4900
4916
  var root$4 = /* @__PURE__ */ from_html(`<div class="sdt-components"><!> <!></div>`);
4901
4917
  function ComponentsTab($$anchor, $$props) {
@@ -4996,7 +5012,7 @@ function ComponentsTab($$anchor, $$props) {
4996
5012
  var node_1 = child(div);
4997
5013
  each(node_1, 17, () => get(visibleNodes), index, ($$anchor2, node) => {
4998
5014
  const isCollapsed = /* @__PURE__ */ user_derived(() => get(collapsed).has(get(node).key));
4999
- var div_1 = root_1$3();
5015
+ var div_1 = root_1$4();
5000
5016
  let classes_1;
5001
5017
  set_attribute(div_1, "tabindex", 0);
5002
5018
  let styles;
@@ -5004,16 +5020,16 @@ function ComponentsTab($$anchor, $$props) {
5004
5020
  {
5005
5021
  var consequent = ($$anchor3) => {
5006
5022
  var button = root_2$2();
5007
- var text2 = child(button);
5023
+ var text = child(button);
5008
5024
  template_effect(() => {
5009
5025
  set_attribute(button, "aria-label", get(isCollapsed) ? "Expand" : "Collapse");
5010
- set_text(text2, get(isCollapsed) ? "▸" : "▾");
5026
+ set_text(text, get(isCollapsed) ? "▸" : "▾");
5011
5027
  });
5012
5028
  delegated("click", button, () => toggleCollapse(get(node).key));
5013
5029
  append($$anchor3, button);
5014
5030
  };
5015
5031
  var alternate = ($$anchor3) => {
5016
- var span = root_3$2();
5032
+ var span = root_3$3();
5017
5033
  append($$anchor3, span);
5018
5034
  };
5019
5035
  if_block(node_2, ($$render) => {
@@ -5024,7 +5040,7 @@ function ComponentsTab($$anchor, $$props) {
5024
5040
  var node_3 = sibling(node_2, 2);
5025
5041
  {
5026
5042
  var consequent_1 = ($$anchor3) => {
5027
- var fragment = root_4$2();
5043
+ var fragment = root_4$1();
5028
5044
  var span_1 = first_child(fragment);
5029
5045
  var text_1 = child(span_1);
5030
5046
  var span_2 = sibling(span_1, 2);
@@ -5036,7 +5052,7 @@ function ComponentsTab($$anchor, $$props) {
5036
5052
  append($$anchor3, fragment);
5037
5053
  };
5038
5054
  var alternate_1 = ($$anchor3) => {
5039
- var span_3 = root_5$2();
5055
+ var span_3 = root_5$1();
5040
5056
  var text_3 = child(span_3);
5041
5057
  template_effect(() => set_text(text_3, `<${get(node).tag ?? ""}>`));
5042
5058
  append($$anchor3, span_3);
@@ -5125,10 +5141,10 @@ function ComponentsTab($$anchor, $$props) {
5125
5141
  pop();
5126
5142
  }
5127
5143
  delegate(["keydown", "click"]);
5128
- var root_1$2 = /* @__PURE__ */ from_html(`<button class="sdt-json-toggle"> </button>`);
5144
+ var root_1$3 = /* @__PURE__ */ from_html(`<button class="sdt-json-toggle"> </button>`);
5129
5145
  var root_2$1 = /* @__PURE__ */ from_html(`<span class="sdt-json-toggle"></span>`);
5130
- var root_3$1 = /* @__PURE__ */ from_html(`<span class="sdt-json-key"> </span> <span class="sdt-json-colon">:</span>`, 1);
5131
- var root_4$1 = /* @__PURE__ */ from_html(`<span> </span>`);
5146
+ var root_3$2 = /* @__PURE__ */ from_html(`<span class="sdt-json-key"> </span> <span class="sdt-json-colon">:</span>`, 1);
5147
+ var root_4 = /* @__PURE__ */ from_html(`<span> </span>`);
5132
5148
  var root_6 = /* @__PURE__ */ from_html(`<span class="sdt-json-brace"> </span>`);
5133
5149
  var root_7 = /* @__PURE__ */ from_html(`<span class="sdt-json-brace"> </span>`);
5134
5150
  var root_8 = /* @__PURE__ */ from_html(`<button class="sdt-json-toggle sdt-json-toggle--summary"> <span class="sdt-json-count"> </span> </button>`);
@@ -5234,11 +5250,11 @@ function JsonNode_1($$anchor, $$props) {
5234
5250
  var node = child(div);
5235
5251
  {
5236
5252
  var consequent = ($$anchor2) => {
5237
- var button = root_1$2();
5238
- var text2 = child(button);
5253
+ var button = root_1$3();
5254
+ var text = child(button);
5239
5255
  template_effect(() => {
5240
5256
  set_attribute(button, "aria-label", get(expanded) ? "Collapse" : "Expand");
5241
- set_text(text2, get(expanded) ? "▾" : "▸");
5257
+ set_text(text, get(expanded) ? "▾" : "▸");
5242
5258
  });
5243
5259
  delegated("click", button, () => set(expanded, !get(expanded)));
5244
5260
  append($$anchor2, button);
@@ -5255,7 +5271,7 @@ function JsonNode_1($$anchor, $$props) {
5255
5271
  var node_1 = sibling(node, 2);
5256
5272
  {
5257
5273
  var consequent_1 = ($$anchor2) => {
5258
- var fragment_1 = root_3$1();
5274
+ var fragment_1 = root_3$2();
5259
5275
  var span_1 = first_child(fragment_1);
5260
5276
  var text_1 = child(span_1);
5261
5277
  template_effect(() => set_text(text_1, `"${keyName() ?? ""}"`));
@@ -5268,7 +5284,7 @@ function JsonNode_1($$anchor, $$props) {
5268
5284
  var node_2 = sibling(node_1, 2);
5269
5285
  {
5270
5286
  var consequent_2 = ($$anchor2) => {
5271
- var span_2 = root_4$1();
5287
+ var span_2 = root_4();
5272
5288
  var text_2 = child(span_2);
5273
5289
  template_effect(
5274
5290
  ($0, $1) => {
@@ -5383,9 +5399,9 @@ function JsonNode_1($$anchor, $$props) {
5383
5399
  pop();
5384
5400
  }
5385
5401
  delegate(["click"]);
5386
- var root_1$1 = /* @__PURE__ */ from_html(`<div class="sdt-state-section-label">Component State</div> <!>`, 1);
5387
- var root_3 = /* @__PURE__ */ from_html(`<div class="sdt-state-section-label">Page Store</div> <!>`, 1);
5388
- var root_5$1 = /* @__PURE__ */ from_html(`<div class="sdt-empty"><span class="sdt-empty-icon"></span> <span>No state data available.</span> <span style="color:#45475a;font-size:11px">SvelteKit page store not detected.</span></div>`);
5402
+ var root_1$2 = /* @__PURE__ */ from_html(`<div class="sdt-state-section-label">Component State</div> <!>`, 1);
5403
+ var root_3$1 = /* @__PURE__ */ from_html(`<div class="sdt-state-section-label">Page Store</div> <!>`, 1);
5404
+ var root_5 = /* @__PURE__ */ from_html(`<div class="sdt-empty"><span class="sdt-empty-icon"></span> <span>No state data available.</span> <span style="color:#45475a;font-size:11px">SvelteKit page store not detected.</span></div>`);
5389
5405
  var root$2 = /* @__PURE__ */ from_html(`<div class="sdt-state"><!> <!> <!></div>`);
5390
5406
  function StateTab($$anchor, $$props) {
5391
5407
  push($$props, true);
@@ -5419,7 +5435,7 @@ function StateTab($$anchor, $$props) {
5419
5435
  var node = child(div);
5420
5436
  {
5421
5437
  var consequent = ($$anchor2) => {
5422
- var fragment = root_1$1();
5438
+ var fragment = root_1$2();
5423
5439
  var node_1 = sibling(first_child(fragment), 2);
5424
5440
  each(node_1, 17, () => get(componentEntries), index, ($$anchor3, $$item) => {
5425
5441
  var $$array = /* @__PURE__ */ user_derived(() => to_array(get($$item), 2));
@@ -5444,7 +5460,7 @@ function StateTab($$anchor, $$props) {
5444
5460
  var node_2 = sibling(node, 2);
5445
5461
  {
5446
5462
  var consequent_1 = ($$anchor2) => {
5447
- var fragment_2 = root_3();
5463
+ var fragment_2 = root_3$1();
5448
5464
  var div_1 = first_child(fragment_2);
5449
5465
  var node_3 = sibling(div_1, 2);
5450
5466
  each(node_3, 17, () => get(pageSections), index, ($$anchor3, section) => {
@@ -5468,7 +5484,7 @@ function StateTab($$anchor, $$props) {
5468
5484
  var node_4 = sibling(node_2, 2);
5469
5485
  {
5470
5486
  var consequent_2 = ($$anchor2) => {
5471
- var div_2 = root_5$1();
5487
+ var div_2 = root_5();
5472
5488
  var span = child(div_2);
5473
5489
  span.textContent = "{}";
5474
5490
  append($$anchor2, div_2);
@@ -5480,10 +5496,10 @@ function StateTab($$anchor, $$props) {
5480
5496
  append($$anchor, div);
5481
5497
  pop();
5482
5498
  }
5483
- var root_2 = /* @__PURE__ */ from_html(`<button role="tab"><span class="sdt-tab-icon"> </span> <!></button>`);
5484
- var root_4 = /* @__PURE__ */ from_svg(`<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><rect x="1.5" y="1.5" width="11" height="11" rx="1.5" stroke="currentColor" stroke-width="1.2"></rect><rect x="8" y="1.5" width="4.5" height="11" rx="0.5" fill="currentColor"></rect></svg>`);
5485
- var root_5 = /* @__PURE__ */ from_svg(`<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><rect x="1.5" y="1.5" width="11" height="11" rx="1.5" stroke="currentColor" stroke-width="1.2"></rect><rect x="1.5" y="8" width="11" height="4.5" rx="0.5" fill="currentColor"></rect></svg>`);
5486
- var root$1 = /* @__PURE__ */ from_html(`<div><button aria-label="Resize panel" title="Drag to resize"></button> <div class="sdt-header"><div class="sdt-logo" title="Svelte DevTools"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 512 512"><path d="M416.9 93.1c-41.1-58.9-122.4-76.3-181.2-38.9L132.5 120c-28.2 17.7-47.6 46.5-53.5 79.3-4.9 27.3-.6 55.5 12.3 80-8.8 13.4-14.9 28.5-17.7 44.2-5.9 33.4 1.8 67.8 21.6 95.4 41.2 58.9 122.4 76.3 181.2 38.9L379.6 392c28.2-17.7 47.6-46.5 53.5-79.3 4.9-27.3.6-55.5-12.3-80 8.8-13.4 14.9-28.4 17.7-44.2 5.8-33.4-1.9-67.8-21.6-95.4" style="fill:#ff3e00"></path><path d="M225.6 424.5c-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4.6-3.3 1.4-6.5 2.5-9.6l1.9-5.9 5.3 3.9c12.2 9 25.9 15.8 40.4 20.2l3.8 1.2-.4 3.8c-.5 5.4 1 10.9 4.2 15.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8l103.2-65.8c5.1-3.2 8.6-8.4 9.7-14.4 1.1-6.1-.3-12.3-3.9-17.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8L252 291c-6.5 4.1-13.5 7.2-21 9.2-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4 3.5-19.7 15.2-37 32.2-47.7l103.2-65.8c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-.6 3.3-1.4 6.5-2.5 9.6L383 193l-5.3-3.9c-12.2-9-25.9-15.8-40.4-20.2l-3.8-1.2.4-3.8c.5-5.4-1-10.9-4.2-15.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8l-103.2 65.8c-5.1 3.2-8.6 8.4-9.7 14.4-1.1 6.1.3 12.3 3.9 17.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8L260 221c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-3.5 19.7-15.2 37-32.2 47.7l-103.2 65.8c-6.5 4.1-13.6 7.2-21 9.2" style="fill:#fff"></path></svg> <!></div> <div class="sdt-tabs" role="tablist"></div> <button class="sdt-position-toggle"><!></button> <button class="sdt-close" title="Close (⇧⌥D)">✕</button></div> <div class="sdt-content" role="tabpanel"><!></div></div>`);
5499
+ var root_1$1 = /* @__PURE__ */ from_html(`<button role="tab"><span class="sdt-tab-icon"> </span> <span class="sdt-tab-label"> </span></button>`);
5500
+ var root_2 = /* @__PURE__ */ from_svg(`<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><rect x="1.5" y="1.5" width="11" height="11" rx="1.5" stroke="currentColor" stroke-width="1.2"></rect><rect x="8" y="1.5" width="4.5" height="11" rx="0.5" fill="currentColor"></rect></svg>`);
5501
+ var root_3 = /* @__PURE__ */ from_svg(`<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><rect x="1.5" y="1.5" width="11" height="11" rx="1.5" stroke="currentColor" stroke-width="1.2"></rect><rect x="1.5" y="8" width="11" height="4.5" rx="0.5" fill="currentColor"></rect></svg>`);
5502
+ var root$1 = /* @__PURE__ */ from_html(`<div><button aria-label="Resize panel" title="Drag to resize"></button> <div class="sdt-header"><div class="sdt-logo" title="Svelte DevTools"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 512 512"><path d="M416.9 93.1c-41.1-58.9-122.4-76.3-181.2-38.9L132.5 120c-28.2 17.7-47.6 46.5-53.5 79.3-4.9 27.3-.6 55.5 12.3 80-8.8 13.4-14.9 28.5-17.7 44.2-5.9 33.4 1.8 67.8 21.6 95.4 41.2 58.9 122.4 76.3 181.2 38.9L379.6 392c28.2-17.7 47.6-46.5 53.5-79.3 4.9-27.3.6-55.5-12.3-80 8.8-13.4 14.9-28.4 17.7-44.2 5.8-33.4-1.9-67.8-21.6-95.4" style="fill:#ff3e00"></path><path d="M225.6 424.5c-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4.6-3.3 1.4-6.5 2.5-9.6l1.9-5.9 5.3 3.9c12.2 9 25.9 15.8 40.4 20.2l3.8 1.2-.4 3.8c-.5 5.4 1 10.9 4.2 15.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8l103.2-65.8c5.1-3.2 8.6-8.4 9.7-14.4 1.1-6.1-.3-12.3-3.9-17.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8L252 291c-6.5 4.1-13.5 7.2-21 9.2-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4 3.5-19.7 15.2-37 32.2-47.7l103.2-65.8c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-.6 3.3-1.4 6.5-2.5 9.6L383 193l-5.3-3.9c-12.2-9-25.9-15.8-40.4-20.2l-3.8-1.2.4-3.8c.5-5.4-1-10.9-4.2-15.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8l-103.2 65.8c-5.1 3.2-8.6 8.4-9.7 14.4-1.1 6.1.3 12.3 3.9 17.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8L260 221c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-3.5 19.7-15.2 37-32.2 47.7l-103.2 65.8c-6.5 4.1-13.6 7.2-21 9.2" style="fill:#fff"></path></svg> <span class="sdt-logo-text">Svelte DevTools</span></div> <div class="sdt-tabs" role="tablist"></div> <button class="sdt-position-toggle"><!></button> <button class="sdt-close" title="Close (⇧⌥D)">✕</button></div> <div class="sdt-content" role="tabpanel"><!></div></div>`);
5487
5503
  function Panel($$anchor, $$props) {
5488
5504
  push($$props, true);
5489
5505
  function storageGet(key) {
@@ -5513,99 +5529,84 @@ function Panel($$anchor, $$props) {
5513
5529
  set(activeTab, id, true);
5514
5530
  storageSet("sdt:tab", id);
5515
5531
  }
5516
- function startResize(e) {
5517
- const startVal = $$props.position === "bottom" ? e.clientY : e.clientX;
5532
+ function startResize(startClientY, startClientX) {
5518
5533
  const startSize = $$props.position === "bottom" ? $$props.height : $$props.width;
5519
- e.preventDefault();
5520
- const onMove = (e2) => {
5521
- const delta = $$props.position === "bottom" ? startVal - e2.clientY : (
5534
+ const onMove = (clientY, clientX) => {
5535
+ const delta = $$props.position === "bottom" ? startClientY - clientY : (
5522
5536
  // drag up → taller
5523
- startVal - e2.clientX
5537
+ startClientX - clientX
5524
5538
  );
5525
5539
  const next = Math.min(900, Math.max(180, startSize + delta));
5526
5540
  $$props.onResize(next);
5527
5541
  };
5528
- const onUp = () => {
5529
- document.removeEventListener("mousemove", onMove);
5530
- document.removeEventListener("mouseup", onUp);
5542
+ const onMouseMove = (e) => onMove(e.clientY, e.clientX);
5543
+ const onTouchMove = (e) => onMove(e.touches[0].clientY, e.touches[0].clientX);
5544
+ const onEnd = () => {
5545
+ document.removeEventListener("mousemove", onMouseMove);
5546
+ document.removeEventListener("mouseup", onEnd);
5547
+ document.removeEventListener("touchmove", onTouchMove);
5548
+ document.removeEventListener("touchend", onEnd);
5531
5549
  };
5532
- document.addEventListener("mousemove", onMove);
5533
- document.addEventListener("mouseup", onUp);
5550
+ document.addEventListener("mousemove", onMouseMove);
5551
+ document.addEventListener("mouseup", onEnd);
5552
+ document.addEventListener("touchmove", onTouchMove, { passive: true });
5553
+ document.addEventListener("touchend", onEnd);
5534
5554
  }
5535
5555
  var div = root$1();
5536
5556
  let classes;
5537
5557
  var button = child(div);
5538
5558
  let classes_1;
5539
5559
  var div_1 = sibling(button, 2);
5540
- var div_2 = child(div_1);
5541
- var node = sibling(child(div_2), 2);
5542
- {
5543
- var consequent = ($$anchor2) => {
5544
- var text$1 = text("Svelte DevTools");
5545
- append($$anchor2, text$1);
5546
- };
5547
- if_block(node, ($$render) => {
5548
- if ($$props.position === "bottom") $$render(consequent);
5549
- });
5550
- }
5551
- var div_3 = sibling(div_2, 2);
5552
- each(div_3, 21, () => tabs, index, ($$anchor2, tab) => {
5553
- var button_1 = root_2();
5560
+ var div_2 = sibling(child(div_1), 2);
5561
+ each(div_2, 21, () => tabs, index, ($$anchor2, tab) => {
5562
+ var button_1 = root_1$1();
5554
5563
  let classes_2;
5555
5564
  var span = child(button_1);
5556
- var text_1 = child(span);
5557
- var node_1 = sibling(span, 2);
5558
- {
5559
- var consequent_1 = ($$anchor3) => {
5560
- var text_2 = text();
5561
- template_effect(() => set_text(text_2, get(tab).label));
5562
- append($$anchor3, text_2);
5563
- };
5564
- if_block(node_1, ($$render) => {
5565
- if ($$props.position === "bottom") $$render(consequent_1);
5566
- });
5567
- }
5565
+ var text = child(span);
5566
+ var span_1 = sibling(span, 2);
5567
+ var text_1 = child(span_1);
5568
5568
  template_effect(() => {
5569
5569
  classes_2 = set_class(button_1, 1, "sdt-tab", null, classes_2, { "sdt-tab--active": get(activeTab) === get(tab).id });
5570
5570
  set_attribute(button_1, "aria-selected", get(activeTab) === get(tab).id);
5571
5571
  set_attribute(button_1, "title", get(tab).label);
5572
- set_text(text_1, get(tab).icon);
5572
+ set_text(text, get(tab).icon);
5573
+ set_text(text_1, get(tab).label);
5573
5574
  });
5574
5575
  delegated("click", button_1, () => selectTab(get(tab).id));
5575
5576
  append($$anchor2, button_1);
5576
5577
  });
5577
- var button_2 = sibling(div_3, 2);
5578
- var node_2 = child(button_2);
5578
+ var button_2 = sibling(div_2, 2);
5579
+ var node = child(button_2);
5579
5580
  {
5580
- var consequent_2 = ($$anchor2) => {
5581
- var svg = root_4();
5581
+ var consequent = ($$anchor2) => {
5582
+ var svg = root_2();
5582
5583
  append($$anchor2, svg);
5583
5584
  };
5584
5585
  var alternate = ($$anchor2) => {
5585
- var svg_1 = root_5();
5586
+ var svg_1 = root_3();
5586
5587
  append($$anchor2, svg_1);
5587
5588
  };
5588
- if_block(node_2, ($$render) => {
5589
- if ($$props.position === "bottom") $$render(consequent_2);
5589
+ if_block(node, ($$render) => {
5590
+ if ($$props.position === "bottom") $$render(consequent);
5590
5591
  else $$render(alternate, -1);
5591
5592
  });
5592
5593
  }
5593
5594
  var button_3 = sibling(button_2, 2);
5594
- var div_4 = sibling(div_1, 2);
5595
- var node_3 = child(div_4);
5595
+ var div_3 = sibling(div_1, 2);
5596
+ var node_1 = child(div_3);
5596
5597
  {
5597
- var consequent_3 = ($$anchor2) => {
5598
+ var consequent_1 = ($$anchor2) => {
5598
5599
  RoutesTab($$anchor2, {});
5599
5600
  };
5600
- var consequent_4 = ($$anchor2) => {
5601
+ var consequent_2 = ($$anchor2) => {
5601
5602
  ComponentsTab($$anchor2, {});
5602
5603
  };
5603
5604
  var alternate_1 = ($$anchor2) => {
5604
5605
  StateTab($$anchor2, {});
5605
5606
  };
5606
- if_block(node_3, ($$render) => {
5607
- if (get(activeTab) === "routes") $$render(consequent_3);
5608
- else if (get(activeTab) === "components") $$render(consequent_4, 1);
5607
+ if_block(node_1, ($$render) => {
5608
+ if (get(activeTab) === "routes") $$render(consequent_1);
5609
+ else if (get(activeTab) === "components") $$render(consequent_2, 1);
5609
5610
  else $$render(alternate_1, -1);
5610
5611
  });
5611
5612
  }
@@ -5616,7 +5617,11 @@ function Panel($$anchor, $$props) {
5616
5617
  set_attribute(button_2, "title", $$props.position === "bottom" ? "Move to right" : "Move to bottom");
5617
5618
  set_attribute(button_2, "aria-label", $$props.position === "bottom" ? "Switch to right drawer" : "Switch to bottom drawer");
5618
5619
  });
5619
- delegated("mousedown", button, startResize);
5620
+ delegated("mousedown", button, (e) => {
5621
+ e.preventDefault();
5622
+ startResize(e.clientY, e.clientX);
5623
+ });
5624
+ delegated("touchstart", button, (e) => startResize(e.touches[0].clientY, e.touches[0].clientX));
5620
5625
  delegated("keydown", button, (e) => {
5621
5626
  if ($$props.position === "bottom") {
5622
5627
  if (e.key === "ArrowUp") $$props.onResize(Math.min(900, $$props.height + 20));
@@ -5634,7 +5639,7 @@ function Panel($$anchor, $$props) {
5634
5639
  append($$anchor, div);
5635
5640
  pop();
5636
5641
  }
5637
- delegate(["mousedown", "keydown", "click"]);
5642
+ delegate(["mousedown", "touchstart", "keydown", "click"]);
5638
5643
  var root_1 = /* @__PURE__ */ from_html(`<div><!></div>`);
5639
5644
  var root = /* @__PURE__ */ from_html(`<button aria-label="Toggle Svelte DevTools"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512"><path d="M416.9 93.1c-41.1-58.9-122.4-76.3-181.2-38.9L132.5 120c-28.2 17.7-47.6 46.5-53.5 79.3-4.9 27.3-.6 55.5 12.3 80-8.8 13.4-14.9 28.5-17.7 44.2-5.9 33.4 1.8 67.8 21.6 95.4 41.2 58.9 122.4 76.3 181.2 38.9L379.6 392c28.2-17.7 47.6-46.5 53.5-79.3 4.9-27.3.6-55.5-12.3-80 8.8-13.4 14.9-28.4 17.7-44.2 5.8-33.4-1.9-67.8-21.6-95.4" style="fill:#ff3e00"></path><path d="M225.6 424.5c-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4.6-3.3 1.4-6.5 2.5-9.6l1.9-5.9 5.3 3.9c12.2 9 25.9 15.8 40.4 20.2l3.8 1.2-.4 3.8c-.5 5.4 1 10.9 4.2 15.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8l103.2-65.8c5.1-3.2 8.6-8.4 9.7-14.4 1.1-6.1-.3-12.3-3.9-17.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8L252 291c-6.5 4.1-13.5 7.2-21 9.2-33.3 8.6-68.4-4.4-88-32.6-11.9-16.6-16.5-37.3-13-57.4 3.5-19.7 15.2-37 32.2-47.7l103.2-65.8c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-.6 3.3-1.4 6.5-2.5 9.6L383 193l-5.3-3.9c-12.2-9-25.9-15.8-40.4-20.2l-3.8-1.2.4-3.8c.5-5.4-1-10.9-4.2-15.3-5.9-8.5-16.5-12.4-26.5-9.8-2.2.6-4.4 1.5-6.3 2.8l-103.2 65.8c-5.1 3.2-8.6 8.4-9.7 14.4-1.1 6.1.3 12.3 3.9 17.3 5.9 8.5 16.5 12.4 26.5 9.8 2.2-.6 4.4-1.5 6.3-2.8L260 221c6.5-4.1 13.5-7.2 21-9.2 33.3-8.6 68.4 4.4 88 32.6 11.9 16.6 16.5 37.3 13 57.4-3.5 19.7-15.2 37-32.2 47.7l-103.2 65.8c-6.5 4.1-13.6 7.2-21 9.2" style="fill:#fff"></path></svg> <span>Svelte DevTools</span></button> <!>`, 1);
5640
5645
  function Overlay($$anchor, $$props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svelte-devtools/vite-plugin",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Vite plugin that adds a development overlay for inspecting Svelte 5 and SvelteKit apps",
5
5
  "type": "module",
6
6
  "keywords": [