@dogsbay/ssg-cli 0.2.0-beta.183 → 0.2.0-beta.188
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/AGENTS.md +168 -0
- package/README.md +3 -1
- package/THIRD-PARTY-NOTICES.txt +23 -17
- package/chunks/{build-command-QLNZ5BNK.mjs → build-command-NJATVOUY.mjs} +37 -26
- package/chunks/check-command-FL5O3AXB.mjs +577 -0
- package/chunks/chunk-2EM7IEQT.mjs +95 -0
- package/chunks/{chunk-JABACD5T.mjs → chunk-5A2QPRCV.mjs} +1 -30
- package/chunks/chunk-5NQOUB5I.mjs +4534 -0
- package/chunks/chunk-CYJ6GFVM.mjs +77 -0
- package/chunks/{chunk-KE6N5RFA.mjs → chunk-FFIXBXHD.mjs} +63 -234
- package/chunks/chunk-GFG5I7WI.mjs +807 -0
- package/chunks/chunk-GZ3E45TE.mjs +2290 -0
- package/chunks/chunk-IAAKV7V2.mjs +37 -0
- package/chunks/{chunk-IERF2DNL.mjs → chunk-VJ6AESSJ.mjs} +8072 -8555
- package/chunks/chunk-X3UPCLX5.mjs +503 -0
- package/chunks/{chunk-QDXUP47M.mjs → chunk-ZDH4JRVX.mjs} +1203 -4035
- package/chunks/{chunk-LNWQN7K7.mjs → chunk-ZRGJHNES.mjs} +7 -1
- package/chunks/compare-W4DJYVHT.mjs +239 -0
- package/chunks/compare-command-U36H55IE.mjs +144 -0
- package/chunks/{css-build-VKKTSP6P.mjs → css-build-MKIHYHCX.mjs} +2 -1
- package/chunks/{dev-HXLVZ7MF.mjs → dev-X3PKN4G3.mjs} +77 -25
- package/chunks/{menu-N2AZSZKS.mjs → menu-J3CLVADF.mjs} +9 -5
- package/chunks/{publish-command-UFHG6PJN.mjs → publish-command-SAPICGGM.mjs} +15 -7
- package/chunks/{release-diff-LFDQIFEF.mjs → release-diff-Y7X63MT3.mjs} +13 -6
- package/chunks/{serve-WGWRM7JQ.mjs → serve-7DR4WSYA.mjs} +3 -1
- package/cli.mjs +17 -10
- package/package.json +4 -3
- package/chunks/check-command-5U7VSMDO.mjs +0 -218
- package/chunks/chunk-KFYMG4VB.mjs +0 -45
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
FOREIGN_END,
|
|
5
|
-
FOREIGN_START,
|
|
6
|
-
unesc
|
|
7
|
-
} from "./chunk-G6OTOD3B.mjs";
|
|
8
3
|
|
|
9
4
|
// src/core/detach.ts
|
|
10
5
|
function detach(s) {
|
|
@@ -58,29 +53,6 @@ var TextCache = class {
|
|
|
58
53
|
};
|
|
59
54
|
var TEXT_FILE = /\.(md|markdown|ya?ml|json|txt|html?|css|js|mjs|svg|xml|csv|ditaval|properties)$/i;
|
|
60
55
|
|
|
61
|
-
// src/theme/classes.ts
|
|
62
|
-
var FOREIGN_BLOCK = new RegExp(`${FOREIGN_START}[\\s\\S]*?${FOREIGN_END}`, "g");
|
|
63
|
-
var seenValues = /* @__PURE__ */ new WeakMap();
|
|
64
|
-
var SEEN_MAX_CHARS = 1e6;
|
|
65
|
-
function collectClasses(html, into) {
|
|
66
|
-
if (html.includes(FOREIGN_START)) html = html.replace(FOREIGN_BLOCK, "");
|
|
67
|
-
let seen = seenValues.get(into);
|
|
68
|
-
if (!seen) seenValues.set(into, seen = { values: /* @__PURE__ */ new Set(), chars: 0 });
|
|
69
|
-
for (const m of html.matchAll(/\sclass\s*=\s*(?:"([^"]*)"|'([^']*)')/g)) {
|
|
70
|
-
const value = m[1] ?? m[2];
|
|
71
|
-
if (seen.values.has(value)) continue;
|
|
72
|
-
if (seen.chars + value.length <= SEEN_MAX_CHARS) {
|
|
73
|
-
seen.values.add(detach(value));
|
|
74
|
-
seen.chars += value.length;
|
|
75
|
-
}
|
|
76
|
-
for (const tok of value.split(/\s+/)) {
|
|
77
|
-
if (!tok) continue;
|
|
78
|
-
const name = unesc(tok);
|
|
79
|
-
if (!into.has(name)) into.add(detach(name));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
56
|
export {
|
|
85
57
|
detach,
|
|
86
58
|
isRef,
|
|
@@ -88,6 +60,5 @@ export {
|
|
|
88
60
|
isStream,
|
|
89
61
|
joinStream,
|
|
90
62
|
TextCache,
|
|
91
|
-
TEXT_FILE
|
|
92
|
-
collectClasses
|
|
63
|
+
TEXT_FILE
|
|
93
64
|
};
|