Kernmodule 1.2.0
Tree-shakebare JavaScript-Module unter core/ - getrennt von CSS und Web Components in components/. English: Kernmodule
Wann verwenden
- Import tree-shakeable modules for search, motion, attributes, highlight, or meta without the full WC bundle.
- Use
components/runtime(bootFromDOM) when you only need tags present on the page.
Wann nicht
- Do not treat
core/metaas a complete AI design system — agent metadata is beta. - Prefer documented subpaths over deep relative imports into
core/files.
Layout
velinstyle/
core/
search/ types.js, engine.js, highlight.js, providers.js, index.js
motion/ scheduler.js, effects.js, stagger.js, scroll.js, index.js
attributes/ registry.js, index.js
components/ velin-search.js, velin-modal.js, …
cli/ search-index.js, docs-generate.js
core/search
VelinSearchEngine— in-memory fuzzy + substring scoringvelinSearch— singleton:loadIndex(),query()createSearch()— isolated instance per widgetregisterSearchProvider(id, fn)— merge custom entrieshighlightHtml(text, query)— safe<mark class="velin-search-hit">
core/motion
initMotion(options)— IO + stagger + smooth scroll bindingsobserveInView(el, callback)— rAF-batched visibilityapplyEffects(el, attrs)— map attributes to CSS classessmoothScrollTo(target)— reduced-motion aware
core/attributes
registerAttribute(name, { enhance })bootAttributes(root)— scan DOM, lazy WC loadlistRegisteredAttributes()— 27 built-ins
core/highlight
initHighlight() — lazy language registry, MutationObserver for velin-code / pre code. Subpath: @birdapi/velinstyle/highlight.
core/meta
velin-meta export and velin-agent.json agent bundle — see Velin-Meta guide.
sanitize / email / secure
Package exports: @birdapi/velinstyle/sanitize, ./email, ./secure — used by components and PII tooling.
components/runtime
bootFromDOM() registers only components present in the page. Prefer over full IIFE when bundle size matters.
Legacy-Motion-Helfer
velin-reveal / velin-flip / velin-haptic remain as helper modules; prefer core/motion + attributes for new work (Motion guide).
Package-Exports (1.2.0)
Verified against @birdapi/velinstyle package.json exports:
| Subpath | Role |
|---|---|
@birdapi/velinstyle | register, lazyDefine, bootFromDOM, COMPONENT_LOADERS |
@birdapi/velinstyle/runtime | Same runtime API (explicit subpath) |
@birdapi/velinstyle/bundle | Full minified components bundle |
@birdapi/velinstyle/css | Minified CSS |
@birdapi/velinstyle/motion | initMotion, stagger, scroll helpers |
@birdapi/velinstyle/attributes | registerAttribute, bootAttributes, registry |
@birdapi/velinstyle/search | VelinSearch engine |
@birdapi/velinstyle/highlight | Syntax highlighting |
@birdapi/velinstyle/meta | Agent meta builders beta |
@birdapi/velinstyle/a11y | initA11y |
@birdapi/velinstyle/sanitize · /email · /secure | Security / PII helpers |
Verwandt: VelinSearch, Motion guide, JavaScript API.