treesap 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layouts/Layout.d.ts +6 -5
- package/dist/layouts/Layout.d.ts.map +1 -1
- package/dist/layouts/Layout.js +7 -14
- package/dist/layouts/Layout.js.map +1 -1
- package/dist/static/styles/main.css +5 -0
- package/package.json +1 -2
- package/src/index.tsx +1 -1
- package/src/layouts/Layout.tsx +35 -28
- package/src/static/styles/main.css +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { startServer, type TreesapConfig } from './server.js';
|
|
2
|
-
export { startServer, type TreesapConfig
|
|
2
|
+
export { startServer, type TreesapConfig };
|
|
3
3
|
export { default as Layout } from './layouts/Layout.js';
|
|
4
4
|
export { default as NotFoundLayout } from './layouts/NotFoundLayout.js';
|
|
5
5
|
export { Home } from './pages/Home.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,CAAC;AAG3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AAE9D,yDAAyD;AACzD,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AAE9D,yDAAyD;AACzD,OAAO,EAAE,WAAW,EAAsB,CAAC;AAE3C,kDAAkD;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/layouts/Layout.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export type BaseLayoutProps = LayoutProps & {
|
|
1
|
+
interface BaseLayoutProps {
|
|
3
2
|
title?: string;
|
|
4
3
|
description?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
head?: any;
|
|
5
|
+
children: any;
|
|
6
|
+
}
|
|
7
|
+
export default function BaseLayout(props: BaseLayoutProps): import("hono/jsx/jsx-dev-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
8
9
|
//# sourceMappingURL=Layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../src/layouts/Layout.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../src/layouts/Layout.tsx"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,kDAiCxD"}
|
package/dist/layouts/Layout.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from "hono/jsx/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: props.description,
|
|
9
|
-
});
|
|
10
|
-
const combinedHead = html `
|
|
11
|
-
${defaultHeadContent}
|
|
12
|
-
${props.additionalHead || ''}
|
|
13
|
-
`;
|
|
14
|
-
return (_jsx(SaplingLayout, { enableIslands: true, head: combinedHead, bodyClass: props.bodyClass || `font-sans @dark:bg-black @dark:text-white`, children: props.children }));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "hono/jsx/jsx-runtime";
|
|
2
|
+
export default function BaseLayout(props) {
|
|
3
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { dangerouslySetInnerHTML: { __html: '<!DOCTYPE html>' } }), _jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("title", { children: props.title || "Treesap" }), _jsx("meta", { name: "description", content: props.description || "A modern web application" }), _jsx("meta", { charset: "UTF-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }), _jsx("link", { rel: "stylesheet", href: "/styles/main.css" }), _jsx("script", { type: "module", src: "https://sapling-is.land" }), _jsx("style", { dangerouslySetInnerHTML: {
|
|
4
|
+
__html: `
|
|
5
|
+
sapling-island{display:contents}
|
|
6
|
+
`,
|
|
7
|
+
} }), _jsx("script", { src: "https://cdn.jsdelivr.net/npm/iconify-icon@2.1.0/dist/iconify-icon.min.js", defer: true }), props.head] }), _jsx("body", { class: "bg-white text-black", children: props.children })] })] }));
|
|
15
8
|
}
|
|
16
9
|
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../src/layouts/Layout.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../src/layouts/Layout.tsx"],"names":[],"mappings":";AAOA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,OAAO,CACL,8BACE,cAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAI,EAC/D,gBAAM,IAAI,EAAC,IAAI,aACf,2BACE,0BAAQ,KAAK,CAAC,KAAK,IAAI,SAAS,GAAS,EACzC,eAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,KAAK,CAAC,WAAW,IAAI,0BAA0B,GAAI,EACrF,eAAM,OAAO,EAAC,OAAO,GAAG,EACxB,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,uCAAuC,GAAG,EACxE,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAC,kBAAkB,GAAG,EAEjD,iBAAQ,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,yBAAyB,GAAU,EAC7D,gBACE,uBAAuB,EAAE;oCACvB,MAAM,EAAE;;aAEP;iCACF,GACD,EACF,iBACE,GAAG,EAAC,0EAA0E,EAC9E,KAAK,SAEE,EACR,KAAK,CAAC,IAAI,IACN,EACP,eAAM,KAAK,EAAC,qBAAqB,YAC9B,KAAK,CAAC,QAAQ,GACV,IACA,IACN,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1313,6 +1313,11 @@ video {
|
|
|
1313
1313
|
line-height: 1.25;
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
+
.text-black {
|
|
1317
|
+
--tw-text-opacity: 1;
|
|
1318
|
+
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1316
1321
|
.text-gray-400 {
|
|
1317
1322
|
--tw-text-opacity: 1;
|
|
1318
1323
|
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "treesap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "AI Agent Framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@hono/node-server": "^1.13.1",
|
|
36
|
-
"@sapling/sapling": "npm:@jsr/sapling__sapling@^0.8.0-beta.2",
|
|
37
36
|
"@tailwindcss/typography": "^0.5.16",
|
|
38
37
|
"commander": "^12.1.0",
|
|
39
38
|
"dotenv": "^16.4.7",
|
package/src/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { startServer, type TreesapConfig } from './server.js';
|
|
2
2
|
|
|
3
3
|
// Re-export everything that might be needed by consumers
|
|
4
|
-
export { startServer, type TreesapConfig
|
|
4
|
+
export { startServer, type TreesapConfig };
|
|
5
5
|
|
|
6
6
|
// Export components and layouts for library usage
|
|
7
7
|
export { default as Layout } from './layouts/Layout.js';
|
package/src/layouts/Layout.tsx
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
Layout as SaplingLayout,
|
|
3
|
-
type LayoutProps,
|
|
4
|
-
} from "@sapling/sapling";
|
|
5
|
-
import { html } from "hono/html";
|
|
6
|
-
import { BaseHead } from "../components/BaseHead.js";
|
|
7
|
-
|
|
8
|
-
export type BaseLayoutProps = LayoutProps & {
|
|
1
|
+
interface BaseLayoutProps {
|
|
9
2
|
title?: string;
|
|
10
3
|
description?: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export default async function Layout(props: BaseLayoutProps) {
|
|
15
|
-
const defaultHeadContent = BaseHead({
|
|
16
|
-
title: props.title,
|
|
17
|
-
description: props.description,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const combinedHead = html`
|
|
21
|
-
${defaultHeadContent}
|
|
22
|
-
${props.additionalHead || ''}
|
|
23
|
-
`;
|
|
4
|
+
head?: any;
|
|
5
|
+
children: any;
|
|
6
|
+
}
|
|
24
7
|
|
|
8
|
+
export default function BaseLayout(props: BaseLayoutProps) {
|
|
25
9
|
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
<>
|
|
11
|
+
<div dangerouslySetInnerHTML={{ __html: '<!DOCTYPE html>' }} />
|
|
12
|
+
<html lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<title>{props.title || "Treesap"}</title>
|
|
15
|
+
<meta name="description" content={props.description || "A modern web application"} />
|
|
16
|
+
<meta charset="UTF-8" />
|
|
17
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
18
|
+
<link rel="stylesheet" href="/styles/main.css" />
|
|
19
|
+
{/* Sapling Islands */}
|
|
20
|
+
<script type="module" src="https://sapling-is.land"></script>
|
|
21
|
+
<style
|
|
22
|
+
dangerouslySetInnerHTML={{
|
|
23
|
+
__html: `
|
|
24
|
+
sapling-island{display:contents}
|
|
25
|
+
`,
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
<script
|
|
29
|
+
src="https://cdn.jsdelivr.net/npm/iconify-icon@2.1.0/dist/iconify-icon.min.js"
|
|
30
|
+
defer
|
|
31
|
+
>
|
|
32
|
+
</script>
|
|
33
|
+
{props.head}
|
|
34
|
+
</head>
|
|
35
|
+
<body class="bg-white text-black">
|
|
36
|
+
{props.children}
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
39
|
+
</>
|
|
33
40
|
);
|
|
34
41
|
}
|
|
@@ -1313,6 +1313,11 @@ video {
|
|
|
1313
1313
|
line-height: 1.25;
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
+
.text-black {
|
|
1317
|
+
--tw-text-opacity: 1;
|
|
1318
|
+
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1316
1321
|
.text-gray-400 {
|
|
1317
1322
|
--tw-text-opacity: 1;
|
|
1318
1323
|
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|