@treeseed/core 0.10.21 → 0.11.0
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 +69 -125
- package/dist/content.js +1 -0
- package/dist/dev-watch.js +2 -1
- package/dist/dev.d.ts +1 -1
- package/dist/dev.js +51 -35
- package/dist/pages/404.astro +1 -1
- package/dist/pages/[slug].astro +4 -4
- package/dist/pages/agents/[slug].astro +3 -3
- package/dist/pages/agents/index.astro +3 -3
- package/dist/pages/books/[slug].astro +3 -3
- package/dist/pages/books/index.astro +3 -3
- package/dist/pages/contact.astro +2 -2
- package/dist/pages/decisions/[slug].astro +3 -3
- package/dist/pages/decisions/index.astro +3 -3
- package/dist/pages/docs-runtime/[...slug].astro +3 -3
- package/dist/pages/docs-runtime/index.astro +3 -3
- package/dist/pages/index.astro +11 -11
- package/dist/pages/notes/[slug].astro +3 -3
- package/dist/pages/notes/index.astro +3 -3
- package/dist/pages/objectives/[slug].astro +3 -3
- package/dist/pages/objectives/index.astro +3 -3
- package/dist/pages/people/[slug].astro +3 -3
- package/dist/pages/people/index.astro +3 -3
- package/dist/pages/proposals/[slug].astro +3 -3
- package/dist/pages/proposals/index.astro +3 -3
- package/dist/pages/questions/[slug].astro +3 -3
- package/dist/pages/questions/index.astro +3 -3
- package/dist/pages/ui/index.astro +23 -23
- package/dist/platform-resources.js +5 -1
- package/dist/scripts/build-dist.js +2 -0
- package/dist/scripts/release-verify.js +24 -2
- package/dist/scripts/workspace-bootstrap.js +3 -0
- package/dist/site.js +49 -11
- package/dist/styles/global.css +5 -5
- package/dist/templates.d.ts +2 -0
- package/dist/templates.js +8 -6
- package/package.json +3 -45
- package/templates/github/deploy-web.workflow.yml +36 -2
- package/dist/components/DevWatchReload.astro +0 -45
- package/dist/components/SiteTitle.astro +0 -51
- package/dist/components/content/ContentStatusLegend.astro +0 -18
- package/dist/components/content/StatusBadge.astro +0 -11
- package/dist/components/docs/BookFontControls.astro +0 -180
- package/dist/components/docs/DesktopSidebarToggle.astro +0 -88
- package/dist/components/docs/DownloadBook.astro +0 -34
- package/dist/components/docs/Footer.astro +0 -112
- package/dist/components/docs/Header.astro +0 -157
- package/dist/components/docs/PageFrame.astro +0 -260
- package/dist/components/docs/PageSidebar.astro +0 -63
- package/dist/components/docs/PageTitle.astro +0 -39
- package/dist/components/docs/Sidebar.astro +0 -41
- package/dist/components/docs/ThemeSelect.astro +0 -5
- package/dist/components/forms/ContactForm.astro +0 -233
- package/dist/components/forms/FooterSubscribeForm.astro +0 -188
- package/dist/components/site/BookList.astro +0 -27
- package/dist/components/site/CTASection.astro +0 -24
- package/dist/components/site/ChronicleList.astro +0 -33
- package/dist/components/site/Hero.astro +0 -18
- package/dist/components/site/NotesList.astro +0 -29
- package/dist/components/site/PathCard.astro +0 -16
- package/dist/components/site/ProfileList.astro +0 -30
- package/dist/components/site/PublishedContentBody.astro +0 -5
- package/dist/components/site/RouteNotFound.astro +0 -25
- package/dist/components/site/SectionIntro.astro +0 -9
- package/dist/components/site/StageBanner.astro +0 -8
- package/dist/components/site/TrustCallout.astro +0 -9
- package/dist/components/starlight.js +0 -6
- package/dist/components/ui/data/ActionList.astro +0 -51
- package/dist/components/ui/data/Badge.astro +0 -19
- package/dist/components/ui/data/DataTable.astro +0 -51
- package/dist/components/ui/data/KeyValueList.astro +0 -28
- package/dist/components/ui/data/MetricCard.astro +0 -25
- package/dist/components/ui/data/MetricGrid.astro +0 -27
- package/dist/components/ui/data/StatusPill.astro +0 -20
- package/dist/components/ui/forms/Button.astro +0 -59
- package/dist/components/ui/forms/Field.astro +0 -39
- package/dist/components/ui/forms/FormActions.astro +0 -12
- package/dist/components/ui/forms/PasswordMeter.astro +0 -80
- package/dist/components/ui/forms/RadioGroup.astro +0 -55
- package/dist/components/ui/forms/Select.astro +0 -47
- package/dist/components/ui/forms/TextInput.astro +0 -58
- package/dist/components/ui/forms/Textarea.astro +0 -45
- package/dist/components/ui/layout/PageHeader.astro +0 -45
- package/dist/components/ui/shell/AppShell.astro +0 -130
- package/dist/components/ui/shell/BottomNav.astro +0 -42
- package/dist/components/ui/shell/ProjectHeader.astro +0 -66
- package/dist/components/ui/shell/PublicFooter.astro +0 -39
- package/dist/components/ui/shell/PublicShell.astro +0 -184
- package/dist/components/ui/shell/RailNav.astro +0 -42
- package/dist/components/ui/shell/ShellIconLink.astro +0 -30
- package/dist/components/ui/shell/TopBar.astro +0 -52
- package/dist/components/ui/surface/Card.astro +0 -46
- package/dist/components/ui/surface/EmptyState.astro +0 -45
- package/dist/components/ui/surface/Panel.astro +0 -54
- package/dist/components/ui/theme/ThemeMenu.astro +0 -58
- package/dist/components/ui/theme/ThemePreviewSwatch.astro +0 -18
- package/dist/components/ui/theme/ThemeScript.astro +0 -112
- package/dist/components/ui/theme/ThemeSelector.astro +0 -202
- package/dist/components/ui/types.js +0 -0
- package/dist/layouts/AuthoredEntryLayout.astro +0 -195
- package/dist/layouts/BookLayout.astro +0 -35
- package/dist/layouts/BridgeLayout.astro +0 -11
- package/dist/layouts/ContentLayout.astro +0 -24
- package/dist/layouts/MainLayout.astro +0 -76
- package/dist/layouts/NoteLayout.astro +0 -26
- package/dist/layouts/ProfileLayout.astro +0 -85
- package/dist/styles/app-shell.css +0 -626
- package/dist/styles/forms.css +0 -274
- package/dist/styles/theme.css +0 -198
- package/dist/styles/tokens.css +0 -65
- package/dist/styles/ui.css +0 -551
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import PublishedContentBody from '
|
|
4
|
-
import RouteNotFound from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
4
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
5
5
|
import { loadHostedBookRuntime, loadHostedDocsTree } from '../../utils/published-content';
|
|
6
6
|
import { loadPublishedEntry } from '../../utils/site-content-runtime';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import PublishedContentBody from '
|
|
4
|
-
import RouteNotFound from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
4
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
5
5
|
import { loadHostedBookRuntime, loadHostedDocsTree } from '../../utils/published-content';
|
|
6
6
|
import { loadPublishedEntry } from '../../utils/site-content-runtime';
|
|
7
7
|
|
package/dist/pages/index.astro
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import Hero from '
|
|
4
|
-
import StageBanner from '
|
|
5
|
-
import SectionIntro from '
|
|
6
|
-
import PathCard from '
|
|
7
|
-
import CTASection from '
|
|
8
|
-
import TrustCallout from '
|
|
9
|
-
import NotesList from '
|
|
10
|
-
import ChronicleList from '
|
|
11
|
-
import ProfileList from '
|
|
12
|
-
import BookList from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import Hero from '@treeseed/ui/components/astro/site/Hero.astro';
|
|
4
|
+
import StageBanner from '@treeseed/ui/components/astro/site/StageBanner.astro';
|
|
5
|
+
import SectionIntro from '@treeseed/ui/components/astro/site/SectionIntro.astro';
|
|
6
|
+
import PathCard from '@treeseed/ui/components/astro/site/PathCard.astro';
|
|
7
|
+
import CTASection from '@treeseed/ui/components/astro/site/CTASection.astro';
|
|
8
|
+
import TrustCallout from '@treeseed/ui/components/astro/site/TrustCallout.astro';
|
|
9
|
+
import NotesList from '@treeseed/ui/components/astro/site/NotesList.astro';
|
|
10
|
+
import ChronicleList from '@treeseed/ui/components/astro/site/ChronicleList.astro';
|
|
11
|
+
import ProfileList from '@treeseed/ui/components/astro/site/ProfileList.astro';
|
|
12
|
+
import BookList from '@treeseed/ui/components/astro/site/BookList.astro';
|
|
13
13
|
import {
|
|
14
14
|
getPublishedAgents,
|
|
15
15
|
getPublishedBooks,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import AuthoredEntryLayout from '
|
|
3
|
-
import PublishedContentBody from '
|
|
4
|
-
import RouteNotFound from '
|
|
2
|
+
import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
|
|
3
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
4
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
5
5
|
import { isPublishedRuntimeContentMode, loadPublishedEntry, metadataFromPublishedContent } from '../../utils/site-content-runtime';
|
|
6
6
|
|
|
7
7
|
export const prerender = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import SectionIntro from '
|
|
4
|
-
import NotesList from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import SectionIntro from '@treeseed/ui/components/astro/site/SectionIntro.astro';
|
|
4
|
+
import NotesList from '@treeseed/ui/components/astro/site/NotesList.astro';
|
|
5
5
|
import { isPublishedRuntimeContentMode, loadPublishedCollection } from '../../utils/site-content-runtime';
|
|
6
6
|
|
|
7
7
|
const publishedRuntime = isPublishedRuntimeContentMode();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import AuthoredEntryLayout from '
|
|
2
|
+
import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
|
|
3
3
|
import { resolveContributor, resolveReferences } from '../../utils/hub-content';
|
|
4
|
-
import PublishedContentBody from '
|
|
5
|
-
import RouteNotFound from '
|
|
4
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
5
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
6
6
|
import {
|
|
7
7
|
isPublishedRuntimeContentMode,
|
|
8
8
|
loadPublishedEntry,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import SectionIntro from '
|
|
4
|
-
import ChronicleList from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import SectionIntro from '@treeseed/ui/components/astro/site/SectionIntro.astro';
|
|
4
|
+
import ChronicleList from '@treeseed/ui/components/astro/site/ChronicleList.astro';
|
|
5
5
|
import { getPublishedObjectives, resolveContributorsForEntries } from '../../utils/hub-content';
|
|
6
6
|
import { isPublishedRuntimeContentMode, loadPublishedCollection, resolvePublishedContributor, metadataFromPublishedContent, loadPublishedEntry } from '../../utils/site-content-runtime';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import ProfileLayout from '
|
|
2
|
+
import ProfileLayout from '@treeseed/ui/components/astro/layouts/ProfileLayout.astro';
|
|
3
3
|
import { resolveReferences } from '../../utils/hub-content';
|
|
4
|
-
import PublishedContentBody from '
|
|
5
|
-
import RouteNotFound from '
|
|
4
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
5
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
6
6
|
import { isPublishedRuntimeContentMode, loadPublishedEntry, metadataFromPublishedContent, resolvePublishedReferences } from '../../utils/site-content-runtime';
|
|
7
7
|
|
|
8
8
|
export const prerender = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import SectionIntro from '
|
|
4
|
-
import ProfileList from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import SectionIntro from '@treeseed/ui/components/astro/site/SectionIntro.astro';
|
|
4
|
+
import ProfileList from '@treeseed/ui/components/astro/site/ProfileList.astro';
|
|
5
5
|
import { isPublishedRuntimeContentMode, loadPublishedCollection } from '../../utils/site-content-runtime';
|
|
6
6
|
|
|
7
7
|
const publishedRuntime = isPublishedRuntimeContentMode();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import AuthoredEntryLayout from '
|
|
2
|
+
import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
|
|
3
3
|
import { resolveContributor, resolveReferences } from '../../utils/hub-content';
|
|
4
|
-
import PublishedContentBody from '
|
|
5
|
-
import RouteNotFound from '
|
|
4
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
5
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
6
6
|
import {
|
|
7
7
|
isPublishedRuntimeContentMode,
|
|
8
8
|
loadPublishedEntry,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import SectionIntro from '
|
|
4
|
-
import ChronicleList from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import SectionIntro from '@treeseed/ui/components/astro/site/SectionIntro.astro';
|
|
4
|
+
import ChronicleList from '@treeseed/ui/components/astro/site/ChronicleList.astro';
|
|
5
5
|
import { getPublishedProposals, resolveContributorsForEntries } from '../../utils/hub-content';
|
|
6
6
|
import { isPublishedRuntimeContentMode, loadPublishedCollection, resolvePublishedContributor, metadataFromPublishedContent, loadPublishedEntry } from '../../utils/site-content-runtime';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import AuthoredEntryLayout from '
|
|
2
|
+
import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
|
|
3
3
|
import { resolveContributor, resolveReferences } from '../../utils/hub-content';
|
|
4
|
-
import PublishedContentBody from '
|
|
5
|
-
import RouteNotFound from '
|
|
4
|
+
import PublishedContentBody from '@treeseed/ui/components/astro/site/PublishedContentBody.astro';
|
|
5
|
+
import RouteNotFound from '@treeseed/ui/components/astro/site/RouteNotFound.astro';
|
|
6
6
|
import {
|
|
7
7
|
isPublishedRuntimeContentMode,
|
|
8
8
|
loadPublishedEntry,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import MainLayout from '
|
|
3
|
-
import SectionIntro from '
|
|
4
|
-
import ChronicleList from '
|
|
2
|
+
import MainLayout from '@treeseed/ui/components/astro/layouts/MainLayout.astro';
|
|
3
|
+
import SectionIntro from '@treeseed/ui/components/astro/site/SectionIntro.astro';
|
|
4
|
+
import ChronicleList from '@treeseed/ui/components/astro/site/ChronicleList.astro';
|
|
5
5
|
import { getPublishedQuestions, resolveContributorsForEntries } from '../../utils/hub-content';
|
|
6
6
|
import { isPublishedRuntimeContentMode, loadPublishedCollection, resolvePublishedContributor, metadataFromPublishedContent, loadPublishedEntry } from '../../utils/site-content-runtime';
|
|
7
7
|
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
import '../../styles/global.css';
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
3
|
+
import '@treeseed/ui/styles/theme.css';
|
|
4
|
+
import '@treeseed/ui/styles/ui.css';
|
|
5
|
+
import '@treeseed/ui/styles/forms.css';
|
|
6
6
|
import { ClientRouter } from 'astro:transitions';
|
|
7
|
-
import ThemeScript from '
|
|
8
|
-
import ThemeSelector from '
|
|
9
|
-
import Button from '
|
|
10
|
-
import Field from '
|
|
11
|
-
import TextInput from '
|
|
12
|
-
import Select from '
|
|
13
|
-
import Textarea from '
|
|
14
|
-
import RadioGroup from '
|
|
15
|
-
import FormActions from '
|
|
16
|
-
import PasswordMeter from '
|
|
17
|
-
import Panel from '
|
|
18
|
-
import Card from '
|
|
19
|
-
import EmptyState from '
|
|
20
|
-
import Badge from '
|
|
21
|
-
import StatusPill from '
|
|
22
|
-
import MetricGrid from '
|
|
23
|
-
import ActionList from '
|
|
24
|
-
import KeyValueList from '
|
|
25
|
-
import DataTable from '
|
|
26
|
-
import PageHeader from '
|
|
7
|
+
import ThemeScript from '@treeseed/ui/components/astro/theme/ThemeScript.astro';
|
|
8
|
+
import ThemeSelector from '@treeseed/ui/components/astro/theme/ThemeSelector.astro';
|
|
9
|
+
import Button from '@treeseed/ui/components/astro/forms/Button.astro';
|
|
10
|
+
import Field from '@treeseed/ui/components/astro/forms/Field.astro';
|
|
11
|
+
import TextInput from '@treeseed/ui/components/astro/forms/TextInput.astro';
|
|
12
|
+
import Select from '@treeseed/ui/components/astro/forms/Select.astro';
|
|
13
|
+
import Textarea from '@treeseed/ui/components/astro/forms/Textarea.astro';
|
|
14
|
+
import RadioGroup from '@treeseed/ui/components/astro/forms/RadioGroup.astro';
|
|
15
|
+
import FormActions from '@treeseed/ui/components/astro/forms/FormActions.astro';
|
|
16
|
+
import PasswordMeter from '@treeseed/ui/components/astro/forms/PasswordMeter.astro';
|
|
17
|
+
import Panel from '@treeseed/ui/components/astro/surface/Panel.astro';
|
|
18
|
+
import Card from '@treeseed/ui/components/astro/surface/Card.astro';
|
|
19
|
+
import EmptyState from '@treeseed/ui/components/astro/surface/EmptyState.astro';
|
|
20
|
+
import Badge from '@treeseed/ui/components/astro/data/Badge.astro';
|
|
21
|
+
import StatusPill from '@treeseed/ui/components/astro/data/StatusPill.astro';
|
|
22
|
+
import MetricGrid from '@treeseed/ui/components/astro/data/MetricGrid.astro';
|
|
23
|
+
import ActionList from '@treeseed/ui/components/astro/data/ActionList.astro';
|
|
24
|
+
import KeyValueList from '@treeseed/ui/components/astro/data/KeyValueList.astro';
|
|
25
|
+
import DataTable from '@treeseed/ui/components/astro/data/DataTable.astro';
|
|
26
|
+
import PageHeader from '@treeseed/ui/components/astro/layout/PageHeader.astro';
|
|
27
27
|
import { getBuiltInColorSchemes, normalizeThemePreference } from '../../utils/theme.js';
|
|
28
28
|
|
|
29
29
|
const selected = normalizeThemePreference({
|
|
@@ -104,7 +104,11 @@ function resolveTreeseedSiteResource(layers, kind, resourcePath) {
|
|
|
104
104
|
}
|
|
105
105
|
function resolveTreeseedPageEntrypoint(layers, resourcePath) {
|
|
106
106
|
const hasExplicitExtension = /\.[A-Za-z0-9]+$/u.test(resourcePath);
|
|
107
|
-
const
|
|
107
|
+
const compiledCandidates = hasExplicitExtension && /\.[cm]?tsx?$/u.test(resourcePath) ? [
|
|
108
|
+
resourcePath.replace(/\.[cm]?tsx?$/u, ".js"),
|
|
109
|
+
resourcePath.replace(/\.[cm]?tsx?$/u, ".mjs")
|
|
110
|
+
] : [];
|
|
111
|
+
const candidates = hasExplicitExtension ? [resourcePath, ...compiledCandidates, `${resourcePath}.astro`, `${resourcePath}.ts`, `${resourcePath}.js`, `${resourcePath}.mjs`] : [resourcePath, `${resourcePath}.astro`, `${resourcePath}.ts`, `${resourcePath}.js`, `${resourcePath}.mjs`];
|
|
108
112
|
for (const candidate of candidates) {
|
|
109
113
|
const resolved = resolveTreeseedSiteResource(layers, "pages", candidate);
|
|
110
114
|
if (resolved) {
|
|
@@ -212,6 +212,8 @@ function resolveWorkspaceSdkDeclarationPaths() {
|
|
|
212
212
|
}
|
|
213
213
|
return {
|
|
214
214
|
'@treeseed/sdk': [relativePathForTsconfig(packageRoot, resolve(workspaceSdkDistRoot, 'index.d.ts'))],
|
|
215
|
+
'@treeseed/sdk/types': [relativePathForTsconfig(packageRoot, resolve(workspaceSdkDistRoot, 'sdk-types.d.ts'))],
|
|
216
|
+
'@treeseed/sdk/types/*': [relativePathForTsconfig(packageRoot, resolve(workspaceSdkDistRoot, 'types', '*.d.ts'))],
|
|
215
217
|
'@treeseed/sdk/*': [relativePathForTsconfig(packageRoot, resolve(workspaceSdkDistRoot, '*.d.ts'))],
|
|
216
218
|
};
|
|
217
219
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readFileSync, readdirSync } from 'node:fs';
|
|
2
|
-
import { extname, join, resolve } from 'node:path';
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, symlinkSync } from 'node:fs';
|
|
2
|
+
import { dirname, extname, join, resolve } from 'node:path';
|
|
3
3
|
import { spawnSync } from 'node:child_process';
|
|
4
4
|
import { packageRoot } from './package-tools.js';
|
|
5
5
|
const textExtensions = new Set(['.js', '.ts', '.mjs', '.cjs', '.d.js', '.json', '.astro', '.css']);
|
|
@@ -19,6 +19,27 @@ function run(command, args, cwd = packageRoot) {
|
|
|
19
19
|
process.exit(result.status ?? 1);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
function runtimeDependencyNames() {
|
|
23
|
+
const packageJson = JSON.parse(readFileSync(resolve(packageRoot, 'package.json'), 'utf8'));
|
|
24
|
+
return Object.keys(packageJson.dependencies ?? {});
|
|
25
|
+
}
|
|
26
|
+
function ensureWorkspaceRuntimePackageLinks() {
|
|
27
|
+
for (const packageName of runtimeDependencyNames()) {
|
|
28
|
+
if (!packageName.startsWith('@treeseed/')) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const runtimePackageRoot = resolve(packageRoot, '..', packageName.slice('@treeseed/'.length));
|
|
32
|
+
if (!existsSync(resolve(runtimePackageRoot, 'package.json'))) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const linkPath = resolve(packageRoot, 'node_modules', ...packageName.split('/'));
|
|
36
|
+
if (existsSync(linkPath)) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
mkdirSync(dirname(linkPath), { recursive: true });
|
|
40
|
+
symlinkSync(runtimePackageRoot, linkPath, 'dir');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
22
43
|
function assertNoLocalDependencyLinks() {
|
|
23
44
|
const packageJson = JSON.parse(readFileSync(resolve(packageRoot, 'package.json'), 'utf8'));
|
|
24
45
|
for (const sectionName of ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies']) {
|
|
@@ -70,6 +91,7 @@ function scanDirectory(root) {
|
|
|
70
91
|
}
|
|
71
92
|
}
|
|
72
93
|
assertNoLocalDependencyLinks();
|
|
94
|
+
ensureWorkspaceRuntimePackageLinks();
|
|
73
95
|
run('npm', ['run', 'lint']);
|
|
74
96
|
scanDirectory(resolve(packageRoot, 'dist'));
|
|
75
97
|
run('npm', ['run', 'test:unit']);
|
|
@@ -7,8 +7,11 @@ import { createRequire } from 'node:module';
|
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
8
8
|
const requiredPackages = [
|
|
9
9
|
{ name: '@treeseed/sdk', dir: 'packages/sdk', build: true },
|
|
10
|
+
{ name: '@treeseed/ui', dir: 'packages/ui', build: true },
|
|
10
11
|
{ name: '@treeseed/core', dir: 'packages/core', build: true },
|
|
12
|
+
{ name: '@treeseed/admin', dir: 'packages/admin', build: true },
|
|
11
13
|
{ name: '@treeseed/cli', dir: 'packages/cli', build: true, binName: 'treeseed' },
|
|
14
|
+
{ name: '@treeseed/agent', dir: 'packages/agent', build: false },
|
|
12
15
|
];
|
|
13
16
|
function packageState(root, entry) {
|
|
14
17
|
const dir = resolve(root, entry.dir);
|
package/dist/site.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineConfig, envField } from "astro/config";
|
|
2
2
|
import cloudflare from "@astrojs/cloudflare";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
4
|
-
import {
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
import { resolve, sep } from "node:path";
|
|
5
6
|
import { fileURLToPath } from "node:url";
|
|
6
7
|
import { parse as parseYaml } from "yaml";
|
|
7
8
|
import rehypeKatex from "rehype-katex";
|
|
@@ -25,6 +26,7 @@ import { deriveTreeseedAstroAllowedDomains } from "./utils/astro-security.js";
|
|
|
25
26
|
import { isSiteRenderedModel } from "./utils/site-models.js";
|
|
26
27
|
const TENANT_THEME_VIRTUAL_ID = "virtual:treeseed/tenant-theme.css";
|
|
27
28
|
const RESOLVED_TENANT_THEME_VIRTUAL_ID = "\0treeseed:tenant-theme.css";
|
|
29
|
+
const require2 = createRequire(import.meta.url);
|
|
28
30
|
function packageFile(relativePath) {
|
|
29
31
|
return fileURLToPath(new URL(relativePath, import.meta.url));
|
|
30
32
|
}
|
|
@@ -141,8 +143,41 @@ function resolveRouteEntry(route, siteLayers) {
|
|
|
141
143
|
}
|
|
142
144
|
throw new Error(`Treeseed route "${route.pattern}" must define either entrypoint or resourcePath.`);
|
|
143
145
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
+
function resolveUiComponentEntrypoint(siteLayers, resourcePath, uiEntrypoint, projectRoot) {
|
|
147
|
+
const tenantEntrypoint = resolveTreeseedSiteResource(siteLayers, "components", resourcePath);
|
|
148
|
+
if (tenantEntrypoint) return tenantEntrypoint;
|
|
149
|
+
if (projectRoot) {
|
|
150
|
+
try {
|
|
151
|
+
return createRequire(resolve(projectRoot, "package.json")).resolve(uiEntrypoint);
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return require2.resolve(uiEntrypoint);
|
|
156
|
+
}
|
|
157
|
+
function resolveUiDistRoot(projectRoot) {
|
|
158
|
+
const probeEntrypoint = "@treeseed/ui/components/astro/layouts/MainLayout.astro";
|
|
159
|
+
let resolvedProbe;
|
|
160
|
+
try {
|
|
161
|
+
resolvedProbe = createRequire(resolve(projectRoot, "package.json")).resolve(probeEntrypoint);
|
|
162
|
+
} catch {
|
|
163
|
+
resolvedProbe = require2.resolve(probeEntrypoint);
|
|
164
|
+
}
|
|
165
|
+
const distMarker = `${sep}dist${sep}astro${sep}`;
|
|
166
|
+
const markerIndex = resolvedProbe.lastIndexOf(distMarker);
|
|
167
|
+
if (markerIndex < 0) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
return resolvedProbe.slice(0, markerIndex + `${sep}dist`.length);
|
|
171
|
+
}
|
|
172
|
+
function createUiPackageAliases(projectRoot) {
|
|
173
|
+
const uiDistRoot = resolveUiDistRoot(projectRoot);
|
|
174
|
+
if (!uiDistRoot) return [];
|
|
175
|
+
return [
|
|
176
|
+
{ find: /^@treeseed\/ui\/components\/astro\/(.*)$/, replacement: `${uiDistRoot}/astro/$1` },
|
|
177
|
+
{ find: /^@treeseed\/ui\/styles\/(.*)$/, replacement: `${uiDistRoot}/styles/$1` },
|
|
178
|
+
{ find: /^@treeseed\/ui\/lib\/(.*)$/, replacement: `${uiDistRoot}/lib/$1` },
|
|
179
|
+
{ find: /^@treeseed\/ui\/theme\/schemes\/(.*)$/, replacement: `${uiDistRoot}/theme/schemes/$1` }
|
|
180
|
+
];
|
|
146
181
|
}
|
|
147
182
|
function resolveSitePluginExtensions(pluginRuntime, context) {
|
|
148
183
|
const selectedSiteProvider = pluginRuntime.config.providers.site;
|
|
@@ -306,6 +341,9 @@ function createTreeseedSite(tenantConfig, { starlight }) {
|
|
|
306
341
|
}
|
|
307
342
|
},
|
|
308
343
|
vite: {
|
|
344
|
+
resolve: {
|
|
345
|
+
alias: createUiPackageAliases(projectRoot)
|
|
346
|
+
},
|
|
309
347
|
define: {
|
|
310
348
|
__TREESEED_TENANT_CONFIG__: injectedTenantConfig,
|
|
311
349
|
__TREESEED_PROJECT_ROOT__: injectedProjectRoot,
|
|
@@ -375,14 +413,14 @@ function createTreeseedSite(tenantConfig, { starlight }) {
|
|
|
375
413
|
{ icon: "discord", label: `${siteConfig.site.name} Discord`, href: siteConfig.site.discordLink }
|
|
376
414
|
],
|
|
377
415
|
components: {
|
|
378
|
-
Footer:
|
|
379
|
-
Header:
|
|
380
|
-
PageTitle:
|
|
381
|
-
PageFrame:
|
|
382
|
-
PageSidebar:
|
|
383
|
-
Sidebar:
|
|
384
|
-
SiteTitle:
|
|
385
|
-
ThemeSelect:
|
|
416
|
+
Footer: resolveUiComponentEntrypoint(siteLayers, "components/docs/Footer.astro", "@treeseed/ui/components/astro/docs/Footer.astro", projectRoot),
|
|
417
|
+
Header: resolveUiComponentEntrypoint(siteLayers, "components/docs/Header.astro", "@treeseed/ui/components/astro/docs/Header.astro", projectRoot),
|
|
418
|
+
PageTitle: resolveUiComponentEntrypoint(siteLayers, "components/docs/PageTitle.astro", "@treeseed/ui/components/astro/docs/PageTitle.astro", projectRoot),
|
|
419
|
+
PageFrame: resolveUiComponentEntrypoint(siteLayers, "components/docs/PageFrame.astro", "@treeseed/ui/components/astro/docs/PageFrame.astro", projectRoot),
|
|
420
|
+
PageSidebar: resolveUiComponentEntrypoint(siteLayers, "components/docs/PageSidebar.astro", "@treeseed/ui/components/astro/docs/PageSidebar.astro", projectRoot),
|
|
421
|
+
Sidebar: resolveUiComponentEntrypoint(siteLayers, "components/docs/Sidebar.astro", "@treeseed/ui/components/astro/docs/Sidebar.astro", projectRoot),
|
|
422
|
+
SiteTitle: resolveUiComponentEntrypoint(siteLayers, "components/SiteTitle.astro", "@treeseed/ui/components/astro/core/SiteTitle.astro", projectRoot),
|
|
423
|
+
ThemeSelect: resolveUiComponentEntrypoint(siteLayers, "components/docs/ThemeSelect.astro", "@treeseed/ui/components/astro/docs/ThemeSelect.astro", projectRoot),
|
|
386
424
|
...siteExtensions.starlightComponents
|
|
387
425
|
},
|
|
388
426
|
sidebar: booksRendered ? getStarlightSidebarConfigFromRuntime(bookRuntime) : [],
|
package/dist/styles/global.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
2
|
@import "katex/dist/katex.min.css";
|
|
3
|
-
@import "
|
|
4
|
-
@import "
|
|
5
|
-
@import "
|
|
6
|
-
@import "
|
|
7
|
-
@import "
|
|
3
|
+
@import "@treeseed/ui/styles/tokens.css";
|
|
4
|
+
@import "@treeseed/ui/styles/theme.css";
|
|
5
|
+
@import "@treeseed/ui/styles/ui.css";
|
|
6
|
+
@import "@treeseed/ui/styles/forms.css";
|
|
7
|
+
@import "@treeseed/ui/styles/app-shell.css";
|
|
8
8
|
@import "./prose.css";
|
|
9
9
|
|
|
10
10
|
@theme {
|
package/dist/templates.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface TemplateContentEntry {
|
|
|
4
4
|
id: string;
|
|
5
5
|
data: {
|
|
6
6
|
slug: string;
|
|
7
|
+
sourceRef?: string;
|
|
7
8
|
title: string;
|
|
8
9
|
summary: string;
|
|
9
10
|
description: string;
|
|
@@ -48,6 +49,7 @@ export interface TemplateCatalogProvider {
|
|
|
48
49
|
}
|
|
49
50
|
export interface TemplateSiteCard {
|
|
50
51
|
slug: string;
|
|
52
|
+
sourceRef: string;
|
|
51
53
|
title: string;
|
|
52
54
|
summary: string;
|
|
53
55
|
category: string;
|
package/dist/templates.js
CHANGED
|
@@ -37,6 +37,7 @@ function contentCardFromEntry(entry) {
|
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
39
39
|
slug: entry.data.slug,
|
|
40
|
+
sourceRef: entry.data.sourceRef ?? entry.data.slug,
|
|
40
41
|
title: entry.data.title,
|
|
41
42
|
summary: entry.data.summary,
|
|
42
43
|
category: entry.data.category,
|
|
@@ -83,6 +84,7 @@ function detailFromContentEntry(entry) {
|
|
|
83
84
|
function cardFromCatalogItem(item) {
|
|
84
85
|
return {
|
|
85
86
|
slug: item.slug,
|
|
87
|
+
sourceRef: catalogString(item.metadata, "sourceRef") ?? item.slug,
|
|
86
88
|
title: item.title,
|
|
87
89
|
summary: item.summary ?? "",
|
|
88
90
|
category: catalogString(item.metadata, "category") ?? "Template",
|
|
@@ -136,28 +138,28 @@ async function listSiteTemplates(context = {}) {
|
|
|
136
138
|
}
|
|
137
139
|
const catalogItems = context.catalogProvider && typeof context.catalogProvider.listItems === "function" ? await context.catalogProvider.listItems({ locals: context.locals }) : [];
|
|
138
140
|
const localEntries = await listLocalTemplateEntries(context.listLocalEntries);
|
|
139
|
-
const
|
|
141
|
+
const cardsBySourceRef = /* @__PURE__ */ new Map();
|
|
140
142
|
for (const entry of localEntries) {
|
|
141
143
|
const card = contentCardFromEntry(entry);
|
|
142
144
|
if (card) {
|
|
143
|
-
|
|
145
|
+
cardsBySourceRef.set(card.sourceRef, card);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
for (const item of catalogItems) {
|
|
147
149
|
const card = cardFromCatalogItem(item);
|
|
148
|
-
const existing =
|
|
150
|
+
const existing = cardsBySourceRef.get(card.sourceRef);
|
|
149
151
|
if (existing) {
|
|
150
|
-
|
|
152
|
+
cardsBySourceRef.set(card.sourceRef, {
|
|
151
153
|
...existing,
|
|
152
154
|
launchRequirements: existing.launchRequirements ?? card.launchRequirements
|
|
153
155
|
});
|
|
154
156
|
} else {
|
|
155
|
-
|
|
157
|
+
cardsBySourceRef.set(card.sourceRef, card);
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
160
|
return {
|
|
159
161
|
rendered: true,
|
|
160
|
-
items: sortTemplateCards([...
|
|
162
|
+
items: sortTemplateCards([...cardsBySourceRef.values()])
|
|
161
163
|
};
|
|
162
164
|
}
|
|
163
165
|
async function resolveSiteTemplate(slug, context = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Treeseed web framework package for Astro/Starlight site runtimes.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"@astrojs/sitemap": "3.7.0",
|
|
71
71
|
"@astrojs/starlight": "0.37.6",
|
|
72
72
|
"@tailwindcss/vite": "^4.1.4",
|
|
73
|
-
"@treeseed/sdk": "
|
|
73
|
+
"@treeseed/sdk": "0.11.0",
|
|
74
|
+
"@treeseed/ui": "github:treeseed-ai/ui#0.11.0",
|
|
74
75
|
"astro": "^5.6.1",
|
|
75
76
|
"esbuild": "^0.28.0",
|
|
76
77
|
"katex": "^0.16.22",
|
|
@@ -154,49 +155,6 @@
|
|
|
154
155
|
"types": "./dist/utils/forms/service.d.ts",
|
|
155
156
|
"default": "./dist/utils/forms/service.js"
|
|
156
157
|
},
|
|
157
|
-
"./components/site/CTASection.astro": "./dist/components/site/CTASection.astro",
|
|
158
|
-
"./components/site/SectionIntro.astro": "./dist/components/site/SectionIntro.astro",
|
|
159
|
-
"./components/site/PathCard.astro": "./dist/components/site/PathCard.astro",
|
|
160
|
-
"./components/site/TrustCallout.astro": "./dist/components/site/TrustCallout.astro",
|
|
161
|
-
"./components/content/ContentStatusLegend.astro": "./dist/components/content/ContentStatusLegend.astro",
|
|
162
|
-
"./components/ui/theme/ThemeScript.astro": "./dist/components/ui/theme/ThemeScript.astro",
|
|
163
|
-
"./components/ui/theme/ThemeSelector.astro": "./dist/components/ui/theme/ThemeSelector.astro",
|
|
164
|
-
"./components/ui/theme/ThemeMenu.astro": "./dist/components/ui/theme/ThemeMenu.astro",
|
|
165
|
-
"./components/ui/theme/ThemePreviewSwatch.astro": "./dist/components/ui/theme/ThemePreviewSwatch.astro",
|
|
166
|
-
"./components/ui/forms/Button.astro": "./dist/components/ui/forms/Button.astro",
|
|
167
|
-
"./components/ui/forms/Field.astro": "./dist/components/ui/forms/Field.astro",
|
|
168
|
-
"./components/ui/forms/TextInput.astro": "./dist/components/ui/forms/TextInput.astro",
|
|
169
|
-
"./components/ui/forms/Select.astro": "./dist/components/ui/forms/Select.astro",
|
|
170
|
-
"./components/ui/forms/Textarea.astro": "./dist/components/ui/forms/Textarea.astro",
|
|
171
|
-
"./components/ui/forms/RadioGroup.astro": "./dist/components/ui/forms/RadioGroup.astro",
|
|
172
|
-
"./components/ui/forms/FormActions.astro": "./dist/components/ui/forms/FormActions.astro",
|
|
173
|
-
"./components/ui/forms/PasswordMeter.astro": "./dist/components/ui/forms/PasswordMeter.astro",
|
|
174
|
-
"./components/ui/surface/Panel.astro": "./dist/components/ui/surface/Panel.astro",
|
|
175
|
-
"./components/ui/surface/Card.astro": "./dist/components/ui/surface/Card.astro",
|
|
176
|
-
"./components/ui/surface/EmptyState.astro": "./dist/components/ui/surface/EmptyState.astro",
|
|
177
|
-
"./components/ui/data/Badge.astro": "./dist/components/ui/data/Badge.astro",
|
|
178
|
-
"./components/ui/data/StatusPill.astro": "./dist/components/ui/data/StatusPill.astro",
|
|
179
|
-
"./components/ui/data/MetricCard.astro": "./dist/components/ui/data/MetricCard.astro",
|
|
180
|
-
"./components/ui/data/MetricGrid.astro": "./dist/components/ui/data/MetricGrid.astro",
|
|
181
|
-
"./components/ui/data/ActionList.astro": "./dist/components/ui/data/ActionList.astro",
|
|
182
|
-
"./components/ui/data/KeyValueList.astro": "./dist/components/ui/data/KeyValueList.astro",
|
|
183
|
-
"./components/ui/data/DataTable.astro": "./dist/components/ui/data/DataTable.astro",
|
|
184
|
-
"./components/ui/layout/PageHeader.astro": "./dist/components/ui/layout/PageHeader.astro",
|
|
185
|
-
"./components/ui/shell/AppShell.astro": "./dist/components/ui/shell/AppShell.astro",
|
|
186
|
-
"./components/ui/shell/PublicShell.astro": "./dist/components/ui/shell/PublicShell.astro",
|
|
187
|
-
"./components/ui/shell/PublicFooter.astro": "./dist/components/ui/shell/PublicFooter.astro",
|
|
188
|
-
"./components/ui/shell/RailNav.astro": "./dist/components/ui/shell/RailNav.astro",
|
|
189
|
-
"./components/ui/shell/BottomNav.astro": "./dist/components/ui/shell/BottomNav.astro",
|
|
190
|
-
"./components/ui/shell/TopBar.astro": "./dist/components/ui/shell/TopBar.astro",
|
|
191
|
-
"./components/ui/shell/ProjectHeader.astro": "./dist/components/ui/shell/ProjectHeader.astro",
|
|
192
|
-
"./styles/theme.css": "./dist/styles/theme.css",
|
|
193
|
-
"./styles/ui.css": "./dist/styles/ui.css",
|
|
194
|
-
"./styles/forms.css": "./dist/styles/forms.css",
|
|
195
|
-
"./styles/app-shell.css": "./dist/styles/app-shell.css",
|
|
196
|
-
"./components/starlight": {
|
|
197
|
-
"types": "./dist/components/starlight.d.ts",
|
|
198
|
-
"default": "./dist/components/starlight.js"
|
|
199
|
-
},
|
|
200
158
|
"./tsconfigs/strict": "./dist/tsconfigs/strict.json"
|
|
201
159
|
}
|
|
202
160
|
}
|