@charmland/gem 0.2.1 → 0.2.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/dist/browser/boot.d.ts +1 -1
- package/dist/browser/boot.js +1 -1
- package/dist/browser/drawer.d.ts +1 -0
- package/dist/browser/drawer.js +49 -0
- package/dist/browser/runtime.d.ts +1 -0
- package/dist/browser/runtime.js +3 -0
- package/dist/default/theme.css +1 -0
- package/dist/default/theme.js +147 -131
- package/package.json +9 -3
- package/src/app/Gem/App.elm +24 -1
- package/src/styles/ui/burger.scss +1 -1
package/dist/browser/boot.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import "@charmland/gem/theme.js";
|
|
|
6
6
|
import type { BootFlags } from "@charmland/gem-compiler/types";
|
|
7
7
|
import type { ElmApp } from "./runtime.js";
|
|
8
8
|
export declare function boot(flags: BootFlags, node?: HTMLElement): ElmApp;
|
|
9
|
-
export { connectPorts, installLightbox, installTabs } from "./runtime.js";
|
|
9
|
+
export { connectPorts, installDrawerLock, installLightbox, installTabs } from "./runtime.js";
|
|
10
10
|
export type { ElmApp, ElmProgram } from "./runtime.js";
|
package/dist/browser/boot.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function installDrawerLock(root?: ParentNode): () => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Pinning the body keeps the page still while the drawer is open, and
|
|
2
|
+
// restores the reader's offset when it closes.
|
|
3
|
+
const OPEN = "open";
|
|
4
|
+
export function installDrawerLock(root = document) {
|
|
5
|
+
const burger = root.querySelector(".burger");
|
|
6
|
+
if (!burger)
|
|
7
|
+
return () => { };
|
|
8
|
+
const body = document.body;
|
|
9
|
+
let locked = false;
|
|
10
|
+
let offset = 0;
|
|
11
|
+
const lock = () => {
|
|
12
|
+
offset = window.scrollY;
|
|
13
|
+
const gutter = window.innerWidth - document.documentElement.clientWidth;
|
|
14
|
+
body.style.position = "fixed";
|
|
15
|
+
body.style.top = `-${offset}px`;
|
|
16
|
+
body.style.left = "0";
|
|
17
|
+
body.style.right = "0";
|
|
18
|
+
body.style.overflow = "hidden";
|
|
19
|
+
if (gutter > 0)
|
|
20
|
+
body.style.paddingRight = `${gutter}px`;
|
|
21
|
+
};
|
|
22
|
+
const unlock = () => {
|
|
23
|
+
body.style.position = "";
|
|
24
|
+
body.style.top = "";
|
|
25
|
+
body.style.left = "";
|
|
26
|
+
body.style.right = "";
|
|
27
|
+
body.style.overflow = "";
|
|
28
|
+
body.style.paddingRight = "";
|
|
29
|
+
window.scrollTo(0, offset);
|
|
30
|
+
};
|
|
31
|
+
const apply = (open) => {
|
|
32
|
+
if (open === locked)
|
|
33
|
+
return;
|
|
34
|
+
locked = open;
|
|
35
|
+
if (open)
|
|
36
|
+
lock();
|
|
37
|
+
else
|
|
38
|
+
unlock();
|
|
39
|
+
};
|
|
40
|
+
const observer = new MutationObserver(() => apply(burger.classList.contains(OPEN)));
|
|
41
|
+
observer.observe(burger, { attributes: true, attributeFilter: ["class"] });
|
|
42
|
+
apply(burger.classList.contains(OPEN));
|
|
43
|
+
return () => {
|
|
44
|
+
observer.disconnect();
|
|
45
|
+
if (locked)
|
|
46
|
+
unlock();
|
|
47
|
+
locked = false;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -10,5 +10,6 @@ export type { ElmApp, MetaFlags } from "./ports.js";
|
|
|
10
10
|
export { connectPorts } from "./ports.js";
|
|
11
11
|
export { installTabs } from "./tabs.js";
|
|
12
12
|
export { installLightbox, upgradeImages } from "./lightbox.js";
|
|
13
|
+
export { installDrawerLock } from "./drawer.js";
|
|
13
14
|
export type { Lightbox } from "./lightbox.js";
|
|
14
15
|
export declare function start<App extends ElmApp>(program: ElmProgram<App>, flags: BootFlags, node?: HTMLElement): App;
|
package/dist/browser/runtime.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { connectColorScheme, prepareColorScheme, watchSystem } from "./color-scheme.js";
|
|
2
|
+
import { installDrawerLock } from "./drawer.js";
|
|
2
3
|
import { installLightbox } from "./lightbox.js";
|
|
3
4
|
import { connectExternal, connectMeta, connectPorts, connectScroll } from "./ports.js";
|
|
4
5
|
import { installLinkInterception } from "./router.js";
|
|
@@ -6,6 +7,7 @@ import { installTabs, observeTabs } from "./tabs.js";
|
|
|
6
7
|
export { connectPorts } from "./ports.js";
|
|
7
8
|
export { installTabs } from "./tabs.js";
|
|
8
9
|
export { installLightbox, upgradeImages } from "./lightbox.js";
|
|
10
|
+
export { installDrawerLock } from "./drawer.js";
|
|
9
11
|
export function start(program, flags, node) {
|
|
10
12
|
const app = program.init({
|
|
11
13
|
flags: prepareColorScheme(flags),
|
|
@@ -21,5 +23,6 @@ export function start(program, flags, node) {
|
|
|
21
23
|
installTabs();
|
|
22
24
|
observeTabs();
|
|
23
25
|
installLightbox();
|
|
26
|
+
installDrawerLock();
|
|
24
27
|
return app;
|
|
25
28
|
}
|
package/dist/default/theme.css
CHANGED
package/dist/default/theme.js
CHANGED
|
@@ -4257,7 +4257,7 @@ function _Browser_getViewport()
|
|
|
4257
4257
|
return {
|
|
4258
4258
|
cV: _Browser_getScene(),
|
|
4259
4259
|
dd: {
|
|
4260
|
-
|
|
4260
|
+
aF: _Browser_window.pageXOffset,
|
|
4261
4261
|
di: _Browser_window.pageYOffset,
|
|
4262
4262
|
dg: _Browser_doc.documentElement.clientWidth,
|
|
4263
4263
|
a2: _Browser_doc.documentElement.clientHeight
|
|
@@ -4299,7 +4299,7 @@ function _Browser_getViewportOf(id)
|
|
|
4299
4299
|
a2: node.scrollHeight
|
|
4300
4300
|
},
|
|
4301
4301
|
dd: {
|
|
4302
|
-
|
|
4302
|
+
aF: node.scrollLeft,
|
|
4303
4303
|
di: node.scrollTop,
|
|
4304
4304
|
dg: node.clientWidth,
|
|
4305
4305
|
a2: node.clientHeight
|
|
@@ -4334,13 +4334,13 @@ function _Browser_getElement(id)
|
|
|
4334
4334
|
return {
|
|
4335
4335
|
cV: _Browser_getScene(),
|
|
4336
4336
|
dd: {
|
|
4337
|
-
|
|
4337
|
+
aF: x,
|
|
4338
4338
|
di: y,
|
|
4339
4339
|
dg: _Browser_doc.documentElement.clientWidth,
|
|
4340
4340
|
a2: _Browser_doc.documentElement.clientHeight
|
|
4341
4341
|
},
|
|
4342
4342
|
bS: {
|
|
4343
|
-
|
|
4343
|
+
aF: x + rect.left,
|
|
4344
4344
|
di: y + rect.top,
|
|
4345
4345
|
dg: rect.width,
|
|
4346
4346
|
a2: rect.height
|
|
@@ -5255,8 +5255,8 @@ var $elm$core$Maybe$withDefault = F2(
|
|
|
5255
5255
|
var $author$project$Gem$Page$firstDoc = function (site_) {
|
|
5256
5256
|
return A2(
|
|
5257
5257
|
$elm$core$Maybe$withDefault,
|
|
5258
|
-
{b: 'docs', c: site_.aq.p,
|
|
5259
|
-
$elm$core$List$head(site_.
|
|
5258
|
+
{b: 'docs', c: site_.aq.p, aA: _List_Nil, aQ: '', aC: '/'},
|
|
5259
|
+
$elm$core$List$head(site_.A));
|
|
5260
5260
|
};
|
|
5261
5261
|
var $elm$core$List$sortBy = _List_sortBy;
|
|
5262
5262
|
var $author$project$Gem$Page$docFor = F2(
|
|
@@ -5268,14 +5268,14 @@ var $author$project$Gem$Page$docFor = F2(
|
|
|
5268
5268
|
A2(
|
|
5269
5269
|
$elm$core$List$filter,
|
|
5270
5270
|
function (item) {
|
|
5271
|
-
return _Utils_eq(item.
|
|
5271
|
+
return _Utils_eq(item.aC, path) || ((item.aC === '/') || A2($elm$core$String$startsWith, item.aQ + '/', path));
|
|
5272
5272
|
},
|
|
5273
5273
|
A2(
|
|
5274
5274
|
$elm$core$List$sortBy,
|
|
5275
5275
|
function (item) {
|
|
5276
5276
|
return 0 - $elm$core$String$length(item.aQ);
|
|
5277
5277
|
},
|
|
5278
|
-
site_.
|
|
5278
|
+
site_.A))));
|
|
5279
5279
|
});
|
|
5280
5280
|
var $elm$core$Maybe$map = F2(
|
|
5281
5281
|
function (f, maybe) {
|
|
@@ -5306,23 +5306,23 @@ var $author$project$Gem$App$docsIndex = F2(
|
|
|
5306
5306
|
var doc = _v0.b;
|
|
5307
5307
|
return _Utils_eq(doc.b, docId);
|
|
5308
5308
|
},
|
|
5309
|
-
A2($elm$core$List$indexedMap, $elm$core$Tuple$pair, site.
|
|
5309
|
+
A2($elm$core$List$indexedMap, $elm$core$Tuple$pair, site.A)))));
|
|
5310
5310
|
});
|
|
5311
5311
|
var $elm$core$Dict$RBEmpty_elm_builtin = {$: -2};
|
|
5312
5312
|
var $elm$core$Dict$empty = $elm$core$Dict$RBEmpty_elm_builtin;
|
|
5313
5313
|
var $author$project$Gem$App$emptySite = {
|
|
5314
5314
|
bp: '/',
|
|
5315
|
-
|
|
5315
|
+
aG: {
|
|
5316
5316
|
a1: {br: '', bz: _List_Nil, bD: _List_Nil, bU: false, bV: false, v: 'Gem'},
|
|
5317
|
-
|
|
5317
|
+
aK: {bm: _List_Nil, A: true, a5: true, u: true, j: true},
|
|
5318
5318
|
c7: {L: true, cK: true}
|
|
5319
5319
|
},
|
|
5320
5320
|
bC: _List_Nil,
|
|
5321
|
-
|
|
5321
|
+
A: _List_fromArray(
|
|
5322
5322
|
[
|
|
5323
|
-
{b: 'docs', c: 'Gem',
|
|
5323
|
+
{b: 'docs', c: 'Gem', aA: _List_Nil, aQ: '', aC: '/'}
|
|
5324
5324
|
]),
|
|
5325
|
-
|
|
5325
|
+
aJ: _List_Nil,
|
|
5326
5326
|
aq: {am: '', bR: $elm$core$Maybe$Nothing, a1: $elm$core$Maybe$Nothing, a4: 'en', a5: 'Gem', ce: $elm$core$Maybe$Nothing, p: 'Gem', J: ''},
|
|
5327
5327
|
cN: $elm$core$Dict$empty,
|
|
5328
5328
|
j: 'dark',
|
|
@@ -5345,6 +5345,38 @@ var $author$project$Ui$Tabs$init = F3(
|
|
|
5345
5345
|
function (id, activeIndex, active) {
|
|
5346
5346
|
return {d: active, ac: activeIndex, ao: false, b: id, _: $elm$core$Maybe$Nothing};
|
|
5347
5347
|
});
|
|
5348
|
+
var $elm$core$List$append = F2(
|
|
5349
|
+
function (xs, ys) {
|
|
5350
|
+
if (!ys.b) {
|
|
5351
|
+
return xs;
|
|
5352
|
+
} else {
|
|
5353
|
+
return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs);
|
|
5354
|
+
}
|
|
5355
|
+
});
|
|
5356
|
+
var $elm$core$List$concat = function (lists) {
|
|
5357
|
+
return A3($elm$core$List$foldr, $elm$core$List$append, _List_Nil, lists);
|
|
5358
|
+
};
|
|
5359
|
+
var $elm$core$List$concatMap = F2(
|
|
5360
|
+
function (f, list) {
|
|
5361
|
+
return $elm$core$List$concat(
|
|
5362
|
+
A2($elm$core$List$map, f, list));
|
|
5363
|
+
});
|
|
5364
|
+
var $author$project$Gem$App$initiallyCollapsed = function (items) {
|
|
5365
|
+
return A2(
|
|
5366
|
+
$elm$core$List$concatMap,
|
|
5367
|
+
function (item) {
|
|
5368
|
+
if (!item.$) {
|
|
5369
|
+
return _List_Nil;
|
|
5370
|
+
} else {
|
|
5371
|
+
var category = item.a;
|
|
5372
|
+
return _Utils_ap(
|
|
5373
|
+
category.z ? _List_fromArray(
|
|
5374
|
+
[category.b]) : _List_Nil,
|
|
5375
|
+
$author$project$Gem$App$initiallyCollapsed(category.b8));
|
|
5376
|
+
}
|
|
5377
|
+
},
|
|
5378
|
+
items);
|
|
5379
|
+
};
|
|
5348
5380
|
var $elm$core$Basics$composeL = F3(
|
|
5349
5381
|
function (g, f, x) {
|
|
5350
5382
|
return g(
|
|
@@ -5379,7 +5411,7 @@ var $author$project$Gem$App$toMeasured = function (result) {
|
|
|
5379
5411
|
return $author$project$Gem$App$AnchorsMeasured(measurements);
|
|
5380
5412
|
} else {
|
|
5381
5413
|
return $author$project$Gem$App$AnchorsMeasured(
|
|
5382
|
-
{
|
|
5414
|
+
{aB: _List_Nil, aD: 0, aE: 0});
|
|
5383
5415
|
}
|
|
5384
5416
|
};
|
|
5385
5417
|
var $author$project$Gem$App$measureAnchors = function (anchors) {
|
|
@@ -5390,7 +5422,7 @@ var $author$project$Gem$App$measureAnchors = function (anchors) {
|
|
|
5390
5422
|
$elm$core$Task$map2,
|
|
5391
5423
|
F2(
|
|
5392
5424
|
function (positions, viewport) {
|
|
5393
|
-
return {
|
|
5425
|
+
return {aB: positions, aD: viewport.cV.a2, aE: viewport.dd.a2};
|
|
5394
5426
|
}),
|
|
5395
5427
|
$elm$core$Task$sequence(
|
|
5396
5428
|
A2(
|
|
@@ -5447,12 +5479,12 @@ var $author$project$Gem$App$landingRoute = function (model) {
|
|
|
5447
5479
|
A2(
|
|
5448
5480
|
$elm$core$Maybe$map,
|
|
5449
5481
|
function ($) {
|
|
5450
|
-
return $.
|
|
5482
|
+
return $.aC;
|
|
5451
5483
|
},
|
|
5452
|
-
$elm$core$List$head(model.a.
|
|
5484
|
+
$elm$core$List$head(model.a.A)));
|
|
5453
5485
|
};
|
|
5454
5486
|
var $author$project$Gem$App$documentTitle = function (model) {
|
|
5455
|
-
var _v0 = model.
|
|
5487
|
+
var _v0 = model.E;
|
|
5456
5488
|
if (!_v0.$) {
|
|
5457
5489
|
var page = _v0.a;
|
|
5458
5490
|
return _Utils_eq(
|
|
@@ -5514,7 +5546,7 @@ var $author$project$Gem$Ports$setMeta = _Platform_outgoingPort(
|
|
|
5514
5546
|
]));
|
|
5515
5547
|
});
|
|
5516
5548
|
var $author$project$Gem$App$setMeta = function (model) {
|
|
5517
|
-
var page = model.
|
|
5549
|
+
var page = model.E;
|
|
5518
5550
|
var description = A2(
|
|
5519
5551
|
$elm$core$Maybe$withDefault,
|
|
5520
5552
|
model.a.aq.am,
|
|
@@ -5564,7 +5596,7 @@ var $author$project$Gem$Page$Meta = F8(
|
|
|
5564
5596
|
});
|
|
5565
5597
|
var $author$project$Gem$Page$Site = F9(
|
|
5566
5598
|
function (meta, pages, docs, entries, colors, theme, themeSystem, chrome, base) {
|
|
5567
|
-
return {bp: base,
|
|
5599
|
+
return {bp: base, aG: chrome, bC: colors, A: docs, aJ: entries, aq: meta, cN: pages, j: theme, at: themeSystem};
|
|
5568
5600
|
});
|
|
5569
5601
|
var $elm$json$Json$Decode$field = _Json_decodeField;
|
|
5570
5602
|
var $elm$json$Json$Decode$at = F2(
|
|
@@ -5574,7 +5606,7 @@ var $elm$json$Json$Decode$at = F2(
|
|
|
5574
5606
|
var $elm$json$Json$Decode$bool = _Json_decodeBool;
|
|
5575
5607
|
var $author$project$Gem$Page$Chrome = F3(
|
|
5576
5608
|
function (header, toolbar, footer) {
|
|
5577
|
-
return {a1: footer,
|
|
5609
|
+
return {a1: footer, aK: header, c7: toolbar};
|
|
5578
5610
|
});
|
|
5579
5611
|
var $author$project$Gem$Page$FooterConfig = F6(
|
|
5580
5612
|
function (enabled, text, blurb, chips, columns, eof) {
|
|
@@ -5582,7 +5614,7 @@ var $author$project$Gem$Page$FooterConfig = F6(
|
|
|
5582
5614
|
});
|
|
5583
5615
|
var $author$project$Gem$Page$HeaderConfig = F5(
|
|
5584
5616
|
function (logo, search, theme, docs, actions) {
|
|
5585
|
-
return {bm: actions,
|
|
5617
|
+
return {bm: actions, A: docs, a5: logo, u: search, j: theme};
|
|
5586
5618
|
});
|
|
5587
5619
|
var $author$project$Gem$Page$ToolbarConfig = F2(
|
|
5588
5620
|
function (copy, openIn) {
|
|
@@ -5762,7 +5794,7 @@ var $author$project$Gem$Page$color = A4(
|
|
|
5762
5794
|
A2($elm$json$Json$Decode$field, 'dark', $elm$json$Json$Decode$string)));
|
|
5763
5795
|
var $author$project$Gem$Page$Doc = F5(
|
|
5764
5796
|
function (id, label, prefix, root, nav) {
|
|
5765
|
-
return {b: id, c: label,
|
|
5797
|
+
return {b: id, c: label, aA: nav, aQ: prefix, aC: root};
|
|
5766
5798
|
});
|
|
5767
5799
|
var $author$project$Gem$Page$Category = function (a) {
|
|
5768
5800
|
return {$: 1, a: a};
|
|
@@ -5782,7 +5814,7 @@ function $author$project$Gem$Page$cyclic$nav() {
|
|
|
5782
5814
|
F4(
|
|
5783
5815
|
function (id, label, collapsed, items) {
|
|
5784
5816
|
return $author$project$Gem$Page$Category(
|
|
5785
|
-
{
|
|
5817
|
+
{z: collapsed, b: id, b8: items, c: label});
|
|
5786
5818
|
}),
|
|
5787
5819
|
A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$string),
|
|
5788
5820
|
A2($elm$json$Json$Decode$field, 'label', $elm$json$Json$Decode$string),
|
|
@@ -6521,22 +6553,6 @@ var $author$project$Gem$Page$site = A3(
|
|
|
6521
6553
|
A2($elm$json$Json$Decode$field, 'base', $elm$json$Json$Decode$string),
|
|
6522
6554
|
$elm$json$Json$Decode$succeed('/')
|
|
6523
6555
|
])));
|
|
6524
|
-
var $elm$core$List$append = F2(
|
|
6525
|
-
function (xs, ys) {
|
|
6526
|
-
if (!ys.b) {
|
|
6527
|
-
return xs;
|
|
6528
|
-
} else {
|
|
6529
|
-
return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs);
|
|
6530
|
-
}
|
|
6531
|
-
});
|
|
6532
|
-
var $elm$core$List$concat = function (lists) {
|
|
6533
|
-
return A3($elm$core$List$foldr, $elm$core$List$append, _List_Nil, lists);
|
|
6534
|
-
};
|
|
6535
|
-
var $elm$core$List$concatMap = F2(
|
|
6536
|
-
function (f, list) {
|
|
6537
|
-
return $elm$core$List$concat(
|
|
6538
|
-
A2($elm$core$List$map, f, list));
|
|
6539
|
-
});
|
|
6540
6556
|
var $author$project$Gem$App$nonEmpty = function (value) {
|
|
6541
6557
|
return $elm$core$String$isEmpty(
|
|
6542
6558
|
$elm$core$String$trim(value)) ? $elm$core$Maybe$Nothing : $elm$core$Maybe$Just(value);
|
|
@@ -6572,7 +6588,7 @@ var $author$project$Gem$App$pageHits = function (entry) {
|
|
|
6572
6588
|
entry.cW));
|
|
6573
6589
|
};
|
|
6574
6590
|
var $author$project$Gem$App$siteIndex = function (site) {
|
|
6575
|
-
return A2($elm$core$List$concatMap, $author$project$Gem$App$pageHits, site.
|
|
6591
|
+
return A2($elm$core$List$concatMap, $author$project$Gem$App$pageHits, site.aJ);
|
|
6576
6592
|
};
|
|
6577
6593
|
var $author$project$Gem$App$themeIndex = F2(
|
|
6578
6594
|
function (system, theme) {
|
|
@@ -6592,11 +6608,11 @@ var $author$project$Gem$App$init = F4(
|
|
|
6592
6608
|
site,
|
|
6593
6609
|
A2($author$project$Gem$Page$routeOf, site, url.ar));
|
|
6594
6610
|
var model = {
|
|
6595
|
-
|
|
6611
|
+
G: $elm$core$Maybe$Nothing,
|
|
6596
6612
|
T: false,
|
|
6597
|
-
|
|
6613
|
+
H: false,
|
|
6598
6614
|
q: $author$project$Ui$Burger$init,
|
|
6599
|
-
|
|
6615
|
+
z: $author$project$Gem$App$initiallyCollapsed(doc.aA),
|
|
6600
6616
|
L: $author$project$Ui$CopyButton$init,
|
|
6601
6617
|
i: doc,
|
|
6602
6618
|
m: A3(
|
|
@@ -6615,12 +6631,12 @@ var $author$project$Gem$App$init = F4(
|
|
|
6615
6631
|
'burger-docs-tabs',
|
|
6616
6632
|
A2($author$project$Gem$App$docsIndex, site, doc.b),
|
|
6617
6633
|
doc.b),
|
|
6618
|
-
|
|
6634
|
+
B: A3(
|
|
6619
6635
|
$author$project$Ui$Tabs$init,
|
|
6620
6636
|
'burger-theme-tabs',
|
|
6621
6637
|
A2($author$project$Gem$App$themeIndex, site.at, site.j),
|
|
6622
6638
|
site.j),
|
|
6623
|
-
|
|
6639
|
+
E: page,
|
|
6624
6640
|
P: false,
|
|
6625
6641
|
n: '',
|
|
6626
6642
|
Z: 0,
|
|
@@ -6629,7 +6645,7 @@ var $author$project$Gem$App$init = F4(
|
|
|
6629
6645
|
a: site,
|
|
6630
6646
|
as: slots,
|
|
6631
6647
|
j: site.j,
|
|
6632
|
-
|
|
6648
|
+
F: A3(
|
|
6633
6649
|
$author$project$Ui$Tabs$init,
|
|
6634
6650
|
'docs-theme-tabs',
|
|
6635
6651
|
A2($author$project$Gem$App$themeIndex, site.at, site.j),
|
|
@@ -6650,11 +6666,11 @@ var $author$project$Gem$App$init = F4(
|
|
|
6650
6666
|
var error = _v0.a;
|
|
6651
6667
|
return _Utils_Tuple2(
|
|
6652
6668
|
{
|
|
6653
|
-
|
|
6669
|
+
G: $elm$core$Maybe$Nothing,
|
|
6654
6670
|
T: false,
|
|
6655
|
-
|
|
6671
|
+
H: false,
|
|
6656
6672
|
q: $author$project$Ui$Burger$init,
|
|
6657
|
-
|
|
6673
|
+
z: _List_Nil,
|
|
6658
6674
|
L: $author$project$Ui$CopyButton$init,
|
|
6659
6675
|
i: A2($author$project$Gem$Page$docFor, $author$project$Gem$App$emptySite, '/'),
|
|
6660
6676
|
m: A3($author$project$Ui$Tabs$init, 'docs-tabs', 0, 'docs'),
|
|
@@ -6666,8 +6682,8 @@ var $author$project$Gem$App$init = F4(
|
|
|
6666
6682
|
ag: key,
|
|
6667
6683
|
ah: $elm$core$Maybe$Nothing,
|
|
6668
6684
|
l: A3($author$project$Ui$Tabs$init, 'burger-docs-tabs', 0, 'docs'),
|
|
6669
|
-
|
|
6670
|
-
|
|
6685
|
+
B: A3($author$project$Ui$Tabs$init, 'burger-theme-tabs', 1, 'dark'),
|
|
6686
|
+
E: $elm$core$Maybe$Nothing,
|
|
6671
6687
|
P: false,
|
|
6672
6688
|
n: '',
|
|
6673
6689
|
Z: 0,
|
|
@@ -6676,7 +6692,7 @@ var $author$project$Gem$App$init = F4(
|
|
|
6676
6692
|
a: $author$project$Gem$App$emptySite,
|
|
6677
6693
|
as: slots,
|
|
6678
6694
|
j: 'dark',
|
|
6679
|
-
|
|
6695
|
+
F: A3($author$project$Ui$Tabs$init, 'docs-theme-tabs', 1, 'dark'),
|
|
6680
6696
|
R: false,
|
|
6681
6697
|
J: url
|
|
6682
6698
|
},
|
|
@@ -7247,8 +7263,8 @@ var $author$project$Ui$Tabs$subscriptions = F2(
|
|
|
7247
7263
|
});
|
|
7248
7264
|
var $author$project$Gem$App$subscriptions = function (model) {
|
|
7249
7265
|
var shell = _Utils_eq(model.an, $elm$core$Maybe$Nothing);
|
|
7250
|
-
var header = model.a.
|
|
7251
|
-
var docsSwitcher = shell && (header.
|
|
7266
|
+
var header = model.a.aG.aK;
|
|
7267
|
+
var docsSwitcher = shell && (header.A && ($elm$core$List$length(model.a.A) > 1));
|
|
7252
7268
|
return $elm$core$Platform$Sub$batch(
|
|
7253
7269
|
_List_fromArray(
|
|
7254
7270
|
[
|
|
@@ -7271,12 +7287,12 @@ var $author$project$Gem$App$subscriptions = function (model) {
|
|
|
7271
7287
|
A2(
|
|
7272
7288
|
$elm$core$Platform$Sub$map,
|
|
7273
7289
|
$author$project$Gem$App$ThemeTabsMsg,
|
|
7274
|
-
A2($author$project$Ui$Tabs$subscriptions, shell && header.j, model.
|
|
7290
|
+
A2($author$project$Ui$Tabs$subscriptions, shell && header.j, model.F)),
|
|
7275
7291
|
A2(
|
|
7276
7292
|
$elm$core$Platform$Sub$map,
|
|
7277
7293
|
$author$project$Gem$App$MenuTabsMsg,
|
|
7278
|
-
A2($author$project$Ui$Tabs$subscriptions, model.q.aP && (shell && header.j), model.
|
|
7279
|
-
A3($author$project$Ui$Dropdown$subscriptions, 'ai-dropdown', model.
|
|
7294
|
+
A2($author$project$Ui$Tabs$subscriptions, model.q.aP && (shell && header.j), model.B)),
|
|
7295
|
+
A3($author$project$Ui$Dropdown$subscriptions, 'ai-dropdown', model.H, $author$project$Gem$App$AiToggled),
|
|
7280
7296
|
$author$project$Gem$Ports$onScroll($author$project$Gem$App$Scrolled),
|
|
7281
7297
|
$elm$browser$Browser$Events$onKeyDown($author$project$Gem$App$searchShortcutKey),
|
|
7282
7298
|
model.x ? $elm$browser$Browser$Events$onKeyDown($author$project$Gem$App$searchEscapeKey) : $elm$core$Platform$Sub$none
|
|
@@ -7293,7 +7309,7 @@ var $elm$core$Basics$ge = _Utils_ge;
|
|
|
7293
7309
|
var $author$project$Gem$App$scrollSpyOffset = 96;
|
|
7294
7310
|
var $author$project$Gem$App$activeAt = F2(
|
|
7295
7311
|
function (scrollY, measurements) {
|
|
7296
|
-
var positions = measurements.
|
|
7312
|
+
var positions = measurements.aB;
|
|
7297
7313
|
var lastId = A2(
|
|
7298
7314
|
$elm$core$Maybe$map,
|
|
7299
7315
|
$elm$core$Tuple$first,
|
|
@@ -7311,7 +7327,7 @@ var $author$project$Gem$App$activeAt = F2(
|
|
|
7311
7327
|
return _Utils_cmp(y - $author$project$Gem$App$scrollSpyOffset, scrollY) < 1;
|
|
7312
7328
|
},
|
|
7313
7329
|
positions))));
|
|
7314
|
-
var atBottom = _Utils_cmp(scrollY + measurements.
|
|
7330
|
+
var atBottom = _Utils_cmp(scrollY + measurements.aE, measurements.aD - 24) > -1;
|
|
7315
7331
|
if (atBottom) {
|
|
7316
7332
|
return A2(
|
|
7317
7333
|
$elm$core$Maybe$map,
|
|
@@ -7466,7 +7482,7 @@ var $author$project$Gem$App$docAt = F3(
|
|
|
7466
7482
|
function (doc) {
|
|
7467
7483
|
return _Utils_eq(doc.b, id);
|
|
7468
7484
|
},
|
|
7469
|
-
site.
|
|
7485
|
+
site.A)));
|
|
7470
7486
|
});
|
|
7471
7487
|
var $elm$core$Basics$neq = _Utils_notEqual;
|
|
7472
7488
|
var $elm$browser$Browser$Navigation$pushUrl = _Browser_pushUrl;
|
|
@@ -7481,13 +7497,13 @@ var $author$project$Gem$App$docNavigation = F3(
|
|
|
7481
7497
|
function (doc) {
|
|
7482
7498
|
return _Utils_eq(doc.b, after.d);
|
|
7483
7499
|
},
|
|
7484
|
-
model.a.
|
|
7500
|
+
model.a.A));
|
|
7485
7501
|
if (!_v0.$) {
|
|
7486
7502
|
var doc = _v0.a;
|
|
7487
7503
|
return (!_Utils_eq(doc.b, model.i.b)) ? A2(
|
|
7488
7504
|
$elm$browser$Browser$Navigation$pushUrl,
|
|
7489
7505
|
model.ag,
|
|
7490
|
-
A2($author$project$Gem$Page$href, model.a, doc.
|
|
7506
|
+
A2($author$project$Gem$Page$href, model.a, doc.aC)) : $elm$core$Platform$Cmd$none;
|
|
7491
7507
|
} else {
|
|
7492
7508
|
return $elm$core$Platform$Cmd$none;
|
|
7493
7509
|
}
|
|
@@ -7642,7 +7658,7 @@ var $author$project$Gem$App$origin = function (model) {
|
|
|
7642
7658
|
{b_: $elm$core$Maybe$Nothing, ar: '/', n: $elm$core$Maybe$Nothing})));
|
|
7643
7659
|
};
|
|
7644
7660
|
var $author$project$Gem$App$pageUrl = function (model) {
|
|
7645
|
-
var _v0 = model.
|
|
7661
|
+
var _v0 = model.E;
|
|
7646
7662
|
if (!_v0.$) {
|
|
7647
7663
|
var page = _v0.a;
|
|
7648
7664
|
return _Utils_ap(
|
|
@@ -7662,7 +7678,7 @@ var $author$project$Gem$App$resyncTabs = F3(
|
|
|
7662
7678
|
});
|
|
7663
7679
|
var $author$project$Gem$Ports$saveTheme = _Platform_outgoingPort('saveTheme', $elm$json$Json$Encode$string);
|
|
7664
7680
|
var $author$project$Gem$App$searchEnabled = function (model) {
|
|
7665
|
-
return model.a.
|
|
7681
|
+
return model.a.aG.aK.u;
|
|
7666
7682
|
};
|
|
7667
7683
|
var $elm$core$Process$sleep = _Process_sleep;
|
|
7668
7684
|
var $author$project$Gem$App$syncDocsTabs = F5(
|
|
@@ -7722,7 +7738,7 @@ var $author$project$Ui$Search$update = F2(
|
|
|
7722
7738
|
{U: false}),
|
|
7723
7739
|
$elm$core$Platform$Cmd$none);
|
|
7724
7740
|
case 2:
|
|
7725
|
-
var count = msg.a.
|
|
7741
|
+
var count = msg.a.aI;
|
|
7726
7742
|
var up = msg.a.aV;
|
|
7727
7743
|
if (count <= 1) {
|
|
7728
7744
|
return _Utils_Tuple2(
|
|
@@ -7759,7 +7775,7 @@ var $author$project$Ui$Tabs$measure = F2(
|
|
|
7759
7775
|
$elm$core$Task$map2,
|
|
7760
7776
|
F2(
|
|
7761
7777
|
function (track, button) {
|
|
7762
|
-
return _Utils_Tuple2(button.bS.
|
|
7778
|
+
return _Utils_Tuple2(button.bS.aF - track.bS.aF, button.bS.dg);
|
|
7763
7779
|
}),
|
|
7764
7780
|
$elm$browser$Browser$Dom$getElement(id),
|
|
7765
7781
|
$elm$browser$Browser$Dom$getElement(buttonId));
|
|
@@ -7794,7 +7810,7 @@ var $author$project$Ui$Tabs$update = F2(
|
|
|
7794
7810
|
{
|
|
7795
7811
|
ao: false,
|
|
7796
7812
|
_: $elm$core$Maybe$Just(
|
|
7797
|
-
{bj: w,
|
|
7813
|
+
{bj: w, aF: x})
|
|
7798
7814
|
}),
|
|
7799
7815
|
$elm$core$Platform$Cmd$none));
|
|
7800
7816
|
} else {
|
|
@@ -7841,7 +7857,7 @@ var $author$project$Gem$App$update = F2(
|
|
|
7841
7857
|
var next = _Utils_update(
|
|
7842
7858
|
model,
|
|
7843
7859
|
{
|
|
7844
|
-
|
|
7860
|
+
G: $elm$core$Maybe$Nothing,
|
|
7845
7861
|
q: model.af ? model.q : $author$project$Gem$App$closeBurger(model.q),
|
|
7846
7862
|
i: doc,
|
|
7847
7863
|
m: (!_Utils_eq(doc.b, model.i.b)) ? A3(
|
|
@@ -7857,7 +7873,7 @@ var $author$project$Gem$App$update = F2(
|
|
|
7857
7873
|
'burger-docs-tabs',
|
|
7858
7874
|
A2($author$project$Gem$App$docsIndex, model.a, doc.b),
|
|
7859
7875
|
doc.b) : model.l,
|
|
7860
|
-
|
|
7876
|
+
E: page,
|
|
7861
7877
|
P: false,
|
|
7862
7878
|
n: '',
|
|
7863
7879
|
x: false,
|
|
@@ -7935,12 +7951,12 @@ var $author$project$Gem$App$update = F2(
|
|
|
7935
7951
|
_Utils_update(
|
|
7936
7952
|
model,
|
|
7937
7953
|
{
|
|
7938
|
-
|
|
7954
|
+
z: A2($elm$core$List$member, id, model.z) ? A2(
|
|
7939
7955
|
$elm$core$List$filter,
|
|
7940
7956
|
function (open) {
|
|
7941
7957
|
return !_Utils_eq(open, id);
|
|
7942
7958
|
},
|
|
7943
|
-
model.
|
|
7959
|
+
model.z) : A2($elm$core$List$cons, id, model.z)
|
|
7944
7960
|
}),
|
|
7945
7961
|
$elm$core$Platform$Cmd$none);
|
|
7946
7962
|
case 8:
|
|
@@ -8018,7 +8034,7 @@ var $author$project$Gem$App$update = F2(
|
|
|
8018
8034
|
])));
|
|
8019
8035
|
case 14:
|
|
8020
8036
|
var tabsMsg = msg.a;
|
|
8021
|
-
var _v10 = A2($author$project$Ui$Tabs$update, tabsMsg, model.
|
|
8037
|
+
var _v10 = A2($author$project$Ui$Tabs$update, tabsMsg, model.F);
|
|
8022
8038
|
var themeTabs = _v10.a;
|
|
8023
8039
|
var cmd = _v10.b;
|
|
8024
8040
|
var changed = !_Utils_eq(themeTabs.d, model.j);
|
|
@@ -8026,9 +8042,9 @@ var $author$project$Gem$App$update = F2(
|
|
|
8026
8042
|
_Utils_update(
|
|
8027
8043
|
model,
|
|
8028
8044
|
{
|
|
8029
|
-
|
|
8045
|
+
B: changed ? A3($author$project$Gem$App$resyncTabs, model.a.at, 'burger-theme-tabs', themeTabs.d) : model.B,
|
|
8030
8046
|
j: themeTabs.d,
|
|
8031
|
-
|
|
8047
|
+
F: themeTabs
|
|
8032
8048
|
}),
|
|
8033
8049
|
$elm$core$Platform$Cmd$batch(
|
|
8034
8050
|
_List_fromArray(
|
|
@@ -8038,7 +8054,7 @@ var $author$project$Gem$App$update = F2(
|
|
|
8038
8054
|
])));
|
|
8039
8055
|
case 15:
|
|
8040
8056
|
var tabsMsg = msg.a;
|
|
8041
|
-
var _v11 = A2($author$project$Ui$Tabs$update, tabsMsg, model.
|
|
8057
|
+
var _v11 = A2($author$project$Ui$Tabs$update, tabsMsg, model.B);
|
|
8042
8058
|
var menuTabs = _v11.a;
|
|
8043
8059
|
var cmd = _v11.b;
|
|
8044
8060
|
var changed = !_Utils_eq(menuTabs.d, model.j);
|
|
@@ -8046,9 +8062,9 @@ var $author$project$Gem$App$update = F2(
|
|
|
8046
8062
|
_Utils_update(
|
|
8047
8063
|
model,
|
|
8048
8064
|
{
|
|
8049
|
-
|
|
8065
|
+
B: menuTabs,
|
|
8050
8066
|
j: menuTabs.d,
|
|
8051
|
-
|
|
8067
|
+
F: changed ? A3($author$project$Gem$App$resyncTabs, model.a.at, 'docs-theme-tabs', menuTabs.d) : model.F
|
|
8052
8068
|
}),
|
|
8053
8069
|
$elm$core$Platform$Cmd$batch(
|
|
8054
8070
|
_List_fromArray(
|
|
@@ -8057,11 +8073,11 @@ var $author$project$Gem$App$update = F2(
|
|
|
8057
8073
|
A2($elm$core$Platform$Cmd$map, $author$project$Gem$App$MenuTabsMsg, cmd)
|
|
8058
8074
|
])));
|
|
8059
8075
|
case 16:
|
|
8060
|
-
var opening = !model.
|
|
8076
|
+
var opening = !model.H;
|
|
8061
8077
|
return _Utils_Tuple2(
|
|
8062
8078
|
_Utils_update(
|
|
8063
8079
|
model,
|
|
8064
|
-
{T: false,
|
|
8080
|
+
{T: false, H: opening}),
|
|
8065
8081
|
opening ? A2($author$project$Ui$Dropdown$measure, $author$project$Gem$App$AiFlipped, 'ai-dropdown') : $elm$core$Platform$Cmd$none);
|
|
8066
8082
|
case 17:
|
|
8067
8083
|
var flip = msg.a;
|
|
@@ -8075,14 +8091,14 @@ var $author$project$Gem$App$update = F2(
|
|
|
8075
8091
|
return _Utils_Tuple2(
|
|
8076
8092
|
_Utils_update(
|
|
8077
8093
|
model,
|
|
8078
|
-
{
|
|
8094
|
+
{H: false}),
|
|
8079
8095
|
$author$project$Gem$Ports$openExternal(
|
|
8080
8096
|
A2(
|
|
8081
8097
|
$author$project$Gem$App$chatbotUrl,
|
|
8082
8098
|
botId,
|
|
8083
8099
|
$author$project$Gem$App$pageUrl(model))));
|
|
8084
8100
|
case 10:
|
|
8085
|
-
var _v12 = model.
|
|
8101
|
+
var _v12 = model.E;
|
|
8086
8102
|
if (!_v12.$) {
|
|
8087
8103
|
var page = _v12.a;
|
|
8088
8104
|
return _Utils_Tuple2(
|
|
@@ -8116,13 +8132,13 @@ var $author$project$Gem$App$update = F2(
|
|
|
8116
8132
|
_Utils_update(
|
|
8117
8133
|
model,
|
|
8118
8134
|
{
|
|
8119
|
-
|
|
8135
|
+
G: function () {
|
|
8120
8136
|
var _v14 = model.ah;
|
|
8121
8137
|
if (!_v14.$) {
|
|
8122
8138
|
var measurements = _v14.a;
|
|
8123
8139
|
return A2($author$project$Gem$App$activeAt, scrollY, measurements);
|
|
8124
8140
|
} else {
|
|
8125
|
-
return model.
|
|
8141
|
+
return model.G;
|
|
8126
8142
|
}
|
|
8127
8143
|
}(),
|
|
8128
8144
|
N: (scrollY < 96) ? false : ((_Utils_cmp(scrollY, model.Z + 2) > 0) ? true : ((_Utils_cmp(scrollY, model.Z - 2) < 0) ? false : model.N)),
|
|
@@ -8141,7 +8157,7 @@ var $author$project$Gem$App$update = F2(
|
|
|
8141
8157
|
_Utils_update(
|
|
8142
8158
|
model,
|
|
8143
8159
|
{
|
|
8144
|
-
|
|
8160
|
+
G: A2($author$project$Gem$App$activeAt, model.Z, measurements),
|
|
8145
8161
|
ah: $elm$core$Maybe$Just(measurements)
|
|
8146
8162
|
}),
|
|
8147
8163
|
$elm$core$Platform$Cmd$none);
|
|
@@ -9307,7 +9323,7 @@ var $author$project$Gem$App$hitHasPhrase = F2(
|
|
|
9307
9323
|
});
|
|
9308
9324
|
var $author$project$Gem$App$inDoc = F2(
|
|
9309
9325
|
function (doc, route) {
|
|
9310
|
-
return _Utils_eq(route, doc.
|
|
9326
|
+
return _Utils_eq(route, doc.aC) || (A2($elm$core$String$startsWith, doc.aQ + '/', route) || ((doc.aQ === '/') && A2($elm$core$String$startsWith, '/', route)));
|
|
9311
9327
|
});
|
|
9312
9328
|
var $elm$core$List$all = F2(
|
|
9313
9329
|
function (isOkay, list) {
|
|
@@ -9509,7 +9525,7 @@ var $author$project$Gem$App$results = function (model) {
|
|
|
9509
9525
|
function (entry) {
|
|
9510
9526
|
return A2($author$project$Gem$App$inDoc, model.i, entry.o);
|
|
9511
9527
|
},
|
|
9512
|
-
model.a.
|
|
9528
|
+
model.a.aJ))) : A2(
|
|
9513
9529
|
$elm$core$List$map,
|
|
9514
9530
|
A2($elm$core$Basics$composeR, $elm$core$Tuple$second, toItem),
|
|
9515
9531
|
A2(
|
|
@@ -9531,7 +9547,7 @@ var $author$project$Gem$Shell$docsChoices = function (config) {
|
|
|
9531
9547
|
function (doc) {
|
|
9532
9548
|
return {b3: $elm$core$Maybe$Nothing, c: doc.c, bi: doc.b};
|
|
9533
9549
|
},
|
|
9534
|
-
config.
|
|
9550
|
+
config.A);
|
|
9535
9551
|
};
|
|
9536
9552
|
var $author$project$Ui$Tabs$Select = F2(
|
|
9537
9553
|
function (a, b) {
|
|
@@ -9545,7 +9561,7 @@ var $author$project$Ui$Tabs$view = F2(
|
|
|
9545
9561
|
var _v2 = model._;
|
|
9546
9562
|
if (!_v2.$) {
|
|
9547
9563
|
var w = _v2.a.bj;
|
|
9548
|
-
var x = _v2.a.
|
|
9564
|
+
var x = _v2.a.aF;
|
|
9549
9565
|
return _List_fromArray(
|
|
9550
9566
|
[
|
|
9551
9567
|
A2(
|
|
@@ -9649,7 +9665,7 @@ var $author$project$Ui$Tabs$view = F2(
|
|
|
9649
9665
|
A2($elm$core$List$indexedMap, button_, config.ax)));
|
|
9650
9666
|
});
|
|
9651
9667
|
var $author$project$Gem$Shell$menuDocsTabsView = function (config) {
|
|
9652
|
-
return ($elm$core$List$length(config.
|
|
9668
|
+
return ($elm$core$List$length(config.A) < 2) ? $elm$html$Html$text('') : A2(
|
|
9653
9669
|
$elm$html$Html$map,
|
|
9654
9670
|
config.cy,
|
|
9655
9671
|
A2(
|
|
@@ -9770,7 +9786,7 @@ var $author$project$Gem$Shell$themeChoices = function (system) {
|
|
|
9770
9786
|
])));
|
|
9771
9787
|
};
|
|
9772
9788
|
var $author$project$Gem$Shell$burgerControls = function (config) {
|
|
9773
|
-
var chrome = config.a.
|
|
9789
|
+
var chrome = config.a.aG.aK;
|
|
9774
9790
|
var parts = _Utils_ap(
|
|
9775
9791
|
chrome.j ? _List_fromArray(
|
|
9776
9792
|
[
|
|
@@ -9784,9 +9800,9 @@ var $author$project$Gem$Shell$burgerControls = function (config) {
|
|
|
9784
9800
|
ax: $author$project$Gem$Shell$themeChoices(config.a.at),
|
|
9785
9801
|
cY: 1
|
|
9786
9802
|
},
|
|
9787
|
-
config.
|
|
9803
|
+
config.B))
|
|
9788
9804
|
]) : _List_Nil,
|
|
9789
|
-
(chrome.
|
|
9805
|
+
(chrome.A && ($elm$core$List$length(config.A) > 1)) ? _List_fromArray(
|
|
9790
9806
|
[
|
|
9791
9807
|
$author$project$Gem$Shell$menuDocsTabsView(config)
|
|
9792
9808
|
]) : _List_Nil);
|
|
@@ -9914,11 +9930,11 @@ var $author$project$Gem$Shell$sections = function (config) {
|
|
|
9914
9930
|
var rootItems = A2(
|
|
9915
9931
|
$elm$core$List$filterMap,
|
|
9916
9932
|
$author$project$Gem$Shell$pageItem(config),
|
|
9917
|
-
config.
|
|
9933
|
+
config.aA);
|
|
9918
9934
|
var groups = A2(
|
|
9919
9935
|
$elm$core$List$filterMap,
|
|
9920
9936
|
$author$project$Gem$Shell$categorySection(config),
|
|
9921
|
-
config.
|
|
9937
|
+
config.aA);
|
|
9922
9938
|
return _Utils_ap(
|
|
9923
9939
|
$elm$core$List$isEmpty(rootItems) ? _List_Nil : _List_fromArray(
|
|
9924
9940
|
[
|
|
@@ -10232,7 +10248,7 @@ var $author$project$Ui$Sidebar$view = function (config) {
|
|
|
10232
10248
|
]),
|
|
10233
10249
|
A2(
|
|
10234
10250
|
$elm$core$List$concatMap,
|
|
10235
|
-
A2($author$project$Ui$Sidebar$sectionNode, config.cH, config.
|
|
10251
|
+
A2($author$project$Ui$Sidebar$sectionNode, config.cH, config.z),
|
|
10236
10252
|
config.cW)),
|
|
10237
10253
|
function () {
|
|
10238
10254
|
var _v0 = config.a1;
|
|
@@ -10259,7 +10275,7 @@ var $author$project$Gem$Shell$sidebarView = F2(
|
|
|
10259
10275
|
return $author$project$Ui$Sidebar$view(
|
|
10260
10276
|
{
|
|
10261
10277
|
aX: attributes,
|
|
10262
|
-
|
|
10278
|
+
z: config.z,
|
|
10263
10279
|
a1: $elm$core$Maybe$Nothing,
|
|
10264
10280
|
ch: false,
|
|
10265
10281
|
cH: $elm$core$Maybe$Just(config.cH),
|
|
@@ -10436,7 +10452,7 @@ var $author$project$Ui$Burger$view = F2(
|
|
|
10436
10452
|
$elm$html$Html$Attributes$class('burger-content')
|
|
10437
10453
|
]),
|
|
10438
10454
|
function () {
|
|
10439
|
-
var _v0 = config.
|
|
10455
|
+
var _v0 = config.aK;
|
|
10440
10456
|
if (!_v0.$) {
|
|
10441
10457
|
var header = _v0.a;
|
|
10442
10458
|
return _List_fromArray(
|
|
@@ -10462,7 +10478,7 @@ var $author$project$Gem$Shell$drawer = function (config) {
|
|
|
10462
10478
|
$author$project$Ui$Burger$view,
|
|
10463
10479
|
{
|
|
10464
10480
|
aX: _List_Nil,
|
|
10465
|
-
|
|
10481
|
+
aK: $elm$core$Maybe$Just(
|
|
10466
10482
|
A2(
|
|
10467
10483
|
$elm$html$Html$div,
|
|
10468
10484
|
_List_fromArray(
|
|
@@ -10545,7 +10561,7 @@ var $author$project$Gem$CharmSticker$view = A2(
|
|
|
10545
10561
|
]))
|
|
10546
10562
|
]));
|
|
10547
10563
|
var $author$project$Gem$Shell$footerView = function (config) {
|
|
10548
|
-
var footer = config.a.
|
|
10564
|
+
var footer = config.a.aG.a1;
|
|
10549
10565
|
var column = function (view_) {
|
|
10550
10566
|
return A2(
|
|
10551
10567
|
$elm$html$Html$div,
|
|
@@ -10691,7 +10707,7 @@ var $author$project$Gem$Shell$footerView = function (config) {
|
|
|
10691
10707
|
]));
|
|
10692
10708
|
};
|
|
10693
10709
|
var $author$project$Gem$Shell$docsTabsView = function (config) {
|
|
10694
|
-
return ($elm$core$List$length(config.
|
|
10710
|
+
return ($elm$core$List$length(config.A) < 2) ? $elm$html$Html$text('') : A2(
|
|
10695
10711
|
$elm$html$Html$map,
|
|
10696
10712
|
config.cv,
|
|
10697
10713
|
A2(
|
|
@@ -10802,7 +10818,7 @@ var $author$project$Gem$Shell$searchToggle = function (config) {
|
|
|
10802
10818
|
]));
|
|
10803
10819
|
};
|
|
10804
10820
|
var $author$project$Gem$Shell$header = function (config) {
|
|
10805
|
-
var chrome = config.a.
|
|
10821
|
+
var chrome = config.a.aG.aK;
|
|
10806
10822
|
return A2(
|
|
10807
10823
|
$elm$html$Html$div,
|
|
10808
10824
|
_List_fromArray(
|
|
@@ -10823,7 +10839,7 @@ var $author$project$Gem$Shell$header = function (config) {
|
|
|
10823
10839
|
[
|
|
10824
10840
|
$elm$html$Html$Attributes$class('docs-header-title'),
|
|
10825
10841
|
$elm$html$Html$Attributes$href(
|
|
10826
|
-
A2($author$project$Gem$Page$href, config.a, config.i.
|
|
10842
|
+
A2($author$project$Gem$Page$href, config.a, config.i.aC))
|
|
10827
10843
|
]),
|
|
10828
10844
|
_List_fromArray(
|
|
10829
10845
|
[
|
|
@@ -10846,7 +10862,7 @@ var $author$project$Gem$Shell$header = function (config) {
|
|
|
10846
10862
|
_List_fromArray(
|
|
10847
10863
|
[
|
|
10848
10864
|
chrome.u ? $author$project$Gem$Shell$searchToggle(config) : $elm$html$Html$text(''),
|
|
10849
|
-
chrome.
|
|
10865
|
+
chrome.A ? $author$project$Gem$Shell$docsTabsView(config) : $elm$html$Html$text(''),
|
|
10850
10866
|
chrome.j ? A2(
|
|
10851
10867
|
$elm$html$Html$map,
|
|
10852
10868
|
config.cF,
|
|
@@ -10857,7 +10873,7 @@ var $author$project$Gem$Shell$header = function (config) {
|
|
|
10857
10873
|
ax: $author$project$Gem$Shell$themeChoices(config.a.at),
|
|
10858
10874
|
cY: 1
|
|
10859
10875
|
},
|
|
10860
|
-
config.
|
|
10876
|
+
config.F)) : $elm$html$Html$text('')
|
|
10861
10877
|
])))
|
|
10862
10878
|
])));
|
|
10863
10879
|
};
|
|
@@ -11143,7 +11159,7 @@ var $author$project$Gem$Render$inline = F3(
|
|
|
11143
11159
|
var props = node.b;
|
|
11144
11160
|
var children = node.c;
|
|
11145
11161
|
return A3(
|
|
11146
|
-
slots.
|
|
11162
|
+
slots.aH,
|
|
11147
11163
|
tag,
|
|
11148
11164
|
A2($author$project$Gem$Render$rewriteProps, rewrite, props),
|
|
11149
11165
|
A3($author$project$Gem$Render$inlinesWithHref, rewrite, slots, children));
|
|
@@ -11301,7 +11317,7 @@ var $author$project$Gem$Render$block = F4(
|
|
|
11301
11317
|
return A4($author$project$Gem$Render$cardsGroupView, rewrite, slots, codeView, groups);
|
|
11302
11318
|
} else {
|
|
11303
11319
|
return A3(
|
|
11304
|
-
slots.
|
|
11320
|
+
slots.aH,
|
|
11305
11321
|
'ui-cards',
|
|
11306
11322
|
A2($author$project$Gem$Render$rewriteProps, rewrite, props),
|
|
11307
11323
|
A4($author$project$Gem$Render$blocksWithHref, rewrite, slots, codeView, children));
|
|
@@ -11311,7 +11327,7 @@ var $author$project$Gem$Render$block = F4(
|
|
|
11311
11327
|
var props = node.b;
|
|
11312
11328
|
var children = node.c;
|
|
11313
11329
|
return A3(
|
|
11314
|
-
slots.
|
|
11330
|
+
slots.aH,
|
|
11315
11331
|
tag,
|
|
11316
11332
|
A2($author$project$Gem$Render$rewriteProps, rewrite, props),
|
|
11317
11333
|
A4($author$project$Gem$Render$blocksWithHref, rewrite, slots, codeView, children));
|
|
@@ -11808,7 +11824,7 @@ var $author$project$Gem$Shell$aiDropdown = function (config) {
|
|
|
11808
11824
|
b: 'ai-dropdown',
|
|
11809
11825
|
cE: config.cj,
|
|
11810
11826
|
aO: config.ck,
|
|
11811
|
-
aP: config.
|
|
11827
|
+
aP: config.H,
|
|
11812
11828
|
cL: A2(
|
|
11813
11829
|
$elm$core$List$map,
|
|
11814
11830
|
function (bot) {
|
|
@@ -11846,7 +11862,7 @@ var $author$project$Gem$Shell$copyPageButton = function (config) {
|
|
|
11846
11862
|
});
|
|
11847
11863
|
};
|
|
11848
11864
|
var $author$project$Gem$Shell$toolbarActions = function (config) {
|
|
11849
|
-
var toolbar = config.a.
|
|
11865
|
+
var toolbar = config.a.aG.c7;
|
|
11850
11866
|
return _Utils_ap(
|
|
11851
11867
|
toolbar.L ? _List_fromArray(
|
|
11852
11868
|
[
|
|
@@ -11917,7 +11933,7 @@ var $author$project$Gem$Shell$pageMarkdownUrl = F2(
|
|
|
11917
11933
|
});
|
|
11918
11934
|
var $author$project$Gem$Shell$eofBand = F2(
|
|
11919
11935
|
function (config, page) {
|
|
11920
|
-
if (!config.a.
|
|
11936
|
+
if (!config.a.aG.a1.bV) {
|
|
11921
11937
|
return $elm$html$Html$text('');
|
|
11922
11938
|
} else {
|
|
11923
11939
|
var command = 'glow -p ' + A2($author$project$Gem$Shell$pageMarkdownUrl, config, page);
|
|
@@ -12001,7 +12017,7 @@ var $author$project$Gem$Shell$eofBand = F2(
|
|
|
12001
12017
|
});
|
|
12002
12018
|
var $author$project$Gem$Shell$pageTail = F2(
|
|
12003
12019
|
function (config, page) {
|
|
12004
|
-
return (config.a.
|
|
12020
|
+
return (config.a.aG.a1.bV || (!_Utils_eq(config.a.aq.bR, $elm$core$Maybe$Nothing))) ? A2(
|
|
12005
12021
|
$elm$html$Html$div,
|
|
12006
12022
|
_List_fromArray(
|
|
12007
12023
|
[
|
|
@@ -12024,7 +12040,7 @@ var $author$project$Gem$Shell$flatten = function (config) {
|
|
|
12024
12040
|
return A2($elm$core$List$concatMap, routeOf, category.b8);
|
|
12025
12041
|
}
|
|
12026
12042
|
};
|
|
12027
|
-
var routes = A2($elm$core$List$concatMap, routeOf, config.
|
|
12043
|
+
var routes = A2($elm$core$List$concatMap, routeOf, config.aA);
|
|
12028
12044
|
var entryFor = function (route) {
|
|
12029
12045
|
return $elm$core$List$head(
|
|
12030
12046
|
A2(
|
|
@@ -12032,7 +12048,7 @@ var $author$project$Gem$Shell$flatten = function (config) {
|
|
|
12032
12048
|
function (entry) {
|
|
12033
12049
|
return _Utils_eq(entry.o, route);
|
|
12034
12050
|
},
|
|
12035
|
-
config.a.
|
|
12051
|
+
config.a.aJ));
|
|
12036
12052
|
};
|
|
12037
12053
|
return A2($elm$core$List$filterMap, entryFor, routes);
|
|
12038
12054
|
};
|
|
@@ -12351,7 +12367,7 @@ var $author$project$Gem$Shell$tocView = F2(
|
|
|
12351
12367
|
[
|
|
12352
12368
|
$author$project$Ui$ToC$view(
|
|
12353
12369
|
{
|
|
12354
|
-
d: config.
|
|
12370
|
+
d: config.G,
|
|
12355
12371
|
aX: _List_Nil,
|
|
12356
12372
|
bN: $elm$core$Maybe$Just(
|
|
12357
12373
|
{aO: config.cG, aP: config.R}),
|
|
@@ -12398,7 +12414,7 @@ var $author$project$Ui$Toolbar$view = function (config) {
|
|
|
12398
12414
|
]));
|
|
12399
12415
|
};
|
|
12400
12416
|
var $author$project$Gem$Shell$pageView = function (config) {
|
|
12401
|
-
var _v0 = config.
|
|
12417
|
+
var _v0 = config.E;
|
|
12402
12418
|
if (_v0.$ === 1) {
|
|
12403
12419
|
return A2(
|
|
12404
12420
|
$elm$html$Html$div,
|
|
@@ -12433,7 +12449,7 @@ var $author$project$Gem$Shell$pageView = function (config) {
|
|
|
12433
12449
|
[
|
|
12434
12450
|
$elm$html$Html$Attributes$class('md-link'),
|
|
12435
12451
|
$elm$html$Html$Attributes$href(
|
|
12436
|
-
A2($author$project$Gem$Page$href, config.a, config.i.
|
|
12452
|
+
A2($author$project$Gem$Page$href, config.a, config.i.aC))
|
|
12437
12453
|
]),
|
|
12438
12454
|
_List_fromArray(
|
|
12439
12455
|
[
|
|
@@ -12975,14 +12991,14 @@ var $author$project$Ui$Search$view = F2(
|
|
|
12975
12991
|
_Utils_Tuple2(
|
|
12976
12992
|
config.c5(
|
|
12977
12993
|
$author$project$Ui$Search$Move(
|
|
12978
|
-
{
|
|
12994
|
+
{aI: itemCount, aV: true})),
|
|
12979
12995
|
true));
|
|
12980
12996
|
case 'ArrowDown':
|
|
12981
12997
|
return $elm$json$Json$Decode$succeed(
|
|
12982
12998
|
_Utils_Tuple2(
|
|
12983
12999
|
config.c5(
|
|
12984
13000
|
$author$project$Ui$Search$Move(
|
|
12985
|
-
{
|
|
13001
|
+
{aI: itemCount, aV: false})),
|
|
12986
13002
|
true));
|
|
12987
13003
|
default:
|
|
12988
13004
|
return $elm$json$Json$Decode$fail('not an arrow');
|
|
@@ -13191,20 +13207,20 @@ var $author$project$Gem$App$view = function (model) {
|
|
|
13191
13207
|
} else {
|
|
13192
13208
|
return $author$project$Gem$Shell$view(
|
|
13193
13209
|
{
|
|
13194
|
-
F: model.F,
|
|
13195
|
-
T: model.T,
|
|
13196
13210
|
G: model.G,
|
|
13211
|
+
T: model.T,
|
|
13212
|
+
H: model.H,
|
|
13197
13213
|
q: model.q,
|
|
13198
13214
|
bA: $author$project$Gem$App$codeView(model),
|
|
13199
|
-
|
|
13215
|
+
z: model.z,
|
|
13200
13216
|
bJ: model.L,
|
|
13201
13217
|
i: model.i,
|
|
13202
|
-
|
|
13218
|
+
A: model.a.A,
|
|
13203
13219
|
m: model.m,
|
|
13204
13220
|
N: model.N,
|
|
13205
13221
|
l: model.l,
|
|
13206
|
-
|
|
13207
|
-
|
|
13222
|
+
B: model.B,
|
|
13223
|
+
aA: model.i.aA,
|
|
13208
13224
|
cj: $author$project$Gem$App$AiPicked,
|
|
13209
13225
|
ck: $author$project$Gem$App$AiToggled,
|
|
13210
13226
|
cl: $author$project$Gem$App$BurgerMsg,
|
|
@@ -13221,7 +13237,7 @@ var $author$project$Gem$App$view = function (model) {
|
|
|
13221
13237
|
cF: $author$project$Gem$App$ThemeTabsMsg,
|
|
13222
13238
|
cG: $author$project$Gem$App$TocToggled,
|
|
13223
13239
|
cH: $author$project$Gem$App$GroupToggled,
|
|
13224
|
-
|
|
13240
|
+
E: model.E,
|
|
13225
13241
|
P: model.P,
|
|
13226
13242
|
n: model.n,
|
|
13227
13243
|
cS: $author$project$Gem$App$results(model),
|
|
@@ -13229,7 +13245,7 @@ var $author$project$Gem$App$view = function (model) {
|
|
|
13229
13245
|
x: model.x,
|
|
13230
13246
|
a: model.a,
|
|
13231
13247
|
as: model.as,
|
|
13232
|
-
|
|
13248
|
+
F: model.F,
|
|
13233
13249
|
R: model.R,
|
|
13234
13250
|
J: model.J
|
|
13235
13251
|
});
|
|
@@ -13543,7 +13559,7 @@ var $author$project$Ui$Stat$view = function (config) {
|
|
|
13543
13559
|
]));
|
|
13544
13560
|
};
|
|
13545
13561
|
var $author$project$Gem$Components$default = {
|
|
13546
|
-
|
|
13562
|
+
aH: F3(
|
|
13547
13563
|
function (tag, props, children) {
|
|
13548
13564
|
switch (tag) {
|
|
13549
13565
|
case 'callout':
|
|
@@ -13776,7 +13792,7 @@ var $author$project$Gem$Components$withInteractive = F2(
|
|
|
13776
13792
|
return _Utils_update(
|
|
13777
13793
|
base,
|
|
13778
13794
|
{
|
|
13779
|
-
|
|
13795
|
+
aH: F3(
|
|
13780
13796
|
function (tag, props, children) {
|
|
13781
13797
|
switch (tag) {
|
|
13782
13798
|
case 'ui-button':
|
|
@@ -13803,7 +13819,7 @@ var $author$project$Gem$Components$withInteractive = F2(
|
|
|
13803
13819
|
p: A2($author$project$Gem$Components$text, props, 'title')
|
|
13804
13820
|
});
|
|
13805
13821
|
default:
|
|
13806
|
-
return A3(base.
|
|
13822
|
+
return A3(base.aH, tag, props, children);
|
|
13807
13823
|
}
|
|
13808
13824
|
})
|
|
13809
13825
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charmland/gem",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Gem's Elm sources, default application, browser runtime, UI kit, stylesheet and fonts.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"gem",
|
|
7
|
+
"elm",
|
|
8
|
+
"documentation",
|
|
9
|
+
"theme",
|
|
10
|
+
"ui"
|
|
11
|
+
],
|
|
6
12
|
"homepage": "https://github.com/charmbracelet/gem/tree/main/packages/gem",
|
|
7
13
|
"bugs": {
|
|
8
14
|
"url": "https://github.com/charmbracelet/gem/issues"
|
|
@@ -75,7 +81,7 @@
|
|
|
75
81
|
"prepack": "bun run build"
|
|
76
82
|
},
|
|
77
83
|
"dependencies": {
|
|
78
|
-
"@charmland/gem-compiler": "0.2.
|
|
84
|
+
"@charmland/gem-compiler": "0.2.2"
|
|
79
85
|
},
|
|
80
86
|
"devDependencies": {
|
|
81
87
|
"@types/node": "^26.6.5",
|
package/src/app/Gem/App.elm
CHANGED
|
@@ -100,6 +100,29 @@ app slots =
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
|
|
103
|
+
{-| The groups a collection asks to start closed. The reader's own toggles
|
|
104
|
+
take over from here, so this is only read at init and never on navigation.
|
|
105
|
+
-}
|
|
106
|
+
initiallyCollapsed : List Page.NavItem -> List String
|
|
107
|
+
initiallyCollapsed items =
|
|
108
|
+
List.concatMap
|
|
109
|
+
(\item ->
|
|
110
|
+
case item of
|
|
111
|
+
Page.PageItem _ ->
|
|
112
|
+
[]
|
|
113
|
+
|
|
114
|
+
Page.Category category ->
|
|
115
|
+
(if category.collapsed then
|
|
116
|
+
[ category.id ]
|
|
117
|
+
|
|
118
|
+
else
|
|
119
|
+
[]
|
|
120
|
+
)
|
|
121
|
+
++ initiallyCollapsed category.items
|
|
122
|
+
)
|
|
123
|
+
items
|
|
124
|
+
|
|
125
|
+
|
|
103
126
|
init : Slots Msg -> D.Value -> Url -> Nav.Key -> ( Model, Cmd Msg )
|
|
104
127
|
init slots flags url key =
|
|
105
128
|
case D.decodeValue Page.site flags of
|
|
@@ -121,7 +144,7 @@ init slots flags url key =
|
|
|
121
144
|
, burger = Ui.Burger.init
|
|
122
145
|
, copy = Ui.CopyButton.init
|
|
123
146
|
, pageCopied = False
|
|
124
|
-
, collapsed =
|
|
147
|
+
, collapsed = initiallyCollapsed doc.nav
|
|
125
148
|
, key = key
|
|
126
149
|
, error = Nothing
|
|
127
150
|
, theme = site.theme
|
|
@@ -112,6 +112,7 @@ $row-inset: 1.5rem;
|
|
|
112
112
|
padding: 5rem 0 0;
|
|
113
113
|
transform: translateY(-100%);
|
|
114
114
|
overflow-y: auto;
|
|
115
|
+
overscroll-behavior: contain;
|
|
115
116
|
visibility: hidden;
|
|
116
117
|
transition: visibility 0s 320ms;
|
|
117
118
|
}
|
|
@@ -274,4 +275,3 @@ $row-inset: 1.5rem;
|
|
|
274
275
|
display: block;
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
|
-
|