@zsviczian/kplex-web 0.0.2 → 0.0.4
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/LICENSES/Lucide.txt +29 -0
- package/LICENSES/Source.txt +2 -2
- package/cdn.js +838 -25
- package/chunk.js +767 -10
- package/compass.css +69 -13
- package/compass.js +1 -1
- package/demo.js +1 -1
- package/offline.js +767 -10
- package/package.json +1 -1
- package/runtime-pack.json +1 -1
package/compass.css
CHANGED
|
@@ -4414,8 +4414,30 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4414
4414
|
}
|
|
4415
4415
|
.kplex-publication-header h1, .kplex-publication-note h2 { margin: 0; font-size: 1.05rem; }
|
|
4416
4416
|
.kplex-publication-header span { font-size: .85rem; color: var(--text-muted); }
|
|
4417
|
+
.kplex-publication-heading { display: flex; align-items: center; gap: .375rem; }
|
|
4418
|
+
.kplex-publication-header .kplex-publication-brand {
|
|
4419
|
+
display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; padding: 0;
|
|
4420
|
+
border-radius: .4rem;
|
|
4421
|
+
background: transparent; border: 0; color: var(--interactive-accent); font: inherit; cursor: pointer;
|
|
4422
|
+
}
|
|
4423
|
+
.kplex-publication-brand:hover { background: var(--background-primary); }
|
|
4424
|
+
.kplex-publication-license-dialog {
|
|
4425
|
+
box-sizing: border-box; width: min(52rem, calc(100% - 2rem)); max-height: 85dvh;
|
|
4426
|
+
padding: 1rem; border: 1px solid var(--background-modifier-border); border-radius: .65rem;
|
|
4427
|
+
background: var(--kplex-publication-panel); color: var(--text-normal); box-shadow: var(--shadow-s);
|
|
4428
|
+
}
|
|
4429
|
+
.kplex-publication-license-dialog::backdrop { background: #0008; }
|
|
4430
|
+
.kplex-publication-license-heading {
|
|
4431
|
+
display: flex; align-items: center; justify-content: space-between; gap: 1rem;
|
|
4432
|
+
}
|
|
4433
|
+
.kplex-publication-license-heading h2 { margin: 0; font-size: 1.25rem; }
|
|
4434
|
+
.kplex-publication-license-heading button {
|
|
4435
|
+
padding: .35rem .65rem; border: 1px solid var(--background-modifier-border); border-radius: .45rem;
|
|
4436
|
+
background: var(--background-primary); color: inherit; font: inherit; cursor: pointer;
|
|
4437
|
+
}
|
|
4438
|
+
.kplex-publication-license-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
4417
4439
|
.kplex-publication-controls { display: flex; flex-wrap: wrap; gap: .35rem; }
|
|
4418
|
-
.kplex-publication-controls button {
|
|
4440
|
+
.kplex-publication-controls :is(button, select) {
|
|
4419
4441
|
min-width: 2.75rem;
|
|
4420
4442
|
min-height: 2.75rem;
|
|
4421
4443
|
padding: .35rem .6rem;
|
|
@@ -4442,8 +4464,8 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4442
4464
|
.kplex-publication-viewport:active { cursor: grabbing; }
|
|
4443
4465
|
.kplex-publication .kplex-camera { left: 50%; top: 50%; }
|
|
4444
4466
|
.kplex-publication-exits { position: absolute; inset: 0; pointer-events: none; }
|
|
4445
|
-
.kplex-publication .kplex-publication-
|
|
4446
|
-
.kplex-publication .kplex-publication-
|
|
4467
|
+
.kplex-publication .kplex-publication-strip-scroll { touch-action: pan-y; scrollbar-color: var(--background-modifier-border) transparent; }
|
|
4468
|
+
.kplex-publication .kplex-publication-strip-scroll:focus-visible { outline-offset: -2px; }
|
|
4447
4469
|
.kplex-publication .kplex-thought {
|
|
4448
4470
|
background: var(--kplex-publication-card);
|
|
4449
4471
|
color: var(--text-normal);
|
|
@@ -4457,7 +4479,14 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4457
4479
|
border-color: transparent;
|
|
4458
4480
|
border-radius: 18px;
|
|
4459
4481
|
}
|
|
4460
|
-
.kplex-publication .kplex-gate { pointer-events:
|
|
4482
|
+
.kplex-publication .kplex-gate { pointer-events: auto; }
|
|
4483
|
+
.kplex-publication .kplex-edge.is-highlighted .kplex-edge-visible { stroke-width: 2.5px; }
|
|
4484
|
+
.kplex-publication-branch {
|
|
4485
|
+
position: absolute; z-index: 15; width: 21px; height: 21px; padding: 0;
|
|
4486
|
+
border: 1px solid var(--background-modifier-border); border-radius: 50%;
|
|
4487
|
+
background: var(--kplex-publication-panel); color: var(--text-normal); font: 14px/1 system-ui, sans-serif;
|
|
4488
|
+
cursor: pointer;
|
|
4489
|
+
}
|
|
4461
4490
|
.kplex-publication-note { border-top: 1px solid var(--background-modifier-border); }
|
|
4462
4491
|
.kplex-publication-note p { color: var(--text-muted); margin: .3rem 0 0; max-width: 70ch; }
|
|
4463
4492
|
.kplex-publication-opening { margin: 1.2rem; font: 1rem/1.5 system-ui, sans-serif; }
|
|
@@ -4520,10 +4549,12 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4520
4549
|
.kplex-publication-trail ol { display: flex; align-items: center; gap: .3rem; min-width: 0; margin: 0; padding: .15rem 0; overflow-x: auto; list-style: none; }
|
|
4521
4550
|
.kplex-publication-trail li { flex: none; min-width: 0; }
|
|
4522
4551
|
.kplex-publication-trail a {
|
|
4523
|
-
display:
|
|
4524
|
-
border: 1px solid var(--background-modifier-border); border-radius: .
|
|
4525
|
-
text-decoration: none;
|
|
4552
|
+
display: flex; align-items: center; gap: .3rem; max-width: min(18rem, 55vw); padding: .25rem .55rem;
|
|
4553
|
+
border: 1px solid var(--kplex-publication-trail-border, var(--background-modifier-border)); border-radius: .75rem; color: inherit;
|
|
4554
|
+
text-decoration: none;
|
|
4526
4555
|
}
|
|
4556
|
+
.kplex-publication-trail a > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
|
|
4557
|
+
.kplex-publication-trail a > svg { flex: none; }
|
|
4527
4558
|
.kplex-publication-trail a:hover, .kplex-publication-trail a[aria-current] { border-color: var(--interactive-accent); }
|
|
4528
4559
|
.kplex-publication-address-menu {
|
|
4529
4560
|
z-index: 90; box-sizing: border-box; padding: .3rem; overflow: auto;
|
|
@@ -4538,12 +4569,28 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4538
4569
|
.kplex-publication-address-menu button + button { margin-block-start: .25rem; }
|
|
4539
4570
|
.kplex-publication-address-menu button:disabled { opacity: .6; cursor: default; }
|
|
4540
4571
|
.kplex-publication-address-menu p { margin: .25rem .4rem; color: var(--text-muted); font-size: .9em; }
|
|
4572
|
+
.kplex-publication-canvas-menu { position: fixed; }
|
|
4573
|
+
.kplex-publication-canvas-menu button { display: flex; align-items: center; gap: .45rem; }
|
|
4574
|
+
.kplex-publication-canvas-menu [aria-haspopup="menu"] { margin-block: .25rem; }
|
|
4575
|
+
.kplex-publication-canvas-menu [role="menu"] { margin: 0 0 .25rem .75rem; }
|
|
4576
|
+
.kplex-publication-submenu-arrow { margin-inline-start: auto; }
|
|
4577
|
+
.kplex-publication-menu-check { flex: 0 0 1em; color: var(--interactive-accent); }
|
|
4578
|
+
.kplex-publication-canvas-menu button:hover { background: var(--interactive-hover, var(--background-modifier-hover)); }
|
|
4579
|
+
.kplex-publication-node-icon { flex: 0 0 auto; margin-inline-end: 4px; opacity: .88; }
|
|
4580
|
+
.kplex-publication [data-publication-crosslink]:not(.is-highlighted, .is-dimmed) { opacity: .5; }
|
|
4541
4581
|
.kplex-publication-workspace {
|
|
4542
4582
|
display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-width: 0; min-height: 0;
|
|
4543
4583
|
}
|
|
4544
4584
|
.kplex-publication-workspace[data-sidecar-dock="right"] {
|
|
4545
4585
|
grid-template-columns: minmax(0, 1fr) var(--kplex-publication-divider-size) var(--kplex-publication-sidecar-size);
|
|
4546
4586
|
}
|
|
4587
|
+
.kplex-publication-workspace[data-sidecar-dock="left"] {
|
|
4588
|
+
grid-template-columns: var(--kplex-publication-sidecar-size) var(--kplex-publication-divider-size) minmax(0, 1fr);
|
|
4589
|
+
}
|
|
4590
|
+
.kplex-publication-workspace[data-sidecar-dock="left"] > * { grid-row: 1; }
|
|
4591
|
+
.kplex-publication-workspace[data-sidecar-dock="left"] > .kplex-publication-note { grid-column: 1; }
|
|
4592
|
+
.kplex-publication-workspace[data-sidecar-dock="left"] > .kplex-publication-divider { grid-column: 2; }
|
|
4593
|
+
.kplex-publication-workspace[data-sidecar-dock="left"] > .kplex-publication-canvas { grid-column: 3; }
|
|
4547
4594
|
.kplex-publication-workspace[data-sidecar-dock="bottom"] {
|
|
4548
4595
|
grid-template-rows: minmax(0, 1fr) var(--kplex-publication-divider-size) var(--kplex-publication-sidecar-size);
|
|
4549
4596
|
}
|
|
@@ -4559,8 +4606,8 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4559
4606
|
.kplex-publication-divider[aria-orientation="horizontal"] { cursor: row-resize; }
|
|
4560
4607
|
.kplex-publication-divider[aria-orientation="horizontal"]::before { width: 2rem; height: 2px; }
|
|
4561
4608
|
.kplex-publication-canvas { position: relative; display: grid; min-width: 0; min-height: 0; }
|
|
4562
|
-
.kplex-publication-camera-actions { position: absolute; bottom: .75rem; left: .75rem; }
|
|
4563
|
-
.kplex-publication-status { position: absolute; top: .6rem; left: .75rem; right:
|
|
4609
|
+
.kplex-publication-camera-actions { position: absolute; z-index: 20; bottom: .75rem; left: .75rem; }
|
|
4610
|
+
.kplex-publication-status { position: absolute; top: .6rem; left: .75rem; right: 8rem; pointer-events: none; }
|
|
4564
4611
|
.kplex-publication-status p { display: table; margin: 0 0 .3rem; padding: .2rem .45rem; border-radius: .3rem; background: var(--kplex-publication-panel); }
|
|
4565
4612
|
.kplex-publication-production .kplex-publication-note {
|
|
4566
4613
|
min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 1rem; border: 0;
|
|
@@ -4571,6 +4618,15 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4571
4618
|
.kplex-publication-sidecar-heading h2 { flex: 1 1 9rem; min-width: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
|
|
4572
4619
|
.kplex-publication-sidecar-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
|
|
4573
4620
|
.kplex-publication-sidecar-actions button:last-child { min-width: 2.75rem; }
|
|
4621
|
+
.kplex-publication-web-note { display: flex; flex-direction: column; }
|
|
4622
|
+
.kplex-publication-web-source { margin-block-end: .6rem; }
|
|
4623
|
+
.kplex-publication-web-source a { color: var(--interactive-accent); }
|
|
4624
|
+
.kplex-publication-web-frame { flex: 1; width: 100%; min-height: 12rem; border: 1px solid var(--background-modifier-border); }
|
|
4625
|
+
.kplex-publication-github-preview { overflow-wrap: anywhere; }
|
|
4626
|
+
.kplex-publication-github-preview h3 { margin: .55rem 0; }
|
|
4627
|
+
.kplex-publication-github-preview .kplex-publication-github-description { white-space: pre-wrap; color: var(--text-normal); }
|
|
4628
|
+
.kplex-publication-github-preview li + li { margin-block-start: .45rem; }
|
|
4629
|
+
.kplex-publication-github-preview a { color: var(--interactive-accent); }
|
|
4574
4630
|
.kplex-publication-note-content { min-width: 0; overflow-wrap: anywhere; }
|
|
4575
4631
|
.kplex-publication-note-content :is(img, svg, audio, video) { max-width: 100%; }
|
|
4576
4632
|
.kplex-publication-note-content :is(img, svg, video) { height: auto; }
|
|
@@ -4633,8 +4689,8 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4633
4689
|
--background-secondary: var(--kplex-published-author-background-secondary, var(--kplex-publication-panel));
|
|
4634
4690
|
--background-modifier-hover: var(--kplex-published-author-background-modifier-hover, light-dark(#ebebeb, #353535));
|
|
4635
4691
|
--text-faint: var(--kplex-published-author-text-faint, var(--text-muted));
|
|
4636
|
-
--interactive-normal: var(--kplex-published-author-interactive-normal,
|
|
4637
|
-
--interactive-hover: var(--kplex-published-author-interactive-hover,
|
|
4692
|
+
--interactive-normal: var(--kplex-published-author-interactive-normal, light-dark(#ffffff, #333333));
|
|
4693
|
+
--interactive-hover: var(--kplex-published-author-interactive-hover, light-dark(#fafafa, #3f3f3f));
|
|
4638
4694
|
--text-on-accent: var(--kplex-published-author-text-on-accent, #ffffff);
|
|
4639
4695
|
--kplex-publication-card: var(--background-primary);
|
|
4640
4696
|
--kplex-publication-center: var(--interactive-accent);
|
|
@@ -4683,11 +4739,11 @@ body.is-mobile > .app-container > .mobile-navbar.kplex-mobile-navbar-hidden { di
|
|
|
4683
4739
|
border-radius: var(--kplex-published-author-input-radius, .35rem);
|
|
4684
4740
|
background: var(--background-primary);
|
|
4685
4741
|
}
|
|
4686
|
-
.kplex-publication-production :is(.kplex-publication-tools, .kplex-publication-note, .kplex-publication-controls) button {
|
|
4742
|
+
.kplex-publication-production :is(.kplex-publication-tools, .kplex-publication-note, .kplex-publication-controls) :is(button, select) {
|
|
4687
4743
|
border-radius: var(--kplex-published-author-button-radius, .35rem);
|
|
4688
4744
|
background: var(--interactive-normal);
|
|
4689
4745
|
}
|
|
4690
|
-
.kplex-publication-production :is(.kplex-publication-tools, .kplex-publication-note, .kplex-publication-controls) button:hover:not(:disabled) {
|
|
4746
|
+
.kplex-publication-production :is(.kplex-publication-tools, .kplex-publication-note, .kplex-publication-controls) :is(button, select):hover:not(:disabled) {
|
|
4691
4747
|
background: var(--interactive-hover);
|
|
4692
4748
|
}
|
|
4693
4749
|
.kplex-publication-production .kplex-publication-tools button[aria-pressed="true"] {
|
package/compass.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as a,e as b,f as c}from"./chunk.js";export{a as mountCompass,c as mountOfflineCompass,b as mountStandaloneCompass};
|
package/demo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as c,b as r,c as d,e as u}from"./chunk.js";c();var m=document.querySelector("[data-kplex-demo]");m&&p(m);function p(t){let o=t.ownerDocument.defaultView;if(!o)return;let l=new URL("./publication.json",t.ownerDocument.baseURI),s=new o.AbortController,a,i=async()=>{let e=t.ownerDocument.createElement("p");e.className="kplex-publication-opening",e.setAttribute("role","status"),e.textContent=r.loading,t.replaceChildren(e);try{let n=await d(o,l,s.signal);s.signal.throwIfAborted(),a=u(t,n,l)}catch{if(s.signal.aborted)return;e.setAttribute("role","alert"),e.textContent=o.crypto.subtle?r.loadFailed:r.insecure;let n=t.ownerDocument.createElement("button");n.type="button",n.textContent=r.retry,n.addEventListener("click",()=>{i()},{once:!0}),e.append(" ",n),n.focus()}};o.addEventListener("pagehide",e=>{e.persisted||(s.abort(),a?.dispose())}),i()}
|