@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.
Files changed (111) hide show
  1. package/README.md +69 -125
  2. package/dist/content.js +1 -0
  3. package/dist/dev-watch.js +2 -1
  4. package/dist/dev.d.ts +1 -1
  5. package/dist/dev.js +51 -35
  6. package/dist/pages/404.astro +1 -1
  7. package/dist/pages/[slug].astro +4 -4
  8. package/dist/pages/agents/[slug].astro +3 -3
  9. package/dist/pages/agents/index.astro +3 -3
  10. package/dist/pages/books/[slug].astro +3 -3
  11. package/dist/pages/books/index.astro +3 -3
  12. package/dist/pages/contact.astro +2 -2
  13. package/dist/pages/decisions/[slug].astro +3 -3
  14. package/dist/pages/decisions/index.astro +3 -3
  15. package/dist/pages/docs-runtime/[...slug].astro +3 -3
  16. package/dist/pages/docs-runtime/index.astro +3 -3
  17. package/dist/pages/index.astro +11 -11
  18. package/dist/pages/notes/[slug].astro +3 -3
  19. package/dist/pages/notes/index.astro +3 -3
  20. package/dist/pages/objectives/[slug].astro +3 -3
  21. package/dist/pages/objectives/index.astro +3 -3
  22. package/dist/pages/people/[slug].astro +3 -3
  23. package/dist/pages/people/index.astro +3 -3
  24. package/dist/pages/proposals/[slug].astro +3 -3
  25. package/dist/pages/proposals/index.astro +3 -3
  26. package/dist/pages/questions/[slug].astro +3 -3
  27. package/dist/pages/questions/index.astro +3 -3
  28. package/dist/pages/ui/index.astro +23 -23
  29. package/dist/platform-resources.js +5 -1
  30. package/dist/scripts/build-dist.js +2 -0
  31. package/dist/scripts/release-verify.js +24 -2
  32. package/dist/scripts/workspace-bootstrap.js +3 -0
  33. package/dist/site.js +49 -11
  34. package/dist/styles/global.css +5 -5
  35. package/dist/templates.d.ts +2 -0
  36. package/dist/templates.js +8 -6
  37. package/package.json +3 -45
  38. package/templates/github/deploy-web.workflow.yml +36 -2
  39. package/dist/components/DevWatchReload.astro +0 -45
  40. package/dist/components/SiteTitle.astro +0 -51
  41. package/dist/components/content/ContentStatusLegend.astro +0 -18
  42. package/dist/components/content/StatusBadge.astro +0 -11
  43. package/dist/components/docs/BookFontControls.astro +0 -180
  44. package/dist/components/docs/DesktopSidebarToggle.astro +0 -88
  45. package/dist/components/docs/DownloadBook.astro +0 -34
  46. package/dist/components/docs/Footer.astro +0 -112
  47. package/dist/components/docs/Header.astro +0 -157
  48. package/dist/components/docs/PageFrame.astro +0 -260
  49. package/dist/components/docs/PageSidebar.astro +0 -63
  50. package/dist/components/docs/PageTitle.astro +0 -39
  51. package/dist/components/docs/Sidebar.astro +0 -41
  52. package/dist/components/docs/ThemeSelect.astro +0 -5
  53. package/dist/components/forms/ContactForm.astro +0 -233
  54. package/dist/components/forms/FooterSubscribeForm.astro +0 -188
  55. package/dist/components/site/BookList.astro +0 -27
  56. package/dist/components/site/CTASection.astro +0 -24
  57. package/dist/components/site/ChronicleList.astro +0 -33
  58. package/dist/components/site/Hero.astro +0 -18
  59. package/dist/components/site/NotesList.astro +0 -29
  60. package/dist/components/site/PathCard.astro +0 -16
  61. package/dist/components/site/ProfileList.astro +0 -30
  62. package/dist/components/site/PublishedContentBody.astro +0 -5
  63. package/dist/components/site/RouteNotFound.astro +0 -25
  64. package/dist/components/site/SectionIntro.astro +0 -9
  65. package/dist/components/site/StageBanner.astro +0 -8
  66. package/dist/components/site/TrustCallout.astro +0 -9
  67. package/dist/components/starlight.js +0 -6
  68. package/dist/components/ui/data/ActionList.astro +0 -51
  69. package/dist/components/ui/data/Badge.astro +0 -19
  70. package/dist/components/ui/data/DataTable.astro +0 -51
  71. package/dist/components/ui/data/KeyValueList.astro +0 -28
  72. package/dist/components/ui/data/MetricCard.astro +0 -25
  73. package/dist/components/ui/data/MetricGrid.astro +0 -27
  74. package/dist/components/ui/data/StatusPill.astro +0 -20
  75. package/dist/components/ui/forms/Button.astro +0 -59
  76. package/dist/components/ui/forms/Field.astro +0 -39
  77. package/dist/components/ui/forms/FormActions.astro +0 -12
  78. package/dist/components/ui/forms/PasswordMeter.astro +0 -80
  79. package/dist/components/ui/forms/RadioGroup.astro +0 -55
  80. package/dist/components/ui/forms/Select.astro +0 -47
  81. package/dist/components/ui/forms/TextInput.astro +0 -58
  82. package/dist/components/ui/forms/Textarea.astro +0 -45
  83. package/dist/components/ui/layout/PageHeader.astro +0 -45
  84. package/dist/components/ui/shell/AppShell.astro +0 -130
  85. package/dist/components/ui/shell/BottomNav.astro +0 -42
  86. package/dist/components/ui/shell/ProjectHeader.astro +0 -66
  87. package/dist/components/ui/shell/PublicFooter.astro +0 -39
  88. package/dist/components/ui/shell/PublicShell.astro +0 -184
  89. package/dist/components/ui/shell/RailNav.astro +0 -42
  90. package/dist/components/ui/shell/ShellIconLink.astro +0 -30
  91. package/dist/components/ui/shell/TopBar.astro +0 -52
  92. package/dist/components/ui/surface/Card.astro +0 -46
  93. package/dist/components/ui/surface/EmptyState.astro +0 -45
  94. package/dist/components/ui/surface/Panel.astro +0 -54
  95. package/dist/components/ui/theme/ThemeMenu.astro +0 -58
  96. package/dist/components/ui/theme/ThemePreviewSwatch.astro +0 -18
  97. package/dist/components/ui/theme/ThemeScript.astro +0 -112
  98. package/dist/components/ui/theme/ThemeSelector.astro +0 -202
  99. package/dist/components/ui/types.js +0 -0
  100. package/dist/layouts/AuthoredEntryLayout.astro +0 -195
  101. package/dist/layouts/BookLayout.astro +0 -35
  102. package/dist/layouts/BridgeLayout.astro +0 -11
  103. package/dist/layouts/ContentLayout.astro +0 -24
  104. package/dist/layouts/MainLayout.astro +0 -76
  105. package/dist/layouts/NoteLayout.astro +0 -26
  106. package/dist/layouts/ProfileLayout.astro +0 -85
  107. package/dist/styles/app-shell.css +0 -626
  108. package/dist/styles/forms.css +0 -274
  109. package/dist/styles/theme.css +0 -198
  110. package/dist/styles/tokens.css +0 -65
  111. package/dist/styles/ui.css +0 -551
