@orbytes/astrolab 0.3.0 → 0.4.0-next.1
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/README.md +109 -64
- package/defaults.mjs +65 -0
- package/dist/core/virtual-module/virtual-routes.js +12 -1
- package/docs/PIN-CONTRACT.md +8 -0
- package/docs/PIN.md +29 -19
- package/index.d.ts +40 -16
- package/index.mjs +32 -10
- package/package.json +6 -2
- package/src/Home.astro +167 -264
- package/src/LabHead.astro +37 -1047
- package/src/chrome/ComponentCard.astro +69 -0
- package/src/chrome/Icon.astro +21 -0
- package/src/chrome/LICENSE-icons +43 -0
- package/src/chrome/Nav.astro +105 -0
- package/src/chrome/Panel.astro +104 -0
- package/src/chrome/Shell.astro +106 -0
- package/src/chrome/Sprite.astro +23 -0
- package/src/chrome/StoryView.astro +251 -0
- package/src/chrome/Tree.astro +83 -0
- package/src/chrome/ViewportControls.astro +98 -0
- package/src/chrome/ViewportStage.astro +32 -0
- package/src/chrome/fonts/OFL.txt +93 -0
- package/src/chrome/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/src/chrome/icons.ts +59 -0
- package/src/chrome/marks-client.ts +102 -0
- package/src/chrome/model.ts +142 -0
- package/src/chrome/pins-data.ts +30 -0
- package/src/chrome/shell-client.ts +372 -0
- package/src/chrome/site-data.ts +230 -0
- package/src/chrome/trees.ts +152 -0
- package/src/chrome/viewport-client.ts +579 -0
- package/src/chrome/views/Assets.astro +110 -0
- package/src/chrome/views/Pages.astro +178 -0
- package/src/chrome/views/Placeholder.astro +37 -0
- package/src/chrome/views/Tasks.astro +107 -0
- package/src/core/LICENSE-astrobook +16 -0
- package/src/core/lib/components/home.astro +4 -2
- package/src/core/lib/pages/story.astro +12 -10
- package/src/core/virtual-module/virtual-routes.ts +20 -4
- package/src/pin/board.mjs +389 -175
- package/src/pin/index.mjs +33 -2
- package/src/pin/toolbar.js +1 -1
- package/src/shell/Browse.astro +106 -353
- package/src/shell/Viewport.astro +22 -1315
- package/src/shell/lab-index.ts +23 -14
- package/src/ui/components/app.astro +5 -7
- package/src/ui/components/theme-script.astro +13 -2
- package/src/ui/lab.css +2152 -370
- package/virtual.d.ts +13 -0
- package/src/shell/CardGrid.astro +0 -297
- package/src/ui/components/build-path.ts +0 -13
- package/src/ui/components/build-tree.ts +0 -108
- package/src/ui/components/collapse-duration.ts +0 -28
- package/src/ui/components/compress-terms.ts +0 -10
- package/src/ui/components/dashboard-layout.astro +0 -39
- package/src/ui/components/home.astro +0 -65
- package/src/ui/components/layout.astro +0 -110
- package/src/ui/components/sidebar-button-fullscreen.astro +0 -38
- package/src/ui/components/sidebar-button-search.astro +0 -23
- package/src/ui/components/sidebar-button-theme.astro +0 -9
- package/src/ui/components/sidebar-button.astro +0 -24
- package/src/ui/components/sidebar-resize-handle.astro +0 -74
- package/src/ui/components/sidebar-search-panel.astro +0 -41
- package/src/ui/components/sidebar-search-script.ts +0 -103
- package/src/ui/components/sidebar-title.astro +0 -17
- package/src/ui/components/sidebar-tree-node.astro +0 -143
- package/src/ui/components/sidebar-tree.astro +0 -84
- package/src/ui/components/sidebar.astro +0 -29
- package/src/ui/components/theme-toggle.astro +0 -63
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
// Vendored from astrobook 0.13.3 (packages/ui/src/components/sidebar.astro) — see
|
|
3
|
-
// ../../core/LICENSE-astrobook.
|
|
4
|
-
// Divergence: the UnoCSS utility string is `.lab-sidebar__nav` in ../lab.css. The header row's
|
|
5
|
-
// shape matters: LabHead.astro appends the collapse and cull buttons to `#astrobook-sidebar > nav
|
|
6
|
-
// > div`, so the header stays the FIRST child <div> of this <nav>.
|
|
7
|
-
import SidebarButtonFullscreen from './sidebar-button-fullscreen.astro'
|
|
8
|
-
import SidebarButtonSearch from './sidebar-button-search.astro'
|
|
9
|
-
import SidebarButtonTheme from './sidebar-button-theme.astro'
|
|
10
|
-
import SidebarSearchPanel from './sidebar-search-panel.astro'
|
|
11
|
-
import SidebarTree from './sidebar-tree.astro'
|
|
12
|
-
import SidebarTitle from './sidebar-title.astro'
|
|
13
|
-
|
|
14
|
-
interface Props {
|
|
15
|
-
story?: string
|
|
16
|
-
}
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
<nav class="lab-sidebar__nav">
|
|
20
|
-
<div class="lab-sidebar__header">
|
|
21
|
-
<SidebarTitle />
|
|
22
|
-
<span class="lab-sidebar__spacer"></span>
|
|
23
|
-
<SidebarButtonFullscreen story={Astro.props.story} />
|
|
24
|
-
<SidebarButtonSearch />
|
|
25
|
-
<SidebarButtonTheme />
|
|
26
|
-
</div>
|
|
27
|
-
<SidebarSearchPanel />
|
|
28
|
-
<SidebarTree />
|
|
29
|
-
</nav>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
// The sun/moon button. Written for this package; replaces `astro-theme-toggle`'s Toggle (see
|
|
3
|
-
// ./theme-script.astro for why the dependency went).
|
|
4
|
-
//
|
|
5
|
-
// Divergence from what it replaces: no ripple `startViewTransition` animation. That is
|
|
6
|
-
// presentation, and this pass is function; phase 2 can put it back.
|
|
7
|
-
interface Props {
|
|
8
|
-
class?: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const { class: className } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<lab-theme-toggle class:list={["lab-theme-toggle", className]} title="Toggle theme">
|
|
15
|
-
<span class="lab-sr-only">Toggle theme</span>
|
|
16
|
-
<svg
|
|
17
|
-
class="lab-theme-icon--light"
|
|
18
|
-
viewBox="0 0 24 24"
|
|
19
|
-
fill="none"
|
|
20
|
-
stroke="currentColor"
|
|
21
|
-
stroke-width="2"
|
|
22
|
-
stroke-linecap="round"
|
|
23
|
-
stroke-linejoin="round"
|
|
24
|
-
aria-hidden="true"
|
|
25
|
-
>
|
|
26
|
-
<circle cx="12" cy="12" r="4"></circle>
|
|
27
|
-
<path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"></path>
|
|
28
|
-
</svg>
|
|
29
|
-
<svg
|
|
30
|
-
class="lab-theme-icon--dark"
|
|
31
|
-
viewBox="0 0 24 24"
|
|
32
|
-
fill="none"
|
|
33
|
-
stroke="currentColor"
|
|
34
|
-
stroke-width="2"
|
|
35
|
-
stroke-linecap="round"
|
|
36
|
-
stroke-linejoin="round"
|
|
37
|
-
aria-hidden="true"
|
|
38
|
-
>
|
|
39
|
-
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path>
|
|
40
|
-
</svg>
|
|
41
|
-
</lab-theme-toggle>
|
|
42
|
-
|
|
43
|
-
<script>
|
|
44
|
-
import { toggleTheme } from "./theme.ts";
|
|
45
|
-
|
|
46
|
-
class LabThemeToggle extends HTMLElement {
|
|
47
|
-
connectedCallback() {
|
|
48
|
-
if (!this.hasAttribute("tabindex")) this.setAttribute("tabindex", "0");
|
|
49
|
-
if (!this.hasAttribute("role")) this.setAttribute("role", "button");
|
|
50
|
-
this.addEventListener("click", () => toggleTheme());
|
|
51
|
-
this.addEventListener("keydown", (event) => {
|
|
52
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
53
|
-
event.preventDefault();
|
|
54
|
-
toggleTheme();
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!customElements.get("lab-theme-toggle")) {
|
|
61
|
-
customElements.define("lab-theme-toggle", LabThemeToggle);
|
|
62
|
-
}
|
|
63
|
-
</script>
|