plggmatic 0.5.11 → 0.5.13
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languageMenu.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/languageMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,IAAI,EAWV,MAAM,WAAW,CAAC;AAWnB;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC;CACtB,CAAC,CAAC;AAgDH;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,UAChB,iBAAiB,KACvB,IAAI,CAAC,KAAK,EAAE,SAAS,CAsBrB,CAAC;AAEJ,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,CAAC;AAOF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"languageMenu.d.ts","sourceRoot":"","sources":["../../../src/Component/usecase/languageMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,IAAI,EAWV,MAAM,WAAW,CAAC;AAWnB;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC;CACtB,CAAC,CAAC;AAgDH;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,UAChB,iBAAiB,KACvB,IAAI,CAAC,KAAK,EAAE,SAAS,CAsBrB,CAAC;AAEJ,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,CAAC;AAOF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,OA6B0D,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { type Theme } from "../../Style";
|
|
|
7
7
|
* all, and the columns take the whole width, sliding as
|
|
8
8
|
* it moves); the header carries breadcrumbs of the open
|
|
9
9
|
* pages, each scrolling its column to the left edge; the
|
|
10
|
-
*
|
|
10
|
+
* header's right end holds the language and theme controls;
|
|
11
11
|
* every open column gets a three-dot menu (close the
|
|
12
12
|
* column, copy its content, copy its link); a lone page
|
|
13
13
|
* with the sidebar shut is centred at the prose measure.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docChrome.d.ts","sourceRoot":"","sources":["../../../src/Shell/usecase/docChrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAapC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAM7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,UAClB,KAAK,KACX,OAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"docChrome.d.ts","sourceRoot":"","sources":["../../../src/Shell/usecase/docChrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAapC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAM7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,UAClB,KAAK,KACX,OAAuC,CAAC;AAmmB3C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,UACvB,KAAK,KACX,OAKG,CAAC;AAEP;;;GAGG;AACH,eAAO,MAAM,YAAY,UAChB,KAAK,KACX,OAuFF,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -2313,33 +2313,33 @@ const list = `.${classHooks_1.languageListClass}`;
|
|
|
2313
2313
|
const item = `.${classHooks_1.languageOptionClass}`;
|
|
2314
2314
|
exports.languageMenuCss = `${menu}{position:relative;display:inline-flex}` +
|
|
2315
2315
|
`${toggle}{display:inline-flex;align-items:center;` +
|
|
2316
|
-
`justify-content:center;width:
|
|
2317
|
-
`border-radius:
|
|
2318
|
-
`
|
|
2319
|
-
`
|
|
2320
|
-
`transition:border-color 0.15s}` +
|
|
2316
|
+
`justify-content:center;width:2rem;height:2rem;` +
|
|
2317
|
+
`border:0;border-radius:.4rem;background:none;` +
|
|
2318
|
+
`color:${cvar("text")};cursor:pointer;list-style:none;` +
|
|
2319
|
+
`transition:background-color .15s}` +
|
|
2321
2320
|
`${toggle}::-webkit-details-marker{display:none}` +
|
|
2322
|
-
`${toggle}:hover{
|
|
2323
|
-
`${toggle}:focus-visible{outline:
|
|
2324
|
-
`${cvar("
|
|
2321
|
+
`${toggle}:hover,${menu}[open] ${toggle}{background:color-mix(in srgb,${cvar("text")} 7%,transparent)}` +
|
|
2322
|
+
`${toggle}:focus-visible{outline:1.5px solid ` +
|
|
2323
|
+
`${cvar("text")};outline-offset:2px}` +
|
|
2325
2324
|
`${toggle} svg{display:block;width:18px;height:18px}` +
|
|
2326
2325
|
`${list}{position:absolute;z-index:60;` +
|
|
2327
|
-
`min-width:
|
|
2328
|
-
`flex-direction:column;gap:0
|
|
2326
|
+
`min-width:max-content;padding:.2rem;display:flex;` +
|
|
2327
|
+
`flex-direction:column;gap:0;` +
|
|
2329
2328
|
`background:${cvar("surface")};` +
|
|
2330
|
-
`border:1px solid ${cvar("border")}
|
|
2329
|
+
`border:1px solid ${cvar("border")};border-radius:.4rem;` +
|
|
2330
|
+
`box-shadow:0 .2rem .65rem color-mix(in srgb,${cvar("text")} 12%,transparent)}` +
|
|
2331
2331
|
`${menu}[data-opens="down"] ${list}{` +
|
|
2332
|
-
`top:calc(100% +
|
|
2332
|
+
`top:calc(100% + 4px);right:0}` +
|
|
2333
2333
|
`${menu}[data-opens="up"] ${list}{` +
|
|
2334
|
-
`bottom:calc(100% +
|
|
2335
|
-
`${item}{display:block;padding
|
|
2336
|
-
`font-size
|
|
2334
|
+
`bottom:calc(100% + 4px);left:0}` +
|
|
2335
|
+
`${item}{display:block;padding:.3rem .6rem;` +
|
|
2336
|
+
`border-radius:.4rem;font-size:.8125rem;line-height:1.35;` +
|
|
2337
2337
|
`white-space:nowrap;color:${cvar("text")};` +
|
|
2338
2338
|
`text-decoration:none}` +
|
|
2339
2339
|
`${item}:hover,${item}:focus-visible{` +
|
|
2340
|
-
`background
|
|
2341
|
-
`color:${cvar("
|
|
2342
|
-
`${item}[aria-current]{
|
|
2340
|
+
`background:color-mix(in srgb,${cvar("text")} 7%,transparent);` +
|
|
2341
|
+
`color:${cvar("text")};outline:0}` +
|
|
2342
|
+
`${item}[aria-current]{background:color-mix(in srgb,${cvar("text")} 12%,transparent)}`;
|
|
2343
2343
|
|
|
2344
2344
|
},
|
|
2345
2345
|
"src/Component/usecase/headingAnchor.ts": function (module, exports, require) {
|
|
@@ -3026,7 +3026,7 @@ const dress = (c) => {
|
|
|
3026
3026
|
controls.className = p + "-sidebar-controls";
|
|
3027
3027
|
controls.setAttribute("role", "group");
|
|
3028
3028
|
controls.setAttribute("aria-label", label("表示設定", "Display settings"));
|
|
3029
|
-
|
|
3029
|
+
bar.append(controls);
|
|
3030
3030
|
drawerLabel.replaceWith(toggle);
|
|
3031
3031
|
for (const selector of [
|
|
3032
3032
|
"." + p + "-lang",
|
|
@@ -3038,7 +3038,7 @@ const dress = (c) => {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
const language = controls.querySelector("." + p + "-lang");
|
|
3040
3040
|
if (language)
|
|
3041
|
-
language.setAttribute("data-opens", "
|
|
3041
|
+
language.setAttribute("data-opens", "down");
|
|
3042
3042
|
const sync = () => {
|
|
3043
3043
|
const expanded = desktop.matches
|
|
3044
3044
|
? !document.documentElement.hasAttribute(c.min)
|
|
@@ -3058,6 +3058,10 @@ const dress = (c) => {
|
|
|
3058
3058
|
sync();
|
|
3059
3059
|
});
|
|
3060
3060
|
drawer.addEventListener("change", sync);
|
|
3061
|
+
new MutationObserver(sync).observe(document.documentElement, {
|
|
3062
|
+
attributes: true,
|
|
3063
|
+
attributeFilter: [c.min],
|
|
3064
|
+
});
|
|
3061
3065
|
desktop.addEventListener("change", sync);
|
|
3062
3066
|
sync();
|
|
3063
3067
|
}
|
|
@@ -3079,6 +3083,16 @@ const dress = (c) => {
|
|
|
3079
3083
|
divider.setAttribute("aria-hidden", "true");
|
|
3080
3084
|
divider.textContent = "›";
|
|
3081
3085
|
home.after(divider, trail);
|
|
3086
|
+
const pageFoot = shell.querySelector("." + p + "-doc-foot");
|
|
3087
|
+
const footText = pageFoot && pageFoot.textContent
|
|
3088
|
+
? pageFoot.textContent.trim()
|
|
3089
|
+
: "";
|
|
3090
|
+
if (footText !== "") {
|
|
3091
|
+
const foot = document.createElement("footer");
|
|
3092
|
+
foot.className = p + "-doc-shell-foot";
|
|
3093
|
+
foot.textContent = footText;
|
|
3094
|
+
strip.after(foot);
|
|
3095
|
+
}
|
|
3082
3096
|
const status = document.createElement("p");
|
|
3083
3097
|
status.className = p + "-doc-status";
|
|
3084
3098
|
status.setAttribute("role", "status");
|
|
@@ -3103,15 +3117,31 @@ const dress = (c) => {
|
|
|
3103
3117
|
"]:not([" +
|
|
3104
3118
|
c.leaving +
|
|
3105
3119
|
"])"));
|
|
3120
|
+
const copyByCommand = (value) => {
|
|
3121
|
+
const field = document.createElement("textarea");
|
|
3122
|
+
field.value = value;
|
|
3123
|
+
field.setAttribute("readonly", "");
|
|
3124
|
+
field.style.position = "fixed";
|
|
3125
|
+
field.style.opacity = "0";
|
|
3126
|
+
document.body.append(field);
|
|
3127
|
+
field.select();
|
|
3128
|
+
const copied = document.execCommand("copy");
|
|
3129
|
+
field.remove();
|
|
3130
|
+
return copied;
|
|
3131
|
+
};
|
|
3106
3132
|
const copy = (value, done) => {
|
|
3107
3133
|
const fail = () => announce(label("クリップボードにコピーできませんでした。", "Could not copy to the clipboard."));
|
|
3108
|
-
|
|
3109
|
-
|
|
3134
|
+
const fallback = () => copyByCommand(value)
|
|
3135
|
+
? announce(done)
|
|
3136
|
+
: fail();
|
|
3137
|
+
if (!navigator.clipboard ||
|
|
3138
|
+
!window.isSecureContext) {
|
|
3139
|
+
fallback();
|
|
3110
3140
|
return;
|
|
3111
3141
|
}
|
|
3112
3142
|
navigator.clipboard
|
|
3113
3143
|
.writeText(value)
|
|
3114
|
-
.then(() => announce(done),
|
|
3144
|
+
.then(() => announce(done), fallback);
|
|
3115
3145
|
};
|
|
3116
3146
|
const addActions = (col, mount) => {
|
|
3117
3147
|
const menu = document.createElement("details");
|
|
@@ -3187,6 +3217,7 @@ const dress = (c) => {
|
|
|
3187
3217
|
behavior: motion,
|
|
3188
3218
|
});
|
|
3189
3219
|
};
|
|
3220
|
+
let shownColumns = 0;
|
|
3190
3221
|
const sync = () => {
|
|
3191
3222
|
room.style.width = "0px";
|
|
3192
3223
|
const open = columns();
|
|
@@ -3213,6 +3244,8 @@ const dress = (c) => {
|
|
|
3213
3244
|
close.hidden = !col.querySelector("." + c.fold);
|
|
3214
3245
|
if (open.length < 2)
|
|
3215
3246
|
return;
|
|
3247
|
+
if (hrefFor(col) === home.href)
|
|
3248
|
+
return;
|
|
3216
3249
|
const item = document.createElement("li");
|
|
3217
3250
|
const button = document.createElement("button");
|
|
3218
3251
|
button.type = "button";
|
|
@@ -3223,10 +3256,32 @@ const dress = (c) => {
|
|
|
3223
3256
|
item.append(button);
|
|
3224
3257
|
crumbs.push(item);
|
|
3225
3258
|
});
|
|
3259
|
+
if (open.length >= 3 &&
|
|
3260
|
+
shownColumns < 3 &&
|
|
3261
|
+
fold &&
|
|
3262
|
+
window.matchMedia("(min-width: 1024px)")
|
|
3263
|
+
.matches &&
|
|
3264
|
+
!document.documentElement.hasAttribute(c.min))
|
|
3265
|
+
fold.click();
|
|
3266
|
+
shownColumns = open.length;
|
|
3226
3267
|
divider.hidden = crumbs.length === 0;
|
|
3227
3268
|
path.replaceChildren(...crumbs);
|
|
3228
3269
|
trail.scrollLeft = trail.scrollWidth;
|
|
3229
3270
|
};
|
|
3271
|
+
document.addEventListener("click", (event) => {
|
|
3272
|
+
const target = event.target;
|
|
3273
|
+
for (const open of document.querySelectorAll("." + p + "-lang[open]")) {
|
|
3274
|
+
if (!(target instanceof Node) ||
|
|
3275
|
+
!open.contains(target))
|
|
3276
|
+
open.open = false;
|
|
3277
|
+
}
|
|
3278
|
+
});
|
|
3279
|
+
document.addEventListener("keydown", (event) => {
|
|
3280
|
+
if (event.key !== "Escape")
|
|
3281
|
+
return;
|
|
3282
|
+
for (const open of document.querySelectorAll("." + p + "-lang[open]"))
|
|
3283
|
+
open.open = false;
|
|
3284
|
+
});
|
|
3230
3285
|
document.addEventListener("click", (event) => {
|
|
3231
3286
|
const target = event.target;
|
|
3232
3287
|
for (const menu of strip.querySelectorAll("." + actionsClass + "[open]")) {
|
|
@@ -3266,7 +3321,8 @@ const docChromeCss = (theme) => {
|
|
|
3266
3321
|
`html:not([${marker_1.embeddedAttr}]) ${C} .${p}-shell-bar{display:flex}`,
|
|
3267
3322
|
`${C} .${p}-shell-bar-brand{flex:none;border-radius:.4rem;padding:.08rem .4rem;background:transparent;color:${v("text")}}`,
|
|
3268
3323
|
`${C} .${p}-shell-side :is(.${p}-shell-head,.${p}-shell-foot){display:none}`,
|
|
3269
|
-
|
|
3324
|
+
`${C} .${p}-shell-side{border-right-color:transparent}`,
|
|
3325
|
+
`.${p}-sidebar-controls{display:flex;align-items:center;gap:.2rem;flex:none;margin-inline-start:auto}`,
|
|
3270
3326
|
`${C} .${p}-sidebar-controls :is(.${p}-theme-toggle,.${p}-lang-toggle){width:2rem;height:2rem;margin:0;border:0;border-radius:.4rem;background:none}`,
|
|
3271
3327
|
`${C} .${p}-sidebar-controls :is(.${p}-theme-toggle,.${p}-lang-toggle):hover{background:${tint(7)};color:${v("text")}}`,
|
|
3272
3328
|
`@media (max-width:479px){${C} .${p}-shell-bar{gap:.25rem;padding-inline:.4rem}}`,
|
|
@@ -3283,7 +3339,7 @@ const docChromeCss = (theme) => {
|
|
|
3283
3339
|
`@media (min-width:1024px){` +
|
|
3284
3340
|
`${C}{transition:${inset} .28s cubic-bezier(.2,.7,.2,1)}` +
|
|
3285
3341
|
`${C} .${p}-shell-side{overflow:hidden;transition:visibility 0s}` +
|
|
3286
|
-
`${C} .${p}-shell-side
|
|
3342
|
+
`${C} .${p}-shell-side .${p}-shell-body{min-width:16rem}` +
|
|
3287
3343
|
`${min} ${C},${C}${min}{${inset}:0px}` +
|
|
3288
3344
|
`${min} ${C} .${p}-shell-side{visibility:hidden;border-right-width:0;transition:visibility 0s .28s}` +
|
|
3289
3345
|
`${min} ${C} .${p}-shell-side .${p}-shell-body{display:block}` +
|
|
@@ -3304,7 +3360,8 @@ const docChromeCss = (theme) => {
|
|
|
3304
3360
|
`${C} .${p}-doc-trail li{display:flex;align-items:center;gap:.5rem;font-size:.875rem}`,
|
|
3305
3361
|
`${C} .${p}-doc-trail li+li::before{content:"›";color:${v("muted")}}`,
|
|
3306
3362
|
`${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}`,
|
|
3307
|
-
`${C} .${p}-doc-trail button:is(:hover,:focus-visible)
|
|
3363
|
+
`${C} .${p}-doc-trail button:is(:hover,:focus-visible){background:${tint(7)};color:${v("text")}}`,
|
|
3364
|
+
`${C} .${p}-shell-bar-brand:is(:hover,:focus-visible){background:${v("text")};color:${v("surface")}}`,
|
|
3308
3365
|
`${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}`,
|
|
3309
3366
|
`${C} .${p}-shell-page .${p}-shell-head:has(details[open]){z-index:2}`,
|
|
3310
3367
|
`${C} .${p}-shell-title{color:${v("text")};font-size:1.125rem;margin:0}`,
|
|
@@ -3324,7 +3381,9 @@ const docChromeCss = (theme) => {
|
|
|
3324
3381
|
`${A} button[hidden]{display:none}`,
|
|
3325
3382
|
`${A} button:hover{background:${tint(7)};color:${v("text")}}`,
|
|
3326
3383
|
`@media (pointer:coarse){${T},${A} summary{width:2.75rem;height:2.75rem}${A} button{min-height:2.75rem}}`,
|
|
3327
|
-
|
|
3384
|
+
`${C} .${p}-doc-foot{display:none}`,
|
|
3385
|
+
`.${p}-doc-shell-foot{flex:none;padding:.35rem 1rem;font-size:.75rem;line-height:1.4;color:${v("muted")};background:${v("surface")};text-align:center}`,
|
|
3386
|
+
`.${p}-doc-status{position:fixed;inset:auto 1rem 2.5rem auto;z-index:90;margin:0;border:1px solid ${v("primary-border")};border-radius:.4rem;padding:.55rem .85rem;background:${v("surface")};color:${v("text")}}`,
|
|
3328
3387
|
`.${p}-doc-status:empty{display:none}`,
|
|
3329
3388
|
`@media (prefers-reduced-motion:reduce){${C},${T} span,${T} span::before,${T} span::after{transition:none}}`,
|
|
3330
3389
|
].join("\n");
|
package/dist/styleEntry.es.js
CHANGED
|
@@ -1611,33 +1611,33 @@ const list = `.${classHooks_1.languageListClass}`;
|
|
|
1611
1611
|
const item = `.${classHooks_1.languageOptionClass}`;
|
|
1612
1612
|
exports.languageMenuCss = `${menu}{position:relative;display:inline-flex}` +
|
|
1613
1613
|
`${toggle}{display:inline-flex;align-items:center;` +
|
|
1614
|
-
`justify-content:center;width:
|
|
1615
|
-
`border-radius:
|
|
1616
|
-
`
|
|
1617
|
-
`
|
|
1618
|
-
`transition:border-color 0.15s}` +
|
|
1614
|
+
`justify-content:center;width:2rem;height:2rem;` +
|
|
1615
|
+
`border:0;border-radius:.4rem;background:none;` +
|
|
1616
|
+
`color:${cvar("text")};cursor:pointer;list-style:none;` +
|
|
1617
|
+
`transition:background-color .15s}` +
|
|
1619
1618
|
`${toggle}::-webkit-details-marker{display:none}` +
|
|
1620
|
-
`${toggle}:hover{
|
|
1621
|
-
`${toggle}:focus-visible{outline:
|
|
1622
|
-
`${cvar("
|
|
1619
|
+
`${toggle}:hover,${menu}[open] ${toggle}{background:color-mix(in srgb,${cvar("text")} 7%,transparent)}` +
|
|
1620
|
+
`${toggle}:focus-visible{outline:1.5px solid ` +
|
|
1621
|
+
`${cvar("text")};outline-offset:2px}` +
|
|
1623
1622
|
`${toggle} svg{display:block;width:18px;height:18px}` +
|
|
1624
1623
|
`${list}{position:absolute;z-index:60;` +
|
|
1625
|
-
`min-width:
|
|
1626
|
-
`flex-direction:column;gap:0
|
|
1624
|
+
`min-width:max-content;padding:.2rem;display:flex;` +
|
|
1625
|
+
`flex-direction:column;gap:0;` +
|
|
1627
1626
|
`background:${cvar("surface")};` +
|
|
1628
|
-
`border:1px solid ${cvar("border")}
|
|
1627
|
+
`border:1px solid ${cvar("border")};border-radius:.4rem;` +
|
|
1628
|
+
`box-shadow:0 .2rem .65rem color-mix(in srgb,${cvar("text")} 12%,transparent)}` +
|
|
1629
1629
|
`${menu}[data-opens="down"] ${list}{` +
|
|
1630
|
-
`top:calc(100% +
|
|
1630
|
+
`top:calc(100% + 4px);right:0}` +
|
|
1631
1631
|
`${menu}[data-opens="up"] ${list}{` +
|
|
1632
|
-
`bottom:calc(100% +
|
|
1633
|
-
`${item}{display:block;padding
|
|
1634
|
-
`font-size
|
|
1632
|
+
`bottom:calc(100% + 4px);left:0}` +
|
|
1633
|
+
`${item}{display:block;padding:.3rem .6rem;` +
|
|
1634
|
+
`border-radius:.4rem;font-size:.8125rem;line-height:1.35;` +
|
|
1635
1635
|
`white-space:nowrap;color:${cvar("text")};` +
|
|
1636
1636
|
`text-decoration:none}` +
|
|
1637
1637
|
`${item}:hover,${item}:focus-visible{` +
|
|
1638
|
-
`background
|
|
1639
|
-
`color:${cvar("
|
|
1640
|
-
`${item}[aria-current]{
|
|
1638
|
+
`background:color-mix(in srgb,${cvar("text")} 7%,transparent);` +
|
|
1639
|
+
`color:${cvar("text")};outline:0}` +
|
|
1640
|
+
`${item}[aria-current]{background:color-mix(in srgb,${cvar("text")} 12%,transparent)}`;
|
|
1641
1641
|
|
|
1642
1642
|
},
|
|
1643
1643
|
"src/Component/usecase/headingAnchor.ts": function (module, exports, require) {
|
|
@@ -2369,7 +2369,7 @@ const dress = (c) => {
|
|
|
2369
2369
|
controls.className = p + "-sidebar-controls";
|
|
2370
2370
|
controls.setAttribute("role", "group");
|
|
2371
2371
|
controls.setAttribute("aria-label", label("表示設定", "Display settings"));
|
|
2372
|
-
|
|
2372
|
+
bar.append(controls);
|
|
2373
2373
|
drawerLabel.replaceWith(toggle);
|
|
2374
2374
|
for (const selector of [
|
|
2375
2375
|
"." + p + "-lang",
|
|
@@ -2381,7 +2381,7 @@ const dress = (c) => {
|
|
|
2381
2381
|
}
|
|
2382
2382
|
const language = controls.querySelector("." + p + "-lang");
|
|
2383
2383
|
if (language)
|
|
2384
|
-
language.setAttribute("data-opens", "
|
|
2384
|
+
language.setAttribute("data-opens", "down");
|
|
2385
2385
|
const sync = () => {
|
|
2386
2386
|
const expanded = desktop.matches
|
|
2387
2387
|
? !document.documentElement.hasAttribute(c.min)
|
|
@@ -2401,6 +2401,10 @@ const dress = (c) => {
|
|
|
2401
2401
|
sync();
|
|
2402
2402
|
});
|
|
2403
2403
|
drawer.addEventListener("change", sync);
|
|
2404
|
+
new MutationObserver(sync).observe(document.documentElement, {
|
|
2405
|
+
attributes: true,
|
|
2406
|
+
attributeFilter: [c.min],
|
|
2407
|
+
});
|
|
2404
2408
|
desktop.addEventListener("change", sync);
|
|
2405
2409
|
sync();
|
|
2406
2410
|
}
|
|
@@ -2422,6 +2426,16 @@ const dress = (c) => {
|
|
|
2422
2426
|
divider.setAttribute("aria-hidden", "true");
|
|
2423
2427
|
divider.textContent = "›";
|
|
2424
2428
|
home.after(divider, trail);
|
|
2429
|
+
const pageFoot = shell.querySelector("." + p + "-doc-foot");
|
|
2430
|
+
const footText = pageFoot && pageFoot.textContent
|
|
2431
|
+
? pageFoot.textContent.trim()
|
|
2432
|
+
: "";
|
|
2433
|
+
if (footText !== "") {
|
|
2434
|
+
const foot = document.createElement("footer");
|
|
2435
|
+
foot.className = p + "-doc-shell-foot";
|
|
2436
|
+
foot.textContent = footText;
|
|
2437
|
+
strip.after(foot);
|
|
2438
|
+
}
|
|
2425
2439
|
const status = document.createElement("p");
|
|
2426
2440
|
status.className = p + "-doc-status";
|
|
2427
2441
|
status.setAttribute("role", "status");
|
|
@@ -2446,15 +2460,31 @@ const dress = (c) => {
|
|
|
2446
2460
|
"]:not([" +
|
|
2447
2461
|
c.leaving +
|
|
2448
2462
|
"])"));
|
|
2463
|
+
const copyByCommand = (value) => {
|
|
2464
|
+
const field = document.createElement("textarea");
|
|
2465
|
+
field.value = value;
|
|
2466
|
+
field.setAttribute("readonly", "");
|
|
2467
|
+
field.style.position = "fixed";
|
|
2468
|
+
field.style.opacity = "0";
|
|
2469
|
+
document.body.append(field);
|
|
2470
|
+
field.select();
|
|
2471
|
+
const copied = document.execCommand("copy");
|
|
2472
|
+
field.remove();
|
|
2473
|
+
return copied;
|
|
2474
|
+
};
|
|
2449
2475
|
const copy = (value, done) => {
|
|
2450
2476
|
const fail = () => announce(label("クリップボードにコピーできませんでした。", "Could not copy to the clipboard."));
|
|
2451
|
-
|
|
2452
|
-
|
|
2477
|
+
const fallback = () => copyByCommand(value)
|
|
2478
|
+
? announce(done)
|
|
2479
|
+
: fail();
|
|
2480
|
+
if (!navigator.clipboard ||
|
|
2481
|
+
!window.isSecureContext) {
|
|
2482
|
+
fallback();
|
|
2453
2483
|
return;
|
|
2454
2484
|
}
|
|
2455
2485
|
navigator.clipboard
|
|
2456
2486
|
.writeText(value)
|
|
2457
|
-
.then(() => announce(done),
|
|
2487
|
+
.then(() => announce(done), fallback);
|
|
2458
2488
|
};
|
|
2459
2489
|
const addActions = (col, mount) => {
|
|
2460
2490
|
const menu = document.createElement("details");
|
|
@@ -2530,6 +2560,7 @@ const dress = (c) => {
|
|
|
2530
2560
|
behavior: motion,
|
|
2531
2561
|
});
|
|
2532
2562
|
};
|
|
2563
|
+
let shownColumns = 0;
|
|
2533
2564
|
const sync = () => {
|
|
2534
2565
|
room.style.width = "0px";
|
|
2535
2566
|
const open = columns();
|
|
@@ -2556,6 +2587,8 @@ const dress = (c) => {
|
|
|
2556
2587
|
close.hidden = !col.querySelector("." + c.fold);
|
|
2557
2588
|
if (open.length < 2)
|
|
2558
2589
|
return;
|
|
2590
|
+
if (hrefFor(col) === home.href)
|
|
2591
|
+
return;
|
|
2559
2592
|
const item = document.createElement("li");
|
|
2560
2593
|
const button = document.createElement("button");
|
|
2561
2594
|
button.type = "button";
|
|
@@ -2566,10 +2599,32 @@ const dress = (c) => {
|
|
|
2566
2599
|
item.append(button);
|
|
2567
2600
|
crumbs.push(item);
|
|
2568
2601
|
});
|
|
2602
|
+
if (open.length >= 3 &&
|
|
2603
|
+
shownColumns < 3 &&
|
|
2604
|
+
fold &&
|
|
2605
|
+
window.matchMedia("(min-width: 1024px)")
|
|
2606
|
+
.matches &&
|
|
2607
|
+
!document.documentElement.hasAttribute(c.min))
|
|
2608
|
+
fold.click();
|
|
2609
|
+
shownColumns = open.length;
|
|
2569
2610
|
divider.hidden = crumbs.length === 0;
|
|
2570
2611
|
path.replaceChildren(...crumbs);
|
|
2571
2612
|
trail.scrollLeft = trail.scrollWidth;
|
|
2572
2613
|
};
|
|
2614
|
+
document.addEventListener("click", (event) => {
|
|
2615
|
+
const target = event.target;
|
|
2616
|
+
for (const open of document.querySelectorAll("." + p + "-lang[open]")) {
|
|
2617
|
+
if (!(target instanceof Node) ||
|
|
2618
|
+
!open.contains(target))
|
|
2619
|
+
open.open = false;
|
|
2620
|
+
}
|
|
2621
|
+
});
|
|
2622
|
+
document.addEventListener("keydown", (event) => {
|
|
2623
|
+
if (event.key !== "Escape")
|
|
2624
|
+
return;
|
|
2625
|
+
for (const open of document.querySelectorAll("." + p + "-lang[open]"))
|
|
2626
|
+
open.open = false;
|
|
2627
|
+
});
|
|
2573
2628
|
document.addEventListener("click", (event) => {
|
|
2574
2629
|
const target = event.target;
|
|
2575
2630
|
for (const menu of strip.querySelectorAll("." + actionsClass + "[open]")) {
|
|
@@ -2609,7 +2664,8 @@ const docChromeCss = (theme) => {
|
|
|
2609
2664
|
`html:not([${marker_1.embeddedAttr}]) ${C} .${p}-shell-bar{display:flex}`,
|
|
2610
2665
|
`${C} .${p}-shell-bar-brand{flex:none;border-radius:.4rem;padding:.08rem .4rem;background:transparent;color:${v("text")}}`,
|
|
2611
2666
|
`${C} .${p}-shell-side :is(.${p}-shell-head,.${p}-shell-foot){display:none}`,
|
|
2612
|
-
|
|
2667
|
+
`${C} .${p}-shell-side{border-right-color:transparent}`,
|
|
2668
|
+
`.${p}-sidebar-controls{display:flex;align-items:center;gap:.2rem;flex:none;margin-inline-start:auto}`,
|
|
2613
2669
|
`${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
2670
|
`${C} .${p}-sidebar-controls :is(.${p}-theme-toggle,.${p}-lang-toggle):hover{background:${tint(7)};color:${v("text")}}`,
|
|
2615
2671
|
`@media (max-width:479px){${C} .${p}-shell-bar{gap:.25rem;padding-inline:.4rem}}`,
|
|
@@ -2626,7 +2682,7 @@ const docChromeCss = (theme) => {
|
|
|
2626
2682
|
`@media (min-width:1024px){` +
|
|
2627
2683
|
`${C}{transition:${inset} .28s cubic-bezier(.2,.7,.2,1)}` +
|
|
2628
2684
|
`${C} .${p}-shell-side{overflow:hidden;transition:visibility 0s}` +
|
|
2629
|
-
`${C} .${p}-shell-side
|
|
2685
|
+
`${C} .${p}-shell-side .${p}-shell-body{min-width:16rem}` +
|
|
2630
2686
|
`${min} ${C},${C}${min}{${inset}:0px}` +
|
|
2631
2687
|
`${min} ${C} .${p}-shell-side{visibility:hidden;border-right-width:0;transition:visibility 0s .28s}` +
|
|
2632
2688
|
`${min} ${C} .${p}-shell-side .${p}-shell-body{display:block}` +
|
|
@@ -2647,7 +2703,8 @@ const docChromeCss = (theme) => {
|
|
|
2647
2703
|
`${C} .${p}-doc-trail li{display:flex;align-items:center;gap:.5rem;font-size:.875rem}`,
|
|
2648
2704
|
`${C} .${p}-doc-trail li+li::before{content:"›";color:${v("muted")}}`,
|
|
2649
2705
|
`${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)
|
|
2706
|
+
`${C} .${p}-doc-trail button:is(:hover,:focus-visible){background:${tint(7)};color:${v("text")}}`,
|
|
2707
|
+
`${C} .${p}-shell-bar-brand:is(:hover,:focus-visible){background:${v("text")};color:${v("surface")}}`,
|
|
2651
2708
|
`${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
2709
|
`${C} .${p}-shell-page .${p}-shell-head:has(details[open]){z-index:2}`,
|
|
2653
2710
|
`${C} .${p}-shell-title{color:${v("text")};font-size:1.125rem;margin:0}`,
|
|
@@ -2667,7 +2724,9 @@ const docChromeCss = (theme) => {
|
|
|
2667
2724
|
`${A} button[hidden]{display:none}`,
|
|
2668
2725
|
`${A} button:hover{background:${tint(7)};color:${v("text")}}`,
|
|
2669
2726
|
`@media (pointer:coarse){${T},${A} summary{width:2.75rem;height:2.75rem}${A} button{min-height:2.75rem}}`,
|
|
2670
|
-
|
|
2727
|
+
`${C} .${p}-doc-foot{display:none}`,
|
|
2728
|
+
`.${p}-doc-shell-foot{flex:none;padding:.35rem 1rem;font-size:.75rem;line-height:1.4;color:${v("muted")};background:${v("surface")};text-align:center}`,
|
|
2729
|
+
`.${p}-doc-status{position:fixed;inset:auto 1rem 2.5rem 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
2730
|
`.${p}-doc-status:empty{display:none}`,
|
|
2672
2731
|
`@media (prefers-reduced-motion:reduce){${C},${T} span,${T} span::before,${T} span::after{transition:none}}`,
|
|
2673
2732
|
].join("\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plggmatic",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"description": "A column-oriented UI design framework on the plgg family: pane alignment, a typed light/dark color scheme, and fundamental components as pure functions returning plgg-view Html",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.es.js",
|