@dirwell/theme-ledger 0.0.2 → 0.0.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.
@@ -169,17 +169,6 @@
169
169
  return () => cancelAnimationFrame(frame);
170
170
  });
171
171
  const isDirectory = directoryLike;
172
- function safeHref(record) {
173
- if (
174
- typeof location !== "undefined" &&
175
- location.protocol === "file:" &&
176
- isDirectory(record) &&
177
- !record.exitsExplorer &&
178
- record.href?.endsWith("/")
179
- )
180
- return record.href + "index.html";
181
- return record.href;
182
- }
183
172
  async function hydrateData() {
184
173
  if (complete || !model.manifestHref || location.protocol === "file:")
185
174
  return;
@@ -206,6 +195,7 @@
206
195
  }
207
196
  }
208
197
  async function navigate(event, record) {
198
+ selected = record.id;
209
199
  saveView();
210
200
  const dataHref = record.presentation?.folderDataHref;
211
201
  if (
@@ -815,7 +805,7 @@
815
805
  {#if column === "name"}<span class="identity"
816
806
  >{#if entry.href}<a
817
807
  class="name"
818
- href={safeHref(entry)}
808
+ href={entry.href}
819
809
  target={entry.exitsExplorer ? "_blank" : undefined}
820
810
  rel={entry.exitsExplorer ? "noopener" : undefined}
821
811
  onclick={(event) => navigate(event, entry)}
@@ -867,7 +857,7 @@
867
857
  })}{/if}
868
858
  {#each ui.actions as action}
869
859
  {#if action === "download" && entry.href && !isDirectory(entry) && !entry.link?.unavailable}<a
870
- href={safeHref(entry)}
860
+ href={entry.href}
871
861
  download>{ui.labels.download}</a
872
862
  >
873
863
  {:else if action !== "download"}<button
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dirwell/theme-ledger",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Svelte-owned searchable directory explorer.",
5
5
  "homepage": "https://vp-tw.github.io/dirwell/themes/",
6
6
  "bugs": {
@@ -38,7 +38,7 @@
38
38
  "tag": "latest"
39
39
  },
40
40
  "dependencies": {
41
- "@dirwell/core": "0.0.2",
41
+ "@dirwell/core": "0.0.3",
42
42
  "svelte": "5.57.2"
43
43
  },
44
44
  "devDependencies": {