@quartz-community/folder-page 0.1.0 → 1.0.1
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/CHANGELOG.md +16 -0
- package/dist/components/index.js +54 -17
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +57 -18
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e7de665: A note with a frontmatter `permalink` (published at its permalink, Quartz 5.1+) stays in its folder in the folder listings, as in Obsidian Publish: pages are placed by their file path and linked by their address.
|
|
8
|
+
|
|
9
|
+
## 1.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- Stable 1.0 release. All `@quartz-community/*` dependencies now use `^1.0.0` ranges.
|
|
14
|
+
|
|
15
|
+
Pre-1.0 caret ranges pinned the minor version (`^0.2.1` means `>=0.2.1 <0.3.0`), so
|
|
16
|
+
published fixes to shared packages could never be resolved by dependents. Moving the
|
|
17
|
+
ecosystem to 1.0 makes caret ranges behave conventionally.
|
|
18
|
+
|
|
3
19
|
All notable changes to this project will be documented in this file.
|
|
4
20
|
|
|
5
21
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
package/dist/components/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
|
|
31
31
|
// node_modules/inline-style-parser/cjs/index.js
|
|
32
32
|
var require_cjs = __commonJS({
|
|
33
|
-
"node_modules/inline-style-parser/cjs/index.js"(exports
|
|
33
|
+
"node_modules/inline-style-parser/cjs/index.js"(exports, module) {
|
|
34
34
|
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
35
35
|
var NEWLINE_REGEX = /\n/g;
|
|
36
36
|
var WHITESPACE_REGEX = /^\s*/;
|
|
@@ -168,12 +168,12 @@ var require_cjs = __commonJS({
|
|
|
168
168
|
|
|
169
169
|
// node_modules/style-to-object/cjs/index.js
|
|
170
170
|
var require_cjs2 = __commonJS({
|
|
171
|
-
"node_modules/style-to-object/cjs/index.js"(exports
|
|
172
|
-
var __importDefault = exports
|
|
171
|
+
"node_modules/style-to-object/cjs/index.js"(exports) {
|
|
172
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
173
173
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
174
174
|
};
|
|
175
|
-
Object.defineProperty(exports
|
|
176
|
-
exports
|
|
175
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176
|
+
exports.default = StyleToObject;
|
|
177
177
|
var inline_style_parser_1 = __importDefault(require_cjs());
|
|
178
178
|
function StyleToObject(style, iterator) {
|
|
179
179
|
let styleObject = null;
|
|
@@ -201,9 +201,9 @@ var require_cjs2 = __commonJS({
|
|
|
201
201
|
|
|
202
202
|
// node_modules/style-to-js/cjs/utilities.js
|
|
203
203
|
var require_utilities = __commonJS({
|
|
204
|
-
"node_modules/style-to-js/cjs/utilities.js"(exports
|
|
205
|
-
Object.defineProperty(exports
|
|
206
|
-
exports
|
|
204
|
+
"node_modules/style-to-js/cjs/utilities.js"(exports) {
|
|
205
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
206
|
+
exports.camelCase = void 0;
|
|
207
207
|
var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
|
|
208
208
|
var HYPHEN_REGEX = /-([a-z])/g;
|
|
209
209
|
var NO_HYPHEN_REGEX = /^[^-]+$/;
|
|
@@ -233,14 +233,14 @@ var require_utilities = __commonJS({
|
|
|
233
233
|
}
|
|
234
234
|
return property.replace(HYPHEN_REGEX, capitalize);
|
|
235
235
|
};
|
|
236
|
-
exports
|
|
236
|
+
exports.camelCase = camelCase;
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
|
|
240
240
|
// node_modules/style-to-js/cjs/index.js
|
|
241
241
|
var require_cjs3 = __commonJS({
|
|
242
|
-
"node_modules/style-to-js/cjs/index.js"(exports
|
|
243
|
-
var __importDefault = exports
|
|
242
|
+
"node_modules/style-to-js/cjs/index.js"(exports, module) {
|
|
243
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
244
244
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
245
245
|
};
|
|
246
246
|
var style_to_object_1 = __importDefault(require_cjs2());
|
|
@@ -293,6 +293,22 @@ function simplifySlug(fp) {
|
|
|
293
293
|
const res = stripSlashes(trimSuffix(fp, "index"), true);
|
|
294
294
|
return res.length === 0 ? "/" : res;
|
|
295
295
|
}
|
|
296
|
+
function slugifyFilePath(fp, excludeExt) {
|
|
297
|
+
fp = stripSlashes(fp);
|
|
298
|
+
const ext = getFileExtension(fp);
|
|
299
|
+
const withoutFileExt = fp.replace(new RegExp(ext + "$"), "");
|
|
300
|
+
const finalExt = [".md", ".html", void 0].includes(ext) ? "" : ext;
|
|
301
|
+
let slug2 = _sluggify(withoutFileExt);
|
|
302
|
+
if (endsWith(slug2, "_index")) {
|
|
303
|
+
slug2 = slug2.replace(/_index$/, "index");
|
|
304
|
+
}
|
|
305
|
+
const segments = slug2.split("/");
|
|
306
|
+
if (segments.length >= 2 && segments[segments.length - 1] === segments[segments.length - 2]) {
|
|
307
|
+
segments[segments.length - 1] = "index";
|
|
308
|
+
slug2 = segments.join("/");
|
|
309
|
+
}
|
|
310
|
+
return slug2 + (finalExt ?? "");
|
|
311
|
+
}
|
|
296
312
|
function joinSegments(...args) {
|
|
297
313
|
if (args.length === 0) {
|
|
298
314
|
return "";
|
|
@@ -326,6 +342,9 @@ function stripSlashes(s2, onlyStripPrefix) {
|
|
|
326
342
|
}
|
|
327
343
|
return s2;
|
|
328
344
|
}
|
|
345
|
+
function getFileExtension(s2) {
|
|
346
|
+
return s2.match(/\.[A-Za-z0-9]+$/)?.[0];
|
|
347
|
+
}
|
|
329
348
|
function isFolderPath(fplike) {
|
|
330
349
|
return fplike.endsWith("/") || endsWith(fplike, "index") || endsWith(fplike, "index.md") || endsWith(fplike, "index.html");
|
|
331
350
|
}
|
|
@@ -340,6 +359,14 @@ function resolveRelative(current, target) {
|
|
|
340
359
|
const res = joinSegments(pathToRoot(current), simplifySlug(target));
|
|
341
360
|
return res;
|
|
342
361
|
}
|
|
362
|
+
function slugifyPath(s2) {
|
|
363
|
+
return s2.split("/").map(
|
|
364
|
+
(segment) => segment.replace(/\s/g, "-").replace(/&/g, "-and-").replace(/%/g, "-percent").replace(/\?/g, "").replace(/#/g, "").replace(/[<>:"|*]/g, "").toLowerCase()
|
|
365
|
+
).join("/").replace(/\/$/, "");
|
|
366
|
+
}
|
|
367
|
+
function _sluggify(s2) {
|
|
368
|
+
return slugifyPath(s2);
|
|
369
|
+
}
|
|
343
370
|
|
|
344
371
|
// node_modules/preact/dist/preact.mjs
|
|
345
372
|
var n;
|
|
@@ -731,6 +758,7 @@ var html = create({
|
|
|
731
758
|
allowFullScreen: boolean,
|
|
732
759
|
allowPaymentRequest: boolean,
|
|
733
760
|
allowUserMedia: boolean,
|
|
761
|
+
alpha: boolean,
|
|
734
762
|
alt: null,
|
|
735
763
|
as: null,
|
|
736
764
|
async: boolean,
|
|
@@ -744,8 +772,12 @@ var html = create({
|
|
|
744
772
|
checked: boolean,
|
|
745
773
|
cite: null,
|
|
746
774
|
className: spaceSeparated,
|
|
775
|
+
closedBy: null,
|
|
776
|
+
colorSpace: null,
|
|
747
777
|
cols: number,
|
|
748
|
-
colSpan:
|
|
778
|
+
colSpan: number,
|
|
779
|
+
command: null,
|
|
780
|
+
commandFor: null,
|
|
749
781
|
content: null,
|
|
750
782
|
contentEditable: booleanish,
|
|
751
783
|
controls: boolean,
|
|
@@ -925,8 +957,10 @@ var html = create({
|
|
|
925
957
|
seamless: boolean,
|
|
926
958
|
selected: boolean,
|
|
927
959
|
shadowRootClonable: boolean,
|
|
960
|
+
shadowRootCustomElementRegistry: boolean,
|
|
928
961
|
shadowRootDelegatesFocus: boolean,
|
|
929
962
|
shadowRootMode: null,
|
|
963
|
+
shadowRootSerializable: boolean,
|
|
930
964
|
shape: null,
|
|
931
965
|
size: number,
|
|
932
966
|
sizes: null,
|
|
@@ -1063,8 +1097,11 @@ var html = create({
|
|
|
1063
1097
|
allowTransparency: null,
|
|
1064
1098
|
autoCorrect: null,
|
|
1065
1099
|
autoSave: null,
|
|
1100
|
+
credentialless: boolean,
|
|
1066
1101
|
disablePictureInPicture: boolean,
|
|
1067
1102
|
disableRemotePlayback: boolean,
|
|
1103
|
+
exportParts: commaSeparated,
|
|
1104
|
+
part: spaceSeparated,
|
|
1068
1105
|
prefix: null,
|
|
1069
1106
|
property: null,
|
|
1070
1107
|
results: number,
|
|
@@ -1118,6 +1155,7 @@ var svg = create({
|
|
|
1118
1155
|
markerEnd: "marker-end",
|
|
1119
1156
|
markerMid: "marker-mid",
|
|
1120
1157
|
markerStart: "marker-start",
|
|
1158
|
+
maskType: "mask-type",
|
|
1121
1159
|
navDown: "nav-down",
|
|
1122
1160
|
navDownLeft: "nav-down-left",
|
|
1123
1161
|
navDownRight: "nav-down-right",
|
|
@@ -1388,6 +1426,7 @@ var svg = create({
|
|
|
1388
1426
|
markerWidth: null,
|
|
1389
1427
|
mask: null,
|
|
1390
1428
|
maskContentUnits: null,
|
|
1429
|
+
maskType: null,
|
|
1391
1430
|
maskUnits: null,
|
|
1392
1431
|
mathematical: null,
|
|
1393
1432
|
max: null,
|
|
@@ -2301,10 +2340,7 @@ function childrenToString(children) {
|
|
|
2301
2340
|
return String(children ?? "");
|
|
2302
2341
|
}
|
|
2303
2342
|
var builtinComponents = {
|
|
2304
|
-
table: (props) => /* @__PURE__ */ u2("div", {
|
|
2305
|
-
class: "table-container",
|
|
2306
|
-
children: /* @__PURE__ */ u2("table", { ...props })
|
|
2307
|
-
}),
|
|
2343
|
+
table: (props) => /* @__PURE__ */ u2("div", { class: "table-container", children: /* @__PURE__ */ u2("table", { ...props }) }),
|
|
2308
2344
|
style: ({ children, ...rest }) => k("style", { ...rest, dangerouslySetInnerHTML: { __html: childrenToString(children) } }),
|
|
2309
2345
|
script: ({ children, ...rest }) => k("script", { ...rest, dangerouslySetInnerHTML: { __html: childrenToString(children) } })
|
|
2310
2346
|
};
|
|
@@ -2728,7 +2764,8 @@ function pagesFromAllFiles(allFiles, folderSlug, showSubfolders) {
|
|
|
2728
2764
|
const subfolderFiles = /* @__PURE__ */ new Map();
|
|
2729
2765
|
for (const file of allFiles) {
|
|
2730
2766
|
if (file.unlisted === true) continue;
|
|
2731
|
-
const
|
|
2767
|
+
const rel = file.relativePath;
|
|
2768
|
+
const fileSlug = rel ? slugifyFilePath(rel) : file.slug;
|
|
2732
2769
|
if (!fileSlug || !fileSlug.startsWith(folderPrefix)) continue;
|
|
2733
2770
|
const relativePath = fileSlug.slice(folderPrefix.length);
|
|
2734
2771
|
if (!relativePath || relativePath === "index") continue;
|