@nakobase/nakobase-md-html 2.3.1 → 2.5.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/dist/cjs/constants.d.ts +2 -0
- package/dist/cjs/constants.d.ts.map +1 -1
- package/dist/cjs/constants.js +3 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/sanitizer.d.ts.map +1 -1
- package/dist/cjs/sanitizer.js +4 -2
- package/dist/cjs/utils/md-container.d.ts +8 -0
- package/dist/cjs/utils/md-container.d.ts.map +1 -1
- package/dist/cjs/utils/md-container.js +62 -6
- package/dist/cjs/utils/md-custom-blocks.d.ts.map +1 -1
- package/dist/cjs/utils/md-custom-blocks.js +104 -24
- package/dist/cjs/utils/md-custom-inlines.d.ts.map +1 -1
- package/dist/cjs/utils/md-custom-inlines.js +23 -13
- package/dist/styles/base.css +1 -1
- package/dist/styles/rich.css +1 -1
- package/package.json +1 -1
package/dist/cjs/constants.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export declare const CONTAINER_TYPES: {
|
|
|
5
5
|
readonly BUBBLE: "bubble";
|
|
6
6
|
readonly BUBBLE_IMAGE: "bubble-image";
|
|
7
7
|
readonly DETAILS: "details";
|
|
8
|
+
readonly GROUP: "group";
|
|
8
9
|
readonly HEADING: "heading";
|
|
10
|
+
readonly STACK: "stack";
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC"}
|
package/dist/cjs/constants.js
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAwB1C,eAAO,MAAM,QAAQ,GACnB,UAAU,MAAM,EAChB,UAAU,eAAe,KACxB,MA2CF,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -45,7 +45,7 @@ const mdToHtml = (markdown, options) => {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
if (rich) {
|
|
48
|
-
md.use(MdItContainer, _constants.CONTAINER_TYPES.DETAILS, _mdContainer.detailsOptions).use(MdItContainer, _constants.CONTAINER_TYPES.BOX, _mdContainer.boxOptions).use(MdItContainer, _constants.CONTAINER_TYPES.BUBBLE, _mdContainer.bubbleOptions).use(MdItContainer, _constants.CONTAINER_TYPES.BUBBLE_IMAGE, _mdContainer.bubbleImageOptions).use(MdItContainer, _constants.CONTAINER_TYPES.HEADING, _mdContainer.headingOptions).use(_mdCustomBlocks.mdCustomBlocks).use(_mdCustomInlines.mdCustomInlines);
|
|
48
|
+
md.use(MdItContainer, _constants.CONTAINER_TYPES.DETAILS, _mdContainer.detailsOptions).use(MdItContainer, _constants.CONTAINER_TYPES.BOX, _mdContainer.boxOptions).use(MdItContainer, _constants.CONTAINER_TYPES.BUBBLE, _mdContainer.bubbleOptions).use(MdItContainer, _constants.CONTAINER_TYPES.BUBBLE_IMAGE, _mdContainer.bubbleImageOptions).use(MdItContainer, _constants.CONTAINER_TYPES.GROUP, _mdContainer.groupOptions).use(MdItContainer, _constants.CONTAINER_TYPES.HEADING, _mdContainer.headingOptions).use(MdItContainer, _constants.CONTAINER_TYPES.STACK, _mdContainer.stackOptions).use(_mdCustomBlocks.mdCustomBlocks).use(_mdCustomInlines.mdCustomInlines);
|
|
49
49
|
}
|
|
50
50
|
if (codeHighlight) {
|
|
51
51
|
md.use(_mdRendererFence.mdRendererFence);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../src/sanitizer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../src/sanitizer.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,MAuBpC,CAAC"}
|
package/dist/cjs/sanitizer.js
CHANGED
|
@@ -10,18 +10,20 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
10
10
|
|
|
11
11
|
const extendedTags = ['iframe', 'code', 'details', 'summary', 'circle', 'img', 'input', 'pre', 'span', 'picture', 'source'];
|
|
12
12
|
const extendedAttributes = {
|
|
13
|
-
a: [...(_sanitizeHtml.defaults.allowedAttributes.a || []), 'id', 'class', 'data-line', 'rel'],
|
|
13
|
+
a: [...(_sanitizeHtml.defaults.allowedAttributes.a || []), 'id', 'class', 'data-line', 'rel', 'target'],
|
|
14
14
|
iframe: ['src', 'width', 'height', 'allow', 'sandbox', 'frameborder'],
|
|
15
15
|
input: ['type', 'checked', 'disabled', 'readonly', 'value', 'class'],
|
|
16
16
|
source: ['srcset', 'type'],
|
|
17
|
+
picture: ['class'],
|
|
17
18
|
img: ['src', 'alt', 'width', 'height'],
|
|
19
|
+
em: ['class'],
|
|
18
20
|
ul: ['class'],
|
|
19
21
|
ol: ['class'],
|
|
20
22
|
li: ['class'],
|
|
21
23
|
div: ['class'],
|
|
22
24
|
pre: ['class'],
|
|
23
25
|
code: [...(_sanitizeHtml.defaults.allowedAttributes.code || []), 'class', 'data-line'],
|
|
24
|
-
span: ['class'],
|
|
26
|
+
span: ['class', 'aria-hidden'],
|
|
25
27
|
h1: ['id'],
|
|
26
28
|
h2: ['id'],
|
|
27
29
|
h3: ['id'],
|
|
@@ -3,6 +3,14 @@ export declare const detailsOptions: {
|
|
|
3
3
|
validate: (params: string) => boolean;
|
|
4
4
|
render: (tokens: Token[], idx: number) => string;
|
|
5
5
|
};
|
|
6
|
+
export declare const groupOptions: {
|
|
7
|
+
validate: (params: string) => boolean;
|
|
8
|
+
render: (tokens: Token[], idx: number) => string;
|
|
9
|
+
};
|
|
10
|
+
export declare const stackOptions: {
|
|
11
|
+
validate: (params: string) => boolean;
|
|
12
|
+
render: (tokens: Token[], idx: number) => string;
|
|
13
|
+
};
|
|
6
14
|
export declare const bubbleOptions: {
|
|
7
15
|
validate: (params: string) => boolean;
|
|
8
16
|
render: (tokens: Token[], idx: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-container.d.ts","sourceRoot":"","sources":["../../../src/utils/md-container.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"md-container.d.ts","sourceRoot":"","sources":["../../../src/utils/md-container.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,uBAAuB,CAAC;AAiB/C,eAAO,MAAM,cAAc;uBACG,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CAc/C,CAAC;AAMF,eAAO,MAAM,YAAY;uBACK,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CAY/C,CAAC;AAMF,eAAO,MAAM,YAAY;uBACK,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CAY/C,CAAC;AAMF,eAAO,MAAM,aAAa;uBACI,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CA+C/C,CAAC;AAMF,eAAO,MAAM,kBAAkB;uBACD,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CAwD/C,CAAC;AAOF,eAAO,MAAM,UAAU;uBACO,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CAc/C,CAAC;AA4BF,eAAO,MAAM,cAAc;uBACG,MAAM;qBAGR,KAAK,EAAE,OAAO,MAAM;CAa/C,CAAC"}
|
|
@@ -3,8 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.headingOptions = exports.detailsOptions = exports.bubbleOptions = exports.bubbleImageOptions = exports.boxOptions = void 0;
|
|
6
|
+
exports.stackOptions = exports.headingOptions = exports.groupOptions = exports.detailsOptions = exports.bubbleOptions = exports.bubbleImageOptions = exports.boxOptions = void 0;
|
|
7
7
|
var _utils = require("markdown-it/lib/common/utils");
|
|
8
|
+
const LAYOUT_GAPS = new Set(['sm', 'md', 'lg']);
|
|
9
|
+
const parseAttrs = info => {
|
|
10
|
+
const regex = /(\w+)="([^"]*)"/g;
|
|
11
|
+
const attrs = {};
|
|
12
|
+
let m;
|
|
13
|
+
while ((m = regex.exec(info)) !== null) {
|
|
14
|
+
attrs[m[1]] = m[2];
|
|
15
|
+
}
|
|
16
|
+
return attrs;
|
|
17
|
+
};
|
|
18
|
+
|
|
8
19
|
// ::: details Detail
|
|
9
20
|
// summary here
|
|
10
21
|
// :::
|
|
@@ -24,8 +35,50 @@ const detailsOptions = exports.detailsOptions = {
|
|
|
24
35
|
}
|
|
25
36
|
};
|
|
26
37
|
|
|
38
|
+
// Group
|
|
39
|
+
// ::: group gap="md"
|
|
40
|
+
// markdown
|
|
41
|
+
// :::
|
|
42
|
+
const groupOptions = exports.groupOptions = {
|
|
43
|
+
validate: function (params) {
|
|
44
|
+
return /^group(?:\s+\w+="[^"]*")*\s*$/.test(params.trim());
|
|
45
|
+
},
|
|
46
|
+
render: function (tokens, idx) {
|
|
47
|
+
const isOpeningTag = tokens[idx].nesting === 1;
|
|
48
|
+
if (isOpeningTag) {
|
|
49
|
+
const info = tokens[idx].info.trim().replace(/^group\s*/, '');
|
|
50
|
+
const attrs = parseAttrs(info);
|
|
51
|
+
const gap = LAYOUT_GAPS.has(attrs.gap) ? attrs.gap : 'md';
|
|
52
|
+
return `<div class="custom-group custom-group-gap-${(0, _utils.escapeHtml)(gap)}">`;
|
|
53
|
+
} else {
|
|
54
|
+
return `</div>\n`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Stack
|
|
60
|
+
// ::: stack gap="md"
|
|
61
|
+
// markdown
|
|
62
|
+
// :::
|
|
63
|
+
const stackOptions = exports.stackOptions = {
|
|
64
|
+
validate: function (params) {
|
|
65
|
+
return /^stack(?:\s+\w+="[^"]*")*\s*$/.test(params.trim());
|
|
66
|
+
},
|
|
67
|
+
render: function (tokens, idx) {
|
|
68
|
+
const isOpeningTag = tokens[idx].nesting === 1;
|
|
69
|
+
if (isOpeningTag) {
|
|
70
|
+
const info = tokens[idx].info.trim().replace(/^stack\s*/, '');
|
|
71
|
+
const attrs = parseAttrs(info);
|
|
72
|
+
const gap = LAYOUT_GAPS.has(attrs.gap) ? attrs.gap : 'md';
|
|
73
|
+
return `<div class="custom-stack custom-stack-gap-${(0, _utils.escapeHtml)(gap)}">`;
|
|
74
|
+
} else {
|
|
75
|
+
return `</div>\n`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
27
80
|
// Bubble
|
|
28
|
-
// ::: bubble alt="alt" src="src" webp="src.webp" width="100" height="100" pos="left"
|
|
81
|
+
// ::: bubble alt="alt" src="src" webp="src.webp" width="100" height="100" pos="left" name="name"
|
|
29
82
|
// markdown
|
|
30
83
|
// :::
|
|
31
84
|
const bubbleOptions = exports.bubbleOptions = {
|
|
@@ -48,7 +101,8 @@ const bubbleOptions = exports.bubbleOptions = {
|
|
|
48
101
|
width = '80',
|
|
49
102
|
height = '80',
|
|
50
103
|
pos = 'left',
|
|
51
|
-
webp = ''
|
|
104
|
+
webp = '',
|
|
105
|
+
name = ''
|
|
52
106
|
} = attrs;
|
|
53
107
|
const imgHtml = `<img src="${(0, _utils.escapeHtml)(src)}" alt="${(0, _utils.escapeHtml)(alt)}" ` + `width="${(0, _utils.escapeHtml)(width)}" height="${(0, _utils.escapeHtml)(height)}">`;
|
|
54
108
|
let imageElement;
|
|
@@ -57,7 +111,7 @@ const bubbleOptions = exports.bubbleOptions = {
|
|
|
57
111
|
} else {
|
|
58
112
|
imageElement = imgHtml;
|
|
59
113
|
}
|
|
60
|
-
return `<div class="bubble ${pos}">` + imageElement + `<div class="bubble-content">`;
|
|
114
|
+
return `<div class="bubble ${pos}">` + `<div class="bubble-avatar">` + imageElement + `${name ? `<span class="bubble-name">${(0, _utils.escapeHtml)(name)}</span>` : ''}` + `</div>` + `<div class="bubble-content">`;
|
|
61
115
|
} else {
|
|
62
116
|
return `</div></div>\n`;
|
|
63
117
|
}
|
|
@@ -120,12 +174,12 @@ const bubbleImageOptions = exports.bubbleImageOptions = {
|
|
|
120
174
|
//
|
|
121
175
|
const boxOptions = exports.boxOptions = {
|
|
122
176
|
validate: function (params) {
|
|
123
|
-
return /^(box[1-
|
|
177
|
+
return /^(box[1-7])(?:\s+(.*))?$/.test(params.trim());
|
|
124
178
|
},
|
|
125
179
|
render: function (tokens, idx) {
|
|
126
180
|
const isOpeningTag = tokens[idx].nesting === 1;
|
|
127
181
|
if (isOpeningTag) {
|
|
128
|
-
const m = tokens[idx].info.trim().match(/^(box[1-
|
|
182
|
+
const m = tokens[idx].info.trim().match(/^(box[1-7])(?:\s+(.*))?$/);
|
|
129
183
|
if (!m) return '';
|
|
130
184
|
const boxType = m[1]; // box1, box2, etc.
|
|
131
185
|
const boxTitle = m[2] || ''; // title (optional)
|
|
@@ -148,6 +202,8 @@ const boxHtml = (boxType, boxTitle) => {
|
|
|
148
202
|
case 'box5':
|
|
149
203
|
case 'box6':
|
|
150
204
|
return `<div class="box ${boxType}"><div class="msg-container"><span class="icon"></span>${boxTitle ? `<span>${boxTitle}</span>` : ''}</div>`;
|
|
205
|
+
case 'box7':
|
|
206
|
+
return `<div class="box ${boxType}">${boxTitle ? `<div class="box-title">${boxTitle}</div>` : ''}`;
|
|
151
207
|
default:
|
|
152
208
|
return `<div class="box ${boxType}">${boxTitle ? `<span>${boxTitle}</span>` : ''}`;
|
|
153
209
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-custom-blocks.d.ts","sourceRoot":"","sources":["../../../src/utils/md-custom-blocks.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"md-custom-blocks.d.ts","sourceRoot":"","sources":["../../../src/utils/md-custom-blocks.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAgLrC,wBAAgB,cAAc,CAAC,EAAE,EAAE,UAAU,QA2C5C"}
|
|
@@ -5,28 +5,82 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.mdCustomBlocks = mdCustomBlocks;
|
|
7
7
|
var _utils = require("markdown-it/lib/common/utils");
|
|
8
|
+
const attrRe = /([a-zA-Z0-9-_]+)="([^"]*)"/g;
|
|
9
|
+
const BUTTON_VARIANTS = new Set(['primary', 'secondary', 'amazon', 'rakuten', 'kindle', 'yahoo']);
|
|
10
|
+
const BUTTON_APPEARANCES = new Set(['solid', 'outline', 'ghost']);
|
|
11
|
+
const BUTTON_SIZES = new Set(['sm', 'md', 'lg']);
|
|
12
|
+
const BUTTON_ICONS = new Set(['amazon', 'rakuten', 'kindle', 'yahoo', 'check', 'external']);
|
|
8
13
|
function escapeRegExp(string) {
|
|
9
14
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
10
15
|
}
|
|
16
|
+
function parseAttrs(rawAttrs) {
|
|
17
|
+
const attrs = {};
|
|
18
|
+
let mat;
|
|
19
|
+
attrRe.lastIndex = 0;
|
|
20
|
+
while (mat = attrRe.exec(rawAttrs)) {
|
|
21
|
+
attrs[mat[1]] = mat[2];
|
|
22
|
+
}
|
|
23
|
+
return attrs;
|
|
24
|
+
}
|
|
25
|
+
function hasRequiredAttrs(attrs, requiredKeys) {
|
|
26
|
+
return requiredKeys.every(key => attrs[key]);
|
|
27
|
+
}
|
|
28
|
+
function renderLinkExternal({
|
|
29
|
+
url,
|
|
30
|
+
text,
|
|
31
|
+
target = '_blank',
|
|
32
|
+
rel,
|
|
33
|
+
icon = 'true'
|
|
34
|
+
}) {
|
|
35
|
+
const label = text || url;
|
|
36
|
+
const relValues = new Set((rel || '').split(/\s+/).filter(Boolean));
|
|
37
|
+
if (target === '_blank') {
|
|
38
|
+
relValues.add('noopener');
|
|
39
|
+
relValues.add('noreferrer');
|
|
40
|
+
}
|
|
41
|
+
const linkRel = [...relValues].join(' ');
|
|
42
|
+
const className = icon === 'false' ? 'external-link external-link-no-icon' : 'external-link';
|
|
43
|
+
const relAttr = linkRel ? ` rel="${(0, _utils.escapeHtml)(linkRel)}"` : '';
|
|
44
|
+
return `<a href="${(0, _utils.escapeHtml)(url)}" target="${(0, _utils.escapeHtml)(target)}"${relAttr} class="${className}">${(0, _utils.escapeHtml)(label)}</a>`;
|
|
45
|
+
}
|
|
46
|
+
function getAllowedValue(value, allowedValues, fallback) {
|
|
47
|
+
return value && allowedValues.has(value) ? value : fallback;
|
|
48
|
+
}
|
|
49
|
+
function renderButton({
|
|
50
|
+
url,
|
|
51
|
+
text,
|
|
52
|
+
variant,
|
|
53
|
+
appearance,
|
|
54
|
+
size,
|
|
55
|
+
icon,
|
|
56
|
+
target = '_blank',
|
|
57
|
+
rel
|
|
58
|
+
}) {
|
|
59
|
+
const label = text || url;
|
|
60
|
+
const buttonVariant = getAllowedValue(variant, BUTTON_VARIANTS, 'primary');
|
|
61
|
+
const buttonAppearance = getAllowedValue(appearance, BUTTON_APPEARANCES, 'solid');
|
|
62
|
+
const buttonSize = getAllowedValue(size, BUTTON_SIZES, 'md');
|
|
63
|
+
const buttonIcon = icon && BUTTON_ICONS.has(icon) ? icon : '';
|
|
64
|
+
const relValues = new Set((rel || '').split(/\s+/).filter(Boolean));
|
|
65
|
+
if (target === '_blank') {
|
|
66
|
+
relValues.add('noopener');
|
|
67
|
+
relValues.add('noreferrer');
|
|
68
|
+
}
|
|
69
|
+
const linkRel = [...relValues].join(' ');
|
|
70
|
+
const relAttr = linkRel ? ` rel="${(0, _utils.escapeHtml)(linkRel)}"` : '';
|
|
71
|
+
const iconHtml = buttonIcon ? `<span class="custom-button-icon custom-button-icon-${buttonIcon}" aria-hidden="true"></span>` : '';
|
|
72
|
+
return `<a href="${(0, _utils.escapeHtml)(url)}" target="${(0, _utils.escapeHtml)(target)}"${relAttr} class="custom-button custom-button-${buttonVariant} custom-button-${buttonAppearance} custom-button-${buttonSize}">${iconHtml}<span class="custom-button-text">${(0, _utils.escapeHtml)(label)}</span></a>`;
|
|
73
|
+
}
|
|
11
74
|
function registerKVBlock(md, block) {
|
|
12
75
|
const escapedMarker = escapeRegExp(block.marker);
|
|
13
76
|
const blockRe = new RegExp(`^@\\[${escapedMarker}\\]\\(([^)]*)\\)$`);
|
|
14
|
-
const attrRe = /([a-zA-Z0-9-_]+)="([^"]*)"/g;
|
|
15
77
|
md.block.ruler.before('paragraph', block.name, (state, start, _end, silent) => {
|
|
16
78
|
const line = state.src.slice(state.bMarks[start] + state.tShift[start], state.eMarks[start]).trim();
|
|
17
79
|
const m = line.match(blockRe);
|
|
18
80
|
if (!m) return false;
|
|
19
81
|
if (silent) return true;
|
|
20
|
-
const attrs =
|
|
21
|
-
|
|
22
|
-
while (mat = attrRe.exec(m[1])) {
|
|
23
|
-
attrs[mat[1]] = mat[2];
|
|
24
|
-
}
|
|
25
|
-
for (const key of block.requiredKeys) {
|
|
26
|
-
if (!attrs[key]) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
82
|
+
const attrs = parseAttrs(m[1]);
|
|
83
|
+
if (!hasRequiredAttrs(attrs, block.requiredKeys)) return false;
|
|
30
84
|
const token = state.push(block.name, '', 0);
|
|
31
85
|
token.meta = attrs;
|
|
32
86
|
state.line = start + 1;
|
|
@@ -36,6 +90,28 @@ function registerKVBlock(md, block) {
|
|
|
36
90
|
return block.renderer(tokens[idx].meta);
|
|
37
91
|
};
|
|
38
92
|
}
|
|
93
|
+
function registerKVInline(md, block) {
|
|
94
|
+
const marker = `@[${block.marker}](`;
|
|
95
|
+
md.inline.ruler.before('link', block.name, (state, silent) => {
|
|
96
|
+
const start = state.pos;
|
|
97
|
+
if (state.src.slice(start, start + marker.length) !== marker) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
const end = state.src.indexOf(')', start + marker.length);
|
|
101
|
+
if (end < 0) return false;
|
|
102
|
+
const attrs = parseAttrs(state.src.slice(start + marker.length, end));
|
|
103
|
+
if (!hasRequiredAttrs(attrs, block.requiredKeys)) return false;
|
|
104
|
+
if (!silent) {
|
|
105
|
+
const token = state.push(block.name, '', 0);
|
|
106
|
+
token.meta = attrs;
|
|
107
|
+
}
|
|
108
|
+
state.pos = end + 1;
|
|
109
|
+
return true;
|
|
110
|
+
});
|
|
111
|
+
md.renderer.rules[block.name] = (tokens, idx) => {
|
|
112
|
+
return block.renderer(tokens[idx].meta);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
39
115
|
function mdCustomBlocks(md) {
|
|
40
116
|
// @[img](src="", alt="", webp="", width="", height="")
|
|
41
117
|
registerKVBlock(md, {
|
|
@@ -54,8 +130,8 @@ function mdCustomBlocks(md) {
|
|
|
54
130
|
const altText = alt ? `alt="${(0, _utils.escapeHtml)(alt)}"` : '';
|
|
55
131
|
const widthAttr = width ? ` width="${(0, _utils.escapeHtml)(width)}"` : '';
|
|
56
132
|
const heightAttr = height ? ` height="${(0, _utils.escapeHtml)(height)}"` : '';
|
|
57
|
-
const captionText = caption ? `<em>${(0, _utils.escapeHtml)(caption)}</em>` : '';
|
|
58
|
-
return `<picture>
|
|
133
|
+
const captionText = caption ? `<em class="custom-image-caption">${(0, _utils.escapeHtml)(caption)}</em>` : '';
|
|
134
|
+
return `<picture class="custom-image">
|
|
59
135
|
${webpSource}
|
|
60
136
|
<img src="${(0, _utils.escapeHtml)(src)}" ${altText}${widthAttr}${heightAttr}>
|
|
61
137
|
${captionText}
|
|
@@ -64,18 +140,22 @@ function mdCustomBlocks(md) {
|
|
|
64
140
|
});
|
|
65
141
|
|
|
66
142
|
// @[link-external](url="", text="")
|
|
67
|
-
|
|
143
|
+
const linkExternal = {
|
|
68
144
|
name: 'link_external',
|
|
69
145
|
marker: 'link-external',
|
|
70
146
|
requiredKeys: ['url'],
|
|
71
|
-
renderer:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
147
|
+
renderer: renderLinkExternal
|
|
148
|
+
};
|
|
149
|
+
registerKVBlock(md, linkExternal);
|
|
150
|
+
registerKVInline(md, linkExternal);
|
|
151
|
+
|
|
152
|
+
// @[button](url="", text="", variant="", appearance="", size="", icon="")
|
|
153
|
+
const button = {
|
|
154
|
+
name: 'button',
|
|
155
|
+
marker: 'button',
|
|
156
|
+
requiredKeys: ['url'],
|
|
157
|
+
renderer: renderButton
|
|
158
|
+
};
|
|
159
|
+
registerKVBlock(md, button);
|
|
160
|
+
registerKVInline(md, button);
|
|
81
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-custom-inlines.d.ts","sourceRoot":"","sources":["../../../src/utils/md-custom-inlines.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"md-custom-inlines.d.ts","sourceRoot":"","sources":["../../../src/utils/md-custom-inlines.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAiErC,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,QAqB7C"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mdCustomInlines = mdCustomInlines;
|
|
7
|
-
|
|
7
|
+
const HIGHLIGHT_COLORS = new Set(['red', 'green', 'blue']);
|
|
8
8
|
function registerInline(md, inline) {
|
|
9
9
|
const inlineRule = (state, silent) => {
|
|
10
10
|
const start = state.pos;
|
|
@@ -12,7 +12,6 @@ function registerInline(md, inline) {
|
|
|
12
12
|
if (start + inline.marker.length > max || state.src.slice(start, start + inline.marker.length) !== inline.marker) {
|
|
13
13
|
return false;
|
|
14
14
|
}
|
|
15
|
-
if (silent) return true;
|
|
16
15
|
let end = start + inline.marker.length;
|
|
17
16
|
while (end < max) {
|
|
18
17
|
if (state.src.slice(end, end + inline.marker.length) === inline.marker) {
|
|
@@ -24,28 +23,39 @@ function registerInline(md, inline) {
|
|
|
24
23
|
return false;
|
|
25
24
|
}
|
|
26
25
|
const content = state.src.slice(start + inline.marker.length, end);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const parsed = inline.parseContent ? inline.parseContent(content) : {
|
|
27
|
+
className: inline.name,
|
|
28
|
+
textStartOffset: 0
|
|
29
|
+
};
|
|
30
|
+
if (silent) return true;
|
|
31
|
+
const oldPosMax = state.posMax;
|
|
32
|
+
const tokenOpen = state.push(`${inline.name}_open`, 'span', 1);
|
|
33
|
+
tokenOpen.markup = inline.marker;
|
|
34
|
+
tokenOpen.attrSet('class', parsed.className);
|
|
35
|
+
state.pos = start + inline.marker.length + parsed.textStartOffset;
|
|
36
|
+
state.posMax = end;
|
|
37
|
+
state.md.inline.tokenize(state);
|
|
38
|
+
const tokenClose = state.push(`${inline.name}_close`, 'span', -1);
|
|
39
|
+
tokenClose.markup = inline.marker;
|
|
30
40
|
state.pos = end + inline.marker.length;
|
|
41
|
+
state.posMax = oldPosMax;
|
|
31
42
|
return true;
|
|
32
43
|
};
|
|
33
44
|
md.inline.ruler.before('emphasis', inline.name, inlineRule);
|
|
34
|
-
md.renderer.rules[inline.name] = (tokens, idx) => {
|
|
35
|
-
return inline.renderer(tokens[idx].content, tokens[idx].meta);
|
|
36
|
-
};
|
|
37
45
|
}
|
|
38
46
|
function mdCustomInlines(md) {
|
|
39
47
|
// ==highlight==
|
|
40
48
|
registerInline(md, {
|
|
41
49
|
name: 'highlight',
|
|
42
50
|
marker: '==',
|
|
43
|
-
|
|
51
|
+
parseContent: content => {
|
|
44
52
|
const colorMatch = content.match(/^([a-zA-Z]+):(.+)$/);
|
|
45
|
-
const color = colorMatch ? colorMatch[1] : 'default';
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
const color = colorMatch && HIGHLIGHT_COLORS.has(colorMatch[1]) ? colorMatch[1] : 'default';
|
|
54
|
+
const hasValidColor = color !== 'default';
|
|
55
|
+
return {
|
|
56
|
+
className: hasValidColor ? `highlight highlight-${color}` : 'highlight',
|
|
57
|
+
textStartOffset: hasValidColor ? colorMatch[1].length + 1 : 0
|
|
58
|
+
};
|
|
49
59
|
}
|
|
50
60
|
});
|
|
51
61
|
}
|
package/dist/styles/base.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@media screen and (max-width: 576px){pre>code{padding:1rem .8rem;font-size:.85em}}.nbcontent{--nb-background: oklch(100% 0 0deg);--nb-foreground: oklch(14.1% 0.005 285.823deg);--nb-primary: oklch(21% 0.006 285.885deg);--nb-primary-foreground: oklch(98.5% 0 0deg);--nb-secondary: oklch(96.7% 0.001 286.375deg);--nb-secondary-foreground: oklch(21% 0.006 285.885deg);--nb-muted: oklch(96.7% 0.001 286.375deg);--nb-muted-foreground: oklch(55.2% 0.016 285.938deg);--nb-accent: oklch(96.7% 0.001 286.375deg);--nb-accent-foreground: oklch(21% 0.006 285.885deg);--nb-destructive: oklch(57.7% 0.245 27.325deg);--nb-border: oklch(92% 0.004 286.32deg);--nb-input: oklch(92% 0.004 286.32deg);--nb-ring: oklch(70.5% 0.015 286.067deg);--nb-link: oklch(62.3% 0.214 259.815deg);--nb-warning: oklch(97.54% 0.025552 84.593deg);--nb-warning-foreground: oklch(83.04% 0.1459 74.36deg);--nb-danger: oklch(96.56% 0.0177 4.51deg);--nb-danger-foreground: oklch(72.71% 0.1684 24.66deg);--nb-rounded-xs: 4px;--nb-rounded-sm: 7px;--nb-rounded-md: 10px;--nb-rounded-lg: 14px;--nb-rounded-full: 99rem}.nbcontent>*:first-child{margin-top:0}.nbcontent{line-height:1.8}.nbcontent i,.nbcontent cite,.nbcontent em,.nbcontent var{font-style:italic}.nbcontent strong{font-weight:bold}.nbcontent a{color:var(--nb-link)}.nbcontent a:hover{text-decoration:underline}.nbcontent p+p{margin-top:1.2em}.nbcontent h1,.nbcontent h2,.nbcontent h3,.nbcontent h4,.nbcontent h5,.nbcontent h6{font-weight:bold}.nbcontent h1+p,.nbcontent h2+p,.nbcontent h3+p,.nbcontent h4+p,.nbcontent h5+p,.nbcontent h6+p{margin-top:.2em}.nbcontent h1,.nbcontent h2{margin-top:1.9em;margin-bottom:1.5rem;padding-bottom:.1em;border-bottom:solid 1px var(--nb-border)}.nbcontent h3,.nbcontent h4,.nbcontent h5,.nbcontent h6{margin-top:1.8em;margin-bottom:.4em}.nbcontent h1{font-size:1.7em}.nbcontent h2{font-size:1.5em}.nbcontent h3{font-size:1.3em}.nbcontent h4{font-size:1.1em}.nbcontent h5{font-size:1em}.nbcontent h6{font-size:.9em}@media screen and (max-width: 576px){.nbcontent h1{font-size:1.6em}.nbcontent h2{font-size:1.4em}.nbcontent h3{font-size:1.2em}.nbcontent h4{font-size:1.1em}.nbcontent h5{font-size:1em}.nbcontent h6{font-size:.85em}}.nbcontent ul,.nbcontent ol{margin:1.4rem 0;line-height:1.6}.nbcontent ul>li,.nbcontent ol>li{margin:.4rem 0}.nbcontent ul ul,.nbcontent ul ol,.nbcontent ol ul,.nbcontent ol ol{margin:.2em 0}.nbcontent ul p,.nbcontent ol p{margin:0}.nbcontent ul{padding-left:1.8em}.nbcontent ul>li{list-style:disc}.nbcontent ul>li::marker{font-size:1.1em}.nbcontent ol{padding-left:1.7em}.nbcontent ol>li{list-style:decimal;padding-left:.2em}.nbcontent ol>li::marker{font-weight:600;letter-spacing:-0.05em}.nbcontent .contains-task-list .task-list-item{list-style:none}.nbcontent .task-list-item-checkbox{margin-left:-1.5em;font-size:1em;pointer-events:none}.nbcontent code{padding:.2em .4em;background:var(--nb-
|
|
1
|
+
@media screen and (max-width: 576px){pre>code{padding:1rem .8rem;font-size:.85em}}.nbcontent{--nb-background: oklch(100% 0 0deg);--nb-foreground: oklch(14.1% 0.005 285.823deg);--nb-primary: oklch(21% 0.006 285.885deg);--nb-primary-foreground: oklch(98.5% 0 0deg);--nb-secondary: oklch(96.7% 0.001 286.375deg);--nb-secondary-foreground: oklch(21% 0.006 285.885deg);--nb-code: oklch(93.88% 0.01 247.91deg);--nb-muted: oklch(96.7% 0.001 286.375deg);--nb-muted-foreground: oklch(55.2% 0.016 285.938deg);--nb-accent: oklch(96.7% 0.001 286.375deg);--nb-accent-foreground: oklch(21% 0.006 285.885deg);--nb-destructive: oklch(57.7% 0.245 27.325deg);--nb-border: oklch(92% 0.004 286.32deg);--nb-input: oklch(92% 0.004 286.32deg);--nb-ring: oklch(70.5% 0.015 286.067deg);--nb-link: oklch(62.3% 0.214 259.815deg);--nb-info: oklch(97.2% 0.012 244deg);--nb-info-foreground: oklch(71.56% 0.1161 221.975deg);--nb-warning: oklch(97.54% 0.025552 84.593deg);--nb-warning-foreground: oklch(83.04% 0.1459 74.36deg);--nb-danger: oklch(96.56% 0.0177 4.51deg);--nb-danger-foreground: oklch(72.71% 0.1684 24.66deg);--nb-amazon: #ff9900;--nb-amazon-foreground: #fff;--nb-rakuten: #bf0000;--nb-rakuten-foreground: #fff;--nb-kindle: #0073bb;--nb-kindle-foreground: #fff;--nb-yahoo: #ff0033;--nb-yahoo-foreground: #fff;--nb-rounded-xs: 4px;--nb-rounded-sm: 7px;--nb-rounded-md: 10px;--nb-rounded-lg: 14px;--nb-rounded-full: 99rem}.nbcontent>*:first-child{margin-top:0}.nbcontent{line-height:1.8}.nbcontent i,.nbcontent cite,.nbcontent em,.nbcontent var{font-style:italic}.nbcontent strong{font-weight:bold}.nbcontent a{color:var(--nb-link)}.nbcontent a:hover{text-decoration:underline}.nbcontent p+p{margin-top:1.2em}.nbcontent h1,.nbcontent h2,.nbcontent h3,.nbcontent h4,.nbcontent h5,.nbcontent h6{font-weight:bold}.nbcontent h1+p,.nbcontent h2+p,.nbcontent h3+p,.nbcontent h4+p,.nbcontent h5+p,.nbcontent h6+p{margin-top:.2em}.nbcontent h1,.nbcontent h2{margin-top:1.9em;margin-bottom:1.5rem;padding-bottom:.1em;border-bottom:solid 1px var(--nb-border)}.nbcontent h3,.nbcontent h4,.nbcontent h5,.nbcontent h6{margin-top:1.8em;margin-bottom:.4em}.nbcontent h1{font-size:1.7em}.nbcontent h2{font-size:1.5em}.nbcontent h3{font-size:1.3em}.nbcontent h4{font-size:1.1em}.nbcontent h5{font-size:1em}.nbcontent h6{font-size:.9em}@media screen and (max-width: 576px){.nbcontent h1{font-size:1.6em}.nbcontent h2{font-size:1.4em}.nbcontent h3{font-size:1.2em}.nbcontent h4{font-size:1.1em}.nbcontent h5{font-size:1em}.nbcontent h6{font-size:.85em}}.nbcontent ul,.nbcontent ol{margin:1.4rem 0;line-height:1.6}.nbcontent ul>li,.nbcontent ol>li{margin:.4rem 0}.nbcontent ul ul,.nbcontent ul ol,.nbcontent ol ul,.nbcontent ol ol{margin:.2em 0}.nbcontent ul p,.nbcontent ol p{margin:0}.nbcontent ul{padding-left:1.8em}.nbcontent ul>li{list-style:disc}.nbcontent ul>li::marker{font-size:1.1em}.nbcontent ol{padding-left:1.7em}.nbcontent ol>li{list-style:decimal;padding-left:.2em}.nbcontent ol>li::marker{font-weight:600;letter-spacing:-0.05em}.nbcontent .contains-task-list .task-list-item{list-style:none}.nbcontent .task-list-item-checkbox{margin-left:-1.5em;font-size:1em;pointer-events:none}.nbcontent code{padding:.2em .4em;background:var(--nb-code);font-size:.85em;border-radius:var(--nb-rounded-xs);vertical-align:.08em;color:var(--nb-foreground)}.nbcontent code,.nbcontent .code-filename{font-family:"JetBrains Mono","Fira Code","SFMono-Regular",Consolas,"Liberation Mono",Menlo,"Cascadia Code","Source Code Pro",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";-webkit-font-smoothing:antialiased}.nbcontent .code-container{position:relative;margin:1.5rem 0}.nbcontent .code-filename{display:table;max-width:100%;background:var(--nb-primary);color:var(--nb-primary-foreground);font-size:12px;line-height:1.3;border-radius:var(--nb-rounded-xs) var(--nb-rounded-xs) 0 0;padding:6px 12px 20px;margin-bottom:-24px}.nbcontent .code-filename-container+pre{border-top-left-radius:0}.nbcontent pre{margin:1.5rem 0;background:var(--nb-primary);overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--nb-rounded-md);word-break:normal;word-wrap:normal;display:flex}.nbcontent pre:after{content:"";width:8px;flex-shrink:0}.nbcontent pre code{margin:0;padding:0;background:rgba(0,0,0,0);font-size:.9em}.nbcontent pre>code{display:block;padding:1.1rem}.nbcontent table{margin:1.5rem auto;width:auto;border-collapse:collapse;font-size:.95em;line-height:1.5;word-break:normal;display:block;overflow:auto;-webkit-overflow-scrolling:touch}.nbcontent th,.nbcontent td{padding:.6rem;border:solid 1px var(--nb-border);background:var(--nb-background)}.nbcontent th{font-weight:700;background:var(--nb-secondary)}.nbcontent img:not(.emoji){margin:1.5rem auto;display:table;max-width:100%;height:auto}.nbcontent img+br{display:none}.nbcontent img~em{display:block;margin:-1rem auto 0;line-height:1.3;text-align:center;color:var(--nb-muted-foreground);font-size:.92em}.nbcontent a:has(img){display:table;margin:0 auto}.nbcontent hr{border-top:2px solid var(--nb-border);margin:2.5rem 0}.nbcontent blockquote{font-size:.97em;margin:1.5rem 0;border-left:solid 3px var(--nb-border);padding:2px 0 2px .7em;color:var(--nb-muted-foreground)}.nbcontent blockquote p{margin:1rem 0}.nbcontent blockquote>:first-child{margin-top:0}.nbcontent blockquote>:last-child{margin-bottom:0}.nbcontent blockquote.twitter-tweet{display:none}.dark .nbcontent{--nb-background: oklch(14.1% 0.005 285.823deg);--nb-foreground: oklch(98.5% 0 0deg);--nb-primary: oklch(92% 0.004 286.32deg);--nb-primary-foreground: oklch(21% 0.006 285.885deg);--nb-secondary: oklch(27.4% 0.006 286.033deg);--nb-secondary-foreground: oklch(98.5% 0 0deg);--nb-code: oklch(34% 0.006 286.033deg);--nb-muted: oklch(27.4% 0.006 286.033deg);--nb-muted-foreground: oklch(70.5% 0.015 286.067deg);--nb-accent: oklch(27.4% 0.006 286.033deg);--nb-accent-foreground: oklch(98.5% 0 0deg);--nb-destructive: oklch(70.4% 0.191 22.216deg);--nb-border: oklch(100% 0 0deg / 0.1);--nb-input: oklch(100% 0 0deg / 0.15);--nb-ring: oklch(55.2% 0.016 285.938deg);--nb-link: oklch(62.3% 0.214 259.815deg);--nb-info: oklch(97.2% 0.012 244deg);--nb-info-foreground: oklch(71.56% 0.1161 221.975deg);--nb-warning: oklch(97.54% 0.025552 84.593deg);--nb-warning-foreground: oklch(83.04% 0.1459 74.36deg);--nb-danger: oklch(96.56% 0.0177 4.51deg);--nb-danger-foreground: oklch(72.71% 0.1684 24.66deg);--nb-amazon: #ff9900;--nb-amazon-foreground: #fff;--nb-rakuten: #bf0000;--nb-rakuten-foreground: #fff;--nb-kindle: #0073bb;--nb-kindle-foreground: #fff;--nb-yahoo: #ff0033;--nb-yahoo-foreground: #fff;--nb-rounded-xs: 4px;--nb-rounded-sm: 7px;--nb-rounded-md: 10px;--nb-rounded-lg: 14px;--nb-rounded-full: 99rem}
|
package/dist/styles/rich.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nbcontent details{font-size:.95em;margin:1rem 0;line-height:1.7}.nbcontent summary{cursor:pointer;outline:0;padding:.7em .7em .7em .9em;border:solid 1px var(--nb-border);color:var(--nb-primary);font-size:.9em;border-radius:var(--nb-rounded-sm);background:var(--nb-background)}.nbcontent summary::-webkit-details-marker{color:var(--nb-muted-foreground)}.nbcontent details[open]>summary{border-radius:var(--nb-rounded-sm) var(--nb-rounded-sm) 0 0;box-shadow:none;background:var(--nb-background);border-bottom:none}.nbcontent .details-content{padding:.5em .9em;border:solid 1px var(--nb-border);border-radius:0 0 var(--nb-rounded-lg) var(--nb-rounded-lg);background:var(--nb-background)}.nbcontent .details-content>*{margin:.5em 0}.nbcontent .bubble{display:flex;align-items:center;gap:1rem;margin:1rem 0}.nbcontent .bubble img{width:80px;height:80px;border-radius:50%;border:2px solid var(--nb-border);padding:.2rem}.nbcontent .bubble .bubble-content{position:relative;width:100%;padding:.5rem .8rem;color:var(--nb-foreground);background-color:var(--nb-secondary);border-radius:5px}.nbcontent .bubble .bubble-content p+p{margin-top:.4em}.nbcontent .bubble .bubble-content::before,.nbcontent .bubble .bubble-content::after{position:absolute;top:50%;left:-12px;width:12px;height:15px;clip-path:polygon(0 50%, 100% 0, 100% 100%);content:"";transform:translateY(-50%)}.nbcontent .bubble .bubble-content::before{background-color:var(--nb-secondary)}.nbcontent .bubble .bubble-content::after{left:-9px;background-color:var(--nb-secondary)}.nbcontent .bubble.right{flex-direction:row-reverse}.nbcontent .bubble.right .bubble-content::before,.nbcontent .bubble.right .bubble-content::after{left:auto;right:-12px;clip-path:polygon(0 0, 100% 50%, 0 100%)}.nbcontent .bubble.right .bubble-content::after{left:auto;right:-9px}.nbcontent .bubble-image{display:flex;align-items:center;gap:1rem;margin:1.5rem 0}.nbcontent .bubble-image .bubble-image-wrapper{overflow:hidden;flex-basis:40%;display:flex;align-items:center;justify-content:center;flex-direction:column;max-width:100%;border:2px solid var(--nb-border);border-radius:5px}.nbcontent .bubble-image .bubble-image-wrapper .browser-header{display:flex;align-items:center;padding:.6rem 1rem;background-color:var(--nb-secondary);width:100%}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls{display:flex;gap:.5rem}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn{width:8px;height:8px;border-radius:50%}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn.close{background-color:#ef4444}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn.minimize{background-color:#eab308}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn.maximize{background-color:#22c55e}.nbcontent .bubble-image .bubble-image-wrapper img{width:100%;height:auto;margin:0}.nbcontent .bubble-image .bubble-image-content{flex-basis:60%;position:relative;width:100%;padding:.5rem .8rem;color:var(--nb-foreground);background-color:var(--nb-secondary);border-radius:5px}.nbcontent .bubble-image .bubble-image-content p+p{margin-top:.4em}.nbcontent .bubble-image .bubble-image-content::before,.nbcontent .bubble-image .bubble-image-content::after{position:absolute;top:50%;left:-12px;width:12px;height:15px;clip-path:polygon(0 50%, 100% 0, 100% 100%);content:"";transform:translateY(-50%);background-color:var(--nb-secondary)}.nbcontent .bubble-image .bubble-image-content::after{left:-9px}@media screen and (max-width: 768px){.nbcontent .bubble-image{flex-direction:column}.nbcontent .bubble-image .bubble-image-content::before,.nbcontent .bubble-image .bubble-image-content::after{top:-12px;left:50%;width:28px;height:12px;clip-path:polygon(50% 0, 0 100%, 100% 100%);transform:translateX(-50%)}.nbcontent .bubble-image .bubble-image-content::after{top:-9px}}.nbcontent .box{margin:1.5rem 0}.nbcontent .box p+p{margin-top:.4em}.nbcontent .box.box1{position:relative;border:1px solid var(--nb-border);border-radius:var(--nb-rounded-sm);padding:1rem}.nbcontent .box.box1 span{position:absolute;top:0;left:1rem;font-size:1.2em;color:var(--nb-foreground);background-color:var(--nb-background);padding:0 .5em;transform:translateY(-50%)}.nbcontent .box.box2{position:relative;border-radius:var(--nb-rounded-sm);padding:1rem;background-color:var(--nb-secondary)}.nbcontent .box.box3{position:relative;border-radius:var(--nb-rounded-sm);padding:1rem;background-color:var(--nb-background);border:2px solid var(--nb-warning-foreground)}.nbcontent .box.box3 .msg-container{position:absolute;top:0;left:1rem;background-color:var(--nb-background);padding:0 .5rem;transform:translateY(-50%);display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-warning-foreground);font-weight:bold}.nbcontent .box.box3 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-warning-foreground);background-color:var(--nb-warning-foreground);border-radius:50%}.nbcontent .box.box3 .icon::before,.nbcontent .box.box3 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box3 .icon::before{top:2px;height:2px}.nbcontent .box.box3 .icon::after{height:8px;bottom:2px}.nbcontent .box.box4{position:relative;border-radius:var(--nb-rounded-sm);padding:1rem;background-color:var(--nb-background);border:2px solid var(--nb-danger-foreground)}.nbcontent .box.box4 .msg-container{position:absolute;top:0;left:1rem;background-color:var(--nb-background);padding:0 .5rem;transform:translateY(-50%);display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-danger-foreground);font-weight:bold}.nbcontent .box.box4 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-danger-foreground);background-color:var(--nb-danger-foreground);border-radius:50%}.nbcontent .box.box4 .icon::before,.nbcontent .box.box4 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box4 .icon::before{top:2px;height:2px}.nbcontent .box.box4 .icon::after{height:8px;bottom:2px}.nbcontent .box.box5{position:relative;border-radius:var(--nb-rounded-sm);padding:1rem;background-color:var(--nb-warning)}.dark .nbcontent .box.box5{color:var(--nb-background)}.nbcontent .box.box5 .msg-container{display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-warning-foreground);font-weight:bold;margin-bottom:.5rem}.nbcontent .box.box5 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-warning-foreground);background-color:var(--nb-warning-foreground);border-radius:50%}.nbcontent .box.box5 .icon::before,.nbcontent .box.box5 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box5 .icon::before{top:2px;height:2px}.nbcontent .box.box5 .icon::after{height:8px;bottom:2px}.nbcontent .box.box6{position:relative;border-radius:var(--nb-rounded-sm);padding:1rem;background-color:var(--nb-danger)}.dark .nbcontent .box.box6{color:var(--nb-background)}.nbcontent .box.box6 .msg-container{display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-danger-foreground);font-weight:bold;margin-bottom:.5rem}.nbcontent .box.box6 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-danger-foreground);background-color:var(--nb-danger-foreground);border-radius:50%}.nbcontent .box.box6 .icon::before,.nbcontent .box.box6 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box6 .icon::before{top:2px;height:2px}.nbcontent .box.box6 .icon::after{height:8px;bottom:2px}.nbcontent .heading{margin:1.5rem 0}.nbcontent .heading h1,.nbcontent .heading h2,.nbcontent .heading h3,.nbcontent .heading h4,.nbcontent .heading h5,.nbcontent .heading h6{margin:0;font-size:1em}.nbcontent .heading.heading1{display:inline-block;position:relative;padding-left:1.5rem;font-weight:bold}.nbcontent .heading.heading1::before{position:absolute;top:0;left:0;width:17px;height:28px;color:var(--nb-primary);background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%221.25em%22%20viewBox%3D%220%200%20448%20512%22%3E%3Cstyle%3Esvg%7Bfill%3A%235ab9ff%7D%3C%2Fstyle%3E%3Cpath%20d%3D%22M438.6%20105.4c12.5%2012.5%2012.5%2032.8%200%2045.3l-256%20256c-12.5%2012.5-32.8%2012.5-45.3%200l-128-128c-12.5-12.5-12.5-32.8%200-45.3s32.8-12.5%2045.3%200L160%20338.7%20393.4%20105.4c12.5-12.5%2032.8-12.5%2045.3%200z%22%2F%3E%3C%2Fsvg%3E);background-position:50%;background-repeat:no-repeat;content:""}.nbcontent .external-link{display:inline-flex;align-items:center;gap:.3em;color:var(--nb-link)}.nbcontent .external-link::after{content:"";display:inline-block;width:.9em;height:.9em;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E") no-repeat center/contain;background-color:var(--nb-link);vertical-align:-0.125em;position:relative;top:-0.05em}.nbcontent .highlight{background:linear-gradient(transparent 60%, #fef08a 40%);padding:0 2px;border-radius:2px}.dark .nbcontent .highlight{background:linear-gradient(transparent 60%, #ca8a04 40%)}.nbcontent .highlight.highlight-red{background:linear-gradient(transparent 60%, #fecaca 40%)}.dark .nbcontent .highlight.highlight-red{background:linear-gradient(transparent 60%, #dc2626 40%)}.nbcontent .highlight.highlight-green{background:linear-gradient(transparent 60%, #bbf7d0 40%)}.dark .nbcontent .highlight.highlight-green{background:linear-gradient(transparent 60%, #16a34a 40%)}.nbcontent .highlight.highlight-blue{background:linear-gradient(transparent 60%, #bfdbfe 40%)}.dark .nbcontent .highlight.highlight-blue{background:linear-gradient(transparent 60%, #2563eb 40%)}
|
|
1
|
+
.nbcontent details{font-size:.95em;margin:1.5rem 0;line-height:1.7}.nbcontent summary{cursor:pointer;outline:0;padding:.7em .7em .7em .9em;border:solid 1px var(--nb-border);color:var(--nb-primary);font-size:.9em;border-radius:var(--nb-rounded-sm);background:var(--nb-background)}.nbcontent summary::-webkit-details-marker{color:var(--nb-muted-foreground)}.nbcontent details[open]>summary{border-radius:var(--nb-rounded-sm) var(--nb-rounded-sm) 0 0;box-shadow:none;background:var(--nb-background);border-bottom:none}.nbcontent .details-content{padding:.5em .9em;border:solid 1px var(--nb-border);border-radius:0 0 var(--nb-rounded-lg) var(--nb-rounded-lg);background:var(--nb-background)}.nbcontent .details-content>*{margin:.5em 0}.nbcontent .custom-group{display:flex;flex-wrap:wrap;align-items:center;margin:1.2rem 0}.nbcontent .custom-group>*{margin-top:0;margin-bottom:0}.nbcontent .custom-group.custom-group-gap-sm{gap:.5rem}.nbcontent .custom-group.custom-group-gap-md{gap:.8rem}.nbcontent .custom-group.custom-group-gap-lg{gap:1.2rem}.nbcontent .custom-stack{display:flex;flex-direction:column;align-items:flex-start;margin:1.2rem 0}.nbcontent .custom-stack>*{margin-top:0;margin-bottom:0}.nbcontent .custom-stack.custom-stack-gap-sm{gap:.5rem}.nbcontent .custom-stack.custom-stack-gap-md{gap:.8rem}.nbcontent .custom-stack.custom-stack-gap-lg{gap:1.2rem}.nbcontent .bubble{display:flex;align-items:flex-start;gap:1rem;margin:1.5rem 0}.nbcontent .bubble .bubble-avatar{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:.125rem;width:5rem}.nbcontent .bubble picture{display:block;width:5rem;height:5rem}.nbcontent .bubble img{box-sizing:border-box;display:block;width:5rem;height:5rem;max-width:none;margin:0;border-radius:50%;border:2px solid var(--nb-border);padding:.2rem}.nbcontent .bubble .bubble-name{max-width:6rem;color:var(--nb-muted-foreground);font-size:.85em;line-height:1.4;text-align:center;overflow-wrap:anywhere}.nbcontent .bubble .bubble-content{box-sizing:border-box;position:relative;width:100%;min-height:5rem;display:flex;flex-direction:column;justify-content:center;padding:.8rem;color:var(--nb-foreground);background-color:var(--nb-secondary);border-radius:5px}.nbcontent .bubble .bubble-content>:first-child{margin-top:0}.nbcontent .bubble .bubble-content>:last-child{margin-bottom:0}.nbcontent .bubble .bubble-content p+p{margin-top:.4em}.nbcontent .bubble .bubble-content ul,.nbcontent .bubble .bubble-content ol{margin:.6rem 0}.nbcontent .bubble .bubble-content li{margin:.2rem 0}.nbcontent .bubble .bubble-content::before,.nbcontent .bubble .bubble-content::after{position:absolute;top:2.5rem;left:-12px;width:12px;height:15px;clip-path:polygon(0 50%, 100% 0, 100% 100%);content:"";transform:translateY(-50%)}.nbcontent .bubble .bubble-content::before{background-color:var(--nb-secondary)}.nbcontent .bubble .bubble-content::after{left:-9px;background-color:var(--nb-secondary)}.nbcontent .bubble.right{flex-direction:row-reverse}.nbcontent .bubble.right .bubble-content::before,.nbcontent .bubble.right .bubble-content::after{left:auto;right:-12px;clip-path:polygon(0 0, 100% 50%, 0 100%)}.nbcontent .bubble.right .bubble-content::after{left:auto;right:-9px}.nbcontent .bubble-image{display:flex;align-items:center;gap:1rem;margin:1.5rem 0}.nbcontent .bubble-image .bubble-image-wrapper{overflow:hidden;flex-basis:40%;display:flex;align-items:center;justify-content:center;flex-direction:column;max-width:100%;border:2px solid var(--nb-border);border-radius:5px}.nbcontent .bubble-image .bubble-image-wrapper .browser-header{display:flex;align-items:center;padding:.6rem 1rem;background-color:var(--nb-secondary);width:100%}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls{display:flex;gap:.5rem}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn{width:8px;height:8px;border-radius:50%}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn.close{background-color:#ef4444}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn.minimize{background-color:#eab308}.nbcontent .bubble-image .bubble-image-wrapper .browser-header .controls .control-btn.maximize{background-color:#22c55e}.nbcontent .bubble-image .bubble-image-wrapper img{width:100%;height:auto;margin:0}.nbcontent .bubble-image .bubble-image-content{flex-basis:60%;position:relative;width:100%;padding:.8rem;color:var(--nb-foreground);background-color:var(--nb-secondary);border-radius:5px}.nbcontent .bubble-image .bubble-image-content p+p{margin-top:.4em}.nbcontent .bubble-image .bubble-image-content ul,.nbcontent .bubble-image .bubble-image-content ol{margin:.6rem 0}.nbcontent .bubble-image .bubble-image-content li{margin:.2rem 0}.nbcontent .bubble-image .bubble-image-content::before,.nbcontent .bubble-image .bubble-image-content::after{position:absolute;top:50%;left:-12px;width:12px;height:15px;clip-path:polygon(0 50%, 100% 0, 100% 100%);content:"";transform:translateY(-50%);background-color:var(--nb-secondary)}.nbcontent .bubble-image .bubble-image-content::after{left:-9px}@media screen and (max-width: 768px){.nbcontent .bubble-image{flex-direction:column}.nbcontent .bubble-image .bubble-image-content::before,.nbcontent .bubble-image .bubble-image-content::after{top:-12px;left:50%;width:28px;height:12px;clip-path:polygon(50% 0, 0 100%, 100% 100%);transform:translateX(-50%)}.nbcontent .bubble-image .bubble-image-content::after{top:-9px}}.nbcontent .box{margin:1.8rem 0}.nbcontent .box p+p{margin-top:.4em}.nbcontent .box ul,.nbcontent .box ol{margin:.6rem 0}.nbcontent .box li{margin:.2rem 0}.nbcontent .box.box1{position:relative;border:1px solid var(--nb-border);border-radius:var(--nb-rounded-sm);padding:1.2rem 1rem}.nbcontent .box.box1 span{position:absolute;top:0;left:1rem;font-size:1.2em;color:var(--nb-foreground);background-color:var(--nb-background);padding:0 .5em;transform:translateY(-50%)}.nbcontent .box.box2{position:relative;border-radius:var(--nb-rounded-sm);padding:1.2rem 1rem;background-color:var(--nb-secondary)}.nbcontent .box.box3{position:relative;border-radius:var(--nb-rounded-sm);padding:1.2rem 1rem;background-color:var(--nb-background);border:2px solid var(--nb-warning-foreground)}.nbcontent .box.box3 .msg-container{position:absolute;top:0;left:1rem;background-color:var(--nb-background);padding:0 .5rem;transform:translateY(-50%);display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-warning-foreground);font-weight:bold}.nbcontent .box.box3 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-warning-foreground);background-color:var(--nb-warning-foreground);border-radius:50%}.nbcontent .box.box3 .icon::before,.nbcontent .box.box3 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box3 .icon::before{top:2px;height:2px}.nbcontent .box.box3 .icon::after{height:8px;bottom:2px}.nbcontent .box.box4{position:relative;border-radius:var(--nb-rounded-sm);padding:1.2rem 1rem;background-color:var(--nb-background);border:2px solid var(--nb-danger-foreground)}.nbcontent .box.box4 .msg-container{position:absolute;top:0;left:1rem;background-color:var(--nb-background);padding:0 .5rem;transform:translateY(-50%);display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-danger-foreground);font-weight:bold}.nbcontent .box.box4 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-danger-foreground);background-color:var(--nb-danger-foreground);border-radius:50%}.nbcontent .box.box4 .icon::before,.nbcontent .box.box4 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box4 .icon::before{top:2px;height:2px}.nbcontent .box.box4 .icon::after{height:8px;bottom:2px}.nbcontent .box.box5{position:relative;border-radius:var(--nb-rounded-sm);padding:1.2rem 1rem;background-color:var(--nb-warning)}.dark .nbcontent .box.box5{color:var(--nb-background)}.nbcontent .box.box5 .msg-container{display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-warning-foreground);font-weight:bold;margin-bottom:.5rem}.nbcontent .box.box5 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-warning-foreground);background-color:var(--nb-warning-foreground);border-radius:50%}.nbcontent .box.box5 .icon::before,.nbcontent .box.box5 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box5 .icon::before{top:2px;height:2px}.nbcontent .box.box5 .icon::after{height:8px;bottom:2px}.nbcontent .box.box6{position:relative;border-radius:var(--nb-rounded-sm);padding:1.2rem 1rem;background-color:var(--nb-danger)}.dark .nbcontent .box.box6{color:var(--nb-background)}.nbcontent .box.box6 .msg-container{display:flex;flex-direction:row;align-items:center;gap:.3rem;color:var(--nb-danger-foreground);font-weight:bold;margin-bottom:.5rem}.nbcontent .box.box6 .icon{box-sizing:border-box;position:relative;width:20px;height:20px;border:2px solid var(--nb-danger-foreground);background-color:var(--nb-danger-foreground);border-radius:50%}.nbcontent .box.box6 .icon::before,.nbcontent .box.box6 .icon::after{content:"";position:absolute;border-radius:3px;width:2px;background:#fff;left:7px}.nbcontent .box.box6 .icon::before{top:2px;height:2px}.nbcontent .box.box6 .icon::after{height:8px;bottom:2px}.nbcontent .box.box7{background:var(--nb-info)}.dark .nbcontent .box.box7{color:var(--nb-background)}.nbcontent .box.box7 .box-title{font-size:1.2em;background:var(--nb-info-foreground);padding:.25rem;text-align:center;color:var(--nb-primary-foreground);font-weight:bold;letter-spacing:.05em}.nbcontent .box.box7>:not(.box-title){padding-right:1.25rem;padding-left:1.25rem}.nbcontent .box.box7>p{margin:0}.nbcontent .box.box7>p+p{margin-top:.4em}.nbcontent .box.box7>:first-child:not(.box-title),.nbcontent .box.box7>.box-title+*{padding-top:1.2rem}.nbcontent .box.box7>:last-child{padding-bottom:1.2rem}.nbcontent .heading{margin:1.5rem 0}.nbcontent .heading h1,.nbcontent .heading h2,.nbcontent .heading h3,.nbcontent .heading h4,.nbcontent .heading h5,.nbcontent .heading h6{margin:0;font-size:1em}.nbcontent .heading.heading1{display:inline-block;position:relative;padding-left:1.5rem;font-weight:bold}.nbcontent .heading.heading1::before{position:absolute;top:0;left:0;width:17px;height:28px;color:var(--nb-primary);background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%221.25em%22%20viewBox%3D%220%200%20448%20512%22%3E%3Cstyle%3Esvg%7Bfill%3A%235ab9ff%7D%3C%2Fstyle%3E%3Cpath%20d%3D%22M438.6%20105.4c12.5%2012.5%2012.5%2032.8%200%2045.3l-256%20256c-12.5%2012.5-32.8%2012.5-45.3%200l-128-128c-12.5-12.5-12.5-32.8%200-45.3s32.8-12.5%2045.3%200L160%20338.7%20393.4%20105.4c12.5-12.5%2032.8-12.5%2045.3%200z%22%2F%3E%3C%2Fsvg%3E);background-position:50%;background-repeat:no-repeat;content:""}.nbcontent .custom-image-caption{display:block;margin:-1rem auto 1.5rem;line-height:1.3;text-align:center;color:var(--nb-muted-foreground);font-size:.92em}.nbcontent .external-link{display:inline-flex;align-items:center;gap:.3em;color:var(--nb-link)}.nbcontent .external-link::after{content:"";display:inline-block;width:.75em;height:.75em;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E") no-repeat center/contain;background-color:var(--nb-link);vertical-align:-0.125em;position:relative;top:-0.05em}.nbcontent .external-link.external-link-no-icon::after{content:none}.nbcontent .custom-button{display:inline-flex;align-items:center;justify-content:center;gap:.45em;max-width:100%;margin:.35rem 0;border:1px solid var(--nb-primary);border-radius:var(--nb-rounded-sm);background-color:var(--nb-primary);color:var(--nb-primary-foreground);font-weight:600;line-height:1.4;text-align:center;text-decoration:none;overflow-wrap:anywhere;transition:opacity .2s}.nbcontent .custom-button:hover{opacity:.86;text-decoration:none}.nbcontent .custom-button.custom-button-sm{padding:.45rem .75rem;font-size:.88em}.nbcontent .custom-button.custom-button-md{padding:.6rem .95rem;font-size:.95em}.nbcontent .custom-button.custom-button-lg{padding:.75rem 1.15rem;font-size:1.05em}.nbcontent .custom-button.custom-button-secondary{border-color:var(--nb-secondary);background-color:var(--nb-secondary);color:var(--nb-secondary-foreground)}.nbcontent .custom-button.custom-button-amazon{border-color:var(--nb-amazon);background-color:var(--nb-amazon);color:var(--nb-amazon-foreground)}.nbcontent .custom-button.custom-button-rakuten{border-color:var(--nb-rakuten);background-color:var(--nb-rakuten);color:var(--nb-rakuten-foreground)}.nbcontent .custom-button.custom-button-kindle{border-color:var(--nb-kindle);background-color:var(--nb-kindle);color:var(--nb-kindle-foreground)}.nbcontent .custom-button.custom-button-yahoo{border-color:var(--nb-yahoo);background-color:var(--nb-yahoo);color:var(--nb-yahoo-foreground)}.nbcontent .custom-button.custom-button-outline{background-color:rgba(0,0,0,0);color:var(--nb-primary)}.nbcontent .custom-button.custom-button-secondary.custom-button-outline{color:var(--nb-secondary-foreground)}.nbcontent .custom-button.custom-button-amazon.custom-button-outline{color:var(--nb-amazon)}.nbcontent .custom-button.custom-button-rakuten.custom-button-outline{color:var(--nb-rakuten)}.nbcontent .custom-button.custom-button-kindle.custom-button-outline{color:var(--nb-kindle)}.nbcontent .custom-button.custom-button-yahoo.custom-button-outline{color:var(--nb-yahoo)}.nbcontent .custom-button.custom-button-ghost{border-color:rgba(0,0,0,0);background-color:rgba(0,0,0,0);color:var(--nb-primary)}.nbcontent .custom-button.custom-button-ghost:hover{opacity:1;text-decoration:underline}.nbcontent .custom-button.custom-button-ghost.custom-button-sm{padding:.2rem 0}.nbcontent .custom-button.custom-button-ghost.custom-button-md{padding:.25rem 0}.nbcontent .custom-button.custom-button-ghost.custom-button-lg{padding:.3rem 0}.nbcontent .custom-button.custom-button-secondary.custom-button-ghost{color:var(--nb-secondary-foreground)}.nbcontent .custom-button.custom-button-amazon.custom-button-ghost{color:var(--nb-amazon)}.nbcontent .custom-button.custom-button-rakuten.custom-button-ghost{color:var(--nb-rakuten)}.nbcontent .custom-button.custom-button-kindle.custom-button-ghost{color:var(--nb-kindle)}.nbcontent .custom-button.custom-button-yahoo.custom-button-ghost{color:var(--nb-yahoo)}.nbcontent .custom-button-icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:1em;height:1em;color:currentColor}.nbcontent .custom-button-icon::before{display:block;width:1em;height:1em;background-color:currentColor;content:"";mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'%3E%3C/path%3E%3Cpath d='M10 14 21 3'%3E%3C/path%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3C/svg%3E") no-repeat center/contain}.nbcontent .custom-button-icon-yahoo::before{mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='19' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'%3E%3C/path%3E%3C/svg%3E") no-repeat center/contain}.nbcontent .custom-button-icon-check::before{mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'%3E%3C/path%3E%3C/svg%3E") no-repeat center/contain}.nbcontent .custom-button-icon-amazon::before,.nbcontent .custom-button-icon-kindle::before{mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 4C8.8 4 6.8 5.6 6.6 8.2h3c.1-.9.9-1.5 2.2-1.5 1.4 0 2.1.7 2.1 1.9v.5h-2.4c-3.1 0-5.1 1.6-5.1 4 0 2.2 1.7 3.7 4.1 3.7 1.6 0 2.8-.6 3.6-1.7.1.5.2.9.4 1.3h3.1c-.4-.8-.6-1.8-.6-3V8.6C17 5.8 15.1 4 12 4Zm1.9 7.5v.7c0 1.4-1.2 2.4-2.8 2.4-1.1 0-1.8-.6-1.8-1.5 0-1 1-1.6 2.5-1.6h2.1Z'/%3E%3Cpath fill='black' d='M5.3 18.2c3.9 2.3 8.8 2.4 12.8.2.4-.2.8.3.4.7-3.4 3.2-9.5 3.1-13.5.2-.4-.4-.1-1.3.3-1.1Z'/%3E%3Cpath fill='black' d='M17.4 17.2c1.1-.2 2.5-.1 2.8.3.3.4-.2 1.8-.8 2.7-.2.4-.7.2-.6-.2.2-.5.4-1.2.2-1.4-.2-.2-.9-.2-1.5-.1-.4.1-.5-.5-.1-.6Z'/%3E%3C/svg%3E") no-repeat center/contain}.nbcontent .custom-button-icon-rakuten::before{mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h9.2c2.8 0 4.8 1.8 4.8 4.4 0 1.7-.9 3-2.3 3.7 1 .5 1.6 1.4 1.9 2.8l.4 1.9c.2.9.5 1.6 1 2.2h-4.1c-.3-.5-.5-1.1-.7-2l-.3-1.5c-.3-1.3-1-1.8-2.3-1.8H9v5.3H5V3Zm4 3.2v3.4h4.5c1 0 1.7-.7 1.7-1.7s-.7-1.7-1.7-1.7H9Z'/%3E%3Cpath fill='black' d='M6 21h12c.6 0 1-.4 1-1s-.4-1-1-1H6c-.6 0-1 .4-1 1s.4 1 1 1Z'/%3E%3C/svg%3E") no-repeat center/contain}.nbcontent .custom-button-text{min-width:0}.nbcontent .highlight{background:linear-gradient(transparent 60%, #fef08a 40%);padding:0 2px;border-radius:2px}.dark .nbcontent .highlight{background:linear-gradient(transparent 60%, #ca8a04 40%)}.nbcontent .highlight.highlight-red{background:linear-gradient(transparent 60%, #fecaca 40%)}.dark .nbcontent .highlight.highlight-red{background:linear-gradient(transparent 60%, #dc2626 40%)}.nbcontent .highlight.highlight-green{background:linear-gradient(transparent 60%, #bbf7d0 40%)}.dark .nbcontent .highlight.highlight-green{background:linear-gradient(transparent 60%, #16a34a 40%)}.nbcontent .highlight.highlight-blue{background:linear-gradient(transparent 60%, #bfdbfe 40%)}.dark .nbcontent .highlight.highlight-blue{background:linear-gradient(transparent 60%, #2563eb 40%)}
|
package/package.json
CHANGED