accessify-widget 0.3.103 → 0.3.104

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.
@@ -1,4 +1,4 @@
1
- import { d, i } from "./index-z-PPlD77.js";
1
+ import { d, i } from "./index-Bsfz4nea.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6663,14 +6663,14 @@ function FeatureGrid($$anchor, $$props) {
6663
6663
  const FEATURE_LOADERS = {
6664
6664
  contrast: () => import("./contrast-CqsOs6Uo.js"),
6665
6665
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6666
- "keyboard-nav": () => import("./keyboard-nav-Ca6B6NGi.js"),
6666
+ "keyboard-nav": () => import("./keyboard-nav-Ce7uj953.js"),
6667
6667
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6668
6668
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6669
6669
  "reading-mask": () => import("./reading-mask-CImlx88t.js"),
6670
6670
  "animation-stop": () => import("./animation-stop-C2Ced0LV.js"),
6671
6671
  "hide-images": () => import("./hide-images-DdZdru63.js"),
6672
6672
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6673
- "page-structure": () => import("./page-structure-CMx_Jviw.js"),
6673
+ "page-structure": () => import("./page-structure-Bj5tC7r4.js"),
6674
6674
  tts: () => import("./tts-BytU4gzP.js"),
6675
6675
  "text-simplify": () => import("./text-simplify-YuRRlyGQ.js"),
6676
6676
  "alt-text": () => Promise.resolve().then(() => altText)
@@ -7438,6 +7438,33 @@ function WidgetApp($$anchor, $$props) {
7438
7438
  }
7439
7439
  const textTransformService = createTextTransformService();
7440
7440
  const STORAGE_KEY = "accessify-prefs";
7441
+ const SCHEMA_VERSION = 1;
7442
+ const SCHEMA_KEY = "accessify-schema-version";
7443
+ const MIGRATIONS = [
7444
+ // Future entries: { from: 1, to: 2, run: () => localStorage.removeItem('…') }
7445
+ ];
7446
+ function runSchemaMigrations() {
7447
+ try {
7448
+ let stored = parseInt(localStorage.getItem(SCHEMA_KEY) || "0", 10);
7449
+ if (!Number.isFinite(stored) || stored < 0) stored = 0;
7450
+ if (stored === 0 && localStorage.getItem(SCHEMA_KEY) === null) {
7451
+ localStorage.setItem(SCHEMA_KEY, String(SCHEMA_VERSION));
7452
+ return;
7453
+ }
7454
+ if (stored === SCHEMA_VERSION) return;
7455
+ while (stored < SCHEMA_VERSION) {
7456
+ const mig = MIGRATIONS.find((m) => m.from === stored);
7457
+ if (!mig) break;
7458
+ try {
7459
+ mig.run();
7460
+ } catch {
7461
+ }
7462
+ stored = mig.to;
7463
+ }
7464
+ localStorage.setItem(SCHEMA_KEY, String(SCHEMA_VERSION));
7465
+ } catch {
7466
+ }
7467
+ }
7441
7468
  let activeCount = /* @__PURE__ */ user_derived(() => Array.from(get(activeFeatures).values()).filter(Boolean).length);
7442
7469
  let currentLangOption = /* @__PURE__ */ user_derived(() => LANGUAGE_OPTIONS.find((o) => o.code === get(widgetLang)));
7443
7470
  function announce(message) {
@@ -7635,6 +7662,7 @@ function WidgetApp($$anchor, $$props) {
7635
7662
  });
7636
7663
  onMount(() => {
7637
7664
  set(widgetLang, getSupportedLang(config2().lang || "en"), true);
7665
+ runSchemaMigrations();
7638
7666
  detectTheme();
7639
7667
  applyTheme();
7640
7668
  loadPrefs();
@@ -9162,4 +9190,4 @@ export {
9162
9190
  init as i,
9163
9191
  t
9164
9192
  };
9165
- //# sourceMappingURL=index-z-PPlD77.js.map
9193
+ //# sourceMappingURL=index-Bsfz4nea.js.map