@embedpdf/engine-core 3.0.0-next.3 → 3.0.0-next.5
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/{AbortError-CjSasIlL.js → AbortError-BsHuCO1S.js} +2 -2
- package/dist/{AbortError-CjSasIlL.js.map → AbortError-BsHuCO1S.js.map} +1 -1
- package/dist/{AbortError-ByBflvEl.cjs → AbortError-DmWeq9sx.cjs} +2 -2
- package/dist/{AbortError-ByBflvEl.cjs.map → AbortError-DmWeq9sx.cjs.map} +1 -1
- package/dist/{AnnotationListSnapshot-W0RCsyDE.d.cts → AnnotationListSnapshot-CHjkcIaL.d.cts} +345 -36
- package/dist/{AnnotationListSnapshot-W0RCsyDE.d.ts → AnnotationListSnapshot-CHjkcIaL.d.ts} +345 -36
- package/dist/{DocumentSecurityService-Df79fgpe.d.cts → DocumentSecurityService-B1uv4FaK.d.cts} +2 -2
- package/dist/{DocumentSecurityService-B-tULKNY.d.ts → DocumentSecurityService-CrxGktMI.d.ts} +2 -2
- package/dist/{Engine-B7Oe7f5i.d.ts → Engine-BE6r06QI.d.ts} +4 -4
- package/dist/{Engine-D9loFZc1.d.cts → Engine-BOaRwtKa.d.cts} +4 -4
- package/dist/{builders-BvikWRuO.cjs → builders-BsUc2A1U.cjs} +426 -223
- package/dist/builders-BsUc2A1U.cjs.map +1 -0
- package/dist/{builders-C548U47M.js → builders-CF5gKkOa.js} +382 -167
- package/dist/builders-CF5gKkOa.js.map +1 -0
- package/dist/{subtype-BvAzLCGC.js → charmap-CUukAMhR.js} +140 -2
- package/dist/charmap-CUukAMhR.js.map +1 -0
- package/dist/{subtype-qejjVr6h.cjs → charmap-D6PLtRiC.cjs} +169 -1
- package/dist/charmap-D6PLtRiC.cjs.map +1 -0
- package/dist/conformance.cjs +511 -177
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +99 -3
- package/dist/conformance.d.ts +99 -3
- package/dist/conformance.js +467 -136
- package/dist/conformance.js.map +1 -1
- package/dist/{fold-IaMph3CO.cjs → fold-BeT1GxLP.cjs} +235 -4
- package/dist/fold-BeT1GxLP.cjs.map +1 -0
- package/dist/{fold-CB4fAOOy.js → fold-DemV94jf.js} +162 -3
- package/dist/fold-DemV94jf.js.map +1 -0
- package/dist/index.cjs +33 -18
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/runtime.cjs +38 -23
- package/dist/runtime.d.cts +4 -4
- package/dist/runtime.d.ts +4 -4
- package/dist/runtime.js +5 -5
- package/dist/{schemas-B_1VyFsm.cjs → schemas-CyWwm0Zf.cjs} +64 -30
- package/dist/schemas-CyWwm0Zf.cjs.map +1 -0
- package/dist/{schemas-9OpSSeM6.js → schemas-ES6-TkIl.js} +44 -10
- package/dist/schemas-ES6-TkIl.js.map +1 -0
- package/dist/wire.cjs +14 -1
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +19 -9
- package/dist/wire.d.ts +19 -9
- package/dist/wire.js +14 -2
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
- package/dist/builders-BvikWRuO.cjs.map +0 -1
- package/dist/builders-C548U47M.js.map +0 -1
- package/dist/fold-CB4fAOOy.js.map +0 -1
- package/dist/fold-IaMph3CO.cjs.map +0 -1
- package/dist/schemas-9OpSSeM6.js.map +0 -1
- package/dist/schemas-B_1VyFsm.cjs.map +0 -1
- package/dist/subtype-BvAzLCGC.js.map +0 -1
- package/dist/subtype-qejjVr6h.cjs.map +0 -1
package/dist/wire.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_resolver = require("./resolver-DAZWVoJL.cjs");
|
|
3
|
-
const require_schemas = require("./schemas-
|
|
3
|
+
const require_schemas = require("./schemas-CyWwm0Zf.cjs");
|
|
4
4
|
//#region src/wire/token.ts
|
|
5
5
|
const DEFAULT_MAX_TOKEN_LENGTH = 256;
|
|
6
6
|
const FIELD_NAME_RE = /^[A-Za-z][A-Za-z0-9]*(?:\.[A-Za-z][A-Za-z0-9]*)*$/;
|
|
@@ -128,6 +128,7 @@ const RenderTokenSchema = {
|
|
|
128
128
|
const SearchTokenSchema = {
|
|
129
129
|
fields: [
|
|
130
130
|
"epoch",
|
|
131
|
+
"format",
|
|
131
132
|
"matchCase",
|
|
132
133
|
"matchDiacritics",
|
|
133
134
|
"maxMatches",
|
|
@@ -209,10 +210,20 @@ const decodeRenderToken = (raw) => decodeToken(RenderTokenSchema, raw);
|
|
|
209
210
|
const encodeAnnotationAppearancesRenderToken = (input) => encodeToken(AnnotationAppearancesRenderTokenSchema, input);
|
|
210
211
|
/** Decode an annotation-appearance render token to a flat field map. */
|
|
211
212
|
const decodeAnnotationAppearancesRenderToken = (raw) => decodeToken(AnnotationAppearancesRenderTokenSchema, raw);
|
|
213
|
+
/**
|
|
214
|
+
* The search RESULT representation this client speaks — part of the token
|
|
215
|
+
* (and therefore the versioned URL), so a response-shape change can never
|
|
216
|
+
* serve a stale CDN body to a newer client: new tokens are new cache keys,
|
|
217
|
+
* and old tokens fail decode on new servers. Deliberately ALWAYS encoded —
|
|
218
|
+
* an exception to the omit-defaults rule, because its entire job is to
|
|
219
|
+
* change the token bytes when the format changes.
|
|
220
|
+
*/
|
|
221
|
+
const SEARCH_RESULT_FORMAT = "segments1";
|
|
212
222
|
const encodeSearchToken = (input) => {
|
|
213
223
|
const q = input.query;
|
|
214
224
|
return encodeToken(SearchTokenSchema, {
|
|
215
225
|
epoch: input.epoch,
|
|
226
|
+
format: SEARCH_RESULT_FORMAT,
|
|
216
227
|
q: encodeTokenText(q.text),
|
|
217
228
|
regex: q.regex ? true : void 0,
|
|
218
229
|
matchCase: q.matchCase ? true : void 0,
|
|
@@ -228,6 +239,7 @@ const decodeSearchToken = (raw) => {
|
|
|
228
239
|
const t = decodeToken(SearchTokenSchema, raw);
|
|
229
240
|
if (t.epoch === void 0) throw new Error("search token is missing \"epoch\"");
|
|
230
241
|
if (t.q === void 0) throw new Error("search token is missing \"q\"");
|
|
242
|
+
if (t.format !== "segments1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
|
|
231
243
|
const query = {
|
|
232
244
|
text: decodeTokenText(t.q),
|
|
233
245
|
...t.regex === "true" ? { regex: true } : {},
|
|
@@ -1464,6 +1476,7 @@ exports.RefetchReasonSchema = require_schemas.RefetchReasonSchema;
|
|
|
1464
1476
|
exports.RenderTokenSchema = RenderTokenSchema;
|
|
1465
1477
|
exports.ResourceRefSchema = require_schemas.ResourceRefSchema;
|
|
1466
1478
|
exports.RevisionTokenSchema = require_schemas.RevisionTokenSchema;
|
|
1479
|
+
exports.SEARCH_RESULT_FORMAT = SEARCH_RESULT_FORMAT;
|
|
1467
1480
|
exports.SearchMatchSchema = require_schemas.SearchMatchSchema;
|
|
1468
1481
|
exports.SearchModeSchema = require_schemas.SearchModeSchema;
|
|
1469
1482
|
exports.SearchQuerySchema = require_schemas.SearchQuerySchema;
|