@slogvo/vue-notion 0.1.0 → 0.2.0
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/build/{CollectionCard.vue_vue_type_script_setup_true_lang-14wiD7gP.js → CollectionCard.vue_vue_type_script_setup_true_lang-CKc3aa-Q.js} +2 -2
- package/build/{CollectionViewBoard-CgsTRxVb.js → CollectionViewBoard-iUYxAnRz.js} +3 -3
- package/build/{CollectionViewGallery-B_vTmafL.js → CollectionViewGallery-Cbq2Spsg.js} +3 -3
- package/build/{CollectionViewList-D3G1ACy1.js → CollectionViewList-BX2TvKSQ.js} +2 -2
- package/build/{CollectionViewTable-UDQc6cpa.js → CollectionViewTable-CTH-HIZh.js} +2 -2
- package/build/{collection-utils-Cqo2kyVg.js → collection-utils-7wJN6y6q.js} +1 -1
- package/build/components/NotionRenderer.vue.d.ts +2 -0
- package/build/{index-BNMgDI2p.js → index-BVgFvBYW.js} +506 -501
- package/build/index.js +1 -1
- package/build/index.umd.cjs +2 -2
- package/build/types.d.ts +1 -0
- package/package.json +16 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as we, provide as _e, defineComponent as A, computed as
|
|
1
|
+
import { inject as we, provide as _e, defineComponent as A, computed as b, ref as U, createElementBlock as u, openBlock as a, normalizeStyle as B, normalizeClass as $, unref as h, createElementVNode as g, Fragment as z, createCommentVNode as k, createBlock as x, toDisplayString as T, h as O, createTextVNode as ae, resolveDynamicComponent as H, renderList as W, renderSlot as N, onMounted as q, watch as ne, createVNode as E, defineAsyncComponent as Z, onUnmounted as le, withCtx as j, resolveComponent as $e, Teleport as xe, Transition as Ie, withModifiers as he, withDirectives as Se, vModelText as Fe, mergeProps as Pe } from "vue";
|
|
2
2
|
import Ae from "prismjs";
|
|
3
3
|
import Ee from "katex";
|
|
4
4
|
import Te from "medium-zoom";
|
|
@@ -27,8 +27,8 @@ const Ce = (e, t, o, i) => {
|
|
|
27
27
|
${t}`, Oe = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), ze = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"), De = (e, t, o) => {
|
|
28
28
|
const i = o === "" ? "" : `with ${o.trim()}() `, n = Le.bind(null, i, t.toString());
|
|
29
29
|
Object.defineProperty(n, "name", ze);
|
|
30
|
-
const { writable: l, enumerable:
|
|
31
|
-
Object.defineProperty(e, "toString", { value: n, writable: l, enumerable:
|
|
30
|
+
const { writable: l, enumerable: s, configurable: c } = Oe;
|
|
31
|
+
Object.defineProperty(e, "toString", { value: n, writable: l, enumerable: s, configurable: c });
|
|
32
32
|
};
|
|
33
33
|
function Me(e, t, { ignoreNonConfigurable: o = !1 } = {}) {
|
|
34
34
|
const { name: i } = e;
|
|
@@ -57,30 +57,30 @@ function je(e, { cacheKey: t, cache: o = /* @__PURE__ */ new Map(), maxAge: i }
|
|
|
57
57
|
throw new TypeError("The `maxAge` option should not be a negative number.");
|
|
58
58
|
}
|
|
59
59
|
const n = function(...l) {
|
|
60
|
-
const
|
|
60
|
+
const s = t ? t(l) : l[0], c = He(o, s);
|
|
61
61
|
if (c)
|
|
62
62
|
return c.data;
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
if (!Number.isFinite(
|
|
63
|
+
const f = e.apply(this, l), p = typeof i == "function" ? i(...l) : i;
|
|
64
|
+
if (p !== void 0 && p !== Number.POSITIVE_INFINITY) {
|
|
65
|
+
if (!Number.isFinite(p))
|
|
66
66
|
throw new TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
69
|
-
if (
|
|
67
|
+
if (p <= 0)
|
|
68
|
+
return f;
|
|
69
|
+
if (p > X)
|
|
70
70
|
throw new TypeError(`The \`maxAge\` function result cannot exceed ${X}.`);
|
|
71
71
|
}
|
|
72
|
-
if (o.set(
|
|
73
|
-
data:
|
|
74
|
-
maxAge:
|
|
75
|
-
}),
|
|
76
|
-
const
|
|
77
|
-
o.delete(
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
72
|
+
if (o.set(s, {
|
|
73
|
+
data: f,
|
|
74
|
+
maxAge: p === void 0 || p === Number.POSITIVE_INFINITY ? Number.POSITIVE_INFINITY : Date.now() + p
|
|
75
|
+
}), p !== void 0 && p !== Number.POSITIVE_INFINITY) {
|
|
76
|
+
const d = setTimeout(() => {
|
|
77
|
+
o.delete(s), ee.get(n)?.delete(d);
|
|
78
|
+
}, p);
|
|
79
|
+
d.unref?.();
|
|
80
|
+
const r = ee.get(n) ?? /* @__PURE__ */ new Set();
|
|
81
|
+
r.add(d), ee.set(n, r);
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return f;
|
|
84
84
|
};
|
|
85
85
|
return Me(n, e, {
|
|
86
86
|
ignoreNonConfigurable: !0
|
|
@@ -101,15 +101,15 @@ const Ve = "text/plain", We = "us-ascii", te = (e, t) => t.some((o) => o instanc
|
|
|
101
101
|
const o = /^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);
|
|
102
102
|
if (!o)
|
|
103
103
|
throw new Error(`Invalid URL: ${e}`);
|
|
104
|
-
const { type: i, data: n, hash: l } = o.groups,
|
|
105
|
-
c &&
|
|
106
|
-
const
|
|
107
|
-
let [
|
|
108
|
-
return
|
|
104
|
+
const { type: i, data: n, hash: l } = o.groups, s = i.split(";"), c = s.at(-1) === "base64";
|
|
105
|
+
c && s.pop();
|
|
106
|
+
const f = s.shift()?.toLowerCase() ?? "", d = [...s.map((v) => {
|
|
107
|
+
let [m, _ = ""] = v.split("=").map((y) => y.trim());
|
|
108
|
+
return m === "charset" && (_ = _.toLowerCase(), _ === We) ? "" : `${m}${_ ? `=${_}` : ""}`;
|
|
109
109
|
}).filter(Boolean)];
|
|
110
|
-
c &&
|
|
111
|
-
const
|
|
112
|
-
return `data:${
|
|
110
|
+
c && d.push("base64"), (d.length > 0 || f && f !== Ve) && d.unshift(f);
|
|
111
|
+
const r = t || !l ? "" : `#${l}`;
|
|
112
|
+
return `data:${d.join(";")},${c ? n.trim() : n}${r}`;
|
|
113
113
|
};
|
|
114
114
|
function Xe(e, t) {
|
|
115
115
|
if (t = {
|
|
@@ -140,17 +140,17 @@ function Xe(e, t) {
|
|
|
140
140
|
if (t.forceHttp && t.forceHttps)
|
|
141
141
|
throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");
|
|
142
142
|
if (t.forceHttp && n.protocol === "https:" && (n.protocol = "http:"), t.forceHttps && n.protocol === "http:" && (n.protocol = "https:"), t.stripAuthentication && (n.username = "", n.password = ""), t.stripHash ? n.hash = "" : t.stripTextFragment && (n.hash = n.hash.replace(/#?:~:text.*?$/i, "")), n.pathname) {
|
|
143
|
-
const
|
|
144
|
-
let c = 0,
|
|
143
|
+
const s = /\b[a-z][a-z\d+\-.]{1,50}:\/\//g;
|
|
144
|
+
let c = 0, f = "";
|
|
145
145
|
for (; ; ) {
|
|
146
|
-
const
|
|
147
|
-
if (!
|
|
146
|
+
const d = s.exec(n.pathname);
|
|
147
|
+
if (!d)
|
|
148
148
|
break;
|
|
149
|
-
const
|
|
150
|
-
|
|
149
|
+
const r = d[0], v = d.index, m = n.pathname.slice(c, v);
|
|
150
|
+
f += m.replace(/\/{2,}/g, "/"), f += r, c = v + r.length;
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
|
|
152
|
+
const p = n.pathname.slice(c, n.pathname.length);
|
|
153
|
+
f += p.replace(/\/{2,}/g, "/"), n.pathname = f;
|
|
154
154
|
}
|
|
155
155
|
if (n.pathname)
|
|
156
156
|
try {
|
|
@@ -158,30 +158,30 @@ function Xe(e, t) {
|
|
|
158
158
|
} catch {
|
|
159
159
|
}
|
|
160
160
|
if (t.removeDirectoryIndex === !0 && (t.removeDirectoryIndex = [/^index\.[a-z]+$/]), Array.isArray(t.removeDirectoryIndex) && t.removeDirectoryIndex.length > 0) {
|
|
161
|
-
const
|
|
162
|
-
c && te(c, t.removeDirectoryIndex) && (
|
|
161
|
+
const s = n.pathname.split("/").filter(Boolean), c = s.at(-1);
|
|
162
|
+
c && te(c, t.removeDirectoryIndex) && (s.pop(), n.pathname = s.length > 0 ? `/${s.join("/")}/` : "/");
|
|
163
163
|
}
|
|
164
164
|
if (t.removePath && (n.pathname = "/"), t.transformPath && typeof t.transformPath == "function") {
|
|
165
|
-
const
|
|
165
|
+
const s = n.pathname.split("/").filter(Boolean), c = t.transformPath(s);
|
|
166
166
|
n.pathname = c?.length > 0 ? `/${c.join("/")}` : "/";
|
|
167
167
|
}
|
|
168
168
|
if (n.hostname && (n.hostname = n.hostname.replace(/\.$/, ""), t.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(n.hostname) && (n.hostname = n.hostname.replace(/^www\./, ""))), Array.isArray(t.removeQueryParameters))
|
|
169
|
-
for (const
|
|
170
|
-
te(
|
|
169
|
+
for (const s of [...n.searchParams.keys()])
|
|
170
|
+
te(s, t.removeQueryParameters) && n.searchParams.delete(s);
|
|
171
171
|
if (!Array.isArray(t.keepQueryParameters) && t.removeQueryParameters === !0 && (n.search = ""), Array.isArray(t.keepQueryParameters) && t.keepQueryParameters.length > 0)
|
|
172
|
-
for (const
|
|
173
|
-
te(
|
|
172
|
+
for (const s of [...n.searchParams.keys()])
|
|
173
|
+
te(s, t.keepQueryParameters) || n.searchParams.delete(s);
|
|
174
174
|
if (t.sortQueryParameters) {
|
|
175
|
-
const
|
|
175
|
+
const s = n.search;
|
|
176
176
|
n.searchParams.sort();
|
|
177
177
|
try {
|
|
178
178
|
n.search = decodeURIComponent(n.search);
|
|
179
179
|
} catch {
|
|
180
180
|
}
|
|
181
|
-
const c =
|
|
182
|
-
for (const
|
|
183
|
-
const
|
|
184
|
-
n.search = n.search.replace(`?${
|
|
181
|
+
const c = s.slice(1).split("&").filter((f) => f && !f.includes("="));
|
|
182
|
+
for (const f of c) {
|
|
183
|
+
const p = decodeURIComponent(f);
|
|
184
|
+
n.search = n.search.replace(`?${p}=`, `?${p}`).replace(`&${p}=`, `&${p}`);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
t.removeTrailingSlash && (n.pathname = n.pathname.replace(/\/$/, "")), t.removeExplicitPort && n.port && (n.port = "");
|
|
@@ -189,15 +189,15 @@ function Xe(e, t) {
|
|
|
189
189
|
return e = n.toString(), !t.removeSingleSlash && n.pathname === "/" && !l.endsWith("/") && n.hash === "" && (e = e.replace(/\/$/, "")), (t.removeTrailingSlash || n.pathname === "/") && n.hash === "" && t.removeSingleSlash && (e = e.replace(/\/$/, "")), o && !t.normalizeProtocol && (e = e.replace(/^http:\/\//, "//")), t.stripProtocol && (e = e.replace(/^(?:https?:)?\/\//, "")), e;
|
|
190
190
|
}
|
|
191
191
|
function ie(e, t) {
|
|
192
|
-
var o, i, n, l,
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
return (
|
|
192
|
+
var o, i, n, l, s, c, f;
|
|
193
|
+
const p = e.collection_id || ((i = (o = e.format) == null ? void 0 : o.collection_pointer) == null ? void 0 : i.id);
|
|
194
|
+
if (p)
|
|
195
|
+
return p;
|
|
196
|
+
const d = (n = e?.view_ids) == null ? void 0 : n[0];
|
|
197
|
+
if (d) {
|
|
198
|
+
const r = (s = (l = t.collection_view) == null ? void 0 : l[d]) == null ? void 0 : s.value;
|
|
199
|
+
if (r)
|
|
200
|
+
return (f = (c = r.format) == null ? void 0 : c.collection_pointer) == null ? void 0 : f.id;
|
|
201
201
|
}
|
|
202
202
|
return null;
|
|
203
203
|
}
|
|
@@ -227,27 +227,27 @@ var Ye = {
|
|
|
227
227
|
sub_header: 1,
|
|
228
228
|
sub_sub_header: 2
|
|
229
229
|
}, Ke = (e, t) => {
|
|
230
|
-
function o(
|
|
231
|
-
return (
|
|
232
|
-
var
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
const { type:
|
|
236
|
-
if (
|
|
230
|
+
function o(s) {
|
|
231
|
+
return (s ?? []).map((c) => {
|
|
232
|
+
var f, p;
|
|
233
|
+
const d = (f = t.block[c]) == null ? void 0 : f.value;
|
|
234
|
+
if (d) {
|
|
235
|
+
const { type: r } = d;
|
|
236
|
+
if (r === "header" || r === "sub_header" || r === "sub_sub_header")
|
|
237
237
|
return {
|
|
238
238
|
id: c,
|
|
239
|
-
type:
|
|
240
|
-
text: M((
|
|
241
|
-
indentLevel: Ye[
|
|
239
|
+
type: r,
|
|
240
|
+
text: M((p = d.properties) == null ? void 0 : p.title),
|
|
241
|
+
indentLevel: Ye[r]
|
|
242
242
|
};
|
|
243
|
-
if (
|
|
244
|
-
return o(
|
|
243
|
+
if (r === "transclusion_container" || r === "column_list" || r === "column")
|
|
244
|
+
return o(d.content);
|
|
245
245
|
}
|
|
246
246
|
return null;
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
function i(
|
|
250
|
-
return
|
|
249
|
+
function i(s) {
|
|
250
|
+
return s.flatMap((c) => c == null ? [] : Array.isArray(c) ? i(c) : [c]);
|
|
251
251
|
}
|
|
252
252
|
const n = i(o(e.content)), l = [
|
|
253
253
|
{
|
|
@@ -255,17 +255,17 @@ var Ye = {
|
|
|
255
255
|
effective: -1
|
|
256
256
|
}
|
|
257
257
|
];
|
|
258
|
-
for (const
|
|
259
|
-
const { indentLevel: c } =
|
|
258
|
+
for (const s of n) {
|
|
259
|
+
const { indentLevel: c } = s, f = c;
|
|
260
260
|
do {
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
263
|
-
|
|
264
|
-
actual:
|
|
265
|
-
effective:
|
|
261
|
+
const p = l.at(-1), { actual: d, effective: r } = p;
|
|
262
|
+
if (f > d)
|
|
263
|
+
s.indentLevel = r + 1, l.push({
|
|
264
|
+
actual: f,
|
|
265
|
+
effective: s.indentLevel
|
|
266
266
|
});
|
|
267
|
-
else if (
|
|
268
|
-
|
|
267
|
+
else if (f === d) {
|
|
268
|
+
s.indentLevel = r;
|
|
269
269
|
break;
|
|
270
270
|
} else
|
|
271
271
|
l.pop();
|
|
@@ -289,9 +289,9 @@ function ve(e, t) {
|
|
|
289
289
|
if (e.type === "collection_view_page" || e.type === "collection_view") {
|
|
290
290
|
const l = ie(e, t);
|
|
291
291
|
if (l) {
|
|
292
|
-
const
|
|
293
|
-
if (
|
|
294
|
-
return
|
|
292
|
+
const s = (n = t.collection[l]) == null ? void 0 : n.value;
|
|
293
|
+
if (s)
|
|
294
|
+
return s.icon;
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
return null;
|
|
@@ -304,12 +304,12 @@ var J = (e, t, {
|
|
|
304
304
|
for (; l; ) {
|
|
305
305
|
if (o && l?.type === "page")
|
|
306
306
|
return l;
|
|
307
|
-
const
|
|
308
|
-
if (!
|
|
307
|
+
const s = l.parent_id, c = l.parent_table;
|
|
308
|
+
if (!s)
|
|
309
309
|
break;
|
|
310
310
|
if (c === "collection")
|
|
311
|
-
l = (i = t.collection[
|
|
312
|
-
else if (l = (n = t.block[
|
|
311
|
+
l = (i = t.collection[s]) == null ? void 0 : i.value;
|
|
312
|
+
else if (l = (n = t.block[s]) == null ? void 0 : n.value, l?.type === "page")
|
|
313
313
|
return l;
|
|
314
314
|
}
|
|
315
315
|
return null;
|
|
@@ -318,23 +318,23 @@ var J = (e, t, {
|
|
|
318
318
|
const i = e.block, n = [];
|
|
319
319
|
let l = t;
|
|
320
320
|
do {
|
|
321
|
-
const
|
|
322
|
-
if (!
|
|
321
|
+
const s = (o = i[l]) == null ? void 0 : o.value;
|
|
322
|
+
if (!s)
|
|
323
323
|
break;
|
|
324
|
-
const c = Q(
|
|
325
|
-
if (!(c ||
|
|
324
|
+
const c = Q(s, e), f = ve(s, e);
|
|
325
|
+
if (!(c || f))
|
|
326
326
|
break;
|
|
327
327
|
n.push({
|
|
328
|
-
block:
|
|
328
|
+
block: s,
|
|
329
329
|
active: l === t,
|
|
330
330
|
pageId: l,
|
|
331
331
|
title: c,
|
|
332
|
-
icon:
|
|
332
|
+
icon: f
|
|
333
333
|
});
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
334
|
+
const p = J(s, e), d = p?.id;
|
|
335
|
+
if (!d)
|
|
336
336
|
break;
|
|
337
|
-
l =
|
|
337
|
+
l = d;
|
|
338
338
|
} while (!0);
|
|
339
339
|
return n.reverse(), n;
|
|
340
340
|
}, et = /(?:https?:\/\/)?[^\s]+\.gif(?=$|\?|#)/, tt = (e, t) => {
|
|
@@ -381,7 +381,7 @@ function D() {
|
|
|
381
381
|
throw new Error("useNotionContext must be used within a NotionRenderer");
|
|
382
382
|
return e;
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const S = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Object.keys(t).filter((o) => t[o]).join(" ") : t).join(" "), ot = /* @__PURE__ */ new Set([
|
|
385
385
|
"youtu.be",
|
|
386
386
|
"youtube.com",
|
|
387
387
|
"www.youtube.com",
|
|
@@ -412,12 +412,12 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
412
412
|
priority: { type: Boolean }
|
|
413
413
|
},
|
|
414
414
|
setup(e) {
|
|
415
|
-
const t = e, { recordMap: o, previewImages: i, forceCustomImages: n, components: l, zoom:
|
|
416
|
-
t.zoomable &&
|
|
415
|
+
const t = e, { recordMap: o, previewImages: i, forceCustomImages: n, components: l, zoom: s } = D(), c = b(() => !i || !t.src ? null : o?.preview_images?.[t.src] ?? o?.preview_images?.[ke(t.src)]), f = U(null), p = (d) => {
|
|
416
|
+
t.zoomable && f.value && s && s.attach(f.value);
|
|
417
417
|
};
|
|
418
|
-
return (
|
|
418
|
+
return (d, r) => c.value ? (a(), u("div", {
|
|
419
419
|
key: 0,
|
|
420
|
-
class: $(
|
|
420
|
+
class: $(h(S)("lazy-image-wrapper", e.className)),
|
|
421
421
|
style: B({
|
|
422
422
|
width: "100%",
|
|
423
423
|
paddingBottom: e.height ? void 0 : `${c.value.originalHeight / c.value.originalWidth * 100}%`,
|
|
@@ -432,7 +432,7 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
432
432
|
}, null, 8, lt),
|
|
433
433
|
g("img", {
|
|
434
434
|
ref_key: "imageRef",
|
|
435
|
-
ref:
|
|
435
|
+
ref: f,
|
|
436
436
|
class: "lazy-image-real",
|
|
437
437
|
src: e.src,
|
|
438
438
|
alt: e.alt,
|
|
@@ -440,20 +440,20 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
440
440
|
height: c.value.originalHeight,
|
|
441
441
|
decoding: "async",
|
|
442
442
|
loading: "lazy",
|
|
443
|
-
onLoad:
|
|
443
|
+
onLoad: p
|
|
444
444
|
}, null, 40, it)
|
|
445
|
-
], 6)) : (a(),
|
|
446
|
-
e.src ? (a(),
|
|
445
|
+
], 6)) : (a(), u(z, { key: 1 }, [
|
|
446
|
+
e.src ? (a(), u("img", {
|
|
447
447
|
key: 0,
|
|
448
448
|
ref_key: "imageRef",
|
|
449
|
-
ref:
|
|
449
|
+
ref: f,
|
|
450
450
|
class: $(e.className),
|
|
451
451
|
style: B(e.style),
|
|
452
452
|
src: e.src,
|
|
453
453
|
alt: e.alt,
|
|
454
454
|
loading: "lazy",
|
|
455
455
|
decoding: "async",
|
|
456
|
-
onLoad:
|
|
456
|
+
onLoad: p
|
|
457
457
|
}, null, 46, rt)) : k("", !0)
|
|
458
458
|
], 64));
|
|
459
459
|
}
|
|
@@ -469,9 +469,9 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
469
469
|
defaultIcon: {}
|
|
470
470
|
},
|
|
471
471
|
setup(e) {
|
|
472
|
-
const t = e, { recordMap: o, mapImageUrl: i, darkMode: n } = D(), l =
|
|
472
|
+
const t = e, { recordMap: o, mapImageUrl: i, darkMode: n } = D(), l = b(
|
|
473
473
|
() => ve(t.block, o)?.trim() || t.defaultIcon
|
|
474
|
-
),
|
|
474
|
+
), s = b(() => Q(t.block, o)), c = b(() => l.value && (oe(l.value) || l.value.startsWith("/icons/"))), f = b(() => {
|
|
475
475
|
if (l.value) {
|
|
476
476
|
if (oe(l.value))
|
|
477
477
|
return i(l.value, t.block);
|
|
@@ -479,10 +479,10 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
479
479
|
return `https://www.notion.so${l.value}?mode=${n ? "dark" : "light"}`;
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
|
-
return (
|
|
482
|
+
return (p, d) => l.value || !e.hideDefaultIcon ? (a(), u("div", {
|
|
483
483
|
key: 0,
|
|
484
484
|
class: $(
|
|
485
|
-
|
|
485
|
+
h(S)(
|
|
486
486
|
e.inline ? "notion-page-icon-inline" : "notion-page-icon-hero",
|
|
487
487
|
c.value ? "notion-page-icon-image" : "notion-page-icon-span"
|
|
488
488
|
)
|
|
@@ -490,17 +490,17 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
490
490
|
}, [
|
|
491
491
|
c.value ? (a(), x(re, {
|
|
492
492
|
key: 0,
|
|
493
|
-
src:
|
|
494
|
-
alt:
|
|
495
|
-
className:
|
|
496
|
-
}, null, 8, ["src", "alt", "className"])) : l.value ? (a(),
|
|
493
|
+
src: f.value,
|
|
494
|
+
alt: s.value || "page icon",
|
|
495
|
+
className: h(S)(e.className, "notion-page-icon")
|
|
496
|
+
}, null, 8, ["src", "alt", "className"])) : l.value ? (a(), u("span", {
|
|
497
497
|
key: 1,
|
|
498
|
-
class: $(
|
|
498
|
+
class: $(h(S)(e.className, "notion-page-icon")),
|
|
499
499
|
role: "img",
|
|
500
500
|
"aria-label": l.value
|
|
501
|
-
}, T(l.value), 11, ct)) : e.hideDefaultIcon ? k("", !0) : (a(),
|
|
501
|
+
}, T(l.value), 11, ct)) : e.hideDefaultIcon ? k("", !0) : (a(), u("div", {
|
|
502
502
|
key: 2,
|
|
503
|
-
class: $(
|
|
503
|
+
class: $(h(S)(e.className, "notion-page-icon"))
|
|
504
504
|
}, " 📄 ", 2))
|
|
505
505
|
], 2)) : k("", !0);
|
|
506
506
|
}
|
|
@@ -510,12 +510,12 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
510
510
|
content: {}
|
|
511
511
|
},
|
|
512
512
|
setup(e) {
|
|
513
|
-
const t = e, o =
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
516
|
-
const
|
|
513
|
+
const t = e, o = b(() => t.content[0]), i = b(() => t.content[1] || []), { recordMap: n, mapPageUrl: l, components: s } = D(), c = b(() => {
|
|
514
|
+
const f = o.value, p = i.value, d = p?.find((m) => m[0] === "eoi");
|
|
515
|
+
if (d) {
|
|
516
|
+
const m = d[1], _ = n.block[m]?.value || n.block[K(m)]?.value || n.block[ce(m)]?.value;
|
|
517
517
|
if (_ && _.type === "external_object_instance") {
|
|
518
|
-
const y = _.format, P = y?.original_url || y?.uri,
|
|
518
|
+
const y = _.format, P = y?.original_url || y?.uri, I = (y?.attributes || []).find((C) => C.id === "title")?.values?.[0] || P;
|
|
519
519
|
return O(
|
|
520
520
|
"a",
|
|
521
521
|
{
|
|
@@ -524,17 +524,17 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
524
524
|
target: "_blank",
|
|
525
525
|
rel: "noopener noreferrer"
|
|
526
526
|
},
|
|
527
|
-
|
|
527
|
+
I || "Original Link"
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
if (
|
|
533
|
-
const
|
|
531
|
+
const r = p?.find((m) => m[0] === "p");
|
|
532
|
+
if (r) {
|
|
533
|
+
const m = r[1], _ = n.block[m]?.value || n.block[K(m)]?.value || n.block[ce(m)]?.value;
|
|
534
534
|
if (_) {
|
|
535
|
-
const y = M(_.properties?.title) || "Untitled", P = l(
|
|
535
|
+
const y = M(_.properties?.title) || "Untitled", P = l(m);
|
|
536
536
|
return O(
|
|
537
|
-
|
|
537
|
+
s.PageLink,
|
|
538
538
|
{
|
|
539
539
|
class: "notion-link notion-page-mention",
|
|
540
540
|
href: P
|
|
@@ -545,9 +545,9 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
545
545
|
]
|
|
546
546
|
);
|
|
547
547
|
} else {
|
|
548
|
-
const y = l(
|
|
548
|
+
const y = l(m);
|
|
549
549
|
return O(
|
|
550
|
-
|
|
550
|
+
s.PageLink,
|
|
551
551
|
{
|
|
552
552
|
class: "notion-link notion-page-mention",
|
|
553
553
|
href: y
|
|
@@ -556,29 +556,29 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
556
556
|
);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
if (!
|
|
560
|
-
let
|
|
561
|
-
for (const
|
|
562
|
-
switch (
|
|
559
|
+
if (!p?.length) return f;
|
|
560
|
+
let v = f;
|
|
561
|
+
for (const m of p)
|
|
562
|
+
switch (m[0]) {
|
|
563
563
|
case "b":
|
|
564
|
-
|
|
564
|
+
v = O("b", null, v);
|
|
565
565
|
break;
|
|
566
566
|
case "i":
|
|
567
|
-
|
|
567
|
+
v = O("i", null, v);
|
|
568
568
|
break;
|
|
569
569
|
case "s":
|
|
570
|
-
|
|
570
|
+
v = O("s", null, v);
|
|
571
571
|
break;
|
|
572
572
|
case "a":
|
|
573
|
-
const y =
|
|
574
|
-
y.startsWith("/") ?
|
|
575
|
-
|
|
573
|
+
const y = m[1];
|
|
574
|
+
y.startsWith("/") ? v = O(
|
|
575
|
+
s.PageLink,
|
|
576
576
|
{
|
|
577
577
|
class: "notion-link",
|
|
578
578
|
href: y
|
|
579
579
|
},
|
|
580
|
-
|
|
581
|
-
) :
|
|
580
|
+
v
|
|
581
|
+
) : v = O(
|
|
582
582
|
"a",
|
|
583
583
|
{
|
|
584
584
|
class: "notion-link",
|
|
@@ -586,23 +586,23 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
586
586
|
target: "_blank",
|
|
587
587
|
rel: "noopener noreferrer"
|
|
588
588
|
},
|
|
589
|
-
|
|
589
|
+
v
|
|
590
590
|
);
|
|
591
591
|
break;
|
|
592
592
|
case "c":
|
|
593
|
-
|
|
593
|
+
v = O("code", { class: "notion-inline-code" }, v);
|
|
594
594
|
break;
|
|
595
595
|
case "_":
|
|
596
|
-
|
|
596
|
+
v = O("span", { class: "notion-inline-underscore" }, v);
|
|
597
597
|
break;
|
|
598
598
|
case "h":
|
|
599
|
-
const P =
|
|
600
|
-
|
|
599
|
+
const P = m[1];
|
|
600
|
+
v = O("span", { class: `notion-${P}` }, v);
|
|
601
601
|
break;
|
|
602
602
|
}
|
|
603
|
-
return
|
|
603
|
+
return v;
|
|
604
604
|
});
|
|
605
|
-
return (
|
|
605
|
+
return (f, p) => typeof c.value == "string" ? (a(), u(z, { key: 0 }, [
|
|
606
606
|
ae(T(c.value), 1)
|
|
607
607
|
], 64)) : (a(), x(H(c.value), { key: 1 }));
|
|
608
608
|
}
|
|
@@ -616,8 +616,8 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
616
616
|
block: {}
|
|
617
617
|
},
|
|
618
618
|
setup(e) {
|
|
619
|
-
return (t, o) => e.value ? (a(),
|
|
620
|
-
(a(!0),
|
|
619
|
+
return (t, o) => e.value ? (a(), u("span", pt, [
|
|
620
|
+
(a(!0), u(z, null, W(e.value, (i, n) => (a(), x(dt, {
|
|
621
621
|
key: n,
|
|
622
622
|
content: i
|
|
623
623
|
}, null, 8, ["content"]))), 128))
|
|
@@ -635,8 +635,8 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
635
635
|
zoomable: { type: Boolean }
|
|
636
636
|
},
|
|
637
637
|
setup(e) {
|
|
638
|
-
const t = e, { recordMap: o, mapImageUrl: i, components: n } = D(), l =
|
|
639
|
-
const
|
|
638
|
+
const t = e, { recordMap: o, mapImageUrl: i, components: n } = D(), l = b(() => {
|
|
639
|
+
const r = {
|
|
640
640
|
position: "relative",
|
|
641
641
|
display: "flex",
|
|
642
642
|
justifyContent: "center",
|
|
@@ -647,76 +647,76 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
647
647
|
};
|
|
648
648
|
if (t.block.format) {
|
|
649
649
|
const {
|
|
650
|
-
block_aspect_ratio:
|
|
651
|
-
block_height:
|
|
650
|
+
block_aspect_ratio: v,
|
|
651
|
+
block_height: m,
|
|
652
652
|
block_width: _,
|
|
653
653
|
block_full_width: y,
|
|
654
654
|
block_page_width: P,
|
|
655
|
-
block_preserve_scale:
|
|
655
|
+
block_preserve_scale: F
|
|
656
656
|
} = t.block.format;
|
|
657
657
|
if (y || P)
|
|
658
|
-
y ?
|
|
658
|
+
y ? r.width = "100vw" : r.width = "100%", t.block.type === "video" ? m ? r.height = `${m}px` : v && (r.paddingBottom = `${v * 100}%`) : v && t.block.type !== "image" ? r.paddingBottom = `${v * 100}%` : m && (r.height = `${m}px`);
|
|
659
659
|
else {
|
|
660
660
|
switch (t.block.format?.block_alignment) {
|
|
661
661
|
case "center":
|
|
662
|
-
|
|
662
|
+
r.alignSelf = "center";
|
|
663
663
|
break;
|
|
664
664
|
case "left":
|
|
665
|
-
|
|
665
|
+
r.alignSelf = "start";
|
|
666
666
|
break;
|
|
667
667
|
case "right":
|
|
668
|
-
|
|
668
|
+
r.alignSelf = "end";
|
|
669
669
|
break;
|
|
670
670
|
}
|
|
671
|
-
_ && (
|
|
671
|
+
_ && (r.width = typeof _ == "number" ? `${_}px` : _);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
return
|
|
675
|
-
}),
|
|
676
|
-
const
|
|
677
|
-
return t.block.type === "image" ?
|
|
678
|
-
}), c =
|
|
679
|
-
let
|
|
680
|
-
if (
|
|
681
|
-
const
|
|
682
|
-
|
|
674
|
+
return r;
|
|
675
|
+
}), s = b(() => {
|
|
676
|
+
const r = {};
|
|
677
|
+
return t.block.type === "image" ? r.objectFit = "cover" : t.block.format?.block_preserve_scale && (r.objectFit = "contain"), r;
|
|
678
|
+
}), c = b(() => {
|
|
679
|
+
let r = o.signed_urls?.[t.block.id] || t.block.properties?.source?.[0]?.[0];
|
|
680
|
+
if (r && t.block.space_id) {
|
|
681
|
+
const v = new URL(r);
|
|
682
|
+
v.searchParams.set("spaceId", t.block.space_id), r = v.toString();
|
|
683
683
|
}
|
|
684
|
-
return
|
|
685
|
-
}),
|
|
684
|
+
return r;
|
|
685
|
+
}), f = b(() => {
|
|
686
686
|
if (t.block.type === "image" && c.value) {
|
|
687
|
-
let
|
|
688
|
-
return !
|
|
687
|
+
let r = c.value;
|
|
688
|
+
return !r.includes(".gif") && r.includes("file.notion.so") && (r = t.block.properties?.source?.[0]?.[0]), i(r, t.block);
|
|
689
689
|
}
|
|
690
690
|
return c.value;
|
|
691
|
-
}),
|
|
692
|
-
const
|
|
693
|
-
return
|
|
694
|
-
}),
|
|
695
|
-
return (
|
|
691
|
+
}), p = b(() => {
|
|
692
|
+
const r = M(t.block.properties?.alt_text), v = M(t.block.properties?.caption);
|
|
693
|
+
return r || v || "notion image";
|
|
694
|
+
}), d = b(() => t.block.type === "video" && c.value ? at(c.value) : null);
|
|
695
|
+
return (r, v) => c.value ? (a(), u("div", {
|
|
696
696
|
key: 0,
|
|
697
697
|
style: B(l.value)
|
|
698
698
|
}, [
|
|
699
|
-
e.block.type === "image" ? (a(), x(H(
|
|
699
|
+
e.block.type === "image" ? (a(), x(H(h(n).Image), {
|
|
700
700
|
key: 0,
|
|
701
|
-
src:
|
|
702
|
-
alt:
|
|
701
|
+
src: f.value,
|
|
702
|
+
alt: p.value,
|
|
703
703
|
zoomable: e.zoomable,
|
|
704
|
-
style: B(
|
|
705
|
-
}, null, 8, ["src", "alt", "zoomable", "style"])) : e.block.type === "video" ? (a(),
|
|
706
|
-
|
|
704
|
+
style: B(s.value)
|
|
705
|
+
}, null, 8, ["src", "alt", "zoomable", "style"])) : e.block.type === "video" ? (a(), u(z, { key: 1 }, [
|
|
706
|
+
d.value ? (a(), u("iframe", {
|
|
707
707
|
key: 0,
|
|
708
708
|
class: "notion-asset-object-fit",
|
|
709
|
-
style: B(
|
|
710
|
-
src: `https://www.youtube.com/embed/${
|
|
709
|
+
style: B(s.value),
|
|
710
|
+
src: `https://www.youtube.com/embed/${d.value}`,
|
|
711
711
|
frameBorder: "0",
|
|
712
712
|
allowFullScreen: "",
|
|
713
713
|
loading: "lazy"
|
|
714
|
-
}, null, 12, ft)) : (a(),
|
|
714
|
+
}, null, 12, ft)) : (a(), u("video", {
|
|
715
715
|
key: 1,
|
|
716
716
|
playsInline: "",
|
|
717
717
|
controls: "",
|
|
718
718
|
preload: "metadata",
|
|
719
|
-
style: B(
|
|
719
|
+
style: B(s.value),
|
|
720
720
|
src: c.value
|
|
721
721
|
}, null, 12, mt))
|
|
722
722
|
], 64)) : [
|
|
@@ -728,21 +728,21 @@ const I = (...e) => e.filter((t) => !!t).map((t) => typeof t == "object" ? Objec
|
|
|
728
728
|
"excalidraw",
|
|
729
729
|
"codepen",
|
|
730
730
|
"replit"
|
|
731
|
-
].includes(e.block.type) ? (a(),
|
|
731
|
+
].includes(e.block.type) ? (a(), u("iframe", {
|
|
732
732
|
key: 2,
|
|
733
733
|
class: "notion-asset-object-fit",
|
|
734
|
-
style: B(
|
|
734
|
+
style: B(s.value),
|
|
735
735
|
src: c.value,
|
|
736
736
|
frameBorder: "0",
|
|
737
737
|
allowFullScreen: "",
|
|
738
738
|
loading: "lazy"
|
|
739
|
-
}, null, 12, bt)) : e.block.type === "pdf" ? (a(),
|
|
739
|
+
}, null, 12, bt)) : e.block.type === "pdf" ? (a(), u("div", ht, [
|
|
740
740
|
g("a", {
|
|
741
741
|
href: c.value,
|
|
742
742
|
target: "_blank"
|
|
743
743
|
}, "View PDF", 8, vt)
|
|
744
744
|
])) : k("", !0),
|
|
745
|
-
N(
|
|
745
|
+
N(r.$slots, "default")
|
|
746
746
|
], 4)) : k("", !0);
|
|
747
747
|
}
|
|
748
748
|
});
|
|
@@ -1227,16 +1227,16 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1227
1227
|
"operator",
|
|
1228
1228
|
"punctuation",
|
|
1229
1229
|
"number"
|
|
1230
|
-
], l = i.variable[1].inside,
|
|
1231
|
-
l[n[
|
|
1230
|
+
], l = i.variable[1].inside, s = 0; s < n.length; s++)
|
|
1231
|
+
l[n[s]] = e.languages.bash[n[s]];
|
|
1232
1232
|
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
1233
1233
|
})(Prism);
|
|
1234
1234
|
(function(e) {
|
|
1235
1235
|
var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
|
1236
|
-
function o(
|
|
1237
|
-
return
|
|
1236
|
+
function o(d) {
|
|
1237
|
+
return d = d.replace(/<inner>/g, function() {
|
|
1238
1238
|
return t;
|
|
1239
|
-
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" +
|
|
1239
|
+
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + d + ")");
|
|
1240
1240
|
}
|
|
1241
1241
|
var i = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, n = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
1242
1242
|
return i;
|
|
@@ -1465,69 +1465,69 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
}), ["url", "bold", "italic", "strike"].forEach(function(
|
|
1469
|
-
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(
|
|
1470
|
-
|
|
1468
|
+
}), ["url", "bold", "italic", "strike"].forEach(function(d) {
|
|
1469
|
+
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(r) {
|
|
1470
|
+
d !== r && (e.languages.markdown[d].inside.content.inside[r] = e.languages.markdown[r]);
|
|
1471
1471
|
});
|
|
1472
|
-
}), e.hooks.add("after-tokenize", function(
|
|
1473
|
-
if (
|
|
1472
|
+
}), e.hooks.add("after-tokenize", function(d) {
|
|
1473
|
+
if (d.language !== "markdown" && d.language !== "md")
|
|
1474
1474
|
return;
|
|
1475
|
-
function
|
|
1476
|
-
if (!(!
|
|
1477
|
-
for (var
|
|
1478
|
-
var y = m
|
|
1475
|
+
function r(v) {
|
|
1476
|
+
if (!(!v || typeof v == "string"))
|
|
1477
|
+
for (var m = 0, _ = v.length; m < _; m++) {
|
|
1478
|
+
var y = v[m];
|
|
1479
1479
|
if (y.type !== "code") {
|
|
1480
|
-
|
|
1480
|
+
r(y.content);
|
|
1481
1481
|
continue;
|
|
1482
1482
|
}
|
|
1483
|
-
var P = y.content[1],
|
|
1484
|
-
if (P &&
|
|
1485
|
-
var
|
|
1486
|
-
|
|
1487
|
-
var
|
|
1488
|
-
|
|
1483
|
+
var P = y.content[1], F = y.content[3];
|
|
1484
|
+
if (P && F && P.type === "code-language" && F.type === "code-block" && typeof P.content == "string") {
|
|
1485
|
+
var w = P.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
|
1486
|
+
w = (/[a-z][\w-]*/i.exec(w) || [""])[0].toLowerCase();
|
|
1487
|
+
var I = "language-" + w;
|
|
1488
|
+
F.alias ? typeof F.alias == "string" ? F.alias = [F.alias, I] : F.alias.push(I) : F.alias = [I];
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
|
|
1493
|
-
}), e.hooks.add("wrap", function(
|
|
1494
|
-
if (
|
|
1495
|
-
for (var
|
|
1496
|
-
var _ =
|
|
1492
|
+
r(d.tokens);
|
|
1493
|
+
}), e.hooks.add("wrap", function(d) {
|
|
1494
|
+
if (d.type === "code-block") {
|
|
1495
|
+
for (var r = "", v = 0, m = d.classes.length; v < m; v++) {
|
|
1496
|
+
var _ = d.classes[v], y = /language-(.+)/.exec(_);
|
|
1497
1497
|
if (y) {
|
|
1498
|
-
|
|
1498
|
+
r = y[1];
|
|
1499
1499
|
break;
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
var P = e.languages[
|
|
1502
|
+
var P = e.languages[r];
|
|
1503
1503
|
if (P)
|
|
1504
|
-
|
|
1505
|
-
else if (
|
|
1506
|
-
var
|
|
1507
|
-
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1504
|
+
d.content = e.highlight(p(d.content), P, r);
|
|
1505
|
+
else if (r && r !== "none" && e.plugins.autoloader) {
|
|
1506
|
+
var F = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
|
|
1507
|
+
d.attributes.id = F, e.plugins.autoloader.loadLanguages(r, function() {
|
|
1508
|
+
var w = document.getElementById(F);
|
|
1509
|
+
w && (w.innerHTML = e.highlight(w.textContent, e.languages[r], r));
|
|
1510
1510
|
});
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
});
|
|
1514
|
-
var
|
|
1514
|
+
var s = RegExp(e.languages.markup.tag.pattern.source, "gi"), c = {
|
|
1515
1515
|
amp: "&",
|
|
1516
1516
|
lt: "<",
|
|
1517
1517
|
gt: ">",
|
|
1518
1518
|
quot: '"'
|
|
1519
|
-
},
|
|
1520
|
-
function
|
|
1521
|
-
var
|
|
1522
|
-
return
|
|
1523
|
-
if (
|
|
1519
|
+
}, f = String.fromCodePoint || String.fromCharCode;
|
|
1520
|
+
function p(d) {
|
|
1521
|
+
var r = d.replace(s, "");
|
|
1522
|
+
return r = r.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(v, m) {
|
|
1523
|
+
if (m = m.toLowerCase(), m[0] === "#") {
|
|
1524
1524
|
var _;
|
|
1525
|
-
return
|
|
1525
|
+
return m[1] === "x" ? _ = parseInt(m.slice(2), 16) : _ = Number(m.slice(1)), f(_);
|
|
1526
1526
|
} else {
|
|
1527
|
-
var y = c[
|
|
1528
|
-
return y ||
|
|
1527
|
+
var y = c[m];
|
|
1528
|
+
return y || v;
|
|
1529
1529
|
}
|
|
1530
|
-
}),
|
|
1530
|
+
}), r;
|
|
1531
1531
|
}
|
|
1532
1532
|
e.languages.md = e.languages.markdown;
|
|
1533
1533
|
})(Prism);
|
|
@@ -1728,12 +1728,12 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1728
1728
|
defaultLanguage: {}
|
|
1729
1729
|
},
|
|
1730
1730
|
setup(e) {
|
|
1731
|
-
const t = e, o =
|
|
1731
|
+
const t = e, o = b(() => M(t.block.properties?.title)), i = b(
|
|
1732
1732
|
() => t.block.properties?.language?.[0]?.[0]?.toLowerCase() || t.defaultLanguage || "typescript"
|
|
1733
|
-
), n =
|
|
1733
|
+
), n = b(() => t.block.properties?.caption), l = U(null), s = () => {
|
|
1734
1734
|
l.value && Ae.highlightElement(l.value);
|
|
1735
1735
|
};
|
|
1736
|
-
return q(
|
|
1736
|
+
return q(s), ne(o, s), ne(i, s), (c, f) => (a(), u("div", $t, [
|
|
1737
1737
|
g("pre", {
|
|
1738
1738
|
class: $(`language-${i.value}`)
|
|
1739
1739
|
}, [
|
|
@@ -1743,7 +1743,7 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1743
1743
|
class: $(`language-${i.value}`)
|
|
1744
1744
|
}, T(o.value), 3)
|
|
1745
1745
|
], 2),
|
|
1746
|
-
n.value ? (a(),
|
|
1746
|
+
n.value ? (a(), u("figcaption", xt, [
|
|
1747
1747
|
E(R, {
|
|
1748
1748
|
value: n.value,
|
|
1749
1749
|
block: e.block
|
|
@@ -1760,7 +1760,7 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1760
1760
|
inline: { type: Boolean }
|
|
1761
1761
|
},
|
|
1762
1762
|
setup(e) {
|
|
1763
|
-
const t = e, o =
|
|
1763
|
+
const t = e, o = b(() => M(t.block.properties?.title)), i = b(() => {
|
|
1764
1764
|
const n = o.value;
|
|
1765
1765
|
if (!n) return "";
|
|
1766
1766
|
try {
|
|
@@ -1772,11 +1772,11 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1772
1772
|
return console.error("KaTeX error", l), n;
|
|
1773
1773
|
}
|
|
1774
1774
|
});
|
|
1775
|
-
return (n, l) => e.inline ? (a(),
|
|
1775
|
+
return (n, l) => e.inline ? (a(), u("span", {
|
|
1776
1776
|
key: 0,
|
|
1777
1777
|
class: "notion-equation notion-equation-inline",
|
|
1778
1778
|
innerHTML: i.value
|
|
1779
|
-
}, null, 8, Ft)) : (a(),
|
|
1779
|
+
}, null, 8, Ft)) : (a(), u("div", {
|
|
1780
1780
|
key: 1,
|
|
1781
1781
|
class: "notion-equation notion-equation-block",
|
|
1782
1782
|
innerHTML: i.value
|
|
@@ -1798,44 +1798,44 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1798
1798
|
},
|
|
1799
1799
|
setup(e) {
|
|
1800
1800
|
const t = Z(
|
|
1801
|
-
() => import("./CollectionViewGallery-
|
|
1801
|
+
() => import("./CollectionViewGallery-Cbq2Spsg.js")
|
|
1802
1802
|
), o = Z(
|
|
1803
|
-
() => import("./CollectionViewList-
|
|
1803
|
+
() => import("./CollectionViewList-BX2TvKSQ.js")
|
|
1804
1804
|
), i = Z(
|
|
1805
|
-
() => import("./CollectionViewTable-
|
|
1805
|
+
() => import("./CollectionViewTable-CTH-HIZh.js")
|
|
1806
1806
|
), n = Z(
|
|
1807
|
-
() => import("./CollectionViewBoard-
|
|
1807
|
+
() => import("./CollectionViewBoard-iUYxAnRz.js")
|
|
1808
1808
|
);
|
|
1809
|
-
return (l,
|
|
1810
|
-
e.collectionView.type === "gallery" ? (a(), x(
|
|
1809
|
+
return (l, s) => (a(), u("div", Tt, [
|
|
1810
|
+
e.collectionView.type === "gallery" ? (a(), x(h(t), {
|
|
1811
1811
|
key: 0,
|
|
1812
1812
|
collection: e.collection,
|
|
1813
1813
|
"collection-view": e.collectionView,
|
|
1814
1814
|
"collection-data": e.collectionData,
|
|
1815
1815
|
width: e.width,
|
|
1816
1816
|
padding: e.padding
|
|
1817
|
-
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : e.collectionView.type === "list" ? (a(), x(
|
|
1817
|
+
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : e.collectionView.type === "list" ? (a(), x(h(o), {
|
|
1818
1818
|
key: 1,
|
|
1819
1819
|
collection: e.collection,
|
|
1820
1820
|
"collection-view": e.collectionView,
|
|
1821
1821
|
"collection-data": e.collectionData,
|
|
1822
1822
|
width: e.width,
|
|
1823
1823
|
padding: e.padding
|
|
1824
|
-
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : e.collectionView.type === "table" ? (a(), x(
|
|
1824
|
+
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : e.collectionView.type === "table" ? (a(), x(h(i), {
|
|
1825
1825
|
key: 2,
|
|
1826
1826
|
collection: e.collection,
|
|
1827
1827
|
"collection-view": e.collectionView,
|
|
1828
1828
|
"collection-data": e.collectionData,
|
|
1829
1829
|
width: e.width,
|
|
1830
1830
|
padding: e.padding
|
|
1831
|
-
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : e.collectionView.type === "board" ? (a(), x(
|
|
1831
|
+
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : e.collectionView.type === "board" ? (a(), x(h(n), {
|
|
1832
1832
|
key: 3,
|
|
1833
1833
|
collection: e.collection,
|
|
1834
1834
|
"collection-view": e.collectionView,
|
|
1835
1835
|
"collection-data": e.collectionData,
|
|
1836
1836
|
width: e.width,
|
|
1837
1837
|
padding: e.padding
|
|
1838
|
-
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : (a(),
|
|
1838
|
+
}, null, 8, ["collection", "collection-view", "collection-data", "width", "padding"])) : (a(), u("div", Ct, " Unsupported collection view: " + T(e.collectionView.type), 1))
|
|
1839
1839
|
]));
|
|
1840
1840
|
}
|
|
1841
1841
|
}), Lt = {
|
|
@@ -1853,57 +1853,57 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1853
1853
|
className: {}
|
|
1854
1854
|
},
|
|
1855
1855
|
setup(e) {
|
|
1856
|
-
const t = e, { recordMap: o } = D(), i =
|
|
1856
|
+
const t = e, { recordMap: o } = D(), i = b(
|
|
1857
1857
|
() => ie(t.block, o)
|
|
1858
|
-
), n =
|
|
1858
|
+
), n = b(
|
|
1859
1859
|
() => i.value ? o.collection[i.value]?.value : null
|
|
1860
|
-
), l =
|
|
1861
|
-
() =>
|
|
1862
|
-
),
|
|
1860
|
+
), l = b(() => t.block.view_ids || []), s = U(l.value[0]), c = b(
|
|
1861
|
+
() => s.value ? o.collection_view[s.value]?.value : null
|
|
1862
|
+
), f = b(() => !i.value || !s.value ? null : o.collection_query[i.value]?.[s.value]), p = b(
|
|
1863
1863
|
() => n.value ? M(n.value.name).trim() : ""
|
|
1864
|
-
),
|
|
1865
|
-
() => c.value?.format?.hide_linked_collection_name !== !0 &&
|
|
1866
|
-
),
|
|
1864
|
+
), d = b(
|
|
1865
|
+
() => c.value?.format?.hide_linked_collection_name !== !0 && p.value
|
|
1866
|
+
), r = U(
|
|
1867
1867
|
typeof window < "u" ? window.innerWidth : 1024
|
|
1868
|
-
),
|
|
1869
|
-
|
|
1868
|
+
), v = () => {
|
|
1869
|
+
r.value = window.innerWidth;
|
|
1870
1870
|
};
|
|
1871
1871
|
q(() => {
|
|
1872
|
-
window.addEventListener("resize",
|
|
1872
|
+
window.addEventListener("resize", v);
|
|
1873
1873
|
}), le(() => {
|
|
1874
|
-
window.removeEventListener("resize",
|
|
1874
|
+
window.removeEventListener("resize", v);
|
|
1875
1875
|
});
|
|
1876
|
-
const
|
|
1876
|
+
const m = b(() => {
|
|
1877
1877
|
const P = J(t.block, o)?.format?.page_full_width === !0;
|
|
1878
1878
|
if (c.value?.type !== "table" && c.value?.type !== "board")
|
|
1879
1879
|
return { width: 0, padding: 0 };
|
|
1880
|
-
const
|
|
1881
|
-
let
|
|
1882
|
-
P ?
|
|
1883
|
-
const C = Math.max(0, Math.trunc((
|
|
1884
|
-
return { width:
|
|
1880
|
+
const F = r.value, w = 708;
|
|
1881
|
+
let I = w;
|
|
1882
|
+
P ? I = Math.trunc(F - 2 * Math.min(96, F * 0.08)) : I = F < w ? Math.trunc(F - F * 0.02) : w;
|
|
1883
|
+
const C = Math.max(0, Math.trunc((F - I) / 2));
|
|
1884
|
+
return { width: F, padding: C };
|
|
1885
1885
|
}), _ = (y) => {
|
|
1886
|
-
|
|
1886
|
+
s.value = y;
|
|
1887
1887
|
};
|
|
1888
|
-
return (y, P) => n.value && c.value &&
|
|
1888
|
+
return (y, P) => n.value && c.value && f.value ? (a(), u("div", {
|
|
1889
1889
|
key: 0,
|
|
1890
|
-
class: $(
|
|
1890
|
+
class: $(h(S)("notion-collection-wrapper", e.className))
|
|
1891
1891
|
}, [
|
|
1892
|
-
l.value.length > 1 ? (a(),
|
|
1893
|
-
(a(!0),
|
|
1894
|
-
key:
|
|
1895
|
-
onClick: (
|
|
1892
|
+
l.value.length > 1 ? (a(), u("div", Lt, [
|
|
1893
|
+
(a(!0), u(z, null, W(l.value, (F) => (a(), u("button", {
|
|
1894
|
+
key: F,
|
|
1895
|
+
onClick: (w) => _(F),
|
|
1896
1896
|
class: $(
|
|
1897
|
-
|
|
1897
|
+
h(S)(
|
|
1898
1898
|
"notion-collection-view-tabs-content-item",
|
|
1899
|
-
|
|
1899
|
+
s.value === F && "notion-collection-view-tabs-content-item-active"
|
|
1900
1900
|
)
|
|
1901
1901
|
)
|
|
1902
1902
|
}, [
|
|
1903
|
-
g("span", zt, T(
|
|
1903
|
+
g("span", zt, T(h(o).collection_view[F]?.value?.name || h(o).collection_view[F]?.value?.type), 1)
|
|
1904
1904
|
], 10, Ot))), 128))
|
|
1905
1905
|
])) : k("", !0),
|
|
1906
|
-
|
|
1906
|
+
d.value ? (a(), u("div", Dt, [
|
|
1907
1907
|
g("div", Mt, [
|
|
1908
1908
|
n.value.icon ? (a(), x(V, {
|
|
1909
1909
|
key: 0,
|
|
@@ -1911,18 +1911,18 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1911
1911
|
class: "notion-page-title-icon",
|
|
1912
1912
|
"hide-default-icon": ""
|
|
1913
1913
|
}, null, 8, ["block"])) : k("", !0),
|
|
1914
|
-
ae(" " + T(
|
|
1914
|
+
ae(" " + T(p.value), 1)
|
|
1915
1915
|
])
|
|
1916
1916
|
])) : k("", !0),
|
|
1917
1917
|
g("div", {
|
|
1918
|
-
class: $(
|
|
1918
|
+
class: $(h(S)("notion-collection", e.className))
|
|
1919
1919
|
}, [
|
|
1920
1920
|
E(Rt, {
|
|
1921
1921
|
collection: n.value,
|
|
1922
1922
|
collectionView: c.value,
|
|
1923
|
-
collectionData:
|
|
1924
|
-
width:
|
|
1925
|
-
padding:
|
|
1923
|
+
collectionData: f.value,
|
|
1924
|
+
width: m.value.width,
|
|
1925
|
+
padding: m.value.padding
|
|
1926
1926
|
}, null, 8, ["collection", "collectionView", "collectionData", "width", "padding"])
|
|
1927
1927
|
], 2)
|
|
1928
1928
|
], 2)) : k("", !0);
|
|
@@ -1935,25 +1935,25 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1935
1935
|
block: {}
|
|
1936
1936
|
},
|
|
1937
1937
|
setup(e) {
|
|
1938
|
-
const t = e, { recordMap: o } = D(), i =
|
|
1938
|
+
const t = e, { recordMap: o } = D(), i = b(() => {
|
|
1939
1939
|
const l = J(t.block, o);
|
|
1940
1940
|
return l ? Ke(l, o) : [];
|
|
1941
|
-
}), n =
|
|
1942
|
-
return (l,
|
|
1941
|
+
}), n = b(() => t.block.format?.block_color);
|
|
1942
|
+
return (l, s) => i.value.length ? (a(), u("div", {
|
|
1943
1943
|
key: 0,
|
|
1944
1944
|
class: $(
|
|
1945
|
-
|
|
1945
|
+
h(S)(
|
|
1946
1946
|
"notion-table-of-contents",
|
|
1947
1947
|
n.value && `notion-${n.value}`,
|
|
1948
1948
|
e.block.id
|
|
1949
1949
|
)
|
|
1950
1950
|
)
|
|
1951
1951
|
}, [
|
|
1952
|
-
(a(!0),
|
|
1952
|
+
(a(!0), u(z, null, W(i.value, (c) => (a(), u("a", {
|
|
1953
1953
|
key: c.id,
|
|
1954
|
-
href: `#${
|
|
1954
|
+
href: `#${h(K)(c.id)}`,
|
|
1955
1955
|
class: $(
|
|
1956
|
-
|
|
1956
|
+
h(S)(
|
|
1957
1957
|
"notion-table-of-contents-item",
|
|
1958
1958
|
`notion-table-of-contents-item-indent-level-${c.indentLevel}`
|
|
1959
1959
|
)
|
|
@@ -1986,38 +1986,38 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
1986
1986
|
block: {}
|
|
1987
1987
|
},
|
|
1988
1988
|
setup(e) {
|
|
1989
|
-
const t = e, { mapImageUrl: o, components: i } = D(), n =
|
|
1989
|
+
const t = e, { mapImageUrl: o, components: i } = D(), n = b(() => M(t.block.properties?.title)), l = b(
|
|
1990
1990
|
() => M(t.block.properties?.description)
|
|
1991
|
-
),
|
|
1992
|
-
|
|
1993
|
-
const c =
|
|
1994
|
-
return (
|
|
1991
|
+
), s = b(() => t.block.properties?.link?.[0]?.[0]);
|
|
1992
|
+
b(() => t.block.properties?.caption);
|
|
1993
|
+
const c = b(() => t.block.format?.bookmark_cover), f = b(() => t.block.format?.bookmark_icon);
|
|
1994
|
+
return (p, d) => s.value ? (a(), u("div", {
|
|
1995
1995
|
key: 0,
|
|
1996
|
-
class: $(
|
|
1996
|
+
class: $(h(S)("notion-bookmark", e.block.id))
|
|
1997
1997
|
}, [
|
|
1998
|
-
(a(), x(H(
|
|
1999
|
-
href:
|
|
1998
|
+
(a(), x(H(h(i).Link), {
|
|
1999
|
+
href: s.value,
|
|
2000
2000
|
target: "_blank",
|
|
2001
2001
|
rel: "noopener noreferrer",
|
|
2002
2002
|
class: "notion-bookmark-link"
|
|
2003
2003
|
}, {
|
|
2004
2004
|
default: j(() => [
|
|
2005
2005
|
g("div", Vt, [
|
|
2006
|
-
n.value ? (a(),
|
|
2007
|
-
l.value ? (a(),
|
|
2006
|
+
n.value ? (a(), u("div", Wt, T(n.value), 1)) : k("", !0),
|
|
2007
|
+
l.value ? (a(), u("div", Gt, T(l.value), 1)) : k("", !0),
|
|
2008
2008
|
g("div", qt, [
|
|
2009
|
-
|
|
2009
|
+
f.value ? (a(), u("img", {
|
|
2010
2010
|
key: 0,
|
|
2011
|
-
src:
|
|
2011
|
+
src: h(o)(f.value, e.block),
|
|
2012
2012
|
class: "notion-bookmark-link-icon",
|
|
2013
2013
|
alt: n.value
|
|
2014
2014
|
}, null, 8, Zt)) : k("", !0),
|
|
2015
|
-
|
|
2015
|
+
s.value ? (a(), u("div", Xt, T(s.value), 1)) : k("", !0)
|
|
2016
2016
|
])
|
|
2017
2017
|
]),
|
|
2018
|
-
c.value ? (a(),
|
|
2018
|
+
c.value ? (a(), u("div", Yt, [
|
|
2019
2019
|
E(re, {
|
|
2020
|
-
src:
|
|
2020
|
+
src: h(o)(c.value, e.block),
|
|
2021
2021
|
alt: n.value,
|
|
2022
2022
|
style: { "object-fit": "cover" }
|
|
2023
2023
|
}, null, 8, ["src", "alt"])
|
|
@@ -2044,26 +2044,26 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2044
2044
|
block: {}
|
|
2045
2045
|
},
|
|
2046
2046
|
setup(e) {
|
|
2047
|
-
const t = e, { recordMap: o, components: i, mapPageUrl: n } = D(), l =
|
|
2048
|
-
return (
|
|
2049
|
-
(a(!0),
|
|
2050
|
-
key:
|
|
2047
|
+
const t = e, { recordMap: o, components: i, mapPageUrl: n } = D(), l = b(() => ge(o, t.block.id));
|
|
2048
|
+
return (s, c) => l.value ? (a(), u("div", Jt, [
|
|
2049
|
+
(a(!0), u(z, null, W(l.value, (f, p) => (a(), u(z, {
|
|
2050
|
+
key: f.pageId
|
|
2051
2051
|
}, [
|
|
2052
|
-
(a(), x(H(
|
|
2053
|
-
href:
|
|
2052
|
+
(a(), x(H(h(i).PageLink), {
|
|
2053
|
+
href: h(n)(f.pageId),
|
|
2054
2054
|
class: "notion-breadcrumb"
|
|
2055
2055
|
}, {
|
|
2056
2056
|
default: j(() => [
|
|
2057
|
-
|
|
2057
|
+
f.icon ? (a(), x(V, {
|
|
2058
2058
|
key: 0,
|
|
2059
|
-
block:
|
|
2059
|
+
block: f.block,
|
|
2060
2060
|
class: "notion-breadcrumb-icon"
|
|
2061
2061
|
}, null, 8, ["block"])) : k("", !0),
|
|
2062
|
-
|
|
2062
|
+
f.title ? (a(), u("span", en, T(f.title), 1)) : k("", !0)
|
|
2063
2063
|
]),
|
|
2064
2064
|
_: 2
|
|
2065
2065
|
}, 1032, ["href"])),
|
|
2066
|
-
|
|
2066
|
+
p < l.value.length - 1 ? (a(), u("div", tn, "/")) : k("", !0)
|
|
2067
2067
|
], 64))), 128))
|
|
2068
2068
|
])) : k("", !0);
|
|
2069
2069
|
}
|
|
@@ -2088,17 +2088,17 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2088
2088
|
className: {}
|
|
2089
2089
|
},
|
|
2090
2090
|
setup(e) {
|
|
2091
|
-
const t = e, { components: o } = D(), i =
|
|
2091
|
+
const t = e, { components: o } = D(), i = b(() => t.block?.format || {}), n = b(() => i.value.original_url), l = b(() => i.value.attributes || []), s = b(() => i.value.domain), c = b(() => l.value.find((y) => y.id === "title")?.values[0] || ""), f = b(() => {
|
|
2092
2092
|
let y = l.value.find((P) => P.id === "owner")?.values[0] || "";
|
|
2093
|
-
return
|
|
2094
|
-
}),
|
|
2095
|
-
return (_, y) =>
|
|
2093
|
+
return s.value === "github.com" && y && (y = y.split("/").at(-1) || y), y;
|
|
2094
|
+
}), p = b(() => l.value.find((y) => y.id === "updated_at")?.values[0]), d = b(() => p.value ? Je(p.value) : null), r = b(() => s.value === "github.com"), v = b(() => s.value === "github.com" ? "github" : null), m = b(() => n.value && l.value.length > 0);
|
|
2095
|
+
return (_, y) => m.value && r.value ? (a(), x(H(h(o).PageLink), {
|
|
2096
2096
|
key: 0,
|
|
2097
2097
|
target: "_blank",
|
|
2098
2098
|
rel: "noopener noreferrer",
|
|
2099
2099
|
href: n.value,
|
|
2100
2100
|
class: $(
|
|
2101
|
-
|
|
2101
|
+
h(S)(
|
|
2102
2102
|
"notion-external",
|
|
2103
2103
|
e.inline ? "notion-external-mention" : "notion-external-block notion-row",
|
|
2104
2104
|
e.className
|
|
@@ -2106,28 +2106,28 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2106
2106
|
)
|
|
2107
2107
|
}, {
|
|
2108
2108
|
default: j(() => [
|
|
2109
|
-
|
|
2110
|
-
|
|
2109
|
+
v.value ? (a(), u("div", an, [
|
|
2110
|
+
v.value === "github" ? (a(), u("svg", ln, [...y[0] || (y[0] = [
|
|
2111
2111
|
g("path", { d: "M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" }, null, -1)
|
|
2112
2112
|
])])) : k("", !0)
|
|
2113
2113
|
])) : k("", !0),
|
|
2114
2114
|
g("div", rn, [
|
|
2115
2115
|
g("div", sn, T(c.value), 1),
|
|
2116
|
-
!e.inline && (
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2116
|
+
!e.inline && (f.value || d.value) ? (a(), u("div", cn, [
|
|
2117
|
+
f.value ? (a(), u("span", un, T(f.value), 1)) : k("", !0),
|
|
2118
|
+
f.value && d.value ? (a(), u("span", dn, " • ")) : k("", !0),
|
|
2119
|
+
d.value ? (a(), u("span", pn, "Updated " + T(d.value), 1)) : k("", !0)
|
|
2120
2120
|
])) : k("", !0)
|
|
2121
2121
|
])
|
|
2122
2122
|
]),
|
|
2123
2123
|
_: 1
|
|
2124
|
-
}, 8, ["href", "class"])) : (a(),
|
|
2124
|
+
}, 8, ["href", "class"])) : (a(), u("div", fn, " [Unsupported external integration: " + T(s.value || "unknown") + "] ", 1));
|
|
2125
2125
|
}
|
|
2126
2126
|
}), bn = {
|
|
2127
2127
|
key: 0,
|
|
2128
2128
|
class: "notion-frame"
|
|
2129
2129
|
}, hn = {
|
|
2130
|
-
key:
|
|
2130
|
+
key: 1,
|
|
2131
2131
|
class: "notion-page-cover-wrapper"
|
|
2132
2132
|
}, vn = ["src"], gn = { class: "notion-page-scroller" }, kn = { class: "notion-title" }, yn = {
|
|
2133
2133
|
key: 2,
|
|
@@ -2150,46 +2150,49 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2150
2150
|
hideBlockId: { type: Boolean }
|
|
2151
2151
|
},
|
|
2152
2152
|
setup(e) {
|
|
2153
|
-
const t = e, { components: o, mapPageUrl: i, mapImageUrl: n, fullPage: l, darkMode:
|
|
2153
|
+
const t = e, { components: o, mapPageUrl: i, mapImageUrl: n, fullPage: l, darkMode: s, recordMap: c, hideHeader: f } = D(), p = b(
|
|
2154
2154
|
() => t.hideBlockId ? "notion-block" : `notion-block-${K(t.block.id)}`
|
|
2155
|
-
),
|
|
2155
|
+
), d = b(() => t.block.format?.block_color ? `notion-${t.block.format.block_color}` : void 0), r = b(() => t.block.properties?.title), v = b(
|
|
2156
2156
|
() => t.block.properties?.checked?.[0]?.[0] === "Yes"
|
|
2157
|
-
), m =
|
|
2158
|
-
|
|
2157
|
+
), m = b(() => t.block.format || {}), _ = b(() => m.value?.page_cover ? n(m.value.page_cover, t.block) : null), y = b(() => `center ${(1 - (m.value?.page_cover_position || 0.5)) * 100}%`), P = b(() => t.block.type === "column" && m.value?.column_ratio ? { width: `calc(${m.value.column_ratio * 100}% - 16px)` } : {});
|
|
2158
|
+
b(() => {
|
|
2159
2159
|
const w = t.block.collection_id;
|
|
2160
2160
|
return w && c.collection[w] ? M(c.collection[w].value?.name) : "Untitled";
|
|
2161
2161
|
});
|
|
2162
|
-
const
|
|
2163
|
-
return (w,
|
|
2162
|
+
const F = b(() => t.block);
|
|
2163
|
+
return (w, I) => e.level === 0 && (e.block.type === "page" || e.block.type === "collection_view_page") ? (a(), u("main", {
|
|
2164
2164
|
key: 0,
|
|
2165
2165
|
class: $(
|
|
2166
|
-
|
|
2166
|
+
h(S)(
|
|
2167
2167
|
"notion",
|
|
2168
2168
|
"notion-app",
|
|
2169
|
-
|
|
2170
|
-
|
|
2169
|
+
h(s) ? "dark-mode" : "light-mode",
|
|
2170
|
+
p.value,
|
|
2171
2171
|
e.className,
|
|
2172
2172
|
m.value.page_full_width && "notion-full-width",
|
|
2173
2173
|
m.value.page_small_text && "notion-small-text"
|
|
2174
2174
|
)
|
|
2175
2175
|
)
|
|
2176
2176
|
}, [
|
|
2177
|
-
|
|
2178
|
-
(a(), x(H(
|
|
2179
|
-
|
|
2177
|
+
h(l) ? (a(), u("div", bn, [
|
|
2178
|
+
h(f) ? k("", !0) : (a(), x(H(h(o).Header), {
|
|
2179
|
+
key: 0,
|
|
2180
|
+
block: e.block
|
|
2181
|
+
}, null, 8, ["block"])),
|
|
2182
|
+
_.value ? (a(), u("div", hn, [
|
|
2180
2183
|
g("img", {
|
|
2181
2184
|
class: "notion-page-cover",
|
|
2182
|
-
src:
|
|
2185
|
+
src: _.value,
|
|
2183
2186
|
alt: "page cover",
|
|
2184
|
-
style: B({ objectPosition:
|
|
2187
|
+
style: B({ objectPosition: y.value })
|
|
2185
2188
|
}, null, 12, vn)
|
|
2186
2189
|
])) : k("", !0),
|
|
2187
2190
|
g("div", gn, [
|
|
2188
2191
|
g("div", {
|
|
2189
2192
|
class: $(
|
|
2190
|
-
|
|
2193
|
+
h(S)(
|
|
2191
2194
|
"notion-page",
|
|
2192
|
-
|
|
2195
|
+
_.value ? "notion-page-has-cover" : "notion-page-no-cover",
|
|
2193
2196
|
m.value.page_icon ? "notion-page-has-icon" : "notion-page-no-icon"
|
|
2194
2197
|
)
|
|
2195
2198
|
)
|
|
@@ -2201,7 +2204,7 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2201
2204
|
}, null, 8, ["block"])) : k("", !0),
|
|
2202
2205
|
g("h1", kn, [
|
|
2203
2206
|
E(R, {
|
|
2204
|
-
value:
|
|
2207
|
+
value: r.value,
|
|
2205
2208
|
block: e.block
|
|
2206
2209
|
}, null, 8, ["value", "block"])
|
|
2207
2210
|
]),
|
|
@@ -2209,114 +2212,114 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2209
2212
|
key: 1,
|
|
2210
2213
|
block: e.block
|
|
2211
2214
|
}, null, 8, ["block"])) : k("", !0),
|
|
2212
|
-
e.block.type !== "collection_view_page" ? (a(),
|
|
2215
|
+
e.block.type !== "collection_view_page" ? (a(), u("div", yn, [
|
|
2213
2216
|
N(w.$slots, "default")
|
|
2214
2217
|
])) : k("", !0)
|
|
2215
2218
|
], 2)
|
|
2216
2219
|
])
|
|
2217
|
-
])) : (a(),
|
|
2220
|
+
])) : (a(), u(z, { key: 1 }, [
|
|
2218
2221
|
e.block.type === "collection_view_page" || e.block.type === "page" && e.block.parent_table === "collection" ? (a(), x(Y, {
|
|
2219
2222
|
key: 0,
|
|
2220
2223
|
block: e.block
|
|
2221
2224
|
}, null, 8, ["block"])) : k("", !0),
|
|
2222
|
-
e.block.type !== "collection_view_page" ? (a(),
|
|
2225
|
+
e.block.type !== "collection_view_page" ? (a(), u("div", wn, [
|
|
2223
2226
|
N(w.$slots, "default")
|
|
2224
2227
|
])) : k("", !0)
|
|
2225
2228
|
], 64))
|
|
2226
|
-
], 2)) : e.block.type === "page" ? (a(), x(H(
|
|
2229
|
+
], 2)) : e.block.type === "page" ? (a(), x(H(h(o).PageLink), {
|
|
2227
2230
|
key: 1,
|
|
2228
|
-
class: $(
|
|
2229
|
-
href:
|
|
2231
|
+
class: $(h(S)("notion-page-link", d.value, p.value)),
|
|
2232
|
+
href: h(i)(e.block.id)
|
|
2230
2233
|
}, {
|
|
2231
2234
|
default: j(() => [
|
|
2232
2235
|
E(V, { block: e.block }, null, 8, ["block"]),
|
|
2233
2236
|
g("div", _n, [
|
|
2234
2237
|
E(R, {
|
|
2235
|
-
value:
|
|
2238
|
+
value: r.value,
|
|
2236
2239
|
block: e.block
|
|
2237
2240
|
}, null, 8, ["value", "block"])
|
|
2238
2241
|
])
|
|
2239
2242
|
]),
|
|
2240
2243
|
_: 1
|
|
2241
|
-
}, 8, ["class", "href"])) : e.block.type === "header" ? (a(),
|
|
2244
|
+
}, 8, ["class", "href"])) : e.block.type === "header" ? (a(), u("h1", {
|
|
2242
2245
|
key: 2,
|
|
2243
|
-
class: $(
|
|
2246
|
+
class: $(h(S)("notion-h", "notion-h1", d.value, p.value))
|
|
2244
2247
|
}, [
|
|
2245
2248
|
g("span", $n, [
|
|
2246
2249
|
E(R, {
|
|
2247
|
-
value:
|
|
2250
|
+
value: r.value,
|
|
2248
2251
|
block: e.block
|
|
2249
2252
|
}, null, 8, ["value", "block"])
|
|
2250
2253
|
])
|
|
2251
|
-
], 2)) : e.block.type === "sub_header" ? (a(),
|
|
2254
|
+
], 2)) : e.block.type === "sub_header" ? (a(), u("h2", {
|
|
2252
2255
|
key: 3,
|
|
2253
|
-
class: $(
|
|
2256
|
+
class: $(h(S)("notion-h", "notion-h2", d.value, p.value))
|
|
2254
2257
|
}, [
|
|
2255
2258
|
g("span", xn, [
|
|
2256
2259
|
E(R, {
|
|
2257
|
-
value:
|
|
2260
|
+
value: r.value,
|
|
2258
2261
|
block: e.block
|
|
2259
2262
|
}, null, 8, ["value", "block"])
|
|
2260
2263
|
])
|
|
2261
|
-
], 2)) : e.block.type === "sub_sub_header" ? (a(),
|
|
2264
|
+
], 2)) : e.block.type === "sub_sub_header" ? (a(), u("h3", {
|
|
2262
2265
|
key: 4,
|
|
2263
|
-
class: $(
|
|
2266
|
+
class: $(h(S)("notion-h", "notion-h3", d.value, p.value))
|
|
2264
2267
|
}, [
|
|
2265
2268
|
g("span", In, [
|
|
2266
2269
|
E(R, {
|
|
2267
|
-
value:
|
|
2270
|
+
value: r.value,
|
|
2268
2271
|
block: e.block
|
|
2269
2272
|
}, null, 8, ["value", "block"])
|
|
2270
2273
|
])
|
|
2271
|
-
], 2)) : e.block.type === "text" ? (a(),
|
|
2274
|
+
], 2)) : e.block.type === "text" ? (a(), u("div", {
|
|
2272
2275
|
key: 5,
|
|
2273
|
-
class: $(
|
|
2276
|
+
class: $(h(S)("notion-text", d.value, p.value))
|
|
2274
2277
|
}, [
|
|
2275
|
-
|
|
2278
|
+
r.value ? (a(), x(R, {
|
|
2276
2279
|
key: 0,
|
|
2277
|
-
value:
|
|
2280
|
+
value: r.value,
|
|
2278
2281
|
block: e.block
|
|
2279
|
-
}, null, 8, ["value", "block"])) : (a(),
|
|
2282
|
+
}, null, 8, ["value", "block"])) : (a(), u("div", Sn, " ")),
|
|
2280
2283
|
N(w.$slots, "default")
|
|
2281
|
-
], 2)) : e.block.type === "bulleted_list" ? (a(),
|
|
2284
|
+
], 2)) : e.block.type === "bulleted_list" ? (a(), u("ul", {
|
|
2282
2285
|
key: 6,
|
|
2283
|
-
class: $(
|
|
2286
|
+
class: $(h(S)("notion-list", "notion-list-disc", p.value))
|
|
2284
2287
|
}, [
|
|
2285
2288
|
g("li", null, [
|
|
2286
2289
|
E(R, {
|
|
2287
|
-
value:
|
|
2290
|
+
value: r.value,
|
|
2288
2291
|
block: e.block
|
|
2289
2292
|
}, null, 8, ["value", "block"])
|
|
2290
2293
|
]),
|
|
2291
2294
|
N(w.$slots, "default")
|
|
2292
|
-
], 2)) : e.block.type === "numbered_list" ? (a(),
|
|
2295
|
+
], 2)) : e.block.type === "numbered_list" ? (a(), u("ol", {
|
|
2293
2296
|
key: 7,
|
|
2294
|
-
class: $(
|
|
2297
|
+
class: $(h(S)("notion-list", "notion-list-numbered", p.value))
|
|
2295
2298
|
}, [
|
|
2296
2299
|
g("li", null, [
|
|
2297
2300
|
E(R, {
|
|
2298
|
-
value:
|
|
2301
|
+
value: r.value,
|
|
2299
2302
|
block: e.block
|
|
2300
2303
|
}, null, 8, ["value", "block"])
|
|
2301
2304
|
]),
|
|
2302
2305
|
N(w.$slots, "default")
|
|
2303
|
-
], 2)) : e.block.type === "to_do" ? (a(),
|
|
2306
|
+
], 2)) : e.block.type === "to_do" ? (a(), u("div", {
|
|
2304
2307
|
key: 8,
|
|
2305
|
-
class: $(
|
|
2308
|
+
class: $(h(S)("notion-to-do", p.value))
|
|
2306
2309
|
}, [
|
|
2307
2310
|
g("div", Fn, [
|
|
2308
2311
|
g("div", Pn, [
|
|
2309
2312
|
g("input", {
|
|
2310
2313
|
type: "checkbox",
|
|
2311
|
-
checked:
|
|
2314
|
+
checked: v.value,
|
|
2312
2315
|
readonly: ""
|
|
2313
2316
|
}, null, 8, An)
|
|
2314
2317
|
]),
|
|
2315
2318
|
g("div", {
|
|
2316
|
-
class: $(
|
|
2319
|
+
class: $(h(S)("notion-to-do-body", v.value && "notion-to-do-checked"))
|
|
2317
2320
|
}, [
|
|
2318
2321
|
E(R, {
|
|
2319
|
-
value:
|
|
2322
|
+
value: r.value,
|
|
2320
2323
|
block: e.block
|
|
2321
2324
|
}, null, 8, ["value", "block"])
|
|
2322
2325
|
], 2)
|
|
@@ -2324,47 +2327,47 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2324
2327
|
g("div", En, [
|
|
2325
2328
|
N(w.$slots, "default")
|
|
2326
2329
|
])
|
|
2327
|
-
], 2)) : e.block.type === "toggle" ? (a(),
|
|
2330
|
+
], 2)) : e.block.type === "toggle" ? (a(), u("details", {
|
|
2328
2331
|
key: 9,
|
|
2329
|
-
class: $(
|
|
2332
|
+
class: $(h(S)("notion-toggle", p.value))
|
|
2330
2333
|
}, [
|
|
2331
2334
|
g("summary", null, [
|
|
2332
2335
|
E(R, {
|
|
2333
|
-
value:
|
|
2336
|
+
value: r.value,
|
|
2334
2337
|
block: e.block
|
|
2335
2338
|
}, null, 8, ["value", "block"])
|
|
2336
2339
|
]),
|
|
2337
2340
|
g("div", null, [
|
|
2338
2341
|
N(w.$slots, "default")
|
|
2339
2342
|
])
|
|
2340
|
-
], 2)) : e.block.type === "quote" ? (a(),
|
|
2343
|
+
], 2)) : e.block.type === "quote" ? (a(), u("blockquote", {
|
|
2341
2344
|
key: 10,
|
|
2342
|
-
class: $(
|
|
2345
|
+
class: $(h(S)("notion-quote", d.value, p.value))
|
|
2343
2346
|
}, [
|
|
2344
2347
|
g("div", null, [
|
|
2345
2348
|
E(R, {
|
|
2346
|
-
value:
|
|
2349
|
+
value: r.value,
|
|
2347
2350
|
block: e.block
|
|
2348
2351
|
}, null, 8, ["value", "block"])
|
|
2349
2352
|
]),
|
|
2350
2353
|
N(w.$slots, "default")
|
|
2351
|
-
], 2)) : e.block.type === "callout" ? (a(),
|
|
2354
|
+
], 2)) : e.block.type === "callout" ? (a(), u("div", {
|
|
2352
2355
|
key: 11,
|
|
2353
2356
|
class: $(
|
|
2354
|
-
|
|
2357
|
+
h(S)("notion-callout", d.value ? `${d.value}_co` : void 0, p.value)
|
|
2355
2358
|
)
|
|
2356
2359
|
}, [
|
|
2357
2360
|
E(V, { block: e.block }, null, 8, ["block"]),
|
|
2358
2361
|
g("div", Tn, [
|
|
2359
2362
|
E(R, {
|
|
2360
|
-
value:
|
|
2363
|
+
value: r.value,
|
|
2361
2364
|
block: e.block
|
|
2362
2365
|
}, null, 8, ["value", "block"]),
|
|
2363
2366
|
N(w.$slots, "default")
|
|
2364
2367
|
])
|
|
2365
|
-
], 2)) : e.block.type === "divider" ? (a(),
|
|
2368
|
+
], 2)) : e.block.type === "divider" ? (a(), u("hr", {
|
|
2366
2369
|
key: 12,
|
|
2367
|
-
class: $(
|
|
2370
|
+
class: $(h(S)("notion-hr", p.value))
|
|
2368
2371
|
}, null, 2)) : e.block.type === "code" ? (a(), x(St, {
|
|
2369
2372
|
key: 13,
|
|
2370
2373
|
block: e.block
|
|
@@ -2377,9 +2380,9 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2377
2380
|
}, null, 8, ["block"])) : e.block.type === "table_of_contents" ? (a(), x(jt, {
|
|
2378
2381
|
key: 16,
|
|
2379
2382
|
block: e.block
|
|
2380
|
-
}, null, 8, ["block"])) : e.block.type === "transclusion_container" || e.block.type === "transclusion_reference" ? (a(),
|
|
2383
|
+
}, null, 8, ["block"])) : e.block.type === "transclusion_container" || e.block.type === "transclusion_reference" ? (a(), u("div", {
|
|
2381
2384
|
key: 17,
|
|
2382
|
-
class: $(
|
|
2385
|
+
class: $(h(S)("notion-sync-block", p.value))
|
|
2383
2386
|
}, [
|
|
2384
2387
|
N(w.$slots, "default")
|
|
2385
2388
|
], 2)) : e.block.type === "equation" ? (a(), x(Et, {
|
|
@@ -2399,10 +2402,10 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2399
2402
|
"pdf"
|
|
2400
2403
|
].includes(e.block.type) ? (a(), x(kt, {
|
|
2401
2404
|
key: 19,
|
|
2402
|
-
block:
|
|
2405
|
+
block: F.value
|
|
2403
2406
|
}, {
|
|
2404
2407
|
default: j(() => [
|
|
2405
|
-
e.block.properties?.caption ? (a(),
|
|
2408
|
+
e.block.properties?.caption ? (a(), u("figcaption", Cn, [
|
|
2406
2409
|
E(R, {
|
|
2407
2410
|
value: e.block.properties.caption,
|
|
2408
2411
|
block: e.block
|
|
@@ -2410,15 +2413,15 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2410
2413
|
])) : k("", !0)
|
|
2411
2414
|
]),
|
|
2412
2415
|
_: 1
|
|
2413
|
-
}, 8, ["block"])) : e.block.type === "column_list" ? (a(),
|
|
2416
|
+
}, 8, ["block"])) : e.block.type === "column_list" ? (a(), u("div", {
|
|
2414
2417
|
key: 20,
|
|
2415
|
-
class: $(
|
|
2418
|
+
class: $(h(S)("notion-row", p.value))
|
|
2416
2419
|
}, [
|
|
2417
2420
|
N(w.$slots, "default")
|
|
2418
|
-
], 2)) : e.block.type === "column" ? (a(),
|
|
2421
|
+
], 2)) : e.block.type === "column" ? (a(), u("div", {
|
|
2419
2422
|
key: 21,
|
|
2420
|
-
class: $(
|
|
2421
|
-
style: B(
|
|
2423
|
+
class: $(h(S)("notion-column", p.value)),
|
|
2424
|
+
style: B(P.value)
|
|
2422
2425
|
}, [
|
|
2423
2426
|
N(w.$slots, "default")
|
|
2424
2427
|
], 6)) : e.block.type === "collection_view" || e.block.type === "collection_view_page" ? (a(), x(Y, {
|
|
@@ -2427,10 +2430,10 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2427
2430
|
}, null, 8, ["block"])) : e.block.type === "external_object_instance" ? (a(), x(mn, {
|
|
2428
2431
|
key: 23,
|
|
2429
2432
|
block: e.block,
|
|
2430
|
-
class: $(
|
|
2431
|
-
}, null, 8, ["block", "class"])) : (a(),
|
|
2433
|
+
class: $(p.value)
|
|
2434
|
+
}, null, 8, ["block", "class"])) : (a(), u("div", {
|
|
2432
2435
|
key: 24,
|
|
2433
|
-
class: $(
|
|
2436
|
+
class: $(h(S)("notion-block-fallback", p.value))
|
|
2434
2437
|
}, null, 2));
|
|
2435
2438
|
}
|
|
2436
2439
|
}), Rn = /* @__PURE__ */ A({
|
|
@@ -2441,8 +2444,8 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2441
2444
|
zoom: {}
|
|
2442
2445
|
},
|
|
2443
2446
|
setup(e) {
|
|
2444
|
-
const t = e, { recordMap: o } = D(), i =
|
|
2445
|
-
return (l,
|
|
2447
|
+
const t = e, { recordMap: o } = D(), i = b(() => t.blockId || Object.keys(o.block)[0]), n = b(() => o.block[i.value]?.value);
|
|
2448
|
+
return (l, s) => {
|
|
2446
2449
|
const c = $e("NotionBlockRenderer", !0);
|
|
2447
2450
|
return n.value ? (a(), x(Nn, {
|
|
2448
2451
|
key: i.value,
|
|
@@ -2450,9 +2453,9 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2450
2453
|
block: n.value
|
|
2451
2454
|
}, {
|
|
2452
2455
|
default: j(() => [
|
|
2453
|
-
n.value.content ? (a(!0),
|
|
2454
|
-
key:
|
|
2455
|
-
blockId:
|
|
2456
|
+
n.value.content ? (a(!0), u(z, { key: 0 }, W(n.value.content, (f) => (a(), x(c, {
|
|
2457
|
+
key: f,
|
|
2458
|
+
blockId: f,
|
|
2456
2459
|
level: (e.level || 0) + 1
|
|
2457
2460
|
}, null, 8, ["blockId", "level"]))), 128)) : k("", !0)
|
|
2458
2461
|
]),
|
|
@@ -2467,7 +2470,7 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2467
2470
|
className: {}
|
|
2468
2471
|
},
|
|
2469
2472
|
setup(e) {
|
|
2470
|
-
return (t, o) => (a(),
|
|
2473
|
+
return (t, o) => (a(), u("a", {
|
|
2471
2474
|
href: e.href,
|
|
2472
2475
|
class: $(e.className)
|
|
2473
2476
|
}, [
|
|
@@ -2486,10 +2489,10 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2486
2489
|
isChecked: { type: Boolean }
|
|
2487
2490
|
},
|
|
2488
2491
|
setup(e) {
|
|
2489
|
-
return (t, o) => (a(),
|
|
2492
|
+
return (t, o) => (a(), u("span", {
|
|
2490
2493
|
class: $(["notion-checkbox", e.isChecked && "notion-checkbox-checked"])
|
|
2491
2494
|
}, [
|
|
2492
|
-
e.isChecked ? (a(),
|
|
2495
|
+
e.isChecked ? (a(), u("svg", zn, [...o[0] || (o[0] = [
|
|
2493
2496
|
g("polyline", { points: "3.3 7 5.7 9 10.7 4" }, null, -1)
|
|
2494
2497
|
])])) : k("", !0)
|
|
2495
2498
|
], 2));
|
|
@@ -2515,10 +2518,10 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2515
2518
|
}), (n, l) => (a(), x(xe, { to: "body" }, [
|
|
2516
2519
|
E(Ie, { name: "notion-modal-fade" }, {
|
|
2517
2520
|
default: j(() => [
|
|
2518
|
-
e.isOpen ? (a(),
|
|
2521
|
+
e.isOpen ? (a(), u("div", {
|
|
2519
2522
|
key: 0,
|
|
2520
2523
|
class: "notion-modal-overlay",
|
|
2521
|
-
onClick: l[1] || (l[1] = he((
|
|
2524
|
+
onClick: l[1] || (l[1] = he((s) => o("close"), ["self"]))
|
|
2522
2525
|
}, [
|
|
2523
2526
|
g("div", {
|
|
2524
2527
|
class: "notion-modal",
|
|
@@ -2528,7 +2531,7 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2528
2531
|
}, [
|
|
2529
2532
|
g("button", {
|
|
2530
2533
|
class: "notion-modal-close",
|
|
2531
|
-
onClick: l[0] || (l[0] = (
|
|
2534
|
+
onClick: l[0] || (l[0] = (s) => o("close")),
|
|
2532
2535
|
"aria-label": "Close modal"
|
|
2533
2536
|
}, [...l[2] || (l[2] = [
|
|
2534
2537
|
g("svg", {
|
|
@@ -2565,17 +2568,17 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2565
2568
|
defaultIcon: {}
|
|
2566
2569
|
},
|
|
2567
2570
|
setup(e) {
|
|
2568
|
-
const t = e, { recordMap: o } = D(), i =
|
|
2569
|
-
return (n, l) => e.block ? (a(),
|
|
2571
|
+
const t = e, { recordMap: o } = D(), i = b(() => Q(t.block, o));
|
|
2572
|
+
return (n, l) => e.block ? (a(), u("span", {
|
|
2570
2573
|
key: 0,
|
|
2571
|
-
class: $(
|
|
2574
|
+
class: $(h(S)("notion-page-title"))
|
|
2572
2575
|
}, [
|
|
2573
2576
|
E(V, {
|
|
2574
2577
|
block: e.block,
|
|
2575
2578
|
"default-icon": e.defaultIcon,
|
|
2576
2579
|
class: "notion-page-title-icon"
|
|
2577
2580
|
}, null, 8, ["block", "default-icon"]),
|
|
2578
|
-
i.value ? (a(),
|
|
2581
|
+
i.value ? (a(), u("span", Gn, T(i.value), 1)) : k("", !0)
|
|
2579
2582
|
], 2)) : k("", !0);
|
|
2580
2583
|
}
|
|
2581
2584
|
}), Xn = { class: "quickFindMenu" }, Yn = { class: "searchBar" }, Kn = { class: "inlineIcon" }, Qn = {
|
|
@@ -2605,53 +2608,53 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2605
2608
|
},
|
|
2606
2609
|
emits: ["close"],
|
|
2607
2610
|
setup(e, { emit: t }) {
|
|
2608
|
-
const o = e, i = t, { components: n, searchNotion: l, mapPageUrl:
|
|
2609
|
-
let
|
|
2610
|
-
function _(
|
|
2611
|
+
const o = e, i = t, { components: n, searchNotion: l, mapPageUrl: s, defaultPageIcon: c } = D(), f = U(!1), p = U(""), d = U(null), r = U(null), v = U(null);
|
|
2612
|
+
let m = null;
|
|
2613
|
+
function _(w, I) {
|
|
2611
2614
|
return (...C) => {
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
},
|
|
2615
|
+
m || (m = setTimeout(() => {
|
|
2616
|
+
w(...C), m = null;
|
|
2617
|
+
}, I));
|
|
2615
2618
|
};
|
|
2616
2619
|
}
|
|
2617
2620
|
async function y() {
|
|
2618
|
-
if (!
|
|
2619
|
-
|
|
2621
|
+
if (!p.value.trim() || !l) {
|
|
2622
|
+
f.value = !1, d.value = null, r.value = null;
|
|
2620
2623
|
return;
|
|
2621
2624
|
}
|
|
2622
|
-
|
|
2625
|
+
f.value = !0;
|
|
2623
2626
|
try {
|
|
2624
|
-
const
|
|
2625
|
-
query:
|
|
2627
|
+
const w = await l({
|
|
2628
|
+
query: p.value,
|
|
2626
2629
|
ancestorId: o.rootBlockId
|
|
2627
2630
|
});
|
|
2628
|
-
if (
|
|
2629
|
-
|
|
2631
|
+
if (w.error || w.errorId)
|
|
2632
|
+
r.value = w, d.value = null;
|
|
2630
2633
|
else {
|
|
2631
|
-
const
|
|
2632
|
-
const G =
|
|
2634
|
+
const I = w.results.map((L) => {
|
|
2635
|
+
const G = w.recordMap.block[L.id]?.value;
|
|
2633
2636
|
if (!G) return;
|
|
2634
|
-
const se = Q(G,
|
|
2635
|
-
if (se && (L.title = se, L.block = G, L.recordMap =
|
|
2637
|
+
const se = Q(G, w.recordMap);
|
|
2638
|
+
if (se && (L.title = se, L.block = G, L.recordMap = w.recordMap, L.page = J(G, w.recordMap, { inclusive: !0 }) || G, !!L.page.id))
|
|
2636
2639
|
return L.highlight?.text && (L.highlight.html = L.highlight.text.replaceAll(/<gzknfouu>/gi, "<b>").replaceAll(/<\/gzknfouu>/gi, "</b>")), L;
|
|
2637
2640
|
}).filter(Boolean), C = Object.fromEntries(
|
|
2638
|
-
|
|
2641
|
+
I.map((L) => [L.page.id, L])
|
|
2639
2642
|
);
|
|
2640
|
-
|
|
2641
|
-
...
|
|
2643
|
+
d.value = {
|
|
2644
|
+
...w,
|
|
2642
2645
|
results: Object.values(C)
|
|
2643
|
-
},
|
|
2646
|
+
}, r.value = null;
|
|
2644
2647
|
}
|
|
2645
|
-
} catch (
|
|
2646
|
-
|
|
2648
|
+
} catch (w) {
|
|
2649
|
+
r.value = w, d.value = null;
|
|
2647
2650
|
} finally {
|
|
2648
|
-
|
|
2651
|
+
f.value = !1;
|
|
2649
2652
|
}
|
|
2650
2653
|
}
|
|
2651
2654
|
const P = _(y, 1e3);
|
|
2652
|
-
ne(
|
|
2653
|
-
if (!
|
|
2654
|
-
|
|
2655
|
+
ne(p, (w) => {
|
|
2656
|
+
if (!w.trim()) {
|
|
2657
|
+
d.value = null, r.value = null, f.value = !1;
|
|
2655
2658
|
return;
|
|
2656
2659
|
}
|
|
2657
2660
|
P();
|
|
@@ -2661,19 +2664,19 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2661
2664
|
ancestorId: o.rootBlockId
|
|
2662
2665
|
});
|
|
2663
2666
|
});
|
|
2664
|
-
function
|
|
2665
|
-
|
|
2667
|
+
function F() {
|
|
2668
|
+
p.value = "";
|
|
2666
2669
|
}
|
|
2667
|
-
return (
|
|
2670
|
+
return (w, I) => (a(), x(H(h(n).Modal), {
|
|
2668
2671
|
"is-open": e.isOpen,
|
|
2669
2672
|
"content-label": "Search",
|
|
2670
|
-
onClose:
|
|
2673
|
+
onClose: I[3] || (I[3] = (C) => i("close"))
|
|
2671
2674
|
}, {
|
|
2672
2675
|
default: j(() => [
|
|
2673
2676
|
g("div", Xn, [
|
|
2674
2677
|
g("div", Yn, [
|
|
2675
2678
|
g("div", Kn, [
|
|
2676
|
-
|
|
2679
|
+
f.value ? (a(), u("svg", Qn, [...I[4] || (I[4] = [
|
|
2677
2680
|
g("circle", {
|
|
2678
2681
|
cx: "50",
|
|
2679
2682
|
cy: "50",
|
|
@@ -2693,27 +2696,27 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2693
2696
|
repeatCount: "indefinite"
|
|
2694
2697
|
})
|
|
2695
2698
|
], -1)
|
|
2696
|
-
])])) : (a(),
|
|
2699
|
+
])])) : (a(), u("svg", Jn, [...I[5] || (I[5] = [
|
|
2697
2700
|
g("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" }, null, -1)
|
|
2698
2701
|
])]))
|
|
2699
2702
|
]),
|
|
2700
2703
|
Se(g("input", {
|
|
2701
2704
|
ref_key: "inputRef",
|
|
2702
|
-
ref:
|
|
2703
|
-
"onUpdate:modelValue":
|
|
2705
|
+
ref: v,
|
|
2706
|
+
"onUpdate:modelValue": I[0] || (I[0] = (C) => p.value = C),
|
|
2704
2707
|
class: "searchInput",
|
|
2705
2708
|
placeholder: "Search",
|
|
2706
|
-
onKeydown:
|
|
2709
|
+
onKeydown: I[1] || (I[1] = he(() => {
|
|
2707
2710
|
}, ["stop"]))
|
|
2708
2711
|
}, null, 544), [
|
|
2709
|
-
[Fe,
|
|
2712
|
+
[Fe, p.value]
|
|
2710
2713
|
]),
|
|
2711
|
-
|
|
2714
|
+
p.value ? (a(), u("div", {
|
|
2712
2715
|
key: 0,
|
|
2713
2716
|
role: "button",
|
|
2714
2717
|
class: "clearButton",
|
|
2715
|
-
onClick:
|
|
2716
|
-
}, [...
|
|
2718
|
+
onClick: F
|
|
2719
|
+
}, [...I[6] || (I[6] = [
|
|
2717
2720
|
g("svg", {
|
|
2718
2721
|
class: "clearIcon",
|
|
2719
2722
|
viewBox: "0 0 24 24"
|
|
@@ -2722,20 +2725,20 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2722
2725
|
], -1)
|
|
2723
2726
|
])])) : k("", !0)
|
|
2724
2727
|
]),
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
(a(!0),
|
|
2728
|
+
p.value.trim() && d.value ? (a(), u("div", eo, [
|
|
2729
|
+
d.value.results.length ? (a(), u(z, { key: 0 }, [
|
|
2730
|
+
(a(!0), u(z, null, W(d.value.results, (C) => (a(), x(H(h(n).PageLink), {
|
|
2728
2731
|
key: C.id,
|
|
2729
|
-
href:
|
|
2732
|
+
href: h(s)(C.page.id),
|
|
2730
2733
|
class: "result notion-page-link",
|
|
2731
|
-
onClick:
|
|
2734
|
+
onClick: I[2] || (I[2] = (L) => i("close"))
|
|
2732
2735
|
}, {
|
|
2733
2736
|
default: j(() => [
|
|
2734
2737
|
E(Zn, {
|
|
2735
2738
|
block: C.page,
|
|
2736
|
-
"default-icon":
|
|
2739
|
+
"default-icon": h(c)
|
|
2737
2740
|
}, null, 8, ["block", "default-icon"]),
|
|
2738
|
-
C.highlight?.html ? (a(),
|
|
2741
|
+
C.highlight?.html ? (a(), u("div", {
|
|
2739
2742
|
key: 0,
|
|
2740
2743
|
class: "notion-search-result-highlight",
|
|
2741
2744
|
innerHTML: C.highlight.html
|
|
@@ -2745,15 +2748,15 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2745
2748
|
}, 1032, ["href"]))), 128)),
|
|
2746
2749
|
g("footer", no, [
|
|
2747
2750
|
g("div", null, [
|
|
2748
|
-
g("span", oo, T(
|
|
2749
|
-
ae(" " + T(
|
|
2751
|
+
g("span", oo, T(d.value.results.length), 1),
|
|
2752
|
+
ae(" " + T(d.value.results.length === 1 ? " result" : " results"), 1)
|
|
2750
2753
|
])
|
|
2751
2754
|
])
|
|
2752
|
-
], 64)) : (a(),
|
|
2755
|
+
], 64)) : (a(), u("div", ao, [...I[7] || (I[7] = [
|
|
2753
2756
|
g("div", { class: "noResults" }, "No results", -1),
|
|
2754
2757
|
g("div", { class: "noResultsDetail" }, "Try different search terms", -1)
|
|
2755
2758
|
])]))
|
|
2756
|
-
])) :
|
|
2759
|
+
])) : p.value.trim() && r.value ? (a(), u("div", lo, [...I[8] || (I[8] = [
|
|
2757
2760
|
g("div", { class: "noResults" }, "Search error", -1)
|
|
2758
2761
|
])])) : k("", !0)
|
|
2759
2762
|
])
|
|
@@ -2784,64 +2787,64 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2784
2787
|
block: {}
|
|
2785
2788
|
},
|
|
2786
2789
|
setup(e) {
|
|
2787
|
-
const t = e, { recordMap: o, components: i, mapPageUrl: n, searchNotion: l } = D(),
|
|
2788
|
-
function
|
|
2790
|
+
const t = e, { recordMap: o, components: i, mapPageUrl: n, searchNotion: l } = D(), s = b(() => ge(o, t.block.id)), c = U(!1);
|
|
2791
|
+
function f() {
|
|
2789
2792
|
c.value = !0;
|
|
2790
2793
|
}
|
|
2791
|
-
function
|
|
2794
|
+
function p() {
|
|
2792
2795
|
c.value = !1;
|
|
2793
2796
|
}
|
|
2794
|
-
function
|
|
2795
|
-
(
|
|
2797
|
+
function d(r) {
|
|
2798
|
+
(r.metaKey || r.ctrlKey) && (r.key === "p" || r.key === "k") && (r.preventDefault(), f());
|
|
2796
2799
|
}
|
|
2797
2800
|
return q(() => {
|
|
2798
|
-
window.addEventListener("keydown",
|
|
2801
|
+
window.addEventListener("keydown", d);
|
|
2799
2802
|
}), le(() => {
|
|
2800
|
-
window.removeEventListener("keydown",
|
|
2801
|
-
}), (
|
|
2803
|
+
window.removeEventListener("keydown", d);
|
|
2804
|
+
}), (r, v) => (a(), u("header", so, [
|
|
2802
2805
|
g("div", co, [
|
|
2803
|
-
|
|
2804
|
-
(a(!0),
|
|
2805
|
-
key:
|
|
2806
|
+
s.value ? (a(), u("div", uo, [
|
|
2807
|
+
(a(!0), u(z, null, W(s.value, (m, _) => (a(), u(z, {
|
|
2808
|
+
key: m.pageId
|
|
2806
2809
|
}, [
|
|
2807
|
-
(a(), x(H(
|
|
2810
|
+
(a(), x(H(m.active ? "div" : h(i).PageLink), Pe(
|
|
2808
2811
|
{ ref_for: !0 },
|
|
2809
|
-
|
|
2812
|
+
m.active ? {} : { href: h(n)(m.pageId) },
|
|
2810
2813
|
{
|
|
2811
|
-
class:
|
|
2814
|
+
class: h(S)("breadcrumb", m.active && "active")
|
|
2812
2815
|
}
|
|
2813
2816
|
), {
|
|
2814
2817
|
default: j(() => [
|
|
2815
|
-
|
|
2818
|
+
m.icon ? (a(), x(V, {
|
|
2816
2819
|
key: 0,
|
|
2817
|
-
block:
|
|
2820
|
+
block: m.block,
|
|
2818
2821
|
class: "icon"
|
|
2819
2822
|
}, null, 8, ["block"])) : k("", !0),
|
|
2820
|
-
|
|
2823
|
+
m.title ? (a(), u("span", po, T(m.title), 1)) : k("", !0)
|
|
2821
2824
|
]),
|
|
2822
2825
|
_: 2
|
|
2823
2826
|
}, 1040, ["class"])),
|
|
2824
|
-
_ <
|
|
2827
|
+
_ < s.value.length - 1 ? (a(), u("span", fo, " / ")) : k("", !0)
|
|
2825
2828
|
], 64))), 128))
|
|
2826
2829
|
])) : k("", !0),
|
|
2827
2830
|
g("div", mo, [
|
|
2828
|
-
|
|
2831
|
+
h(l) ? (a(), u("div", {
|
|
2829
2832
|
key: 0,
|
|
2830
2833
|
role: "button",
|
|
2831
2834
|
class: "notion-nav-button notion-search-button",
|
|
2832
|
-
onClick:
|
|
2835
|
+
onClick: f
|
|
2833
2836
|
}, [
|
|
2834
|
-
(a(),
|
|
2837
|
+
(a(), u("svg", bo, [...v[0] || (v[0] = [
|
|
2835
2838
|
g("path", { d: "M8.875 2.625a6.25 6.25 0 1 0 3.955 11.09l3.983 3.982a.625.625 0 1 0 .884-.884l-3.983-3.982a6.25 6.25 0 0 0-4.84-10.205m-5 6.25a5 5 0 1 1 10 0 5 5 0 0 1-10 0" }, null, -1)
|
|
2836
2839
|
])]))
|
|
2837
2840
|
])) : k("", !0),
|
|
2838
|
-
N(
|
|
2841
|
+
N(r.$slots, "header-right")
|
|
2839
2842
|
]),
|
|
2840
2843
|
c.value ? (a(), x(ro, {
|
|
2841
2844
|
key: 1,
|
|
2842
2845
|
"is-open": c.value,
|
|
2843
2846
|
"root-block-id": e.block.id,
|
|
2844
|
-
onClose:
|
|
2847
|
+
onClose: p
|
|
2845
2848
|
}, null, 8, ["is-open", "root-block-id"])) : k("", !0)
|
|
2846
2849
|
])
|
|
2847
2850
|
]));
|
|
@@ -2862,10 +2865,11 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2862
2865
|
defaultPageIcon: {},
|
|
2863
2866
|
defaultPageCover: {},
|
|
2864
2867
|
defaultPageCoverPosition: { default: 0.5 },
|
|
2865
|
-
isImageZoomable: { type: Boolean }
|
|
2868
|
+
isImageZoomable: { type: Boolean },
|
|
2869
|
+
hideHeader: { type: Boolean, default: !1 }
|
|
2866
2870
|
},
|
|
2867
2871
|
setup(e) {
|
|
2868
|
-
const t = e, o =
|
|
2872
|
+
const t = e, o = b(() => ({
|
|
2869
2873
|
Image: re,
|
|
2870
2874
|
Link: "a",
|
|
2871
2875
|
PageLink: On,
|
|
@@ -2899,10 +2903,11 @@ const $t = { class: "notion-code" }, xt = {
|
|
|
2899
2903
|
defaultPageCover: t.defaultPageCover,
|
|
2900
2904
|
defaultPageCoverPosition: t.defaultPageCoverPosition || 0.5,
|
|
2901
2905
|
forceCustomImages: !!t.components?.Image,
|
|
2902
|
-
zoom: i
|
|
2906
|
+
zoom: i,
|
|
2907
|
+
hideHeader: t.hideHeader
|
|
2903
2908
|
}), (n, l) => (a(), x(Rn, {
|
|
2904
2909
|
level: 0,
|
|
2905
|
-
zoom: e.isImageZoomable ?
|
|
2910
|
+
zoom: e.isImageZoomable ? h(i) : null
|
|
2906
2911
|
}, null, 8, ["zoom"]));
|
|
2907
2912
|
}
|
|
2908
2913
|
});
|
|
@@ -2910,7 +2915,7 @@ export {
|
|
|
2910
2915
|
V as _,
|
|
2911
2916
|
re as a,
|
|
2912
2917
|
R as b,
|
|
2913
|
-
|
|
2918
|
+
S as c,
|
|
2914
2919
|
Mn as d,
|
|
2915
2920
|
_o as e,
|
|
2916
2921
|
D as u
|