vde-open 0.1.14 → 0.1.16
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/README.md +35 -4
- package/dist/cli.js +319 -9
- package/dist/daemon.js +2 -2
- package/dist/{html-static-C_wwQAJx.js → html-static-Ct_9qmNR.js} +74 -26
- package/dist/{main-ChphixE8.js → main-D-ZX3nEP.js} +836 -153
- package/dist/{print-vae7mHCU.js → print-Bb6ArlQl.js} +1 -1
- package/dist/{render-BJa4uW0H.js → render-CY_Mrhyl.js} +2 -1
- package/dist/{search-index-B-hHn9RV.js → search-index-B0xpVDwG.js} +117 -2
- package/dist/web/assets/main-DcvVu7FQ.js +123 -0
- package/dist/web/assets/mobile-HCpMXT2S.js +1 -0
- package/dist/web/assets/rolldown-runtime-CbXtAM7H.js +1 -0
- package/dist/web/assets/src--PpHwH7V.js +41 -0
- package/dist/web/assets/src-DinzSLDA.css +2 -0
- package/dist/web/index.html +4 -2
- package/dist/web/mobile.html +15 -0
- package/dist/workers/parse-worker.js +3 -3
- package/dist/workers/search-worker.js +1 -1
- package/package.json +1 -1
- package/dist/web/assets/index-528DM2Fz.js +0 -163
- package/dist/web/assets/index-B9HgIqYy.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as parseMarkdown, D as serialize, E as parseFragment, M as escapeHtml$2, N as footnoteReferenceId, O as defaultTreeAdapter, T as parse, b as dirnameOfLogicalPath, c as renderedLinkOf, g as parseMarkdownDocument, i as transformStaticHtml, j as escapeAttr, k as NS, n as resolveAssetUrl, o as transformCss, s as localImagePath, t as DiagnosticLog, u as MARKDOWN_PARSE_OPTIONS } from "./html-static-Ct_9qmNR.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@tanstack+markdown@1.0.0_react@19.3.0/node_modules/@tanstack/markdown/dist/html.js
|
|
3
3
|
function renderHtml(input, options = {}) {
|
|
4
4
|
return (typeof input === "string" ? parseMarkdown(input, options) : input).children.map((node) => renderBlock(node, options)).join("\n");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as parseMarkdown, T as parse, a as scanCssReferences, b as dirnameOfLogicalPath, h as markdownUrlTransform, i as transformStaticHtml, m as inlineText$1, n as resolveAssetUrl, o as transformCss, p as assertWithinLimits, r as scanHtmlReferences, t as DiagnosticLog, u as MARKDOWN_PARSE_OPTIONS, v as classifyLink } from "./html-static-Ct_9qmNR.js";
|
|
2
2
|
//#region ../../packages/document/src/title.ts
|
|
3
3
|
const TITLE_SCAN_CHARS = 65536;
|
|
4
4
|
const MAX_TITLE_LENGTH = 160;
|
|
@@ -161,6 +161,7 @@ function renderDocument(input) {
|
|
|
161
161
|
}
|
|
162
162
|
const result = transformStaticHtml({
|
|
163
163
|
...staticInput,
|
|
164
|
+
relayDocumentLinks: true,
|
|
164
165
|
interactive: input.mode === "interactive",
|
|
165
166
|
...input.mode === "interactive" && input.sdkScript !== null ? { sdkScript: input.sdkScript } : {}
|
|
166
167
|
}, log);
|
|
@@ -3514,6 +3514,15 @@ function _number(Class, params) {
|
|
|
3514
3514
|
}));
|
|
3515
3515
|
}
|
|
3516
3516
|
// @__NO_SIDE_EFFECTS__
|
|
3517
|
+
function _coercedNumber(Class, params) {
|
|
3518
|
+
return new Class(snapshotChecks({
|
|
3519
|
+
type: "number",
|
|
3520
|
+
coerce: true,
|
|
3521
|
+
checks: [],
|
|
3522
|
+
...normalizeParams(params)
|
|
3523
|
+
}));
|
|
3524
|
+
}
|
|
3525
|
+
// @__NO_SIDE_EFFECTS__
|
|
3517
3526
|
function _int(Class, params) {
|
|
3518
3527
|
return new Class({
|
|
3519
3528
|
type: "number",
|
|
@@ -5724,6 +5733,11 @@ const documentSummarySchema = strictObject({
|
|
|
5724
5733
|
htmlMode: htmlModeSchema.nullable(),
|
|
5725
5734
|
interactiveAllowed: boolean()
|
|
5726
5735
|
});
|
|
5736
|
+
function lastOpenedDocument(documents) {
|
|
5737
|
+
let latest;
|
|
5738
|
+
for (const document of documents) if (latest === void 0 || document.openedAt > latest.openedAt || document.openedAt === latest.openedAt && document.documentId > latest.documentId) latest = document;
|
|
5739
|
+
return latest;
|
|
5740
|
+
}
|
|
5727
5741
|
const sourceRangeSchema = strictObject({
|
|
5728
5742
|
startByte: number().int().nonnegative(),
|
|
5729
5743
|
endByteExclusive: number().int().nonnegative(),
|
|
@@ -5823,6 +5837,19 @@ strictObject({
|
|
|
5823
5837
|
closed: array(documentIdSchema),
|
|
5824
5838
|
alreadyClosed: array(documentIdSchema)
|
|
5825
5839
|
});
|
|
5840
|
+
const mobileStatusSchema = discriminatedUnion("state", [
|
|
5841
|
+
strictObject({ state: literal("disabled") }),
|
|
5842
|
+
strictObject({
|
|
5843
|
+
state: literal("ready"),
|
|
5844
|
+
uiUrl: string()
|
|
5845
|
+
}),
|
|
5846
|
+
strictObject({
|
|
5847
|
+
state: literal("error"),
|
|
5848
|
+
listener: _enum(["ui", "preview"]).nullable(),
|
|
5849
|
+
port: number().int().nullable(),
|
|
5850
|
+
reason: string()
|
|
5851
|
+
})
|
|
5852
|
+
]);
|
|
5826
5853
|
strictObject({
|
|
5827
5854
|
state: _enum(["running", "stopped"]),
|
|
5828
5855
|
daemonId: string().nullable(),
|
|
@@ -5833,7 +5860,8 @@ strictObject({
|
|
|
5833
5860
|
stateRoot: string(),
|
|
5834
5861
|
openDocuments: number().int().nonnegative().nullable(),
|
|
5835
5862
|
catalogVersion: number().int().nonnegative().nullable(),
|
|
5836
|
-
uiUrl: string().nullable()
|
|
5863
|
+
uiUrl: string().nullable(),
|
|
5864
|
+
mobile: mobileStatusSchema.nullable()
|
|
5837
5865
|
});
|
|
5838
5866
|
const reorderParamsSchema = strictObject({
|
|
5839
5867
|
order: array(documentIdSchema),
|
|
@@ -5931,6 +5959,7 @@ const htmlModeChangeParamsSchema = strictObject({
|
|
|
5931
5959
|
const linkOpenParamsSchema = strictObject({
|
|
5932
5960
|
documentId: documentIdSchema,
|
|
5933
5961
|
revision: revisionSchema,
|
|
5962
|
+
mode: htmlModeSchema,
|
|
5934
5963
|
linkId: string().regex(/^lnk_\d{4,}$/),
|
|
5935
5964
|
confirmation: string().min(1).max(64).optional()
|
|
5936
5965
|
});
|
|
@@ -6115,6 +6144,10 @@ const ERROR_SPECS = {
|
|
|
6115
6144
|
exit: ExitCode.notFound,
|
|
6116
6145
|
retryable: false
|
|
6117
6146
|
},
|
|
6147
|
+
E_TAILSCALE_UNAVAILABLE: {
|
|
6148
|
+
exit: ExitCode.notFound,
|
|
6149
|
+
retryable: false
|
|
6150
|
+
},
|
|
6118
6151
|
E_KEY_CONFLICT: {
|
|
6119
6152
|
exit: ExitCode.conflict,
|
|
6120
6153
|
retryable: false
|
|
@@ -6131,6 +6164,10 @@ const ERROR_SPECS = {
|
|
|
6131
6164
|
exit: ExitCode.conflict,
|
|
6132
6165
|
retryable: false
|
|
6133
6166
|
},
|
|
6167
|
+
E_VIEW_STALE: {
|
|
6168
|
+
exit: ExitCode.conflict,
|
|
6169
|
+
retryable: false
|
|
6170
|
+
},
|
|
6134
6171
|
E_CATALOG_CONFLICT: {
|
|
6135
6172
|
exit: ExitCode.conflict,
|
|
6136
6173
|
retryable: true
|
|
@@ -6143,6 +6180,10 @@ const ERROR_SPECS = {
|
|
|
6143
6180
|
exit: ExitCode.conflict,
|
|
6144
6181
|
retryable: false
|
|
6145
6182
|
},
|
|
6183
|
+
E_SERVE_CONFLICT: {
|
|
6184
|
+
exit: ExitCode.conflict,
|
|
6185
|
+
retryable: false
|
|
6186
|
+
},
|
|
6146
6187
|
E_DRAFT_CONFLICT: {
|
|
6147
6188
|
exit: ExitCode.conflict,
|
|
6148
6189
|
retryable: false
|
|
@@ -6239,6 +6280,10 @@ const ERROR_SPECS = {
|
|
|
6239
6280
|
exit: ExitCode.internal,
|
|
6240
6281
|
retryable: false
|
|
6241
6282
|
},
|
|
6283
|
+
E_TAILSCALE_FAILED: {
|
|
6284
|
+
exit: ExitCode.internal,
|
|
6285
|
+
retryable: false
|
|
6286
|
+
},
|
|
6242
6287
|
E_STORAGE_WRITE_FAILED: {
|
|
6243
6288
|
exit: ExitCode.internal,
|
|
6244
6289
|
retryable: true
|
|
@@ -6580,6 +6625,76 @@ const feedbackSubmitParamsSchema = strictObject({
|
|
|
6580
6625
|
});
|
|
6581
6626
|
const feedbackCancelParamsSchema = strictObject({ confirmed: literal(true) });
|
|
6582
6627
|
//#endregion
|
|
6628
|
+
//#region ../../packages/shared/src/mobile.ts
|
|
6629
|
+
const viewEpochSchema = string().regex(/^\d+\.\d+$/);
|
|
6630
|
+
const mobileDocumentSchema = strictObject({
|
|
6631
|
+
documentId: documentIdSchema,
|
|
6632
|
+
title: string(),
|
|
6633
|
+
format: documentFormatSchema,
|
|
6634
|
+
openedAt: string(),
|
|
6635
|
+
revision: revisionSchema.nullable(),
|
|
6636
|
+
sourceState: sourceStateSchema,
|
|
6637
|
+
effectiveMode: htmlModeSchema.nullable(),
|
|
6638
|
+
viewEpoch: viewEpochSchema
|
|
6639
|
+
});
|
|
6640
|
+
strictObject({
|
|
6641
|
+
daemonId: string(),
|
|
6642
|
+
catalogVersion: number().int().nonnegative(),
|
|
6643
|
+
documents: array(mobileDocumentSchema),
|
|
6644
|
+
nextCursor: string().nullable()
|
|
6645
|
+
});
|
|
6646
|
+
strictObject({
|
|
6647
|
+
documentId: documentIdSchema,
|
|
6648
|
+
revision: revisionSchema,
|
|
6649
|
+
content: string(),
|
|
6650
|
+
nextCursor: string().nullable()
|
|
6651
|
+
});
|
|
6652
|
+
const mobileGrantParamsSchema = strictObject({
|
|
6653
|
+
revision: revisionSchema,
|
|
6654
|
+
viewEpoch: viewEpochSchema
|
|
6655
|
+
});
|
|
6656
|
+
strictObject({
|
|
6657
|
+
grant: string(),
|
|
6658
|
+
documentId: documentIdSchema,
|
|
6659
|
+
revision: revisionSchema,
|
|
6660
|
+
viewEpoch: viewEpochSchema,
|
|
6661
|
+
format: documentFormatSchema,
|
|
6662
|
+
mode: htmlModeSchema,
|
|
6663
|
+
documentUrl: string().nullable(),
|
|
6664
|
+
filesBaseUrl: string(),
|
|
6665
|
+
documentLogicalPath: string(),
|
|
6666
|
+
assets: array(strictObject({
|
|
6667
|
+
logicalPath: string(),
|
|
6668
|
+
role: assetRoleSchema
|
|
6669
|
+
})),
|
|
6670
|
+
links: array(renderLinkSchema),
|
|
6671
|
+
headingTargets: array(strictObject({
|
|
6672
|
+
sectionId: string().regex(/^sec_\d{4,}$/),
|
|
6673
|
+
anchor: string()
|
|
6674
|
+
}))
|
|
6675
|
+
});
|
|
6676
|
+
string().regex(/^[A-Za-z0-9_-]{43}$/);
|
|
6677
|
+
const mobileReleaseParamsSchema = strictObject({ grants: array(string().min(1).max(128)).max(256) });
|
|
6678
|
+
const mobileCheckParamsSchema = strictObject({ grant: string().min(1).max(128) });
|
|
6679
|
+
const mobileLinkParamsSchema = strictObject({
|
|
6680
|
+
grant: string().min(1).max(128),
|
|
6681
|
+
linkId: string().regex(/^lnk_\d{4,}$/)
|
|
6682
|
+
});
|
|
6683
|
+
discriminatedUnion("status", [strictObject({
|
|
6684
|
+
status: literal("open"),
|
|
6685
|
+
documentId: documentIdSchema
|
|
6686
|
+
}), strictObject({ status: literal("not-open") })]);
|
|
6687
|
+
strictObject({
|
|
6688
|
+
type: _enum([
|
|
6689
|
+
"hello",
|
|
6690
|
+
"changed",
|
|
6691
|
+
"resync-required",
|
|
6692
|
+
"daemon-stopping"
|
|
6693
|
+
]),
|
|
6694
|
+
daemonId: string(),
|
|
6695
|
+
documentId: documentIdSchema.optional()
|
|
6696
|
+
});
|
|
6697
|
+
//#endregion
|
|
6583
6698
|
//#region ../../node_modules/.pnpm/minisearch@7.2.0/node_modules/minisearch/dist/es/index.js
|
|
6584
6699
|
/** @ignore */
|
|
6585
6700
|
const ENTRIES = "ENTRIES";
|
|
@@ -8867,4 +8982,4 @@ var SearchIndex = class {
|
|
|
8867
8982
|
}
|
|
8868
8983
|
};
|
|
8869
8984
|
//#endregion
|
|
8870
|
-
export {
|
|
8985
|
+
export { sourceStateSchema as $, isErrorCode as A, htmlModeChangeParamsSchema as B, questionnaireSchema as C, validateAnswers as D, utf8Length as E, successEnvelope as F, openParamsSchema as G, lastOpenedDocument as H, assetRecordSchema as I, reorderParamsSchema as J, readParamsSchema as K, closeParamsSchema as L, ExitCode as M, envelopeSchema as N, VdeError as O, errorEnvelope as P, sourceKindSchema as Q, documentFormatSchema as R, feedbackWaitParamsSchema as S, submissionSchema as T, linkOpenParamsSchema as U, htmlModeSchema as V, listParamsSchema as W, searchParamsSchema as X, revisionSchema as Y, sha256Schema as Z, feedbackForgetParamsSchema as _, uniqueTokens as a, boolean as at, feedbackStatusSchema as b, mobileLinkParamsSchema as c, record as ct, answersSchema as d, unknown as dt, watchRuleSchema as et, cancellationSchema as f, ZodError as ft, feedbackDraftParamsSchema as g, feedbackCreateParamsSchema as h, codePointLength as i, array as it, isVdeError as j, exitCodeForError as k, mobileReleaseParamsSchema as l, strictObject as lt, feedbackCancelParamsSchema as m, canonicalJson as mt, batchesOf as n, ZodNumber as nt, mobileCheckParamsSchema as o, literal as ot, feedbackAckParamsSchema as p, _coercedNumber as pt, renderGrantParamsSchema as q, partsOf as r, _enum as rt, mobileGrantParamsSchema as s, number as st, SearchIndex as t, LIMITS as tt, viewEpochSchema as u, string as ut, feedbackIdParamsSchema as v, requestIdSchema as w, feedbackSubmitParamsSchema as x, feedbackListParamsSchema as y, documentIdSchema as z };
|