html-flip-book-vanilla 0.0.0-alpha.71 → 0.0.0-alpha.73

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.
@@ -18,5 +18,6 @@ export interface DownloadConfig {
18
18
  downloadContext?: PageRangesDownloadContext;
19
19
  entireBookFilename?: string;
20
20
  rangeFilename?: string;
21
+ onDownloadError?: (error: unknown) => unknown;
21
22
  }
22
23
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/download/types.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAEhC,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,EAAE,MAAM,CAAC;CACb;AAGD,MAAM,WAAW,yBAAyB;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAOD,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAOxE,MAAM,MAAM,yBAAyB,GAAG,CACvC,KAAK,EAAE,MAAM,EAAE,EACf,aAAa,EAAE,gBAAgB,EAAE,EACjC,OAAO,CAAC,EAAE,yBAAyB,KAC/B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAMpC,MAAM,WAAW,cAAc;IAE9B,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAEvC,mBAAmB,CAAC,EAAE,yBAAyB,CAAC;IAEhD,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAE5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/download/types.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAEhC,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,EAAE,MAAM,CAAC;CACb;AAGD,MAAM,WAAW,yBAAyB;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAOD,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAOxE,MAAM,MAAM,yBAAyB,GAAG,CACvC,KAAK,EAAE,MAAM,EAAE,EACf,aAAa,EAAE,gBAAgB,EAAE,EACjC,OAAO,CAAC,EAAE,yBAAyB,KAC/B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAMpC,MAAM,WAAW,cAAc;IAE9B,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAEvC,mBAAmB,CAAC,EAAE,yBAAyB,CAAC;IAEhD,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAE5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,aAAa,CAAC,EAAE,MAAM,CAAC;IAMvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../src/intl/locales/en-US.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,YA0BX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../src/intl/locales/en-US.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,YA2BX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"he-IL.d.ts","sourceRoot":"","sources":["../../../src/intl/locales/he-IL.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,YA0BX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"he-IL.d.ts","sourceRoot":"","sources":["../../../src/intl/locales/he-IL.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,YA2BX,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/dist/intl.js CHANGED
@@ -7,6 +7,7 @@ const m = {
7
7
  "toolbarItem.download.from": "From",
8
8
  "toolbarItem.download.to": "To",
9
9
  "toolbarItem.download.download": "Download",
10
+ "toolbarItem.download.error": "Download failed — try again",
10
11
  "command.downloadEntireBook": "Download entire book",
11
12
  "command.jumpToToc": "Table of contents",
12
13
  "command.jumpToFirstPage": "First page",
@@ -33,6 +34,7 @@ const m = {
33
34
  "toolbarItem.download.from": "מ",
34
35
  "toolbarItem.download.to": "עד",
35
36
  "toolbarItem.download.download": "הורד",
37
+ "toolbarItem.download.error": "ההורדה נכשלה — נסו שוב",
36
38
  "command.downloadEntireBook": "הורד את כל הספר",
37
39
  "command.jumpToToc": "תוכן העניינים",
38
40
  "command.jumpToFirstPage": "עמוד ראשון",
@@ -53,7 +55,7 @@ const m = {
53
55
  }, l = {
54
56
  "en-US": m,
55
57
  "he-IL": d
56
- }, n = "en-US", c = {
58
+ }, a = "en-US", c = {
57
59
  "toolbarItem.download": "Download",
58
60
  "toolbarItem.downloadPageRange": "Download page range…",
59
61
  "toolbarItem.download.from": "From",
@@ -74,25 +76,25 @@ const m = {
74
76
  "toolbarItem.exitFullscreen": "Exit fullscreen",
75
77
  "toolbarItem.fullscreenUnsupported": "Fullscreen is not supported by this browser"
76
78
  };
77
- function a(o) {
78
- return l[o] ?? l[n];
79
+ function n(o) {
80
+ return l[o] ?? l[a];
79
81
  }
80
82
  function g(o) {
81
- return a(o).direction === "rtl";
83
+ return n(o).direction === "rtl";
82
84
  }
83
85
  function u(o) {
84
86
  return g(o) ? "rtl" : "ltr";
85
87
  }
86
88
  function b(o, r) {
87
- const e = a(r).translations[o];
89
+ const e = n(r).translations[o];
88
90
  if (e !== void 0 && e !== "") return e;
89
- const t = l[n].translations[o];
91
+ const t = l[a].translations[o];
90
92
  return t !== void 0 && t !== "" ? t : c[o] ?? o;
91
93
  }
92
94
  export {
93
- n as defaultLocale,
95
+ a as defaultLocale,
94
96
  u as directionFromLocale,
95
- a as getConfig,
97
+ n as getConfig,
96
98
  g as isRtl,
97
99
  b as t
98
100
  };
package/dist/intl.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"intl.js","sources":["../src/intl/locales/en-US.ts","../src/intl/locales/he-IL.ts","../src/intl/index.ts"],"sourcesContent":["/**\n * en-US locale: LTR, with actual English translation values.\n */\nimport type { LocaleConfig } from \"../types\";\n\nconst enUS: LocaleConfig = {\n\talign: \"left\",\n\tdirection: \"ltr\",\n\ttranslations: {\n\t\t\"toolbarItem.download\": \"Download\",\n\t\t\"toolbarItem.downloadPageRange\": \"Download page range…\",\n\t\t\"toolbarItem.download.from\": \"From\",\n\t\t\"toolbarItem.download.to\": \"To\",\n\t\t\"toolbarItem.download.download\": \"Download\",\n\t\t\"command.downloadEntireBook\": \"Download entire book\",\n\t\t\"command.jumpToToc\": \"Table of contents\",\n\t\t\"command.jumpToFirstPage\": \"First page\",\n\t\t\"command.jumpToLastPage\": \"Last page\",\n\t\t\"command.jumpToPrevPage\": \"Previous page\",\n\t\t\"command.jumpToNextPage\": \"Next page\",\n\t\t\"command.toggleFullscreen\": \"Toggle fullscreen\",\n\t\t\"command.toggleFullscreenDesc\": \"Enter or exit fullscreen mode\",\n\t\t\"command.toggleDebug\": \"Toggle debug toolbar\",\n\t\t\"command.toggleDebugDesc\": \"Show or hide the debug toolbar (Ctrl+Alt+D)\",\n\t\t\"toolbarItem.goToPage\": \"Go to page\",\n\t\t\"toolbarItem.selectText\": \"Select text with mouse\",\n\t\t\"toolbarItem.selectionLetters\": \"Aa\",\n\t\t\"toolbarItem.enterFullscreen\": \"Enter fullscreen\",\n\t\t\"toolbarItem.exitFullscreen\": \"Exit fullscreen\",\n\t\t\"toolbarItem.fullscreenUnsupported\": \"Fullscreen is not supported by this browser\",\n\t},\n};\n\nexport default enUS;\n","/**\n * he-IL locale: RTL, Hebrew translations.\n */\nimport type { LocaleConfig } from \"../types\";\n\nconst heIL: LocaleConfig = {\n\talign: \"right\",\n\tdirection: \"rtl\",\n\ttranslations: {\n\t\t\"toolbarItem.download\": \"הורדה\",\n\t\t\"toolbarItem.downloadPageRange\": \"הורד טווח עמודים…\",\n\t\t\"toolbarItem.download.from\": \"מ\",\n\t\t\"toolbarItem.download.to\": \"עד\",\n\t\t\"toolbarItem.download.download\": \"הורד\",\n\t\t\"command.downloadEntireBook\": \"הורד את כל הספר\",\n\t\t\"command.jumpToToc\": \"תוכן העניינים\",\n\t\t\"command.jumpToFirstPage\": \"עמוד ראשון\",\n\t\t\"command.jumpToLastPage\": \"עמוד אחרון\",\n\t\t\"command.jumpToPrevPage\": \"עמוד קודם\",\n\t\t\"command.jumpToNextPage\": \"עמוד הבא\",\n\t\t\"command.toggleFullscreen\": \"מסך מלא\",\n\t\t\"command.toggleFullscreenDesc\": \"כניסה או יציאה ממסך מלא\",\n\t\t\"command.toggleDebug\": \"סרגל כלים לדיבוג\",\n\t\t\"command.toggleDebugDesc\": \"הצג או הסתר סרגל הדיבוג (Ctrl+Alt+D)\",\n\t\t\"toolbarItem.goToPage\": \"מעבר לעמוד\",\n\t\t\"toolbarItem.selectText\": \"בחירת טקסט עם העכבר\",\n\t\t\"toolbarItem.selectionLetters\": \"אב\",\n\t\t\"toolbarItem.enterFullscreen\": \"כניסה למסך מלא\",\n\t\t\"toolbarItem.exitFullscreen\": \"יציאה ממסך מלא\",\n\t\t\"toolbarItem.fullscreenUnsupported\": \"מסך מלא אינו נתמך בדפדפן זה\",\n\t},\n};\n\nexport default heIL;\n","/**\n * Intl at base level: locale config (align + translations) and helpers.\n * One file per locale: en-US (default), he-IL.\n */\nimport enUS from \"./locales/en-US\";\nimport heIL from \"./locales/he-IL\";\nimport type { Locale, LocaleConfig } from \"./types\";\n\nexport type { Locale, LocaleConfig } from \"./types\";\n\nconst configs: Record<Locale, LocaleConfig> = {\n\t\"en-US\": enUS,\n\t\"he-IL\": heIL,\n};\n\n/** Default locale. Used to derive default direction (LTR). */\nexport const defaultLocale: Locale = \"en-US\";\n\n/** Fallback when a key is missing (use en-US or key). */\nconst enFallbacks: Record<string, string> = {\n\t\"toolbarItem.download\": \"Download\",\n\t\"toolbarItem.downloadPageRange\": \"Download page range…\",\n\t\"toolbarItem.download.from\": \"From\",\n\t\"toolbarItem.download.to\": \"To\",\n\t\"toolbarItem.download.download\": \"Download\",\n\t\"command.downloadEntireBook\": \"Download entire book\",\n\t\"command.jumpToToc\": \"Table of contents\",\n\t\"command.jumpToFirstPage\": \"First page\",\n\t\"command.jumpToLastPage\": \"Last page\",\n\t\"command.jumpToPrevPage\": \"Previous page\",\n\t\"command.jumpToNextPage\": \"Next page\",\n\t\"command.toggleFullscreen\": \"Toggle fullscreen\",\n\t\"command.toggleFullscreenDesc\": \"Enter or exit fullscreen mode\",\n\t\"command.toggleDebug\": \"Toggle debug toolbar\",\n\t\"command.toggleDebugDesc\": \"Show or hide the debug toolbar (Ctrl+Alt+D)\",\n\t\"toolbarItem.goToPage\": \"Go to page\",\n\t\"toolbarItem.enterFullscreen\": \"Enter fullscreen\",\n\t\"toolbarItem.exitFullscreen\": \"Exit fullscreen\",\n\t\"toolbarItem.fullscreenUnsupported\": \"Fullscreen is not supported by this browser\",\n};\n\nexport function getConfig(locale: Locale): LocaleConfig {\n\treturn configs[locale] ?? configs[defaultLocale];\n}\n\n/** Whether the locale is RTL (e.g. he-IL). */\nexport function isRtl(locale: Locale): boolean {\n\treturn getConfig(locale).direction === \"rtl\";\n}\n\n/** Resolve direction from locale. Default from intl. */\nexport function directionFromLocale(locale: Locale): \"ltr\" | \"rtl\" {\n\treturn isRtl(locale) ? \"rtl\" : \"ltr\";\n}\n\n/**\n * Translate key for locale. Returns config translation or fallback to en-US, then key.\n */\nexport function t(key: string, locale: Locale): string {\n\tconst cfg = getConfig(locale);\n\tconst value = cfg.translations[key];\n\tif (value !== undefined && value !== \"\") return value;\n\tconst en = configs[defaultLocale].translations[key];\n\tif (en !== undefined && en !== \"\") return en;\n\treturn enFallbacks[key] ?? key;\n}\n"],"names":["enUS","heIL","configs","defaultLocale","enFallbacks","getConfig","locale","isRtl","directionFromLocale","t","key","value","en"],"mappings":"AAKA,MAAMA,IAAqB;AAAA,EAC1B,OAAO;AAAA,EACP,WAAW;AAAA,EACX,cAAc;AAAA,IACb,wBAAwB;AAAA,IACxB,iCAAiC;AAAA,IACjC,6BAA6B;AAAA,IAC7B,2BAA2B;AAAA,IAC3B,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,qBAAqB;AAAA,IACrB,2BAA2B;AAAA,IAC3B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,4BAA4B;AAAA,IAC5B,gCAAgC;AAAA,IAChC,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,wBAAwB;AAAA,IACxB,0BAA0B;AAAA,IAC1B,gCAAgC;AAAA,IAChC,+BAA+B;AAAA,IAC/B,8BAA8B;AAAA,IAC9B,qCAAqC;AAAA,EAAA;AAEvC,GC1BMC,IAAqB;AAAA,EAC1B,OAAO;AAAA,EACP,WAAW;AAAA,EACX,cAAc;AAAA,IACb,wBAAwB;AAAA,IACxB,iCAAiC;AAAA,IACjC,6BAA6B;AAAA,IAC7B,2BAA2B;AAAA,IAC3B,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,qBAAqB;AAAA,IACrB,2BAA2B;AAAA,IAC3B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,4BAA4B;AAAA,IAC5B,gCAAgC;AAAA,IAChC,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,wBAAwB;AAAA,IACxB,0BAA0B;AAAA,IAC1B,gCAAgC;AAAA,IAChC,+BAA+B;AAAA,IAC/B,8BAA8B;AAAA,IAC9B,qCAAqC;AAAA,EAAA;AAEvC,GCrBMC,IAAwC;AAAA,EAC7C,SAASF;AAAA,EACT,SAASC;AACV,GAGaE,IAAwB,SAG/BC,IAAsC;AAAA,EAC3C,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,8BAA8B;AAAA,EAC9B,qBAAqB;AAAA,EACrB,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,gCAAgC;AAAA,EAChC,uBAAuB;AAAA,EACvB,2BAA2B;AAAA,EAC3B,wBAAwB;AAAA,EACxB,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,qCAAqC;AACtC;AAEO,SAASC,EAAUC,GAA8B;AACvD,SAAOJ,EAAQI,CAAM,KAAKJ,EAAQC,CAAa;AAChD;AAGO,SAASI,EAAMD,GAAyB;AAC9C,SAAOD,EAAUC,CAAM,EAAE,cAAc;AACxC;AAGO,SAASE,EAAoBF,GAA+B;AAClE,SAAOC,EAAMD,CAAM,IAAI,QAAQ;AAChC;AAKO,SAASG,EAAEC,GAAaJ,GAAwB;AAEtD,QAAMK,IADMN,EAAUC,CAAM,EACV,aAAaI,CAAG;AAClC,MAAIC,MAAU,UAAaA,MAAU,GAAI,QAAOA;AAChD,QAAMC,IAAKV,EAAQC,CAAa,EAAE,aAAaO,CAAG;AAClD,SAAIE,MAAO,UAAaA,MAAO,KAAWA,IACnCR,EAAYM,CAAG,KAAKA;AAC5B;"}
1
+ {"version":3,"file":"intl.js","sources":["../src/intl/locales/en-US.ts","../src/intl/locales/he-IL.ts","../src/intl/index.ts"],"sourcesContent":["/**\n * en-US locale: LTR, with actual English translation values.\n */\nimport type { LocaleConfig } from \"../types\";\n\nconst enUS: LocaleConfig = {\n\talign: \"left\",\n\tdirection: \"ltr\",\n\ttranslations: {\n\t\t\"toolbarItem.download\": \"Download\",\n\t\t\"toolbarItem.downloadPageRange\": \"Download page range…\",\n\t\t\"toolbarItem.download.from\": \"From\",\n\t\t\"toolbarItem.download.to\": \"To\",\n\t\t\"toolbarItem.download.download\": \"Download\",\n\t\t\"toolbarItem.download.error\": \"Download failed — try again\",\n\t\t\"command.downloadEntireBook\": \"Download entire book\",\n\t\t\"command.jumpToToc\": \"Table of contents\",\n\t\t\"command.jumpToFirstPage\": \"First page\",\n\t\t\"command.jumpToLastPage\": \"Last page\",\n\t\t\"command.jumpToPrevPage\": \"Previous page\",\n\t\t\"command.jumpToNextPage\": \"Next page\",\n\t\t\"command.toggleFullscreen\": \"Toggle fullscreen\",\n\t\t\"command.toggleFullscreenDesc\": \"Enter or exit fullscreen mode\",\n\t\t\"command.toggleDebug\": \"Toggle debug toolbar\",\n\t\t\"command.toggleDebugDesc\": \"Show or hide the debug toolbar (Ctrl+Alt+D)\",\n\t\t\"toolbarItem.goToPage\": \"Go to page\",\n\t\t\"toolbarItem.selectText\": \"Select text with mouse\",\n\t\t\"toolbarItem.selectionLetters\": \"Aa\",\n\t\t\"toolbarItem.enterFullscreen\": \"Enter fullscreen\",\n\t\t\"toolbarItem.exitFullscreen\": \"Exit fullscreen\",\n\t\t\"toolbarItem.fullscreenUnsupported\": \"Fullscreen is not supported by this browser\",\n\t},\n};\n\nexport default enUS;\n","/**\n * he-IL locale: RTL, Hebrew translations.\n */\nimport type { LocaleConfig } from \"../types\";\n\nconst heIL: LocaleConfig = {\n\talign: \"right\",\n\tdirection: \"rtl\",\n\ttranslations: {\n\t\t\"toolbarItem.download\": \"הורדה\",\n\t\t\"toolbarItem.downloadPageRange\": \"הורד טווח עמודים…\",\n\t\t\"toolbarItem.download.from\": \"מ\",\n\t\t\"toolbarItem.download.to\": \"עד\",\n\t\t\"toolbarItem.download.download\": \"הורד\",\n\t\t\"toolbarItem.download.error\": \"ההורדה נכשלה — נסו שוב\",\n\t\t\"command.downloadEntireBook\": \"הורד את כל הספר\",\n\t\t\"command.jumpToToc\": \"תוכן העניינים\",\n\t\t\"command.jumpToFirstPage\": \"עמוד ראשון\",\n\t\t\"command.jumpToLastPage\": \"עמוד אחרון\",\n\t\t\"command.jumpToPrevPage\": \"עמוד קודם\",\n\t\t\"command.jumpToNextPage\": \"עמוד הבא\",\n\t\t\"command.toggleFullscreen\": \"מסך מלא\",\n\t\t\"command.toggleFullscreenDesc\": \"כניסה או יציאה ממסך מלא\",\n\t\t\"command.toggleDebug\": \"סרגל כלים לדיבוג\",\n\t\t\"command.toggleDebugDesc\": \"הצג או הסתר סרגל הדיבוג (Ctrl+Alt+D)\",\n\t\t\"toolbarItem.goToPage\": \"מעבר לעמוד\",\n\t\t\"toolbarItem.selectText\": \"בחירת טקסט עם העכבר\",\n\t\t\"toolbarItem.selectionLetters\": \"אב\",\n\t\t\"toolbarItem.enterFullscreen\": \"כניסה למסך מלא\",\n\t\t\"toolbarItem.exitFullscreen\": \"יציאה ממסך מלא\",\n\t\t\"toolbarItem.fullscreenUnsupported\": \"מסך מלא אינו נתמך בדפדפן זה\",\n\t},\n};\n\nexport default heIL;\n","/**\n * Intl at base level: locale config (align + translations) and helpers.\n * One file per locale: en-US (default), he-IL.\n */\nimport enUS from \"./locales/en-US\";\nimport heIL from \"./locales/he-IL\";\nimport type { Locale, LocaleConfig } from \"./types\";\n\nexport type { Locale, LocaleConfig } from \"./types\";\n\nconst configs: Record<Locale, LocaleConfig> = {\n\t\"en-US\": enUS,\n\t\"he-IL\": heIL,\n};\n\n/** Default locale. Used to derive default direction (LTR). */\nexport const defaultLocale: Locale = \"en-US\";\n\n/** Fallback when a key is missing (use en-US or key). */\nconst enFallbacks: Record<string, string> = {\n\t\"toolbarItem.download\": \"Download\",\n\t\"toolbarItem.downloadPageRange\": \"Download page range…\",\n\t\"toolbarItem.download.from\": \"From\",\n\t\"toolbarItem.download.to\": \"To\",\n\t\"toolbarItem.download.download\": \"Download\",\n\t\"command.downloadEntireBook\": \"Download entire book\",\n\t\"command.jumpToToc\": \"Table of contents\",\n\t\"command.jumpToFirstPage\": \"First page\",\n\t\"command.jumpToLastPage\": \"Last page\",\n\t\"command.jumpToPrevPage\": \"Previous page\",\n\t\"command.jumpToNextPage\": \"Next page\",\n\t\"command.toggleFullscreen\": \"Toggle fullscreen\",\n\t\"command.toggleFullscreenDesc\": \"Enter or exit fullscreen mode\",\n\t\"command.toggleDebug\": \"Toggle debug toolbar\",\n\t\"command.toggleDebugDesc\": \"Show or hide the debug toolbar (Ctrl+Alt+D)\",\n\t\"toolbarItem.goToPage\": \"Go to page\",\n\t\"toolbarItem.enterFullscreen\": \"Enter fullscreen\",\n\t\"toolbarItem.exitFullscreen\": \"Exit fullscreen\",\n\t\"toolbarItem.fullscreenUnsupported\": \"Fullscreen is not supported by this browser\",\n};\n\nexport function getConfig(locale: Locale): LocaleConfig {\n\treturn configs[locale] ?? configs[defaultLocale];\n}\n\n/** Whether the locale is RTL (e.g. he-IL). */\nexport function isRtl(locale: Locale): boolean {\n\treturn getConfig(locale).direction === \"rtl\";\n}\n\n/** Resolve direction from locale. Default from intl. */\nexport function directionFromLocale(locale: Locale): \"ltr\" | \"rtl\" {\n\treturn isRtl(locale) ? \"rtl\" : \"ltr\";\n}\n\n/**\n * Translate key for locale. Returns config translation or fallback to en-US, then key.\n */\nexport function t(key: string, locale: Locale): string {\n\tconst cfg = getConfig(locale);\n\tconst value = cfg.translations[key];\n\tif (value !== undefined && value !== \"\") return value;\n\tconst en = configs[defaultLocale].translations[key];\n\tif (en !== undefined && en !== \"\") return en;\n\treturn enFallbacks[key] ?? key;\n}\n"],"names":["enUS","heIL","configs","defaultLocale","enFallbacks","getConfig","locale","isRtl","directionFromLocale","t","key","value","en"],"mappings":"AAKA,MAAMA,IAAqB;AAAA,EAC1B,OAAO;AAAA,EACP,WAAW;AAAA,EACX,cAAc;AAAA,IACb,wBAAwB;AAAA,IACxB,iCAAiC;AAAA,IACjC,6BAA6B;AAAA,IAC7B,2BAA2B;AAAA,IAC3B,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,8BAA8B;AAAA,IAC9B,qBAAqB;AAAA,IACrB,2BAA2B;AAAA,IAC3B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,4BAA4B;AAAA,IAC5B,gCAAgC;AAAA,IAChC,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,wBAAwB;AAAA,IACxB,0BAA0B;AAAA,IAC1B,gCAAgC;AAAA,IAChC,+BAA+B;AAAA,IAC/B,8BAA8B;AAAA,IAC9B,qCAAqC;AAAA,EAAA;AAEvC,GC3BMC,IAAqB;AAAA,EAC1B,OAAO;AAAA,EACP,WAAW;AAAA,EACX,cAAc;AAAA,IACb,wBAAwB;AAAA,IACxB,iCAAiC;AAAA,IACjC,6BAA6B;AAAA,IAC7B,2BAA2B;AAAA,IAC3B,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,8BAA8B;AAAA,IAC9B,qBAAqB;AAAA,IACrB,2BAA2B;AAAA,IAC3B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,4BAA4B;AAAA,IAC5B,gCAAgC;AAAA,IAChC,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,wBAAwB;AAAA,IACxB,0BAA0B;AAAA,IAC1B,gCAAgC;AAAA,IAChC,+BAA+B;AAAA,IAC/B,8BAA8B;AAAA,IAC9B,qCAAqC;AAAA,EAAA;AAEvC,GCtBMC,IAAwC;AAAA,EAC7C,SAASF;AAAA,EACT,SAASC;AACV,GAGaE,IAAwB,SAG/BC,IAAsC;AAAA,EAC3C,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,8BAA8B;AAAA,EAC9B,qBAAqB;AAAA,EACrB,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,gCAAgC;AAAA,EAChC,uBAAuB;AAAA,EACvB,2BAA2B;AAAA,EAC3B,wBAAwB;AAAA,EACxB,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,qCAAqC;AACtC;AAEO,SAASC,EAAUC,GAA8B;AACvD,SAAOJ,EAAQI,CAAM,KAAKJ,EAAQC,CAAa;AAChD;AAGO,SAASI,EAAMD,GAAyB;AAC9C,SAAOD,EAAUC,CAAM,EAAE,cAAc;AACxC;AAGO,SAASE,EAAoBF,GAA+B;AAClE,SAAOC,EAAMD,CAAM,IAAI,QAAQ;AAChC;AAKO,SAASG,EAAEC,GAAaJ,GAAwB;AAEtD,QAAMK,IADMN,EAAUC,CAAM,EACV,aAAaI,CAAG;AAClC,MAAIC,MAAU,UAAaA,MAAU,GAAI,QAAOA;AAChD,QAAMC,IAAKV,EAAQC,CAAa,EAAE,aAAaO,CAAG;AAClD,SAAIE,MAAO,UAAaA,MAAO,KAAWA,IACnCR,EAAYM,CAAG,KAAKA;AAC5B;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-flip-book-vanilla",
3
- "version": "0.0.0-alpha.71",
3
+ "version": "0.0.0-alpha.73",
4
4
  "description": "Flipbook component for HTML (vanilla JavaScript)",
5
5
  "author": "DoradSoft",
6
6
  "type": "module",