@symbiotejs/symbiote 3.8.3 → 3.10.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 +52 -2
- package/core/AppRouter.js +97 -58
- package/core/PubSub.js +42 -11
- package/core/Symbiote.js +90 -59
- package/core/itemizeProcessor-keyed.js +88 -188
- package/core/itemizeProcessor.js +1 -12
- package/core/itemizeSetup.js +26 -3
- package/core/ownElements.js +1 -4
- package/core/resolveTemplate.js +12 -0
- package/core/tpl-processors.js +3 -3
- package/docs/README.md +5 -4
- package/docs/html-app-vs-htmx.md +55 -0
- package/docs/lifecycle.md +2 -0
- package/docs/list-rendering.md +10 -2
- package/docs/properties.md +28 -1
- package/docs/pubsub.md +3 -0
- package/docs/routing.md +15 -4
- package/docs/security.md +41 -12
- package/docs/templates.md +29 -0
- package/html-app/BaseClass.js +203 -0
- package/html-app/README.md +369 -0
- package/html-app/action-data.js +168 -0
- package/html-app/actions.js +366 -0
- package/html-app/collection-actions.js +104 -0
- package/html-app/collection-data.js +234 -0
- package/html-app/collection-items.js +45 -0
- package/html-app/conditions.js +42 -0
- package/html-app/context-data.js +185 -0
- package/html-app/context-requests.js +374 -0
- package/html-app/context-storage.js +376 -0
- package/html-app/declarations.js +55 -0
- package/html-app/examples/assets/actions.html +56 -0
- package/html-app/examples/assets/collections.html +72 -0
- package/html-app/examples/assets/components.html +25 -0
- package/html-app/examples/assets/conditional.html +29 -0
- package/html-app/examples/assets/data.html +31 -0
- package/html-app/examples/assets/guide.html +4 -0
- package/html-app/examples/assets/imports.html +11 -0
- package/html-app/examples/assets/not-found.html +4 -0
- package/html-app/examples/assets/routes.json +58 -0
- package/html-app/examples/assets/routing.html +27 -0
- package/html-app/examples/assets/state.html +32 -0
- package/html-app/examples/assets/storage.html +28 -0
- package/html-app/examples/assets/tasks.json +25 -0
- package/html-app/examples/full-app.html +147 -0
- package/html-app/examples/todo-ref.html +37 -0
- package/html-app/fetch-source.js +147 -0
- package/html-app/fragment-content.js +29 -0
- package/html-app/fragment-source.js +169 -0
- package/html-app/index.js +34 -0
- package/html-app/initial-data.js +88 -0
- package/html-app/pub-map.js +93 -0
- package/html-app/router-data.js +50 -0
- package/html-app/router-navigation.js +70 -0
- package/html-app/storage-revisions.js +130 -0
- package/html-app/sym-collection.js +142 -0
- package/html-app/sym-component.js +20 -0
- package/html-app/sym-conditional.js +141 -0
- package/html-app/sym-context.js +176 -0
- package/html-app/sym-import.js +218 -0
- package/html-app/sym-router.js +107 -0
- package/package.json +18 -8
- package/scripts/check-html-app-package.js +117 -0
- package/scripts/check-html-app-size.js +91 -0
- package/scripts/update-exports.js +4 -0
- package/skills/symbiote/SKILL.md +197 -0
- package/skills/symbiote/agents/openai.yaml +3 -0
- package/types/core/AppRouter.d.ts +13 -4
- package/types/core/AppRouter.d.ts.map +1 -1
- package/types/core/PubSub.d.ts +1 -1
- package/types/core/PubSub.d.ts.map +1 -1
- package/types/core/Symbiote.d.ts +6 -2
- package/types/core/Symbiote.d.ts.map +1 -1
- package/types/core/itemizeProcessor-keyed.d.ts.map +1 -1
- package/types/core/itemizeProcessor.d.ts.map +1 -1
- package/types/core/itemizeSetup.d.ts +1 -0
- package/types/core/itemizeSetup.d.ts.map +1 -1
- package/types/core/ownElements.d.ts +1 -1
- package/types/core/ownElements.d.ts.map +1 -1
- package/types/core/resolveTemplate.d.ts +2 -0
- package/types/core/resolveTemplate.d.ts.map +1 -0
- package/types/html-app/BaseClass.d.ts +24 -0
- package/types/html-app/BaseClass.d.ts.map +1 -0
- package/types/html-app/action-data.d.ts +15 -0
- package/types/html-app/action-data.d.ts.map +1 -0
- package/types/html-app/actions.d.ts +104 -0
- package/types/html-app/actions.d.ts.map +1 -0
- package/types/html-app/collection-actions.d.ts +12 -0
- package/types/html-app/collection-actions.d.ts.map +1 -0
- package/types/html-app/collection-data.d.ts +13 -0
- package/types/html-app/collection-data.d.ts.map +1 -0
- package/types/html-app/collection-items.d.ts +7 -0
- package/types/html-app/collection-items.d.ts.map +1 -0
- package/types/html-app/conditions.d.ts +5 -0
- package/types/html-app/conditions.d.ts.map +1 -0
- package/types/html-app/context-data.d.ts +31 -0
- package/types/html-app/context-data.d.ts.map +1 -0
- package/types/html-app/context-requests.d.ts +97 -0
- package/types/html-app/context-requests.d.ts.map +1 -0
- package/types/html-app/context-storage.d.ts +102 -0
- package/types/html-app/context-storage.d.ts.map +1 -0
- package/types/html-app/declarations.d.ts +3 -0
- package/types/html-app/declarations.d.ts.map +1 -0
- package/types/html-app/fetch-source.d.ts +23 -0
- package/types/html-app/fetch-source.d.ts.map +1 -0
- package/types/html-app/fragment-content.d.ts +6 -0
- package/types/html-app/fragment-content.d.ts.map +1 -0
- package/types/html-app/fragment-source.d.ts +14 -0
- package/types/html-app/fragment-source.d.ts.map +1 -0
- package/types/html-app/index.d.ts +9 -0
- package/types/html-app/index.d.ts.map +1 -0
- package/types/html-app/initial-data.d.ts +8 -0
- package/types/html-app/initial-data.d.ts.map +1 -0
- package/types/html-app/pub-map.d.ts +19 -0
- package/types/html-app/pub-map.d.ts.map +1 -0
- package/types/html-app/router-data.d.ts +4 -0
- package/types/html-app/router-data.d.ts.map +1 -0
- package/types/html-app/router-navigation.d.ts +3 -0
- package/types/html-app/router-navigation.d.ts.map +1 -0
- package/types/html-app/storage-revisions.d.ts +11 -0
- package/types/html-app/storage-revisions.d.ts.map +1 -0
- package/types/html-app/sym-collection.d.ts +16 -0
- package/types/html-app/sym-collection.d.ts.map +1 -0
- package/types/html-app/sym-component.d.ts +5 -0
- package/types/html-app/sym-component.d.ts.map +1 -0
- package/types/html-app/sym-conditional.d.ts +10 -0
- package/types/html-app/sym-conditional.d.ts.map +1 -0
- package/types/html-app/sym-context.d.ts +16 -0
- package/types/html-app/sym-context.d.ts.map +1 -0
- package/types/html-app/sym-import.d.ts +19 -0
- package/types/html-app/sym-import.d.ts.map +1 -0
- package/types/html-app/sym-router.d.ts +12 -0
- package/types/html-app/sym-router.d.ts.map +1 -0
- package/docs/llms-index.md +0 -49
- package/llms-full.txt +0 -5432
- package/llms.txt +0 -49
- package/scripts/build-llms.js +0 -56
package/llms.txt
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Symbiote.js
|
|
2
|
-
|
|
3
|
-
> Lightweight, standards-first UI library built on Web Components. Zero dependencies, ~7.3 kb brotli. No virtual DOM, no compiler, no build step required. Works in any framework or plain HTML.
|
|
4
|
-
|
|
5
|
-
Symbiote.js extends HTMLElement natively. State changes update the DOM synchronously. Components are real custom elements. Supports SSR with isomorphic hydration, WebMCP for exposing UI as browser-native agent tools, and optional Shadow DOM.
|
|
6
|
-
|
|
7
|
-
## Key resources
|
|
8
|
-
|
|
9
|
-
- [Full documentation (single file)](https://rnd-pro.com/symbiote/llms-full.txt): Complete merged reference — paste this into any AI tool for full context
|
|
10
|
-
- [README](https://github.com/symbiotejs/symbiote.js/blob/main/README.md): Overview, quick start, and feature summary
|
|
11
|
-
|
|
12
|
-
## Core concepts
|
|
13
|
-
|
|
14
|
-
- [Get Started](https://github.com/symbiotejs/symbiote.js/blob/main/docs/get-started.md): Installation, CDN usage, first component
|
|
15
|
-
- [Templates](https://github.com/symbiotejs/symbiote.js/blob/main/docs/templates.md): html` ` tagged template, binding syntax, slots, refs
|
|
16
|
-
- [Properties & State](https://github.com/symbiotejs/symbiote.js/blob/main/docs/properties.md): init$, $ proxy, subscriptions, computed properties
|
|
17
|
-
- [Context](https://github.com/symbiotejs/symbiote.js/blob/main/docs/context.md): Local, named (`X/`), pop-up (`^`), shared (`*`) contexts
|
|
18
|
-
- [List Rendering](https://github.com/symbiotejs/symbiote.js/blob/main/docs/list-rendering.md): itemize API, inline templates, item-tag
|
|
19
|
-
- [Lifecycle](https://github.com/symbiotejs/symbiote.js/blob/main/docs/lifecycle.md): initCallback, renderCallback, destroyCallback
|
|
20
|
-
- [Flags](https://github.com/symbiotejs/symbiote.js/blob/main/docs/flags.md): pauseRender, renderShadow, ssrMode, isoMode, lazyMode
|
|
21
|
-
- [Attributes](https://github.com/symbiotejs/symbiote.js/blob/main/docs/attributes.md): bindAttributes, attribute observation
|
|
22
|
-
|
|
23
|
-
## State management
|
|
24
|
-
|
|
25
|
-
- [PubSub](https://github.com/symbiotejs/symbiote.js/blob/main/docs/pubsub.md): Standalone named contexts, registerCtx, multiPub
|
|
26
|
-
|
|
27
|
-
## Styling
|
|
28
|
-
|
|
29
|
-
- [Styling](https://github.com/symbiotejs/symbiote.js/blob/main/docs/styling.md): rootStyles, shadowStyles, css` ` tag, adoptedStyleSheets
|
|
30
|
-
- [CSS Data](https://github.com/symbiotejs/symbiote.js/blob/main/docs/css-data.md): CSS custom properties as reactive component state
|
|
31
|
-
|
|
32
|
-
## Features
|
|
33
|
-
|
|
34
|
-
- [WebMCP (Experimental)](https://github.com/symbiotejs/symbiote.js/blob/main/docs/webmcp.md): Expose live UI handlers as browser-native agent tools
|
|
35
|
-
- [Routing](https://github.com/symbiotejs/symbiote.js/blob/main/docs/routing.md): AppRouter, path patterns, guards, lazy loading
|
|
36
|
-
- [SSR](https://github.com/symbiotejs/symbiote.js/blob/main/docs/ssr.md): Server-side rendering, streaming, hydration
|
|
37
|
-
- [SSR Server Setup](https://github.com/symbiotejs/symbiote.js/blob/main/docs/ssr-server.md): Static build, Express, Fastify
|
|
38
|
-
- [Animations](https://github.com/symbiotejs/symbiote.js/blob/main/docs/animations.md): animateOut, CSS-driven exit transitions
|
|
39
|
-
|
|
40
|
-
## Development
|
|
41
|
-
|
|
42
|
-
- [Dev Mode](https://github.com/symbiotejs/symbiote.js/blob/main/docs/dev-mode.md): Verbose warnings, devMessages.js
|
|
43
|
-
- [TypeScript](https://github.com/symbiotejs/symbiote.js/blob/main/docs/typescript.md): JSDoc types, d.ts, hybrid template checks
|
|
44
|
-
- [Security](https://github.com/symbiotejs/symbiote.js/blob/main/docs/security.md): Trusted Types, CSP
|
|
45
|
-
|
|
46
|
-
## Guidance
|
|
47
|
-
|
|
48
|
-
- [Common Mistakes](https://github.com/symbiotejs/symbiote.js/blob/main/docs/common-mistakes.md): Patterns that frequently cause bugs
|
|
49
|
-
- [Examples](https://github.com/symbiotejs/symbiote.js/blob/main/docs/examples.md): 26 complete working examples across all features
|
package/scripts/build-llms.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Generates llms.txt (index) and llms-full.txt (merged docs) from docs/*.md
|
|
3
|
-
|
|
4
|
-
import { readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
|
5
|
-
import { resolve, dirname } from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
-
|
|
8
|
-
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
-
|
|
10
|
-
// Files in docs/ to exclude from the merged output
|
|
11
|
-
const EXCLUDE_DOCS = new Set([
|
|
12
|
-
'README.md', // index only, no content
|
|
13
|
-
'ecosystem.md', // IDE/tooling setup, not API
|
|
14
|
-
'llms-index.md', // llms.txt template — not merged into llms-full.txt
|
|
15
|
-
]);
|
|
16
|
-
|
|
17
|
-
function getDocFiles() {
|
|
18
|
-
const docsDir = resolve(ROOT, 'docs');
|
|
19
|
-
const docFiles = readdirSync(docsDir)
|
|
20
|
-
.filter((f) => f.endsWith('.md') && !EXCLUDE_DOCS.has(f))
|
|
21
|
-
.sort()
|
|
22
|
-
.map((f) => `docs/${f}`);
|
|
23
|
-
return ['README.md', ...docFiles];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Strip trailing navigation footer added by docs (--- \n\n Next: ...)
|
|
27
|
-
function stripNavFooter(content) {
|
|
28
|
-
return content.replace(/\n---\n\nNext:.*$/s, '').trimEnd();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Strip README badge lines (shield.io image badges at the top)
|
|
32
|
-
function stripBadges(content) {
|
|
33
|
-
return content.replace(/^(\[?!\[.*?\]\(.*?\)\]?(?:\(.*?\))?\n)+/, '').trimStart();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function buildFull() {
|
|
37
|
-
const parts = [];
|
|
38
|
-
for (const rel of getDocFiles()) {
|
|
39
|
-
let content = readFileSync(resolve(ROOT, rel), 'utf8');
|
|
40
|
-
content = stripNavFooter(content);
|
|
41
|
-
if (rel === 'README.md') content = stripBadges(content);
|
|
42
|
-
parts.push(content);
|
|
43
|
-
}
|
|
44
|
-
return parts.join('\n\n---\n\n');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const full = buildFull();
|
|
48
|
-
const llmsIndex = readFileSync(resolve(ROOT, 'docs/llms-index.md'), 'utf8');
|
|
49
|
-
|
|
50
|
-
writeFileSync(resolve(ROOT, 'llms-full.txt'), full, 'utf8');
|
|
51
|
-
writeFileSync(resolve(ROOT, 'llms.txt'), llmsIndex, 'utf8');
|
|
52
|
-
|
|
53
|
-
const lines = full.split('\n').length;
|
|
54
|
-
const kb = (Buffer.byteLength(full, 'utf8') / 1024).toFixed(1);
|
|
55
|
-
console.log(`✅ llms-full.txt ${lines} lines, ${kb} KB`);
|
|
56
|
-
console.log(`🥳 llms.txt ready`);
|