rotion 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exporter/api.js +7 -4
- package/dist/exporter/api.js.map +1 -1
- package/dist/exporter/blocks.js +19 -8
- package/dist/exporter/blocks.js.map +1 -1
- package/dist/exporter/files.js +31 -11
- package/dist/exporter/files.js.map +1 -1
- package/dist/exporter/page.js +7 -3
- package/dist/exporter/page.js.map +1 -1
- package/dist/exporter/variables.d.ts +1 -0
- package/dist/exporter/variables.js +1 -0
- package/dist/exporter/variables.js.map +1 -1
- package/dist/ui/cjs/index.js +22 -9
- package/dist/ui/cjs/index.js.map +1 -1
- package/dist/ui/cjs/types/exporter/variables.d.ts +1 -0
- package/dist/ui/esm/index.js +22 -9
- package/dist/ui/esm/index.js.map +1 -1
- package/dist/ui/esm/types/exporter/variables.d.ts +1 -0
- package/dist/ui/styles/notionate-dark.css +7 -0
- package/dist/ui/styles/page.css +2 -5
- package/dist/ui/umd/index.js +22 -9
- package/dist/ui/umd/index.js.map +1 -1
- package/dist/ui/umd/types/exporter/variables.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare const docRoot: string;
|
|
|
7
7
|
export declare const imageDir: string;
|
|
8
8
|
export declare const timeout: number;
|
|
9
9
|
export declare const webpQuality: number;
|
|
10
|
+
export declare const debug: boolean;
|
|
10
11
|
export declare const httpOptions: {
|
|
11
12
|
timeout: number;
|
|
12
13
|
headers: {
|
|
@@ -90,6 +90,13 @@
|
|
|
90
90
|
background-color: rgba(255, 255, 255, 0.055);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
.notionate-blocks-breadcrumb-a {
|
|
94
|
+
color: #ddd;
|
|
95
|
+
}
|
|
96
|
+
.notionate-blocks-breadcrumb-a:hover {
|
|
97
|
+
background-color: rgb(37, 37, 37);
|
|
98
|
+
}
|
|
99
|
+
|
|
93
100
|
.notionate-blocks-callout {
|
|
94
101
|
background-color: rgb(37, 37, 37);
|
|
95
102
|
}
|
package/dist/ui/styles/page.css
CHANGED
|
@@ -90,9 +90,6 @@
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/* breadcrumb */
|
|
93
|
-
.notionate-blocks-breadcrumb {
|
|
94
|
-
padding-left: .5rem;
|
|
95
|
-
}
|
|
96
93
|
.notionate-blocks-breadcrumb-a {
|
|
97
94
|
text-decoration: none;
|
|
98
95
|
color: #333;
|
|
@@ -101,8 +98,8 @@
|
|
|
101
98
|
border-radius: 4px;
|
|
102
99
|
}
|
|
103
100
|
.notionate-blocks-breadcrumb-a:hover {
|
|
104
|
-
color:
|
|
105
|
-
|
|
101
|
+
background-color: rgba(55, 53, 47, 0.08);
|
|
102
|
+
cursor: pointer;
|
|
106
103
|
}
|
|
107
104
|
.notionate-blocks-breadcrumb-icon {
|
|
108
105
|
vertical-align: middle;
|
package/dist/ui/umd/index.js
CHANGED
|
@@ -19317,27 +19317,41 @@
|
|
|
19317
19317
|
React.createElement(TextBlock, { tag: "span", block: block.bookmark.caption }))));
|
|
19318
19318
|
};
|
|
19319
19319
|
|
|
19320
|
+
function buildPathname(id, name, href) {
|
|
19321
|
+
if (href === '/') {
|
|
19322
|
+
return href;
|
|
19323
|
+
}
|
|
19324
|
+
var _a = getLinkPathAndLinkKey(href || ''), path = _a[0], slugKey = _a[1];
|
|
19325
|
+
var file = '';
|
|
19326
|
+
if (slugKey === 'id') {
|
|
19327
|
+
file = id;
|
|
19328
|
+
}
|
|
19329
|
+
else {
|
|
19330
|
+
file = encodeURIComponent(name.toLowerCase()).replace(/%20/g, '-');
|
|
19331
|
+
}
|
|
19332
|
+
return "".concat(path).concat(file);
|
|
19333
|
+
}
|
|
19320
19334
|
var BreadcrumbLink = function (_a) {
|
|
19321
19335
|
var breadcrumb = _a.breadcrumb, link = _a.link, href = _a.href, query = _a.query, children = _a.children;
|
|
19322
19336
|
var id = breadcrumb.id, name = breadcrumb.name;
|
|
19323
|
-
var
|
|
19324
|
-
var file = slugKey === 'id' ? id : encodeURIComponent(name.toLowerCase()).replace(/%20/g, '-');
|
|
19337
|
+
var pathname = buildPathname(id, name, href);
|
|
19325
19338
|
if (link && href) {
|
|
19326
19339
|
var Link = link;
|
|
19327
|
-
return (React.createElement(Link, { className: "notionate-blocks-breadcrumb-a", href: { pathname:
|
|
19340
|
+
return (React.createElement(Link, { className: "notionate-blocks-breadcrumb-a", href: { pathname: pathname, query: query } }, children));
|
|
19328
19341
|
}
|
|
19329
19342
|
if (href) {
|
|
19330
|
-
return (React.createElement("a", { className: "notionate-blocks-breadcrumb-a", href: "".concat(
|
|
19343
|
+
return (React.createElement("a", { className: "notionate-blocks-breadcrumb-a", href: "".concat(pathname).concat(queryToString(query)) }, children));
|
|
19331
19344
|
}
|
|
19332
19345
|
return (React.createElement("span", { className: "notionate-blocks-breadcrumb-a" }, children));
|
|
19333
19346
|
};
|
|
19334
19347
|
var BreadcrumbBlock = function (_a) {
|
|
19335
19348
|
var block = _a.block, link = _a.link, hrefs = _a.hrefs, query = _a.query;
|
|
19336
19349
|
var max = block.list.length;
|
|
19337
|
-
return (React.createElement("div", { className: "notionate-blocks-breadcrumb" }, block.list.map(function (v, i) { return (React.createElement(
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
|
|
19350
|
+
return (React.createElement("div", { className: "notionate-blocks-breadcrumb" }, block.list.map(function (v, i) { return (React.createElement("span", { key: "crumb-".concat(i) },
|
|
19351
|
+
React.createElement(BreadcrumbLink, { breadcrumb: v, href: hrefs === undefined ? undefined : hrefs[i], link: link, query: query },
|
|
19352
|
+
v.icon.type === 'emoji' && React.createElement("span", { className: "notionate-blocks-breadcrumb-emoji" }, v.icon.emoji),
|
|
19353
|
+
v.icon.type !== 'emoji' && React.createElement("img", { className: "notionate-blocks-breadcrumb-icon", src: v.icon.src, width: 20, height: 20, alt: v.name }),
|
|
19354
|
+
React.createElement("span", { className: "notionate-blocks-breadcrumb-title" }, v.name)),
|
|
19341
19355
|
i + 1 < max && React.createElement("span", { className: "notionate-blocks-breadcrumb-slash" }, "/"))); })));
|
|
19342
19356
|
};
|
|
19343
19357
|
|
|
@@ -19858,7 +19872,6 @@
|
|
|
19858
19872
|
case 'callout':
|
|
19859
19873
|
return React.createElement(CalloutBlock, { block: block, key: block.id });
|
|
19860
19874
|
case 'child_database':
|
|
19861
|
-
console.log("debug: ".concat(block.type), block);
|
|
19862
19875
|
return React.createElement(ChildDatabaseBlock, { block: block, href: href, link: link, query: query, key: block.id });
|
|
19863
19876
|
case 'child_page':
|
|
19864
19877
|
return React.createElement(ChildPageBlock, { block: block, href: href, link: link, key: block.id });
|