@repdf/preview 0.5.1 → 0.5.2

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.
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ import "esbuild";
16
16
  import "source-map-js";
17
17
  import "stacktrace-parser";
18
18
  //#region package.json
19
- var version = "0.5.0";
19
+ var version = "0.5.1";
20
20
  //#endregion
21
21
  //#region src/logger.ts
22
22
  const logger = pino({
@@ -156,8 +156,16 @@ function pdfTemplateWatcher() {
156
156
  }
157
157
  //#endregion
158
158
  //#region src/template-loader/get-pdf-component.ts
159
- const componentCache = /* @__PURE__ */ new Map();
160
- const inflightBuilds = /* @__PURE__ */ new Map();
159
+ const COMPONENT_CACHE_STORE_KEY = "__repdf_preview_getPdfComponentCacheStore__";
160
+ const getComponentCacheStore = () => {
161
+ const globalWithStore = globalThis;
162
+ if (!globalWithStore[COMPONENT_CACHE_STORE_KEY]) globalWithStore[COMPONENT_CACHE_STORE_KEY] = {
163
+ componentCache: /* @__PURE__ */ new Map(),
164
+ inflightBuilds: /* @__PURE__ */ new Map()
165
+ };
166
+ return globalWithStore[COMPONENT_CACHE_STORE_KEY];
167
+ };
168
+ const { componentCache, inflightBuilds } = getComponentCacheStore();
161
169
  const clearPdfComponentCache = () => {
162
170
  componentCache.clear();
163
171
  inflightBuilds.clear();
@@ -1 +1 @@
1
- FpcN7f3WcKAegtkQ_R6bq
1
+ FZ6aXlqGO-aLj-TH9yD3I
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "devFiles": [],
6
6
  "lowPriorityFiles": [
7
- "static/FpcN7f3WcKAegtkQ_R6bq/_buildManifest.js",
8
- "static/FpcN7f3WcKAegtkQ_R6bq/_ssgManifest.js"
7
+ "static/FZ6aXlqGO-aLj-TH9yD3I/_buildManifest.js",
8
+ "static/FZ6aXlqGO-aLj-TH9yD3I/_ssgManifest.js"
9
9
  ],
10
10
  "rootMainFiles": [],
11
11
  "rootMainFilesTree": {},
@@ -1 +1 @@
1
- {"previewModeId":"977d7ef8220f24dcb3b8c1b2374e6e1f","previewModeSigningKey":"78cfa27a4ecebdca175bb5fc0c123ff9db79dc21c0c6d044068ab0c5a785745b","previewModeEncryptionKey":"337640af08b52984be6ceaed0cae53006ba2736a7ec287962573d7606c01fe49","expireAt":1774391020545}
1
+ {"previewModeId":"d40fbb4329b168784ada0b1c1125cf04","previewModeSigningKey":"1e1cd48697872824c45c6464b49bc34748c039459df1cef5c4c1d00c8a6dc4a2","previewModeEncryptionKey":"9483644439aa7b04a3f4bf6cd6ba0f4c32bee40d1ae63923eca381e3d11d31dc","expireAt":1774391804415}
@@ -1 +1 @@
1
- {"encryption.key":"TpaNGh0ywVdf3u1xqIyUAcvDNy43b3eLYghnqB3C8YA=","encryption.expire_at":1774391020541}
1
+ {"encryption.key":"aqaHf46LGw8Qjd/GOveOjiYrkQfNjF4RY1HJKPB6r2Y=","encryption.expire_at":1774391804411}