@@ -1,7 +1,7 @@
1
1
  ---
2
- import MainLayout from '../../layouts/MainLayout.astro';
3
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
4
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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 '../../layouts/MainLayout.astro';
3
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
4
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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,15 +1,15 @@
1
1
  ---
2
- import MainLayout from '../layouts/MainLayout.astro';
3
- import Hero from '../components/site/Hero.astro';
4
- import StageBanner from '../components/site/StageBanner.astro';
5
- import SectionIntro from '../components/site/SectionIntro.astro';
6
- import PathCard from '../components/site/PathCard.astro';
7
- import CTASection from '../components/site/CTASection.astro';
8
- import TrustCallout from '../components/site/TrustCallout.astro';
9
- import NotesList from '../components/site/NotesList.astro';
10
- import ChronicleList from '../components/site/ChronicleList.astro';
11
- import ProfileList from '../components/site/ProfileList.astro';
12
- import BookList from '../components/site/BookList.astro';
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 '../../layouts/AuthoredEntryLayout.astro';
3
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
4
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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 '../../layouts/MainLayout.astro';
3
- import SectionIntro from '../../components/site/SectionIntro.astro';
4
- import NotesList from '../../components/site/NotesList.astro';
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 '../../layouts/AuthoredEntryLayout.astro';
2
+ import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
3
3
  import { resolveContributor, resolveReferences } from '../../utils/hub-content';
4
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
5
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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 '../../layouts/MainLayout.astro';
3
- import SectionIntro from '../../components/site/SectionIntro.astro';
4
- import ChronicleList from '../../components/site/ChronicleList.astro';
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 '../../layouts/ProfileLayout.astro';
2
+ import ProfileLayout from '@treeseed/ui/components/astro/layouts/ProfileLayout.astro';
3
3
  import { resolveReferences } from '../../utils/hub-content';
4
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
5
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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 '../../layouts/MainLayout.astro';
3
- import SectionIntro from '../../components/site/SectionIntro.astro';
4
- import ProfileList from '../../components/site/ProfileList.astro';
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 '../../layouts/AuthoredEntryLayout.astro';
2
+ import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
3
3
  import { resolveContributor, resolveReferences } from '../../utils/hub-content';
4
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
5
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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 '../../layouts/MainLayout.astro';
3
- import SectionIntro from '../../components/site/SectionIntro.astro';
4
- import ChronicleList from '../../components/site/ChronicleList.astro';
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 '../../layouts/AuthoredEntryLayout.astro';
2
+ import AuthoredEntryLayout from '@treeseed/ui/components/astro/layouts/AuthoredEntryLayout.astro';
3
3
  import { resolveContributor, resolveReferences } from '../../utils/hub-content';
