plggmatic 0.5.9 → 0.5.11
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/Appearance/usecase/appearanceCss.d.ts.map +1 -1
- package/dist/Component/usecase/brandMark.d.ts +11 -0
- package/dist/Component/usecase/brandMark.d.ts.map +1 -0
- package/dist/Component/usecase/headingAnchor.d.ts +9 -9
- package/dist/Component/usecase/headingAnchor.d.ts.map +1 -1
- package/dist/Component/usecase/sidebarNav.d.ts.map +1 -1
- package/dist/Meta/model/classHooks.d.ts +6 -0
- package/dist/Meta/model/classHooks.d.ts.map +1 -1
- package/dist/Navigate/index.d.ts +1 -0
- package/dist/Navigate/index.d.ts.map +1 -1
- package/dist/Navigate/usecase/codeCopyScript.d.ts +19 -0
- package/dist/Navigate/usecase/codeCopyScript.d.ts.map +1 -0
- package/dist/Shell/usecase/docChrome.d.ts +34 -0
- package/dist/Shell/usecase/docChrome.d.ts.map +1 -0
- package/dist/Shell/usecase/kit.d.ts.map +1 -1
- package/dist/Style/model/syntax.d.ts +1 -1
- package/dist/Style/model/syntax.d.ts.map +1 -1
- package/dist/Style/model/typesetting.d.ts +3 -3
- package/dist/Style/model/typesetting.d.ts.map +1 -1
- package/dist/Style/usecase/shareCss.d.ts +3 -3
- package/dist/System/usecase/systemCss.d.ts.map +1 -1
- package/dist/columnsEntry.es.js +8 -6
- package/dist/hooksEntry.es.js +8 -6
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +644 -108
- package/dist/styleEntry.d.ts +2 -0
- package/dist/styleEntry.d.ts.map +1 -1
- package/dist/styleEntry.es.js +503 -41
- package/package.json +1 -1
package/dist/styleEntry.es.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.colorHex = exports.schemes = exports.variants = exports.semanticRoles = exports.neutrals = exports.colors = exports.defaultTheme = exports.selector = exports.openedAttr = exports.replacingAttr = exports.leavingAttr = exports.trailClass = exports.foldClass = exports.colClass = exports.sidebarNavRevealScript = exports.sidebarNavCss = exports.sidebarNavClass = exports.sidebarNav = exports.heroCss = exports.heroInstallClass = exports.heroActionPrimaryClass = exports.heroActionClass = exports.heroActionsClass = exports.heroTextClass = exports.heroTaglineClass = exports.heroNameClass = exports.heroClass = exports.hero = exports.docPagerCss = exports.docPagerTitleClass = exports.docPagerDirClass = exports.docPagerLinkClass = exports.docPagerClass = exports.docPager = exports.headingAnchorAppearanceCss = exports.headingAnchorSystemCss = exports.headingAnchorClass = exports.headingAnchor = exports.languageMenuCss = exports.languageOptionClass = exports.languageListClass = exports.languageToggleClass = exports.languageMenuClass = exports.languageMenu = exports.themeToggleCss = exports.moonClass = exports.sunClass = exports.themeToggleClass = exports.staticThemeToggle = exports.themeToggle = void 0;
|
|
28
28
|
exports.componentSlots = exports.runwayCss = exports.chromeCss = exports.schemeCssOf = exports.schemeCss = exports.syntaxVar = exports.syntaxHex = exports.syntaxPalette = exports.syntaxKinds = exports.measure = exports.typeStyle = exports.zIndex = exports.lineHeight = exports.weight = exports.fluid = exports.basis = exports.outline = exports.borderColor = exports.border = exports.textColor = exports.color = exports.bg = exports.zValue = exports.zBands = exports.metricVar = exports.metricValue = exports.metrics = exports.maxWidth = exports.minWidth = exports.breakpointPx = exports.breakpoints = exports.sansFontStack = exports.typeScale = exports.semibold = exports.medium = exports.regular = exports.fontWeights = exports.typeRoles = exports.applyScheme = exports.injectAppearanceScript = exports.appearanceInitScript = exports.decideScheme = exports.appearanceStorageKey = exports.contrastRatio = exports.hex = exports.paletteHex = exports.asPalette = exports.defaultPalette = exports.asHexColor = exports.colorVar = void 0;
|
|
29
|
-
exports.carouselInitScript = exports.carouselNextClass = exports.carouselPrevClass = exports.carouselCss = exports.shareInsetVar = exports.spanTwoClass = exports.shareClass = exports.shareCss = exports.shareOptions = exports.navSubgroupTitleClass = exports.navSubgroupClass = exports.navFlatClass = exports.navLinkClass = exports.navGroupTitleClass = exports.navGroupClass = exports.navNumberedClass = exports.navClass = exports.widthAttr = exports.programmaticScrollAttr = exports.phoneAttr = exports.menuCompactAttr = exports.menuOpenAttr = exports.seamClass = exports.menuClass = exports.browserClass = exports.pinnedClass = exports.workspaceClass = exports.workspaceCss = exports.workspaceOptions = exports.pragmaticThemeWithPalette = exports.pragmaticTheme = exports.syntaxCss = exports.reducedMotionCss = exports.metricCss = exports.slotCss = exports.slotStyleCss = exports.asSlotStyle = exports.slotStyle = exports.slotSelector = void 0;
|
|
29
|
+
exports.docChromeClass = exports.docChromeInitScript = exports.docChromeCss = exports.codeCopyInitScript = exports.carouselInitScript = exports.carouselNextClass = exports.carouselPrevClass = exports.carouselCss = exports.shareInsetVar = exports.spanTwoClass = exports.shareClass = exports.shareCss = exports.shareOptions = exports.navSubgroupTitleClass = exports.navSubgroupClass = exports.navFlatClass = exports.navLinkClass = exports.navGroupTitleClass = exports.navGroupClass = exports.navNumberedClass = exports.navClass = exports.widthAttr = exports.programmaticScrollAttr = exports.phoneAttr = exports.menuCompactAttr = exports.menuOpenAttr = exports.seamClass = exports.menuClass = exports.browserClass = exports.pinnedClass = exports.workspaceClass = exports.workspaceCss = exports.workspaceOptions = exports.pragmaticThemeWithPalette = exports.pragmaticTheme = exports.syntaxCss = exports.reducedMotionCss = exports.metricCss = exports.slotCss = exports.slotStyleCss = exports.asSlotStyle = exports.slotStyle = exports.slotSelector = void 0;
|
|
30
30
|
__exportStar(require("plgg-view/style"), exports);
|
|
31
31
|
var themeToggle_1 = require("src/Component/usecase/themeToggle.ts");
|
|
32
32
|
Object.defineProperty(exports, "themeToggle", { enumerable: true, get: function () { return themeToggle_1.themeToggle; } });
|
|
@@ -183,6 +183,12 @@ Object.defineProperty(exports, "carouselPrevClass", { enumerable: true, get: fun
|
|
|
183
183
|
Object.defineProperty(exports, "carouselNextClass", { enumerable: true, get: function () { return classHooks_4.carouselNextClass; } });
|
|
184
184
|
var carouselScript_1 = require("src/Navigate/usecase/carouselScript.ts");
|
|
185
185
|
Object.defineProperty(exports, "carouselInitScript", { enumerable: true, get: function () { return carouselScript_1.carouselInitScript; } });
|
|
186
|
+
var codeCopyScript_1 = require("src/Navigate/usecase/codeCopyScript.ts");
|
|
187
|
+
Object.defineProperty(exports, "codeCopyInitScript", { enumerable: true, get: function () { return codeCopyScript_1.codeCopyInitScript; } });
|
|
188
|
+
var docChrome_1 = require("src/Shell/usecase/docChrome.ts");
|
|
189
|
+
Object.defineProperty(exports, "docChromeCss", { enumerable: true, get: function () { return docChrome_1.docChromeCss; } });
|
|
190
|
+
Object.defineProperty(exports, "docChromeInitScript", { enumerable: true, get: function () { return docChrome_1.docChromeInitScript; } });
|
|
191
|
+
Object.defineProperty(exports, "docChromeClass", { enumerable: true, get: function () { return docChrome_1.docChromeClass; } });
|
|
186
192
|
|
|
187
193
|
},
|
|
188
194
|
"src/Component/usecase/themeToggle.ts": function (module, exports, require) {
|
|
@@ -261,12 +267,12 @@ exports.themeToggleCss = `.${classHooks_1.themeToggleClass}{display:inline-flex;
|
|
|
261
267
|
"src/Meta/model/classHooks.ts": function (module, exports, require) {
|
|
262
268
|
"use strict";
|
|
263
269
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
264
|
-
exports.
|
|
265
|
-
exports.
|
|
266
|
-
exports.
|
|
267
|
-
exports.
|
|
268
|
-
exports.
|
|
269
|
-
exports.iconButtonRoundClass = exports.siteDrawerNoteClass = exports.siteBarNoteClass = exports.siteBarHomeClass = void 0;
|
|
270
|
+
exports.calloutClass = exports.shellOpenAttr = exports.shellBackdropClass = exports.shellMenuId = exports.shellMenuClass = exports.shellMenuButtonClass = exports.shellBarBrandClass = exports.shellBarClass = exports.shellMinAttr = exports.shellNoteClass = exports.docFootClass = exports.shellSideLinkClass = exports.shellCaptionClass = exports.chromeLinkMarkClass = exports.chromeLinkLabelClass = exports.chromeLinkClass = exports.chromeLinksClass = exports.shellRailGroupClass = exports.shellRailClass = exports.figureBodyClass = exports.figurePageClass = exports.codeCopyClass = exports.docClass = exports.shellPageClass = exports.shellFootClass = exports.shellFoldClass = exports.shellBrandHomeClass = exports.shellBrandFullClass = exports.shellBrandClass = exports.shellBodyClass = exports.shellTitleClass = exports.shellHeadClass = exports.shellSideClass = exports.shellClass = exports.switchLabelClass = exports.switchThumbClass = exports.switchTrackClass = exports.switchClass = exports.propControlClass = exports.propLabelClass = exports.propClass = exports.propsClass = exports.trailClass = exports.openedAttr = exports.replacingAttr = exports.leavingAttr = exports.foldClass = exports.paneClass = exports.colClass = exports.rowClass = void 0;
|
|
271
|
+
exports.btnDangerClass = exports.btnPrimaryClass = exports.btnOutlineClass = exports.btnClass = exports.heroInstallClass = exports.heroActionPrimaryClass = exports.heroActionClass = exports.heroActionsClass = exports.heroTextClass = exports.heroTaglineClass = exports.heroNameClass = exports.heroClass = exports.docPagerTitleClass = exports.docPagerDirClass = exports.docPagerLinkClass = exports.docPagerClass = exports.headingAnchorClass = exports.languageOptionClass = exports.languageListClass = exports.languageToggleClass = exports.languageMenuClass = exports.moonClass = exports.sunClass = exports.themeToggleClass = exports.navSubgroupTitleClass = exports.navSubgroupClass = exports.navFlatClass = exports.navLabelClass = exports.navLinkClass = exports.navGroupTitleClass = exports.navGroupClass = exports.navNumberedClass = exports.navClass = exports.widthAttr = exports.programmaticScrollAttr = exports.phoneAttr = exports.menuCompactAttr = exports.menuOpenAttr = exports.seamClass = exports.menuClass = exports.browserClass = exports.pinnedClass = exports.workspaceClass = exports.carouselNextClass = exports.carouselPrevClass = exports.shareInsetVar = exports.spanTwoClass = exports.shareClass = exports.calloutToneClass = exports.calloutTitleClass = void 0;
|
|
272
|
+
exports.tileLinkClass = exports.tileBodyClass = exports.tileClass = exports.boardClass = exports.rowLinkClass = exports.listActionClass = exports.listActionsClass = exports.listItemClass = exports.listClass = exports.menuBodyClass = exports.errorClass = exports.hintClass = exports.backClass = exports.singleClass = exports.schedulerClass = exports.crumbSepClass = exports.crumbLinkClass = exports.crumbHereClass = exports.crumbsClass = exports.colHeadLinkClass = exports.colHeadTitleClass = exports.colHeadClass = exports.fieldMediaClass = exports.fieldRefClass = exports.fieldMomentClass = exports.fieldFlagClass = exports.fieldNumClass = exports.checkLabelClass = exports.checkboxClass = exports.checkClass = exports.inputClass = exports.fieldValueClass = exports.fieldErrorClass = exports.fieldRequiredClass = exports.fieldLabelClass = exports.fieldClass = exports.fieldsClass = exports.formClass = exports.toastToneClass = exports.toastCloseClass = exports.toastClass = exports.toasterClass = exports.dialogActionsClass = exports.dialogTitleClass = exports.dialogClass = exports.backdropClass = exports.modalClass = exports.disabledClass = exports.actionsClass = exports.actionsEndClass = void 0;
|
|
273
|
+
exports.stepsClass = exports.pagerItemClass = exports.pagerClass = exports.tabClass = exports.tabsClass = exports.tipClass = exports.tipAttr = exports.skeletonLineClass = exports.skeletonClass = exports.spinnerMarkClass = exports.spinnerClass = exports.busyAttr = exports.progressBarClass = exports.progressTrackClass = exports.progressClass = exports.alertTitleClass = exports.alertToneClass = exports.alertClass = exports.alertBodyClass = exports.alertPanelClass = exports.alertNoticeClass = exports.itemsTrailClass = exports.itemsNoteClass = exports.itemsTitleClass = exports.itemsRowClass = exports.itemsClass = exports.emptyTitleClass = exports.emptyClass = exports.codeBlockClass = exports.avatarClass = exports.dividerClass = exports.descClass = exports.numericClass = exports.tableClass = exports.tableWrapClass = exports.cardFootClass = exports.cardBodyClass = exports.cardHeadClass = exports.cardClass = exports.tagRemoveClass = exports.tagClass = exports.badgeToneClass = exports.badgeClass = exports.selector = exports.cssVarRef = exports.cssVar = exports.queryChoiceClass = exports.queryClass = exports.tileCaptionClass = exports.tileLabelClass = void 0;
|
|
274
|
+
exports.siteSectionClass = exports.siteStripClass = exports.siteBodyClass = exports.previewBarClass = exports.previewClass = exports.swatchChipClass = exports.swatchClass = exports.swatchesClass = exports.splitPaneClass = exports.splitClass = exports.clusterClass = exports.exampleItemClass = exports.exampleClass = exports.statusClass = exports.codeInputClass = exports.rowsRowClass = exports.rowsClass = exports.splitterClass = exports.toolIconClass = exports.toolClass = exports.toolGroupClass = exports.toolbarClass = exports.calendarDayClass = exports.calendarGridClass = exports.calendarHeadClass = exports.calendarClass = exports.sortClass = exports.checksItemClass = exports.checksClass = exports.sideAttr = exports.drawerBodyClass = exports.drawerHeadClass = exports.drawerClass = exports.popoverBodyClass = exports.popoverClass = exports.searchClass = exports.rangeValueClass = exports.rangeClass = exports.segmentClass = exports.segmentedClass = exports.radioClass = exports.radiosClass = exports.iconButtonClass = exports.menuItemClass = exports.menuListClass = exports.menuButtonClass = exports.accordionBodyClass = exports.accordionItemClass = exports.accordionClass = exports.stepClass = void 0;
|
|
275
|
+
exports.iconButtonRoundClass = exports.siteDrawerNoteClass = exports.siteBarNoteClass = exports.siteBarHomeClass = exports.siteMainClass = exports.siteFillClass = void 0;
|
|
270
276
|
const identity_1 = require("src/Meta/model/identity.ts");
|
|
271
277
|
const hook = (name) => `${identity_1.cssPrefix}-${name}`;
|
|
272
278
|
exports.rowClass = hook("row");
|
|
@@ -297,6 +303,7 @@ exports.shellFoldClass = hook("shell-fold");
|
|
|
297
303
|
exports.shellFootClass = hook("shell-foot");
|
|
298
304
|
exports.shellPageClass = hook("shell-page");
|
|
299
305
|
exports.docClass = hook("doc");
|
|
306
|
+
exports.codeCopyClass = hook("doc-code-copy");
|
|
300
307
|
exports.figurePageClass = hook("figure-page");
|
|
301
308
|
exports.figureBodyClass = hook("figure-body");
|
|
302
309
|
exports.shellRailClass = hook("shell-rail");
|
|
@@ -304,6 +311,7 @@ exports.shellRailGroupClass = hook("shell-rail-group");
|
|
|
304
311
|
exports.chromeLinksClass = hook("chrome-links");
|
|
305
312
|
exports.chromeLinkClass = hook("chrome-link");
|
|
306
313
|
exports.chromeLinkLabelClass = hook("chrome-link-label");
|
|
314
|
+
exports.chromeLinkMarkClass = hook("chrome-link-mark");
|
|
307
315
|
exports.shellCaptionClass = hook("shell-caption");
|
|
308
316
|
exports.shellSideLinkClass = hook("shell-side-link");
|
|
309
317
|
exports.docFootClass = hook("doc-foot");
|
|
@@ -966,6 +974,11 @@ exports.syntaxKinds = [
|
|
|
966
974
|
"regex",
|
|
967
975
|
"template",
|
|
968
976
|
"punctuation",
|
|
977
|
+
"type",
|
|
978
|
+
"function",
|
|
979
|
+
"property",
|
|
980
|
+
"constant",
|
|
981
|
+
"macro",
|
|
969
982
|
];
|
|
970
983
|
const RAW = {
|
|
971
984
|
light: {
|
|
@@ -976,6 +989,11 @@ const RAW = {
|
|
|
976
989
|
regex: "#116329",
|
|
977
990
|
template: "#0a3069",
|
|
978
991
|
punctuation: "#57606a",
|
|
992
|
+
type: "#953800",
|
|
993
|
+
function: "#8250df",
|
|
994
|
+
property: "#0550ae",
|
|
995
|
+
constant: "#0550ae",
|
|
996
|
+
macro: "#116329",
|
|
979
997
|
},
|
|
980
998
|
dark: {
|
|
981
999
|
keyword: "#ff7b72",
|
|
@@ -985,6 +1003,11 @@ const RAW = {
|
|
|
985
1003
|
regex: "#7ee787",
|
|
986
1004
|
template: "#a5d6ff",
|
|
987
1005
|
punctuation: "#c9d1d9",
|
|
1006
|
+
type: "#ffa657",
|
|
1007
|
+
function: "#d2a8ff",
|
|
1008
|
+
property: "#79c0ff",
|
|
1009
|
+
constant: "#79c0ff",
|
|
1010
|
+
macro: "#7ee787",
|
|
988
1011
|
},
|
|
989
1012
|
};
|
|
990
1013
|
const rowOf = (get) => ({
|
|
@@ -995,6 +1018,11 @@ const rowOf = (get) => ({
|
|
|
995
1018
|
regex: get("regex"),
|
|
996
1019
|
template: get("template"),
|
|
997
1020
|
punctuation: get("punctuation"),
|
|
1021
|
+
type: get("type"),
|
|
1022
|
+
function: get("function"),
|
|
1023
|
+
property: get("property"),
|
|
1024
|
+
constant: get("constant"),
|
|
1025
|
+
macro: get("macro"),
|
|
998
1026
|
});
|
|
999
1027
|
const mint = (s) => (0, plgg_1.box)("HexColor")(s);
|
|
1000
1028
|
exports.syntaxPalette = {
|
|
@@ -1195,15 +1223,15 @@ const chromeCss = (theme) => {
|
|
|
1195
1223
|
return (`.${p}-row{background:${cvar("surface-2")};}` +
|
|
1196
1224
|
`.${p}-col{background:${cvar("surface")};border-right:1px solid ${cvar("border")};}` +
|
|
1197
1225
|
`.${p}-colhead{position:sticky;top:0;z-index:${(0, zIndex_1.zValue)("content")};display:flex;align-items:center;justify-content:space-between;gap:0.5rem;height:40px;padding:0 0.75rem;background:${cvar("surface-2")};border-bottom:1px solid ${cvar("border")};}` +
|
|
1198
|
-
`.${p}-colhead-title{font-size:0.85rem;font-weight:
|
|
1199
|
-
`.${p}-colhead-link{margin-left:auto;color:${cvar("primary-base")};text-decoration:none;line-height:1;padding:0.35rem 0.55rem;border:1px solid ${cvar("border")};background:${cvar("surface")};font-size:0.8rem;font-weight:
|
|
1200
|
-
`.${p}-colhead-link:hover{background:${cvar("
|
|
1226
|
+
`.${p}-colhead-title{font-size:0.85rem;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;color:inherit;}` +
|
|
1227
|
+
`.${p}-colhead-link{margin-left:auto;color:${cvar("primary-base")};text-decoration:none;line-height:1;padding:0.35rem 0.55rem;border:1px solid ${cvar("border")};background:${cvar("surface")};font-size:0.8rem;font-weight:400;white-space:nowrap;}` +
|
|
1228
|
+
`.${p}-colhead-link:hover{background:${cvar("surface-2")};color:${cvar("text")};}` +
|
|
1201
1229
|
`.${p}-close{color:${cvar("muted")};text-decoration:none;line-height:1;padding:0.25rem 0.4rem;}` +
|
|
1202
|
-
`.${p}-close:hover{background:${cvar("
|
|
1230
|
+
`.${p}-close:hover{background:${cvar("surface-2")};color:${cvar("text")};}` +
|
|
1203
1231
|
`.${p}-crumbs{display:flex;align-items:center;gap:0.4rem;min-width:0;overflow:hidden;white-space:nowrap;font-size:0.85rem;color:${cvar("muted")};}` +
|
|
1204
1232
|
`.${p}-crumbs a{color:${cvar("muted")};text-decoration:none;padding:0.15rem 0.4rem;}` +
|
|
1205
|
-
`.${p}-crumbs a:hover{background:${cvar("
|
|
1206
|
-
`.${p}-crumb-here{color:${cvar("text")};font-weight:
|
|
1233
|
+
`.${p}-crumbs a:hover{background:${cvar("surface-2")};color:${cvar("text")};}` +
|
|
1234
|
+
`.${p}-crumb-here{color:${cvar("text")};font-weight:400;overflow:hidden;text-overflow:ellipsis;}` +
|
|
1207
1235
|
`.${p}-crumb-sep{color:${cvar("border")};}` +
|
|
1208
1236
|
`.${p}-list{list-style:none;margin:0.75rem;padding:0.4rem;border:1px solid ${cvar("border")};background:${cvar("surface-2")};}` +
|
|
1209
1237
|
`.${p}-list-item{margin:0;}` +
|
|
@@ -1460,7 +1488,7 @@ exports.shareCss = exports.shareOptions = void 0;
|
|
|
1460
1488
|
exports.shareOptions = {
|
|
1461
1489
|
steps: [
|
|
1462
1490
|
{ min: "960px", columns: 2 },
|
|
1463
|
-
{ min: "
|
|
1491
|
+
{ min: "1440px", columns: 3 },
|
|
1464
1492
|
],
|
|
1465
1493
|
};
|
|
1466
1494
|
const shareCss = (theme) => (opts) => {
|
|
@@ -1496,7 +1524,7 @@ const carouselCss = (theme) => {
|
|
|
1496
1524
|
`${each("::before")}{content:"";width:.5rem;height:.5rem;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;}` +
|
|
1497
1525
|
`.${p}-carousel-prev::before{transform:translateX(.12rem) rotate(-135deg);}` +
|
|
1498
1526
|
`.${p}-carousel-next::before{transform:translateX(-.12rem) rotate(45deg);}` +
|
|
1499
|
-
`${each(":hover")},${each(":focus-visible")}{background:${cvar("
|
|
1527
|
+
`${each(":hover")},${each(":focus-visible")}{background:${cvar("surface-2")};color:${cvar("text")};outline:0;}` +
|
|
1500
1528
|
`@media (prefers-reduced-motion:reduce){${both}{transition:none;}}`);
|
|
1501
1529
|
};
|
|
1502
1530
|
exports.carouselCss = carouselCss;
|
|
@@ -1609,7 +1637,7 @@ exports.languageMenuCss = `${menu}{position:relative;display:inline-flex}` +
|
|
|
1609
1637
|
`${item}:hover,${item}:focus-visible{` +
|
|
1610
1638
|
`background:${cvar("primary-base")};` +
|
|
1611
1639
|
`color:${cvar("surface")}}` +
|
|
1612
|
-
`${item}[aria-current]{font-weight:
|
|
1640
|
+
`${item}[aria-current]{font-weight:400}`;
|
|
1613
1641
|
|
|
1614
1642
|
},
|
|
1615
1643
|
"src/Component/usecase/headingAnchor.ts": function (module, exports, require) {
|
|
@@ -1620,22 +1648,17 @@ const plgg_view_1 = require("plgg-view");
|
|
|
1620
1648
|
const classHooks_1 = require("src/Meta/model/classHooks.ts");
|
|
1621
1649
|
Object.defineProperty(exports, "headingAnchorClass", { enumerable: true, get: function () { return classHooks_1.headingAnchorClass; } });
|
|
1622
1650
|
const Style_1 = require("src/Style/index.ts");
|
|
1623
|
-
const headingAnchor = (id) => (0, plgg_view_1.a)([
|
|
1651
|
+
const headingAnchor = (id, children) => (0, plgg_view_1.a)([
|
|
1624
1652
|
(0, plgg_view_1.class_)(classHooks_1.headingAnchorClass),
|
|
1625
1653
|
(0, plgg_view_1.attr)("href", `#${id}`),
|
|
1626
|
-
|
|
1627
|
-
(0, plgg_view_1.attr)("tabindex", "-1"),
|
|
1628
|
-
], []);
|
|
1654
|
+
], children);
|
|
1629
1655
|
exports.headingAnchor = headingAnchor;
|
|
1630
1656
|
const link = `a.${classHooks_1.headingAnchorClass}`;
|
|
1631
|
-
const heading = ":is(h1,h2,h3,h4)[id]";
|
|
1657
|
+
const heading = ":is(h1,h2,h3,h4,h5,h6)[id]";
|
|
1632
1658
|
const headingLink = `${heading} ${link}`;
|
|
1633
|
-
exports.headingAnchorSystemCss = `${
|
|
1634
|
-
|
|
1635
|
-
`${
|
|
1636
|
-
`${heading}:hover ${link}{opacity:1}` +
|
|
1637
|
-
`@media ${(0, Style_1.maxWidth)("lg")}{${headingLink}{display:none}}`;
|
|
1638
|
-
const headingAnchorAppearanceCss = (theme) => `${headingLink}{padding:0;padding-inline-end:.25em;color:${(0, Style_1.colorVar)(theme)("primary-base")};text-decoration:none}`;
|
|
1659
|
+
exports.headingAnchorSystemCss = `${headingLink}{color:inherit;font:inherit;text-decoration:none;cursor:pointer}`;
|
|
1660
|
+
const headingAnchorAppearanceCss = (theme) => `${headingLink}{padding:.04em .3em;margin-inline:-.3em;border-radius:.4rem;background:none;color:${(0, Style_1.colorVar)(theme)("text")};text-decoration:none;box-decoration-break:clone;-webkit-box-decoration-break:clone}` +
|
|
1661
|
+
`${headingLink}:is(:hover,:focus-visible){background:color-mix(in srgb,${(0, Style_1.colorVar)(theme)("text")} 7%,transparent);color:${(0, Style_1.colorVar)(theme)("text")};text-decoration:none;outline:0}`;
|
|
1639
1662
|
exports.headingAnchorAppearanceCss = headingAnchorAppearanceCss;
|
|
1640
1663
|
|
|
1641
1664
|
},
|
|
@@ -1675,19 +1698,19 @@ exports.docPager = docPager;
|
|
|
1675
1698
|
const box = `.${classHooks_1.docPagerClass}`;
|
|
1676
1699
|
const item = `${box} a.${classHooks_1.docPagerLinkClass}`;
|
|
1677
1700
|
exports.docPagerCss = `${box}{display:grid;` +
|
|
1678
|
-
`grid-template-columns:1fr 1fr;gap:
|
|
1679
|
-
`margin-top:
|
|
1701
|
+
`grid-template-columns:1fr 1fr;gap:10px;` +
|
|
1702
|
+
`margin-top:42px;max-width:46em}` +
|
|
1680
1703
|
`${item}{display:flex;flex-direction:column;` +
|
|
1681
|
-
`padding:14px
|
|
1704
|
+
`padding:8px 14px;text-decoration:none;` +
|
|
1682
1705
|
`border:1px solid ${cvar("border")};` +
|
|
1683
1706
|
`color:${cvar("text")}}` +
|
|
1684
1707
|
`${item}:hover{border-color:${cvar("primary-base")}}` +
|
|
1685
1708
|
`${item}[data-dir="next"]{grid-column:2;` +
|
|
1686
1709
|
`text-align:right}` +
|
|
1687
|
-
`.${classHooks_1.docPagerDirClass}{font-size:
|
|
1688
|
-
`line-height:
|
|
1689
|
-
`.${classHooks_1.docPagerTitleClass}{font-size:
|
|
1690
|
-
`line-height:
|
|
1710
|
+
`.${classHooks_1.docPagerDirClass}{font-size:12px;` +
|
|
1711
|
+
`line-height:20px;color:${cvar("muted")}}` +
|
|
1712
|
+
`.${classHooks_1.docPagerTitleClass}{font-size:14px;` +
|
|
1713
|
+
`line-height:22px;font-weight:400}` +
|
|
1691
1714
|
`@media (max-width:639px){${box}{` +
|
|
1692
1715
|
`grid-template-columns:1fr}` +
|
|
1693
1716
|
`${item}[data-dir="next"]{grid-column:1}}`;
|
|
@@ -1734,11 +1757,11 @@ const btn = `${box} a.${classHooks_1.heroActionClass}`;
|
|
|
1734
1757
|
exports.heroCss = `${box}{padding:56px 0 42px;` +
|
|
1735
1758
|
`margin-bottom:14px;max-width:38em}` +
|
|
1736
1759
|
`${box} .${classHooks_1.heroNameClass}{font-size:48px;` +
|
|
1737
|
-
`line-height:56px;font-weight:
|
|
1760
|
+
`line-height:56px;font-weight:400;` +
|
|
1738
1761
|
`letter-spacing:-0.01em;margin:0 0 14px;` +
|
|
1739
1762
|
`border:0;padding:0;font-feature-settings:"palt"}` +
|
|
1740
1763
|
`${box} .${classHooks_1.heroTaglineClass}{font-size:28px;` +
|
|
1741
|
-
`line-height:42px;font-weight:
|
|
1764
|
+
`line-height:42px;font-weight:400;` +
|
|
1742
1765
|
`font-feature-settings:"palt";` +
|
|
1743
1766
|
`color:${cvar("text")};margin:0 0 14px}` +
|
|
1744
1767
|
`${box} .${classHooks_1.heroTextClass}{font-size:16px;` +
|
|
@@ -1749,7 +1772,7 @@ exports.heroCss = `${box}{padding:56px 0 42px;` +
|
|
|
1749
1772
|
`${btn}{display:inline-flex;align-items:center;` +
|
|
1750
1773
|
`margin:0;padding:7px 21px;font-size:15px;` +
|
|
1751
1774
|
`line-height:28px;` +
|
|
1752
|
-
`font-weight:
|
|
1775
|
+
`font-weight:400;text-decoration:none;` +
|
|
1753
1776
|
`border:1px solid ${cvar("border")};` +
|
|
1754
1777
|
`color:${cvar("text")};background:${cvar("surface")}}` +
|
|
1755
1778
|
`${btn}:hover{border-color:${cvar("primary-base")};` +
|
|
@@ -1827,9 +1850,14 @@ const sidebarNav = (props) => {
|
|
|
1827
1850
|
? (0, plgg_view_1.div)([(0, plgg_view_1.class_)(c.group)], g.items.map(renderItem))
|
|
1828
1851
|
: props.toggle
|
|
1829
1852
|
? (0, plgg_view_1.details)(holdsCurrent(g.items)
|
|
1830
|
-
? [
|
|
1853
|
+
? [
|
|
1854
|
+
(0, plgg_view_1.class_)(c.group),
|
|
1855
|
+
(0, plgg_view_1.attr)("open", ""),
|
|
1856
|
+
]
|
|
1831
1857
|
: [(0, plgg_view_1.class_)(c.group)], [
|
|
1832
|
-
(0, plgg_view_1.summary)([(0, plgg_view_1.class_)(c.groupTitle)], [
|
|
1858
|
+
(0, plgg_view_1.summary)([(0, plgg_view_1.class_)(c.groupTitle)], [
|
|
1859
|
+
(0, plgg_view_1.span)([(0, plgg_view_1.class_)(c.label)], [(0, plgg_view_1.text)(g.label)]),
|
|
1860
|
+
]),
|
|
1833
1861
|
...g.items.map(renderItem),
|
|
1834
1862
|
])
|
|
1835
1863
|
: (0, plgg_view_1.div)([(0, plgg_view_1.class_)(c.group)], [
|
|
@@ -1853,7 +1881,7 @@ const sidebarNavCss = (theme) => {
|
|
|
1853
1881
|
.${c.groupTitle}{
|
|
1854
1882
|
padding:1.1rem 1.25rem 0.4rem;font-size:0.75rem;
|
|
1855
1883
|
line-height:1.25rem;
|
|
1856
|
-
font-weight:
|
|
1884
|
+
font-weight:400;color:${cvar("muted")};
|
|
1857
1885
|
border-bottom:1px solid ${cvar("border")};
|
|
1858
1886
|
}
|
|
1859
1887
|
/* leaves + subgroup headers: an inverted pill on hover;
|
|
@@ -1901,7 +1929,7 @@ const sidebarNavCss = (theme) => {
|
|
|
1901
1929
|
padding:0.5rem 1.25rem;font-size:0.875rem;
|
|
1902
1930
|
line-height:1.45;
|
|
1903
1931
|
border-bottom:1px solid ${cvar("border")};
|
|
1904
|
-
font-weight:
|
|
1932
|
+
font-weight:400;color:${cvar("text")};
|
|
1905
1933
|
}
|
|
1906
1934
|
.${c.numbered}{counter-reset:sample}
|
|
1907
1935
|
/* toggle groups: a disclosure per section. The summary
|
|
@@ -2216,6 +2244,436 @@ const LANDMARK = {
|
|
|
2216
2244
|
const landmarkTag = (role) => LANDMARK[role];
|
|
2217
2245
|
exports.landmarkTag = landmarkTag;
|
|
2218
2246
|
|
|
2247
|
+
},
|
|
2248
|
+
"src/Navigate/usecase/codeCopyScript.ts": function (module, exports, require) {
|
|
2249
|
+
"use strict";
|
|
2250
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2251
|
+
exports.codeCopyInitScript = void 0;
|
|
2252
|
+
const classHooks_1 = require("src/Meta/model/classHooks.ts");
|
|
2253
|
+
const q = (value) => JSON.stringify(value);
|
|
2254
|
+
const clipboardIcon = '<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.3"><rect x="5.5" y="1.5" width="8" height="10" rx="1.5"/><path d="M3.5 4.5v8.5a1.5 1.5 0 0 0 1.5 1.5h6"/></svg>';
|
|
2255
|
+
const tickIcon = '<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M3 8.5l3.2 3L13 4.5"/></svg>';
|
|
2256
|
+
exports.codeCopyInitScript = "(function(){" +
|
|
2257
|
+
"if(!navigator.clipboard){return;}" +
|
|
2258
|
+
`var D=${q("." + classHooks_1.docClass)},B=${q(classHooks_1.codeCopyClass)},` +
|
|
2259
|
+
`I=${q(clipboardIcon)},T=${q(tickIcon)};` +
|
|
2260
|
+
"function arm(){var ps=document.querySelectorAll(D+' pre');" +
|
|
2261
|
+
"for(var i=0;i<ps.length;i++){(function(p){" +
|
|
2262
|
+
"if(p.querySelector('.'+B)){return;}" +
|
|
2263
|
+
"var b=document.createElement('button');" +
|
|
2264
|
+
"b.type='button';b.className=B;b.innerHTML=I;" +
|
|
2265
|
+
"b.setAttribute('aria-label','コードをコピー');" +
|
|
2266
|
+
"b.addEventListener('click',function(){" +
|
|
2267
|
+
"var c=p.querySelector('code')||p;" +
|
|
2268
|
+
"navigator.clipboard.writeText(c.innerText).then(function(){" +
|
|
2269
|
+
"b.innerHTML=T;b.setAttribute('data-copied','');b.setAttribute('aria-label','コピーしました');" +
|
|
2270
|
+
"setTimeout(function(){b.innerHTML=I;b.removeAttribute('data-copied');b.setAttribute('aria-label','コードをコピー');},1600);" +
|
|
2271
|
+
"},function(){});});" +
|
|
2272
|
+
"p.appendChild(b);})(ps[i]);}}" +
|
|
2273
|
+
"arm();document.addEventListener('plgg:columns',arm);" +
|
|
2274
|
+
"if(window.MutationObserver&&document.body){" +
|
|
2275
|
+
"new MutationObserver(arm).observe(document.body,{childList:true,subtree:true});}" +
|
|
2276
|
+
"})();";
|
|
2277
|
+
|
|
2278
|
+
},
|
|
2279
|
+
"src/Shell/usecase/docChrome.ts": function (module, exports, require) {
|
|
2280
|
+
"use strict";
|
|
2281
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2282
|
+
exports.docChromeCss = exports.docChromeInitScript = exports.docChromeClass = void 0;
|
|
2283
|
+
const classHooks_1 = require("src/Meta/model/classHooks.ts");
|
|
2284
|
+
const marker_1 = require("src/Navigate/model/marker.ts");
|
|
2285
|
+
const shareCss_1 = require("src/Style/usecase/shareCss.ts");
|
|
2286
|
+
const docChromeClass = (theme) => `${theme.prefix}-doc-chrome`;
|
|
2287
|
+
exports.docChromeClass = docChromeClass;
|
|
2288
|
+
const configOf = (theme) => ({
|
|
2289
|
+
p: theme.prefix,
|
|
2290
|
+
strip: marker_1.stripAttr,
|
|
2291
|
+
column: marker_1.columnAttr,
|
|
2292
|
+
leaving: classHooks_1.leavingAttr,
|
|
2293
|
+
min: classHooks_1.shellMinAttr,
|
|
2294
|
+
head: classHooks_1.shellHeadClass,
|
|
2295
|
+
fold: classHooks_1.foldClass,
|
|
2296
|
+
doc: classHooks_1.docClass,
|
|
2297
|
+
});
|
|
2298
|
+
const dress = (c) => {
|
|
2299
|
+
const p = c.p;
|
|
2300
|
+
const chrome = p + "-doc-chrome";
|
|
2301
|
+
const actionsClass = p + "-doc-actions";
|
|
2302
|
+
const strip = document.querySelector("[" + c.strip + "]");
|
|
2303
|
+
const shell = strip
|
|
2304
|
+
? strip.closest("." + p + "-shell")
|
|
2305
|
+
: null;
|
|
2306
|
+
const bar = shell
|
|
2307
|
+
? shell.querySelector("." + p + "-shell-bar")
|
|
2308
|
+
: null;
|
|
2309
|
+
const home = bar
|
|
2310
|
+
? bar.querySelector("." + p + "-shell-bar-brand")
|
|
2311
|
+
: null;
|
|
2312
|
+
if (!strip ||
|
|
2313
|
+
!shell ||
|
|
2314
|
+
!bar ||
|
|
2315
|
+
!home ||
|
|
2316
|
+
shell.classList.contains(chrome))
|
|
2317
|
+
return;
|
|
2318
|
+
try {
|
|
2319
|
+
CSS.registerProperty({
|
|
2320
|
+
name: "--" + p + "-share-inset",
|
|
2321
|
+
syntax: "<length>",
|
|
2322
|
+
inherits: true,
|
|
2323
|
+
initialValue: "0px",
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
catch {
|
|
2327
|
+
}
|
|
2328
|
+
const english = document.documentElement.lang === "en";
|
|
2329
|
+
const label = (ja, en) => (english ? en : ja);
|
|
2330
|
+
const icons = {
|
|
2331
|
+
more: "M4 8h.01M8 8h.01M12 8h.01",
|
|
2332
|
+
close: "M4.5 4.5l7 7M11.5 4.5l-7 7",
|
|
2333
|
+
copy: "M5.5 5.5h7v8h-7zM10.5 3.5h-7v8",
|
|
2334
|
+
link: "M6.75 9.25l2.5-2.5m-4 4-.75.75a2.12 2.12 0 0 1-3-3l2-2a2.12 2.12 0 0 1 3 0m3 3a2.12 2.12 0 0 0 3 0l2-2a2.12 2.12 0 0 0-3-3l-.75.75",
|
|
2335
|
+
};
|
|
2336
|
+
const icon = (name) => {
|
|
2337
|
+
const ns = "http://www.w3.org/2000/svg";
|
|
2338
|
+
const svg = document.createElementNS(ns, "svg");
|
|
2339
|
+
svg.setAttribute("viewBox", "0 0 16 16");
|
|
2340
|
+
svg.setAttribute("aria-hidden", "true");
|
|
2341
|
+
svg.setAttribute("fill", "none");
|
|
2342
|
+
svg.setAttribute("stroke", "currentColor");
|
|
2343
|
+
svg.setAttribute("stroke-width", name === "more" ? "2.5" : "1.25");
|
|
2344
|
+
svg.setAttribute("stroke-linecap", "round");
|
|
2345
|
+
svg.setAttribute("stroke-linejoin", "round");
|
|
2346
|
+
const path = document.createElementNS(ns, "path");
|
|
2347
|
+
path.setAttribute("d", icons[name] ?? "");
|
|
2348
|
+
svg.append(path);
|
|
2349
|
+
return svg;
|
|
2350
|
+
};
|
|
2351
|
+
const drawerLabel = bar.querySelector("." + p + "-shell-menu-btn");
|
|
2352
|
+
const drawer = shell.querySelector("." + p + "-shell-menu");
|
|
2353
|
+
const sidebar = shell.querySelector("." + p + "-shell-side");
|
|
2354
|
+
const fold = sidebar
|
|
2355
|
+
? sidebar.querySelector("." + p + "-shell-fold")
|
|
2356
|
+
: null;
|
|
2357
|
+
if (drawerLabel && drawer && sidebar && fold) {
|
|
2358
|
+
const desktop = window.matchMedia("(min-width: 1024px)");
|
|
2359
|
+
const toggle = document.createElement("button");
|
|
2360
|
+
toggle.type = "button";
|
|
2361
|
+
toggle.className = p + "-sidebar-toggle";
|
|
2362
|
+
if (!sidebar.id)
|
|
2363
|
+
sidebar.id = p + "-doc-sidebar";
|
|
2364
|
+
toggle.setAttribute("aria-controls", sidebar.id);
|
|
2365
|
+
const bars = document.createElement("span");
|
|
2366
|
+
bars.setAttribute("aria-hidden", "true");
|
|
2367
|
+
toggle.append(bars);
|
|
2368
|
+
const controls = document.createElement("div");
|
|
2369
|
+
controls.className = p + "-sidebar-controls";
|
|
2370
|
+
controls.setAttribute("role", "group");
|
|
2371
|
+
controls.setAttribute("aria-label", label("表示設定", "Display settings"));
|
|
2372
|
+
sidebar.append(controls);
|
|
2373
|
+
drawerLabel.replaceWith(toggle);
|
|
2374
|
+
for (const selector of [
|
|
2375
|
+
"." + p + "-lang",
|
|
2376
|
+
"." + p + "-theme-toggle",
|
|
2377
|
+
]) {
|
|
2378
|
+
const control = bar.querySelector(selector);
|
|
2379
|
+
if (control)
|
|
2380
|
+
controls.append(control);
|
|
2381
|
+
}
|
|
2382
|
+
const language = controls.querySelector("." + p + "-lang");
|
|
2383
|
+
if (language)
|
|
2384
|
+
language.setAttribute("data-opens", "up");
|
|
2385
|
+
const sync = () => {
|
|
2386
|
+
const expanded = desktop.matches
|
|
2387
|
+
? !document.documentElement.hasAttribute(c.min)
|
|
2388
|
+
: drawer.checked;
|
|
2389
|
+
if (!expanded && language)
|
|
2390
|
+
language.open = false;
|
|
2391
|
+
toggle.setAttribute("aria-expanded", String(expanded));
|
|
2392
|
+
toggle.setAttribute("aria-label", expanded
|
|
2393
|
+
? label("サイドバーを閉じる", "Close sidebar")
|
|
2394
|
+
: label("サイドバーを開く", "Open sidebar"));
|
|
2395
|
+
};
|
|
2396
|
+
toggle.addEventListener("click", () => {
|
|
2397
|
+
if (desktop.matches)
|
|
2398
|
+
fold.click();
|
|
2399
|
+
else
|
|
2400
|
+
drawer.click();
|
|
2401
|
+
sync();
|
|
2402
|
+
});
|
|
2403
|
+
drawer.addEventListener("change", sync);
|
|
2404
|
+
desktop.addEventListener("change", sync);
|
|
2405
|
+
sync();
|
|
2406
|
+
}
|
|
2407
|
+
const mark = sidebar
|
|
2408
|
+
? sidebar.querySelector("." + p + "-shell-brand")
|
|
2409
|
+
: null;
|
|
2410
|
+
const siteName = mark && mark.textContent
|
|
2411
|
+
? mark.textContent.trim()
|
|
2412
|
+
: "";
|
|
2413
|
+
if (siteName !== "")
|
|
2414
|
+
home.replaceChildren(siteName);
|
|
2415
|
+
const trail = document.createElement("nav");
|
|
2416
|
+
trail.className = p + "-doc-trail";
|
|
2417
|
+
trail.setAttribute("aria-label", label("パンくず", "Breadcrumbs"));
|
|
2418
|
+
const path = document.createElement("ol");
|
|
2419
|
+
trail.append(path);
|
|
2420
|
+
const divider = document.createElement("span");
|
|
2421
|
+
divider.className = p + "-doc-trail-divider";
|
|
2422
|
+
divider.setAttribute("aria-hidden", "true");
|
|
2423
|
+
divider.textContent = "›";
|
|
2424
|
+
home.after(divider, trail);
|
|
2425
|
+
const status = document.createElement("p");
|
|
2426
|
+
status.className = p + "-doc-status";
|
|
2427
|
+
status.setAttribute("role", "status");
|
|
2428
|
+
shell.append(status);
|
|
2429
|
+
shell.classList.add(chrome);
|
|
2430
|
+
let statusTimer = 0;
|
|
2431
|
+
const announce = (message) => {
|
|
2432
|
+
window.clearTimeout(statusTimer);
|
|
2433
|
+
status.textContent = message;
|
|
2434
|
+
statusTimer = window.setTimeout(() => {
|
|
2435
|
+
status.textContent = "";
|
|
2436
|
+
}, 2600);
|
|
2437
|
+
};
|
|
2438
|
+
const hrefFor = (col) => {
|
|
2439
|
+
const route = col.getAttribute(c.column) ?? "/";
|
|
2440
|
+
return new URL(route.startsWith("/")
|
|
2441
|
+
? route.slice(1)
|
|
2442
|
+
: route, home.href).href;
|
|
2443
|
+
};
|
|
2444
|
+
const columns = () => Array.from(strip.querySelectorAll("[" +
|
|
2445
|
+
c.column +
|
|
2446
|
+
"]:not([" +
|
|
2447
|
+
c.leaving +
|
|
2448
|
+
"])"));
|
|
2449
|
+
const copy = (value, done) => {
|
|
2450
|
+
const fail = () => announce(label("クリップボードにコピーできませんでした。", "Could not copy to the clipboard."));
|
|
2451
|
+
if (!navigator.clipboard) {
|
|
2452
|
+
fail();
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2455
|
+
navigator.clipboard
|
|
2456
|
+
.writeText(value)
|
|
2457
|
+
.then(() => announce(done), fail);
|
|
2458
|
+
};
|
|
2459
|
+
const addActions = (col, mount) => {
|
|
2460
|
+
const menu = document.createElement("details");
|
|
2461
|
+
menu.className = actionsClass;
|
|
2462
|
+
const summary = document.createElement("summary");
|
|
2463
|
+
summary.append(icon("more"));
|
|
2464
|
+
menu.append(summary);
|
|
2465
|
+
const items = document.createElement("div");
|
|
2466
|
+
menu.append(items);
|
|
2467
|
+
const action = (name, text, run) => {
|
|
2468
|
+
const button = document.createElement("button");
|
|
2469
|
+
button.type = "button";
|
|
2470
|
+
button.append(icon(name), text);
|
|
2471
|
+
button.addEventListener("click", () => {
|
|
2472
|
+
menu.open = false;
|
|
2473
|
+
summary.focus();
|
|
2474
|
+
run();
|
|
2475
|
+
});
|
|
2476
|
+
items.append(button);
|
|
2477
|
+
return button;
|
|
2478
|
+
};
|
|
2479
|
+
const close = action("close", label("カラムを閉じる", "Close column"), () => {
|
|
2480
|
+
const folder = col.querySelector("." + c.fold);
|
|
2481
|
+
if (folder)
|
|
2482
|
+
folder.click();
|
|
2483
|
+
const last = columns().pop();
|
|
2484
|
+
const next = last
|
|
2485
|
+
? last.querySelector("." + actionsClass + " summary")
|
|
2486
|
+
: null;
|
|
2487
|
+
if (next)
|
|
2488
|
+
next.focus();
|
|
2489
|
+
});
|
|
2490
|
+
close.setAttribute("data-close-column", "");
|
|
2491
|
+
if (col.querySelector("." + p + "-site-main")) {
|
|
2492
|
+
action("copy", label("コンテンツをコピー", "Copy content"), () => {
|
|
2493
|
+
const content = col.querySelector("." + c.doc + " [data-island]") ??
|
|
2494
|
+
col.querySelector("." + c.doc);
|
|
2495
|
+
if (content)
|
|
2496
|
+
copy(content.innerText, label("コンテンツをコピーしました。", "Content copied."));
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2499
|
+
action("link", label("リンクをコピー", "Copy link"), () => copy(hrefFor(col), label("リンクをコピーしました。", "Link copied.")));
|
|
2500
|
+
menu.addEventListener("keydown", (event) => {
|
|
2501
|
+
if (event.key === "Escape" && menu.open) {
|
|
2502
|
+
menu.open = false;
|
|
2503
|
+
summary.focus();
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
mount.append(menu);
|
|
2507
|
+
return menu;
|
|
2508
|
+
};
|
|
2509
|
+
const room = document.createElement("div");
|
|
2510
|
+
room.className = p + "-doc-strip-room";
|
|
2511
|
+
room.setAttribute("aria-hidden", "true");
|
|
2512
|
+
const bring = (col) => {
|
|
2513
|
+
const motion = window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
2514
|
+
? "auto"
|
|
2515
|
+
: "smooth";
|
|
2516
|
+
const inset = parseFloat(getComputedStyle(strip).scrollPaddingLeft) || 0;
|
|
2517
|
+
const target = strip.scrollLeft +
|
|
2518
|
+
col.getBoundingClientRect().left -
|
|
2519
|
+
strip.getBoundingClientRect().left -
|
|
2520
|
+
inset;
|
|
2521
|
+
const reach = strip.scrollWidth -
|
|
2522
|
+
strip.clientWidth -
|
|
2523
|
+
room.offsetWidth;
|
|
2524
|
+
room.style.width =
|
|
2525
|
+
String(Math.max(0, target - reach)) + "px";
|
|
2526
|
+
if (!room.isConnected)
|
|
2527
|
+
strip.append(room);
|
|
2528
|
+
strip.scrollTo({
|
|
2529
|
+
left: target,
|
|
2530
|
+
behavior: motion,
|
|
2531
|
+
});
|
|
2532
|
+
};
|
|
2533
|
+
const sync = () => {
|
|
2534
|
+
room.style.width = "0px";
|
|
2535
|
+
const open = columns();
|
|
2536
|
+
const crumbs = [];
|
|
2537
|
+
open.forEach((col, index) => {
|
|
2538
|
+
const heading = col.querySelector(":scope > ." + c.head);
|
|
2539
|
+
if (!heading)
|
|
2540
|
+
return;
|
|
2541
|
+
const first = heading.firstElementChild;
|
|
2542
|
+
const title = (first && first.textContent
|
|
2543
|
+
? first.textContent.trim()
|
|
2544
|
+
: "") || hrefFor(col);
|
|
2545
|
+
const free = col.classList.contains(p + "-shell-page") &&
|
|
2546
|
+
col.querySelector("." + p + "-site-main") !== null;
|
|
2547
|
+
if (free)
|
|
2548
|
+
col.classList.add(p + "-doc-free-column");
|
|
2549
|
+
const mount = free ? col : heading;
|
|
2550
|
+
const menu = mount.querySelector(":scope > ." + actionsClass) ?? addActions(col, mount);
|
|
2551
|
+
const summary = menu.querySelector("summary");
|
|
2552
|
+
if (summary)
|
|
2553
|
+
summary.setAttribute("aria-label", label(title + "の操作", "Actions for " + title));
|
|
2554
|
+
const close = menu.querySelector("[data-close-column]");
|
|
2555
|
+
if (close)
|
|
2556
|
+
close.hidden = !col.querySelector("." + c.fold);
|
|
2557
|
+
if (open.length < 2)
|
|
2558
|
+
return;
|
|
2559
|
+
const item = document.createElement("li");
|
|
2560
|
+
const button = document.createElement("button");
|
|
2561
|
+
button.type = "button";
|
|
2562
|
+
button.textContent = title;
|
|
2563
|
+
if (index === open.length - 1)
|
|
2564
|
+
button.setAttribute("aria-current", "page");
|
|
2565
|
+
button.addEventListener("click", () => bring(col));
|
|
2566
|
+
item.append(button);
|
|
2567
|
+
crumbs.push(item);
|
|
2568
|
+
});
|
|
2569
|
+
divider.hidden = crumbs.length === 0;
|
|
2570
|
+
path.replaceChildren(...crumbs);
|
|
2571
|
+
trail.scrollLeft = trail.scrollWidth;
|
|
2572
|
+
};
|
|
2573
|
+
document.addEventListener("click", (event) => {
|
|
2574
|
+
const target = event.target;
|
|
2575
|
+
for (const menu of strip.querySelectorAll("." + actionsClass + "[open]")) {
|
|
2576
|
+
if (!(target instanceof Node) ||
|
|
2577
|
+
!menu.contains(target))
|
|
2578
|
+
menu.open = false;
|
|
2579
|
+
}
|
|
2580
|
+
});
|
|
2581
|
+
document.addEventListener("plgg:columns", sync);
|
|
2582
|
+
new MutationObserver((records) => {
|
|
2583
|
+
if (records.some((record) => record.target instanceof Element &&
|
|
2584
|
+
record.target.matches("." + c.head + " > span")))
|
|
2585
|
+
sync();
|
|
2586
|
+
}).observe(strip, {
|
|
2587
|
+
childList: true,
|
|
2588
|
+
subtree: true,
|
|
2589
|
+
});
|
|
2590
|
+
sync();
|
|
2591
|
+
};
|
|
2592
|
+
const docChromeInitScript = (theme) => "(" +
|
|
2593
|
+
dress.toString() +
|
|
2594
|
+
")(" +
|
|
2595
|
+
JSON.stringify(configOf(theme)) +
|
|
2596
|
+
");";
|
|
2597
|
+
exports.docChromeInitScript = docChromeInitScript;
|
|
2598
|
+
const docChromeCss = (theme) => {
|
|
2599
|
+
const p = theme.prefix;
|
|
2600
|
+
const v = (name) => `var(--${p}-${name})`;
|
|
2601
|
+
const C = `.${p}-doc-chrome`;
|
|
2602
|
+
const A = `.${p}-doc-actions`;
|
|
2603
|
+
const T = `.${p}-sidebar-toggle`;
|
|
2604
|
+
const min = `[${classHooks_1.shellMinAttr}]`;
|
|
2605
|
+
const tint = (n) => `color-mix(in srgb,${v("text")} ${n}%,transparent)`;
|
|
2606
|
+
const inset = `--${p}-share-inset`;
|
|
2607
|
+
return [
|
|
2608
|
+
`${C} .${p}-shell-bar{gap:.5rem;padding-inline:.5rem;z-index:60}`,
|
|
2609
|
+
`html:not([${marker_1.embeddedAttr}]) ${C} .${p}-shell-bar{display:flex}`,
|
|
2610
|
+
`${C} .${p}-shell-bar-brand{flex:none;border-radius:.4rem;padding:.08rem .4rem;background:transparent;color:${v("text")}}`,
|
|
2611
|
+
`${C} .${p}-shell-side :is(.${p}-shell-head,.${p}-shell-foot){display:none}`,
|
|
2612
|
+
`.${p}-sidebar-controls{display:flex;align-items:center;gap:.2rem;flex:none;padding:.5rem .7rem}`,
|
|
2613
|
+
`${C} .${p}-sidebar-controls :is(.${p}-theme-toggle,.${p}-lang-toggle){width:2rem;height:2rem;margin:0;border:0;border-radius:.4rem;background:none}`,
|
|
2614
|
+
`${C} .${p}-sidebar-controls :is(.${p}-theme-toggle,.${p}-lang-toggle):hover{background:${tint(7)};color:${v("text")}}`,
|
|
2615
|
+
`@media (max-width:479px){${C} .${p}-shell-bar{gap:.25rem;padding-inline:.4rem}}`,
|
|
2616
|
+
`${T}{display:grid;place-items:center;flex:none;width:2rem;height:2rem;padding:0;border:0;border-radius:.4rem;background:none;color:${v("text")};cursor:pointer}`,
|
|
2617
|
+
`${T}:hover{background:${tint(7)}}`,
|
|
2618
|
+
`${T} span,${T} span::before,${T} span::after{display:block;width:1.1rem;height:1.5px;border-radius:0;background:currentColor;transition:transform .2s ease,background-color .2s ease}`,
|
|
2619
|
+
`${T} span{position:relative}`,
|
|
2620
|
+
`${T} span::before,${T} span::after{position:absolute;left:0;content:""}`,
|
|
2621
|
+
`${T} span::before{transform:translateY(-.36rem)}`,
|
|
2622
|
+
`${T} span::after{transform:translateY(.36rem)}`,
|
|
2623
|
+
`${T}[aria-expanded="true"] span{background:transparent}`,
|
|
2624
|
+
`${T}[aria-expanded="true"] span::before{transform:rotate(45deg)}`,
|
|
2625
|
+
`${T}[aria-expanded="true"] span::after{transform:rotate(-45deg)}`,
|
|
2626
|
+
`@media (min-width:1024px){` +
|
|
2627
|
+
`${C}{transition:${inset} .28s cubic-bezier(.2,.7,.2,1)}` +
|
|
2628
|
+
`${C} .${p}-shell-side{overflow:hidden;transition:visibility 0s}` +
|
|
2629
|
+
`${C} .${p}-shell-side :is(.${p}-shell-body,.${p}-sidebar-controls){min-width:16rem}` +
|
|
2630
|
+
`${min} ${C},${C}${min}{${inset}:0px}` +
|
|
2631
|
+
`${min} ${C} .${p}-shell-side{visibility:hidden;border-right-width:0;transition:visibility 0s .28s}` +
|
|
2632
|
+
`${min} ${C} .${p}-shell-side .${p}-shell-body{display:block}` +
|
|
2633
|
+
`${C} .${p}-site-fill .${p}-site-main :is(.${p}-doc,.${p}-doc-foot):not(.${p}-doc *){margin-inline:auto;max-width:38em;box-sizing:content-box;padding-inline:0}` +
|
|
2634
|
+
`}`,
|
|
2635
|
+
...shareCss_1.shareOptions.steps.map((step, i) => {
|
|
2636
|
+
const below = i === 0
|
|
2637
|
+
? 1
|
|
2638
|
+
: (shareCss_1.shareOptions.steps[i - 1]
|
|
2639
|
+
?.columns ?? 1);
|
|
2640
|
+
return `@media (min-width:1024px) and (min-width:${step.min}) and (max-width:calc(${step.min} + 16rem - 1px)){html:not(${min}) ${C} .${p}-share{--${p}-share-n:${below}}}`;
|
|
2641
|
+
}),
|
|
2642
|
+
`@media (max-width:1023px){${C} .${p}-shell-side{top:3rem;height:calc(100dvh - 3rem)}${C} .${p}-shell-backdrop{top:3rem}}`,
|
|
2643
|
+
`${C} .${p}-doc-strip-room{flex:none;width:0;border:0}`,
|
|
2644
|
+
`${C} .${p}-doc-trail-divider{color:${v("muted")};flex:none}`,
|
|
2645
|
+
`${C} .${p}-doc-trail{flex:1;min-width:0;overflow:auto;scrollbar-width:none}`,
|
|
2646
|
+
`${C} .${p}-doc-trail ol{display:flex;align-items:center;gap:.5rem;width:max-content;list-style:none;margin:0;padding:0}`,
|
|
2647
|
+
`${C} .${p}-doc-trail li{display:flex;align-items:center;gap:.5rem;font-size:.875rem}`,
|
|
2648
|
+
`${C} .${p}-doc-trail li+li::before{content:"›";color:${v("muted")}}`,
|
|
2649
|
+
`${C} .${p}-doc-trail button{border:0;border-radius:.4rem;background:none;color:inherit;font:inherit;padding:.08rem .4rem;cursor:pointer;transition:background-color .15s ease}`,
|
|
2650
|
+
`${C} .${p}-doc-trail button:is(:hover,:focus-visible),${C} .${p}-shell-bar-brand:is(:hover,:focus-visible){background:${tint(7)};color:${v("text")}}`,
|
|
2651
|
+
`${C} .${p}-shell-page .${p}-shell-head{position:relative;align-items:center;overflow:visible;padding:.65rem .85rem .25rem 1.25rem;height:auto;min-height:3rem;border-bottom:0;background:transparent}`,
|
|
2652
|
+
`${C} .${p}-shell-page .${p}-shell-head:has(details[open]){z-index:2}`,
|
|
2653
|
+
`${C} .${p}-shell-title{color:${v("text")};font-size:1.125rem;margin:0}`,
|
|
2654
|
+
`${C} .${p}-doc-free-column{position:relative}`,
|
|
2655
|
+
`${C} .${p}-doc-free-column .${p}-shell-head:not(.${p}-doc *){display:none}`,
|
|
2656
|
+
`${C} .${p}-doc-free-column ${A}:not(.${p}-shell-head *){position:absolute;inset-block-start:.35rem;inset-inline-end:.5rem;z-index:2}`,
|
|
2657
|
+
`${C} .${p}-doc-free-column .${classHooks_1.docClass} h1{padding-inline-end:2rem}`,
|
|
2658
|
+
`${C} .${p}-shell-head:has(${A}) .${classHooks_1.foldClass}{display:none}`,
|
|
2659
|
+
`${A}{flex:none;margin-inline-start:auto;position:relative}`,
|
|
2660
|
+
`${A} summary{display:grid;place-items:center;width:2rem;height:2rem;border-radius:.4rem;list-style:none;cursor:pointer;background:transparent}`,
|
|
2661
|
+
`${A} summary::-webkit-details-marker{display:none}`,
|
|
2662
|
+
`${A} summary:is(:hover,:focus-visible),${A}[open] summary{background:color-mix(in srgb,${v("text")} 9%,${v("surface")});color:${v("text")}}`,
|
|
2663
|
+
`${A} svg{display:block;width:1rem;height:1rem;flex:none}`,
|
|
2664
|
+
`${A} summary svg{width:1.5rem;height:1.5rem}`,
|
|
2665
|
+
`${A} div{position:absolute;inset-inline-end:0;z-index:1;min-width:max-content;padding:.2rem;border:1px solid ${v("primary-border")};border-radius:.4rem;background:${v("surface")};color:${v("text")};box-shadow:0 .2rem .65rem color-mix(in srgb,${v("text")} 12%,transparent)}`,
|
|
2666
|
+
`${A} button{display:flex;align-items:center;gap:.45rem;width:100%;border:0;border-radius:.4rem;padding:.3rem .45rem;background:none;color:inherit;text-align:start;font:inherit;font-size:.8125rem;line-height:1.35;cursor:pointer}`,
|
|
2667
|
+
`${A} button[hidden]{display:none}`,
|
|
2668
|
+
`${A} button:hover{background:${tint(7)};color:${v("text")}}`,
|
|
2669
|
+
`@media (pointer:coarse){${T},${A} summary{width:2.75rem;height:2.75rem}${A} button{min-height:2.75rem}}`,
|
|
2670
|
+
`.${p}-doc-status{position:fixed;inset:auto 1rem 1rem auto;z-index:90;margin:0;border:1px solid ${v("primary-border")};border-radius:.4rem;padding:.55rem .85rem;background:${v("surface")};color:${v("text")}}`,
|
|
2671
|
+
`.${p}-doc-status:empty{display:none}`,
|
|
2672
|
+
`@media (prefers-reduced-motion:reduce){${C},${T} span,${T} span::before,${T} span::after{transition:none}}`,
|
|
2673
|
+
].join("\n");
|
|
2674
|
+
};
|
|
2675
|
+
exports.docChromeCss = docChromeCss;
|
|
2676
|
+
|
|
2219
2677
|
}
|
|
2220
2678
|
};
|
|
2221
2679
|
const __cache = {};
|
|
@@ -2253,6 +2711,7 @@ export const {
|
|
|
2253
2711
|
carouselPrevClass,
|
|
2254
2712
|
center,
|
|
2255
2713
|
chromeCss,
|
|
2714
|
+
codeCopyInitScript,
|
|
2256
2715
|
colClass,
|
|
2257
2716
|
color,
|
|
2258
2717
|
colorHex,
|
|
@@ -2265,6 +2724,9 @@ export const {
|
|
|
2265
2724
|
decl,
|
|
2266
2725
|
defaultPalette,
|
|
2267
2726
|
defaultTheme,
|
|
2727
|
+
docChromeClass,
|
|
2728
|
+
docChromeCss,
|
|
2729
|
+
docChromeInitScript,
|
|
2268
2730
|
docPager,
|
|
2269
2731
|
docPagerClass,
|
|
2270
2732
|
docPagerCss,
|