@readme/markdown 15.9.1 → 15.9.2
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/components/Accordion/style.scss +4 -1
- package/components/HTMLBlock/index.tsx +3 -2
- package/dist/main.css +1 -1
- package/dist/main.css.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.node.js +76 -9
- package/dist/main.node.js.map +1 -1
- package/dist/render-fixture.css +1 -1
- package/dist/render-fixture.css.map +1 -1
- package/dist/render-fixture.node.js +76 -9
- package/dist/render-fixture.node.js.map +1 -1
- package/package.json +1 -1
package/dist/render-fixture.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.Accordion{background:rgba(var(--color-bg-page-rgb, white), 1);border:1px solid var(--color-border-default, rgba(0, 0, 0, 0.1));border-radius:5px}.Accordion-title{align-items:center;background:rgba(var(--color-bg-page-rgb, white), 1);border:0;border-radius:5px;color:var(--color-text-default, #384248);cursor:pointer;
|
|
1
|
+
.Accordion{background:rgba(var(--color-bg-page-rgb, white), 1);border:1px solid var(--color-border-default, rgba(0, 0, 0, 0.1));border-radius:5px}.Accordion-title{align-items:center;background:rgba(var(--color-bg-page-rgb, white), 1);border:0;border-radius:5px;color:var(--color-text-default, #384248);cursor:pointer;font-size:16px;font-weight:500;padding:10px;position:relative;text-align:left;width:100%}.Accordion>.Accordion-title{display:flex}.Accordion-title:hover{background:var(--color-bg-hover, rgba(0, 0, 0, 0.05))}.Accordion[open] .Accordion-title{border-bottom-left-radius:0;border-bottom-right-radius:0}.Accordion-title::marker{content:""}.Accordion-title::-webkit-details-marker{display:none}.Accordion-toggleIcon,.Accordion-toggleIcon_opened{color:var(--color-text-minimum, #637288);font-size:14px;margin-left:5px;margin-right:10px;transition:transform .1s}.Accordion-toggleIcon_opened,.Accordion-toggleIcon_opened_opened{transform:rotate(90deg)}.Accordion-icon{color:var(--project-color-primary, inherit);margin-right:10px}.Accordion-content{color:var(--color-text-muted, #4f5a66);padding:5px 15px 0 15px}.Accordion-content>*{margin-bottom:var(--markdown-spacing, 15px)}
|
|
2
2
|
.CardsGrid{--CardsGrid-gap: 1.5em;--CardsGrid-columns: auto-fit;--CardsGrid-cardWidth: auto;display:grid;gap:var(--CardsGrid-gap);grid-template-columns:repeat(var(--CardsGrid-columns), minmax(var(--CardsGrid-cardWidth), 1fr))}.Card{--Card-badge-bg-color: var(--yellow);--Card-badge-color: var(--yellow10);--Card-content-color: var(--color-text-minimum);--Card-gap: 0.25em;--Card-href-arrow-opacity: 0;--Card-href-arrow-transform: translateX(-5px);--Card-icon-color: var(--color-text-default);--Card-icon-opacity: 0.65;--Card-icon-opacity-hover: 0.75;--Card-line-height: 1.4;--Card-shadow: none;--Card-title-color: var(--color-text-default);background:var(--Card-bg-color);border:1px solid var(--Card-border-color);border-radius:var(--border-radius-lg);box-shadow:var(--Card-shadow);display:flex;flex-direction:var(--Card-layout);gap:var(--Card-gap);line-height:var(--Card-line-height);padding:var(--Card-padding);text-decoration:none}.Card_card{--Card-bg-color: rgba(var(--color-bg-page-inverse-rgb), 0);--Card-bg-color-hover: rgba(var(--color-bg-page-inverse-rgb), 0);--Card-border-color: var(--color-border-default);--Card-layout: column;--Card-padding: 1.5em}.rm-ReadMe[data-color-mode=dark] .Card_card{--Card-bg-color: rgba(var(--color-bg-page-inverse-rgb), 0.05);--Card-bg-color-hover: rgba(var(--color-bg-page-inverse-rgb), 0.1)}@media(prefers-color-scheme: dark){.rm-ReadMe[data-color-mode=system] .Card_card{--Card-bg-color: rgba(var(--color-bg-page-inverse-rgb), 0.05);--Card-bg-color-hover: rgba(var(--color-bg-page-inverse-rgb), 0.1)}}.Card_tile{--Card-gap: 1em;--Card-icon-opacity: 0.5;--Card-layout: row}.Card_tile .Card-content{--Card-gap: 0}.Card[href]:not([href=""]){color:inherit;text-decoration:none}.Card[href]:not([href=""]):hover,.Card[href]:not([href=""]):active,.Card[href]:not([href=""]):focus{--Card-icon-opacity: var(--Card-icon-opacity-hover);--Card-href-arrow-opacity: 0.75;--Card-href-arrow-transform: none;background:var(--Card-bg-color-hover)}.Card-icon{color:var(--Card-icon-color);font-size:1.4em;margin-bottom:.5em;opacity:var(--Card-icon-opacity);transition:opacity var(--transition-timing) var(--transition-fast)}.Card-title{align-items:flex-start;color:var(--Card-title-color);display:flex;gap:.5em;font-weight:var(--font-weight-bold)}.Card-badge{align-items:center;background:var(--Card-badge-bg-color);border-radius:1em;color:var(--Card-badge-color);font-size:.6em;padding:0 .5em;display:inline-flex;position:relative;top:.5em}.Card-arrow{font-size:.8em;opacity:var(--Card-href-arrow-opacity);position:relative;top:.375em;transition:opacity var(--transition-timing) var(--transition-fast),transform var(--transition-timing) var(--transition-fast);transform:var(--Card-href-arrow-transform)}.Card-content{color:var(--Card-content-color);display:flex;flex-direction:column;font-size:1em;gap:var(--Card-gap)}.Card-content p:last-child{margin-bottom:0}
|
|
3
3
|
.Columns{display:grid;gap:var(--md, 20px)}@media(max-width: 414px){.Columns{grid-template-columns:1fr !important}}
|
|
4
4
|
.TabGroup-nav{border-bottom:solid var(--color-border-default, rgba(0, 0, 0, 0.1));margin-bottom:15px}.TabGroup-tab{background:none;border:0;color:var(--color-text-minimum, #637288);cursor:pointer;font-size:15px;font-weight:600;margin-right:15px;padding:0;padding-bottom:10px}.TabGroup-tab_active{background:none;border:0;border-bottom:solid var(--color-tab-active, currentcolor);color:var(--color-tab-active, currentcolor);font-size:15px;font-weight:600;margin-right:15px;margin-bottom:-2px;padding:0;padding-bottom:10px}.TabGroup-tab:hover{color:var(--color-text-muted, #4f5a66)}.TabGroup-icon{color:var(--project-color-primary, inherit);margin-right:10px}.TabGroup .TabContent{color:var(--color-text-muted, #4f5a66)}:where(.TabGroup .TabContent>*:not(:last-child)){margin-bottom:var(--markdown-spacing, 15px)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-fixture.css","mappings":"AAAA,WACE,oDACA,iEACA,kBAEA,iBACE,mBACA,oDACA,SACA,kBACA,yCACA,eACA,
|
|
1
|
+
{"version":3,"file":"render-fixture.css","mappings":"AAAA,WACE,oDACA,iEACA,kBAEA,iBACE,mBACA,oDACA,SACA,kBACA,yCACA,eACA,eACA,gBACA,aACA,kBACA,gBACA,WAEA,4BACE,aAGF,uBACE,sDAGF,kCACE,4BACA,6BAGF,yBACE,WAGF,yCACE,aAIJ,mDAEE,yCACA,eACA,gBACA,kBACA,yBAEA,iEACE,wBAIJ,gBACE,4CACA,kBAGF,mBACE,uCACA,wBAEA,qBACE,4C;AC5DN,WACE,uBACA,8BACA,4BAEA,aACA,yBACA,gGAGF,MAGE,qCACA,oCACA,gDACA,mBACA,6BACA,8CACA,6CACA,0BACA,gCACA,wBACA,oBACA,8CAEA,gCACA,0CACA,sCACA,8BACA,aACA,kCACA,oBACA,oCACA,4BACA,qBAEA,WACE,2DACA,iEACA,iDACA,sBACA,sBCTA,4CDYE,8DACA,mECRA,mCADF,8CDQE,8DACA,oEAIJ,WACE,gBACA,yBACA,mBAEA,yBACE,cAKJ,2BACE,cACA,qBAEA,oGAGE,oDACA,gCACA,kCAEA,sCAIJ,WACE,6BACA,gBACA,mBACA,iCACA,mEAGF,YACE,uBACA,8BACA,aACA,SACA,oCAGF,YACE,mBACA,sCACA,kBACA,8BACA,eACA,eACA,oBACA,kBACA,SAGF,YACE,eACA,uCACA,kBACA,WACA,4HACE,CAEF,2CAGF,cACE,gCACA,aACA,sBACA,cACA,oBAEA,2BACE,gB;AE7HN,SACE,aACA,oBAEA,yBAJF,SAKI,sC;ACNF,cACE,oEACA,mBAGF,cACE,gBACA,SACA,yCACA,eACA,eACA,gBACA,kBACA,UACA,oBAEA,qBACE,gBACA,SACA,0DACA,4CACA,eACA,gBACA,kBACA,mBACA,UACA,oBAGF,oBACE,uCAIJ,eACE,4CACA,kBAGF,sBACE,uCAIJ,iDACE,4C","sources":["webpack://@readme/markdown/./components/Accordion/style.scss","webpack://@readme/markdown/./components/Cards/style.scss","webpack://@readme/markdown/./styles/mixins/when-color-mode-dark.scss","webpack://@readme/markdown/./components/Columns/style.scss","webpack://@readme/markdown/./components/Tabs/style.scss"],"sourcesContent":[".Accordion {\n background: rgba(var(--color-bg-page-rgb, white), 1);\n border: 1px solid var(--color-border-default, rgba(black, 0.1));\n border-radius: 5px;\n\n &-title {\n align-items: center;\n background: rgba(var(--color-bg-page-rgb, white), 1);\n border: 0;\n border-radius: 5px;\n color: var(--color-text-default, #384248);\n cursor: pointer;\n font-size: 16px;\n font-weight: 500;\n padding: 10px;\n position: relative;\n text-align: left;\n width: 100%;\n \n .Accordion > & {\n display: flex;\n }\n\n &:hover {\n background: var(--color-bg-hover, rgba(black, 0.05));\n }\n\n .Accordion[open] & {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &::marker {\n content: \"\";\n }\n\n &::-webkit-details-marker {\n display: none;\n } \n }\n\n &-toggleIcon,\n &-toggleIcon_opened {\n color: var(--color-text-minimum, #637288);\n font-size: 14px;\n margin-left: 5px;\n margin-right: 10px;\n transition: transform 0.1s;\n\n &_opened {\n transform: rotate(90deg);\n }\n }\n\n &-icon {\n color: var(--project-color-primary, inherit);\n margin-right: 10px;\n }\n\n &-content {\n color: var(--color-text-muted, #4f5a66);\n padding: 5px 15px 0 15px;\n\n > * {\n margin-bottom: var(--markdown-spacing, 15px);\n }\n }\n}\n","@import '../../styles/mixins/when-color-mode-dark.scss';\n\n$iphone-plus: 414px;\n\n.CardsGrid {\n --CardsGrid-gap: 1.5em;\n --CardsGrid-columns: auto-fit;\n --CardsGrid-cardWidth: auto;\n\n display: grid;\n gap: var(--CardsGrid-gap);\n grid-template-columns: repeat(var(--CardsGrid-columns), minmax(var(--CardsGrid-cardWidth), 1fr));\n}\n\n.Card {\n $card: &;\n\n --Card-badge-bg-color: var(--yellow);\n --Card-badge-color: var(--yellow10);\n --Card-content-color: var(--color-text-minimum);\n --Card-gap: 0.25em;\n --Card-href-arrow-opacity: 0;\n --Card-href-arrow-transform: translateX(-5px);\n --Card-icon-color: var(--color-text-default);\n --Card-icon-opacity: 0.65;\n --Card-icon-opacity-hover: 0.75;\n --Card-line-height: 1.4;\n --Card-shadow: none;\n --Card-title-color: var(--color-text-default);\n\n background: var(--Card-bg-color);\n border: 1px solid var(--Card-border-color);\n border-radius: var(--border-radius-lg);\n box-shadow: var(--Card-shadow);\n display: flex;\n flex-direction: var(--Card-layout);\n gap: var(--Card-gap);\n line-height: var(--Card-line-height);\n padding: var(--Card-padding);\n text-decoration: none;\n\n &_card {\n --Card-bg-color: rgba(var(--color-bg-page-inverse-rgb), 0);\n --Card-bg-color-hover: rgba(var(--color-bg-page-inverse-rgb), 0);\n --Card-border-color: var(--color-border-default);\n --Card-layout: column;\n --Card-padding: 1.5em;\n\n @include when-color-mode-dark('.rm-ReadMe') {\n --Card-bg-color: rgba(var(--color-bg-page-inverse-rgb), 0.05);\n --Card-bg-color-hover: rgba(var(--color-bg-page-inverse-rgb), 0.1);\n }\n }\n\n &_tile {\n --Card-gap: 1em;\n --Card-icon-opacity: 0.5;\n --Card-layout: row;\n\n #{$card}-content {\n --Card-gap: 0;\n }\n }\n\n // needs specificity to override the default link styles; while preserving logic for empty hrefs\n &[href]:not([href='']) {\n color: inherit;\n text-decoration: none;\n\n &:hover,\n &:active,\n &:focus {\n --Card-icon-opacity: var(--Card-icon-opacity-hover);\n --Card-href-arrow-opacity: 0.75;\n --Card-href-arrow-transform: none;\n\n background: var(--Card-bg-color-hover);\n }\n }\n\n &-icon {\n color: var(--Card-icon-color);\n font-size: 1.4em;\n margin-bottom: 0.5em;\n opacity: var(--Card-icon-opacity);\n transition: opacity var(--transition-timing) var(--transition-fast);\n }\n\n &-title {\n align-items: flex-start;\n color: var(--Card-title-color);\n display: flex;\n gap: 0.5em;\n font-weight: var(--font-weight-bold);\n }\n\n &-badge {\n align-items: center;\n background: var(--Card-badge-bg-color);\n border-radius: 1em;\n color: var(--Card-badge-color);\n font-size: 0.6em;\n padding: 0 0.5em;\n display: inline-flex;\n position: relative;\n top: 0.5em;\n }\n\n &-arrow {\n font-size: 0.8em;\n opacity: var(--Card-href-arrow-opacity);\n position: relative;\n top: 0.375em;\n transition:\n opacity var(--transition-timing) var(--transition-fast),\n transform var(--transition-timing) var(--transition-fast);\n transform: var(--Card-href-arrow-transform);\n }\n\n &-content {\n color: var(--Card-content-color);\n display: flex;\n flex-direction: column;\n font-size: 1em;\n gap: var(--Card-gap);\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n}\n","/**\n * Dark styles keyed off `$root`'s own `data-color-mode`, not any ancestor.\n * Unlike `dark-mode` (which matches ANY ancestor carrying the attribute —\n * see the warning on that mixin), this only fires when `$root` itself\n * declares the dark/system mode. None of this package's components carry\n * `data-color-mode` on their own root, so callers must pass the selector\n * for whichever wrapper actually carries it in their consuming app — there\n * is no default.\n *\n * IMPORTANT: this package ships one precompiled `dist/main.css` — there is\n * no build step where a consumer can supply their own value for `$root`.\n * Whatever gets passed at each `@include` call site below is permanent for\n * every installer of this package. Call sites currently hardcode\n * `'.rm-ReadMe'`, readme's hub color-mode wrapper, because readme is this\n * package's only real consumer today. If that ever changes, this becomes\n * silently wrong (not an error — dark mode just never activates) for any\n * consumer without that exact class in their DOM, and `$root` should be\n * dropped in favor of each component resolving its own nearest\n * `[data-color-mode]` ancestor at mount via `Element.closest()` and\n * stamping it onto its own root, so the CSS can self-anchor with no\n * hardcoded selector at all.\n *\n * $global: wrap the root-anchor selector in :global(), for use when this\n * file is imported into a CSS-module context (mirrors `dark-mode`'s param).\n */\n@mixin when-color-mode-dark($root, $global: false) {\n @if $global {\n :global(#{$root}[data-color-mode='dark']) & {\n @content;\n }\n\n :global(#{$root}[data-color-mode='system']) & {\n @media (prefers-color-scheme: dark) {\n @content;\n }\n }\n } @else {\n #{$root}[data-color-mode='dark'] & {\n @content;\n }\n\n #{$root}[data-color-mode='system'] & {\n @media (prefers-color-scheme: dark) {\n @content;\n }\n }\n }\n}\n","$iphone-plus: 414px;\n\n.Columns {\n display: grid;\n gap: var(--md, 20px);\n\n @media (max-width: $iphone-plus) {\n grid-template-columns: 1fr !important;\n }\n}\n",".TabGroup {\n &-nav {\n border-bottom: solid var(--color-border-default, #{rgba(black, 0.1)});\n margin-bottom: 15px;\n }\n\n &-tab {\n background: none;\n border: 0;\n color: var(--color-text-minimum, #637288);\n cursor: pointer;\n font-size: 15px;\n font-weight: 600;\n margin-right: 15px;\n padding: 0;\n padding-bottom: 10px;\n\n &_active {\n background: none;\n border: 0;\n border-bottom: solid var(--color-tab-active, currentcolor);\n color: var(--color-tab-active, currentcolor);\n font-size: 15px;\n font-weight: 600;\n margin-right: 15px;\n margin-bottom: -2px;\n padding: 0;\n padding-bottom: 10px;\n }\n\n &:hover {\n color: var(--color-text-muted, #4f5a66);\n }\n }\n\n &-icon {\n color: var(--project-color-primary, inherit);\n margin-right: 10px;\n }\n\n .TabContent {\n color: var(--color-text-muted, #4f5a66);\n }\n}\n\n:where(.TabGroup .TabContent > *:not(:last-child)) {\n margin-bottom: var(--markdown-spacing, 15px);\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -16243,6 +16243,15 @@ function cloneSort(comparator) {
|
|
|
16243
16243
|
return templateFn(comparator);
|
|
16244
16244
|
}
|
|
16245
16245
|
|
|
16246
|
+
let isEvalAllowed = (function () {
|
|
16247
|
+
try {
|
|
16248
|
+
new Function('return 0')();
|
|
16249
|
+
return true;
|
|
16250
|
+
} catch {
|
|
16251
|
+
return false;
|
|
16252
|
+
}
|
|
16253
|
+
})();
|
|
16254
|
+
|
|
16246
16255
|
/**
|
|
16247
16256
|
* Sort the given array in-place with the given comparator function.
|
|
16248
16257
|
*
|
|
@@ -16254,7 +16263,7 @@ function cloneSort(comparator) {
|
|
|
16254
16263
|
|
|
16255
16264
|
let sortCache = new WeakMap();
|
|
16256
16265
|
exports.g = function (ary, comparator, start = 0) {
|
|
16257
|
-
let doQuickSort = sortCache.get(comparator);
|
|
16266
|
+
let doQuickSort = isEvalAllowed ? sortCache.get(comparator) : SortTemplate(comparator);
|
|
16258
16267
|
if (doQuickSort === void 0) {
|
|
16259
16268
|
doQuickSort = cloneSort(comparator);
|
|
16260
16269
|
sortCache.set(comparator, doQuickSort);
|
|
@@ -16282,6 +16291,14 @@ var ArraySet = (__webpack_require__(4361)/* .ArraySet */ .C);
|
|
|
16282
16291
|
var base64VLQ = __webpack_require__(582);
|
|
16283
16292
|
var quickSort = (__webpack_require__(4951)/* .quickSort */ .g);
|
|
16284
16293
|
|
|
16294
|
+
// Upper bound for a section's `offset.line` in an indexed source map. A flat
|
|
16295
|
+
// map spends one ';' per generated line, so a tiny indexed map with a huge
|
|
16296
|
+
// offset.line turns into a huge amount of work and memory once its mappings
|
|
16297
|
+
// are copied into a SourceMapGenerator (CVE-2026-93749). Ten million lines is
|
|
16298
|
+
// far beyond any real generated file. Columns are VLQ-encoded as deltas and
|
|
16299
|
+
// don't amplify, so they only need to be valid integers.
|
|
16300
|
+
var MAX_SECTION_OFFSET_LINE = 1e7;
|
|
16301
|
+
|
|
16285
16302
|
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
16286
16303
|
var sourceMap = aSourceMap;
|
|
16287
16304
|
if (typeof aSourceMap === 'string') {
|
|
@@ -17206,6 +17223,7 @@ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
|
17206
17223
|
line: -1,
|
|
17207
17224
|
column: 0
|
|
17208
17225
|
};
|
|
17226
|
+
var maxOffsetLine = 0;
|
|
17209
17227
|
this._sections = sections.map(function (s) {
|
|
17210
17228
|
if (s.url) {
|
|
17211
17229
|
// The url field will require support for asynchronicity.
|
|
@@ -17216,12 +17234,32 @@ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
|
17216
17234
|
var offsetLine = util.getArg(offset, 'line');
|
|
17217
17235
|
var offsetColumn = util.getArg(offset, 'column');
|
|
17218
17236
|
|
|
17237
|
+
if (!isValidOffset(offsetLine) || !isValidOffset(offsetColumn)) {
|
|
17238
|
+
throw new Error('Section offset line and column must be non-negative integers.');
|
|
17239
|
+
}
|
|
17240
|
+
if (offsetLine > MAX_SECTION_OFFSET_LINE) {
|
|
17241
|
+
throw new Error('Section offset line must not exceed ' + MAX_SECTION_OFFSET_LINE + '.');
|
|
17242
|
+
}
|
|
17243
|
+
|
|
17219
17244
|
if (offsetLine < lastOffset.line ||
|
|
17220
17245
|
(offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
|
|
17221
17246
|
throw new Error('Section offsets must be ordered and non-overlapping.');
|
|
17222
17247
|
}
|
|
17223
17248
|
lastOffset = offset;
|
|
17224
17249
|
|
|
17250
|
+
var consumer = new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL);
|
|
17251
|
+
|
|
17252
|
+
// Offsets of a nested indexed map add up with this one, so apply the
|
|
17253
|
+
// bound to the total.
|
|
17254
|
+
var totalOffsetLine = offsetLine + (consumer._maxOffsetLine || 0);
|
|
17255
|
+
if (totalOffsetLine > MAX_SECTION_OFFSET_LINE) {
|
|
17256
|
+
throw new Error('Section offset line must not exceed ' + MAX_SECTION_OFFSET_LINE +
|
|
17257
|
+
', including offsets of nested sections.');
|
|
17258
|
+
}
|
|
17259
|
+
if (totalOffsetLine > maxOffsetLine) {
|
|
17260
|
+
maxOffsetLine = totalOffsetLine;
|
|
17261
|
+
}
|
|
17262
|
+
|
|
17225
17263
|
return {
|
|
17226
17264
|
generatedOffset: {
|
|
17227
17265
|
// The offset fields are 0-based, but we use 1-based indices when
|
|
@@ -17229,9 +17267,24 @@ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
|
17229
17267
|
generatedLine: offsetLine + 1,
|
|
17230
17268
|
generatedColumn: offsetColumn + 1
|
|
17231
17269
|
},
|
|
17232
|
-
consumer:
|
|
17270
|
+
consumer: consumer
|
|
17233
17271
|
}
|
|
17234
17272
|
});
|
|
17273
|
+
|
|
17274
|
+
// The largest offset.line of any section, including nested sections.
|
|
17275
|
+
this._maxOffsetLine = maxOffsetLine;
|
|
17276
|
+
}
|
|
17277
|
+
|
|
17278
|
+
/**
|
|
17279
|
+
* Section offsets come from untrusted input and are used as line/column
|
|
17280
|
+
* numbers, so only accept non-negative safe integers (rejects NaN, Infinity,
|
|
17281
|
+
* strings, fractions, etc).
|
|
17282
|
+
*/
|
|
17283
|
+
function isValidOffset(aValue) {
|
|
17284
|
+
return typeof aValue === 'number' &&
|
|
17285
|
+
aValue >= 0 &&
|
|
17286
|
+
aValue <= 9007199254740991 && // Number.MAX_SAFE_INTEGER
|
|
17287
|
+
Math.floor(aValue) === aValue;
|
|
17235
17288
|
}
|
|
17236
17289
|
|
|
17237
17290
|
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
@@ -17249,8 +17302,12 @@ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
|
|
|
17249
17302
|
get: function () {
|
|
17250
17303
|
var sources = [];
|
|
17251
17304
|
for (var i = 0; i < this._sections.length; i++) {
|
|
17252
|
-
|
|
17253
|
-
|
|
17305
|
+
// Read the getter once per section: for a nested indexed map it is
|
|
17306
|
+
// itself this getter, and re-reading it per item is exponential in the
|
|
17307
|
+
// nesting depth (CVE-2026-93749).
|
|
17308
|
+
var sectionSources = this._sections[i].consumer.sources;
|
|
17309
|
+
for (var j = 0; j < sectionSources.length; j++) {
|
|
17310
|
+
sources.push(sectionSources[j]);
|
|
17254
17311
|
}
|
|
17255
17312
|
}
|
|
17256
17313
|
return sources;
|
|
@@ -17814,10 +17871,12 @@ SourceMapGenerator.prototype._serializeMappings =
|
|
|
17814
17871
|
|
|
17815
17872
|
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
17816
17873
|
previousGeneratedColumn = 0;
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17874
|
+
// One ';' per skipped line. Build large gaps with a single flat
|
|
17875
|
+
// string: appending ';' one by one creates a rope node per line, which
|
|
17876
|
+
// can exhaust the heap for a big gap (CVE-2026-93749).
|
|
17877
|
+
var lineDelta = mapping.generatedLine - previousGeneratedLine;
|
|
17878
|
+
next += lineDelta === 1 ? ';' : ';'.repeat(lineDelta);
|
|
17879
|
+
previousGeneratedLine = mapping.generatedLine;
|
|
17821
17880
|
}
|
|
17822
17881
|
else {
|
|
17823
17882
|
if (i > 0) {
|
|
@@ -18031,6 +18090,13 @@ SourceNode.fromStringWithSourceMap =
|
|
|
18031
18090
|
// to the SourceNode without any mapping.
|
|
18032
18091
|
// Each line is added as separate string.
|
|
18033
18092
|
while (lastGeneratedLine < mapping.generatedLine) {
|
|
18093
|
+
if (remainingLinesIndex >= remainingLines.length) {
|
|
18094
|
+
// The generated code is exhausted. Skip the rest instead of adding
|
|
18095
|
+
// empty lines one by one: a mapping may point far past the end of
|
|
18096
|
+
// the code (e.g. an indexed map section with a huge offset.line).
|
|
18097
|
+
lastGeneratedLine = mapping.generatedLine;
|
|
18098
|
+
break;
|
|
18099
|
+
}
|
|
18034
18100
|
node.add(shiftNextLine());
|
|
18035
18101
|
lastGeneratedLine++;
|
|
18036
18102
|
}
|
|
@@ -92257,7 +92323,8 @@ const HTMLBlock = ({ children = '', html: htmlProp, runScripts, safeMode: safeMo
|
|
|
92257
92323
|
// In MDX mode, safeMode is passed in as a boolean from JSX parsing
|
|
92258
92324
|
// In MDXish mode, safeMode comes in as a string from HAST props
|
|
92259
92325
|
const safeMode = typeof safeModeRaw !== 'boolean' ? safeModeRaw === 'true' : safeModeRaw;
|
|
92260
|
-
|
|
92326
|
+
// Memoised so `exec` is stable across rerenders and the effect below only runs when the html changes.
|
|
92327
|
+
const [cleanedHtml, exec] = (0,external_react_.useMemo)(() => extractScripts(html), [html]);
|
|
92261
92328
|
(0,external_react_.useEffect)(() => {
|
|
92262
92329
|
if (typeof window !== 'undefined' && typeof runScripts === 'boolean' && runScripts)
|
|
92263
92330
|
exec();
|