4
- import PublishedContentBody from '../../components/site/PublishedContentBody.astro';
5
- import RouteNotFound from '../../components/site/RouteNotFound.astro';
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 '../../layouts/MainLayout.astro';
3
- import SectionIntro from '../../components/site/SectionIntro.astro';
4
- import ChronicleList from '../../components/site/ChronicleList.astro';
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 '../../styles/theme.css';
4
- import '../../styles/ui.css';
5
- import '../../styles/forms.css';
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 '../../components/ui/theme/ThemeScript.astro';
8
- import ThemeSelector from '../../components/ui/theme/ThemeSelector.astro';
9
- import Button from '../../components/ui/forms/Button.astro';
10
- import Field from '../../components/ui/forms/Field.astro';
11
- import TextInput from '../../components/ui/forms/TextInput.astro';
12
- import Select from '../../components/ui/forms/Select.astro';
13
- import Textarea from '../../components/ui/forms/Textarea.astro';
14
- import RadioGroup from '../../components/ui/forms/RadioGroup.astro';
15
- import FormActions from '../../components/ui/forms/FormActions.astro';
16
- import PasswordMeter from '../../components/ui/forms/PasswordMeter.astro';
17
- import Panel from '../../components/ui/surface/Panel.astro';
18
- import Card from '../../components/ui/surface/Card.astro';
19
- import EmptyState from '../../components/ui/surface/EmptyState.astro';
20
- import Badge from '../../components/ui/data/Badge.astro';
21
- import StatusPill from '../../components/ui/data/StatusPill.astro';
22
- import MetricGrid from '../../components/ui/data/MetricGrid.astro';
23
- import ActionList from '../../components/ui/data/ActionList.astro';
24
- import KeyValueList from '../../components/ui/data/KeyValueList.astro';
25
- import DataTable from '../../components/ui/data/DataTable.astro';
26
- import PageHeader from '../../components/ui/layout/PageHeader.astro';
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 candidates = hasExplicitExtension ? [resourcePath, `${resourcePath}.astro`, `${resourcePath}.ts`, `${resourcePath}.js`, `${resourcePath}.mjs`] : [resourcePath, `${resourcePath}.astro`, `${resourcePath}.ts`, `${resourcePath}.js`, `${resourcePath}.mjs`];
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 { resolve } from "node:path";
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 resolveCoreComponentEntrypoint(siteLayers, resourcePath, fallbackPath) {
145
- return resolveTreeseedSiteResource(siteLayers, "components", resourcePath) ?? packageFile(fallbackPath);
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: resolveCoreComponentEntrypoint(siteLayers, "components/docs/Footer.astro", "./components/docs/Footer.astro"),
379
- Header: resolveCoreComponentEntrypoint(siteLayers, "components/docs/Header.astro", "./components/docs/Header.astro"),
380
- PageTitle: resolveCoreComponentEntrypoint(siteLayers, "components/docs/PageTitle.astro", "./components/docs/PageTitle.astro"),
381
- PageFrame: resolveCoreComponentEntrypoint(siteLayers, "components/docs/PageFrame.astro", "./components/docs/PageFrame.astro"),
382
- PageSidebar: resolveCoreComponentEntrypoint(siteLayers, "components/docs/PageSidebar.astro", "./components/docs/PageSidebar.astro"),
383
- Sidebar: resolveCoreComponentEntrypoint(siteLayers, "components/docs/Sidebar.astro", "./components/docs/Sidebar.astro"),
384
- SiteTitle: resolveCoreComponentEntrypoint(siteLayers, "components/SiteTitle.astro", "./components/SiteTitle.astro"),
385
- ThemeSelect: resolveCoreComponentEntrypoint(siteLayers, "components/docs/ThemeSelect.astro", "./components/docs/ThemeSelect.astro"),
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) : [],
@@ -1,10 +1,10 @@
1
1
  @import "tailwindcss";
2
2
  @import "katex/dist/katex.min.css";
3
- @import "./tokens.css";
4
- @import "./theme.css";
5
- @import "./ui.css";
6
- @import "./forms.css";
7
- @import "./app-shell.css";
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 {
@@ -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 cardsBySlug = /* @__PURE__ */ new Map();
141
+ const cardsBySourceRef = /* @__PURE__ */ new Map();
140
142
  for (const entry of localEntries) {
141
143
  const card = contentCardFromEntry(entry);
142
144
  if (card) {
143
- cardsBySlug.set(card.slug, card);
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 = cardsBySlug.get(card.slug);
150
+ const existing = cardsBySourceRef.get(card.sourceRef);
149
151
  if (existing) {
150
- cardsBySlug.set(card.slug, {
152
+ cardsBySourceRef.set(card.sourceRef, {
151
153
  ...existing,
152
154
  launchRequirements: existing.launchRequirements ?? card.launchRequirements
153
155
  });
154
156
  } else {
155
- cardsBySlug.set(card.slug, card);
157
+ cardsBySourceRef.set(card.sourceRef, card);
156
158
  }
157
159
  }
158
160
  return {
159
161
  rendered: true,
160
- items: sortTemplateCards([...cardsBySlug.values()])
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.10.21",
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": "github:treeseed-ai/sdk#0.10.27",
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
  }