solid-elements
Use when building or consuming @jeswr/solid-elements Lit web components, React wrappers, shared theme/account/feedback/status chrome, custom events and reflected attributes, or its optional Solid login adapter.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- solid-elements
- description
- Use when building or consuming @jeswr/solid-elements Lit web components, React wrappers, shared theme/account/feedback/status chrome, custom events and reflected attributes, or its optional Solid login adapter.
02 资源文件 55
- 参考文档api-extractor.auth.json180 B
- 参考文档api-extractor.base.json955 B
- 参考文档api-extractor.main.json170 B
- 参考文档api-extractor.react.json182 B
- 脚本custom-elements-manifest.config.mjs1.7 KB
- 参考文档custom-elements.json59.9 KB
- 参考文档etc/proactive-fetch.api.md1.4 KB
- 参考文档etc/solid-elements.api.md10.7 KB
- 参考文档etc/solid-elements.auth.api.md5.1 KB
- 参考文档etc/solid-elements.react.api.md5.0 KB
- 许可证LICENSE1.0 KB
- 参考文档package.json3.1 KB
- 参考文档README.md3.1 KB
- 脚本scripts/api-report.mjs2.3 KB
- 脚本scripts/cem/solid-binding-plugin.mjs13.4 KB
- 脚本scripts/check-manifest.mjs3.0 KB
- 脚本src/auth/errors.ts2.2 KB
- 脚本src/auth/index.ts102.0 KB
- 脚本src/auth/origin.ts4.8 KB
- 脚本src/auth/proactive-fetch.ts31.1 KB
- 脚本src/auth/www-authenticate.ts7.9 KB
- 脚本src/components/account-menu.ts9.7 KB
- 脚本src/components/empty-state.ts4.1 KB
- 脚本src/components/error-state.ts4.6 KB
- 脚本src/components/feedback-button.ts21.9 KB
- 脚本src/components/loading.ts3.1 KB
- 脚本src/components/login-panel.ts32.5 KB
- 脚本src/components/saving-indicator.ts5.1 KB
- 脚本src/components/theme-toggle.ts8.3 KB
- 脚本src/feedback-core.ts6.5 KB
- 脚本src/index.ts2.8 KB
- 脚本src/internal/initials.ts1.4 KB
- 脚本src/login-controller.ts5.6 KB
- 脚本src/react/index.ts5.5 KB
- 脚本src/theme-core.ts3.2 KB
- 脚本src/theme-tokens.ts2.6 KB
- 脚本test/account-menu.test.ts4.9 KB
- 脚本test/auth-controller.test.ts156.8 KB
- 脚本test/auth-origin-boundary.test.ts6.6 KB
- 脚本test/characterization.test.ts6.5 KB
- 脚本test/feedback-button.test.ts9.8 KB
- 脚本test/feedback-core.test.ts5.8 KB
- 脚本test/login-controller.test.ts1.1 KB
- 脚本test/login-panel.test.ts34.9 KB
- 脚本test/proactive-fetch.test.ts39.2 KB
- 其他test/react.test.tsx9.7 KB
- 脚本test/setup.ts1.9 KB
- 脚本test/solid-binding-plugin.test.ts12.1 KB
- 脚本test/states.test.ts8.4 KB
- 脚本test/theme-core.test.ts3.6 KB
- 脚本test/theme-toggle.test.ts6.6 KB
- 脚本test/theming.test.ts3.7 KB
- 参考文档tsconfig.build.json404 B
- 参考文档tsconfig.json553 B
- 脚本vitest.config.ts1.7 KB
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-5 --> <!-- AUTHORED-BY Codex GPT-6.1-Sol -->
Work with @jeswr/solid-elements
Keep the root package presentation-oriented: custom elements receive attributes/properties and emit CustomEvents; the host owns navigation, persistence, and application state.
Choose an entry point
- Import
@jeswr/solid-elementsto register thejeswr-*custom elements. - Import
@jeswr/solid-elements/reactfor React wrappers. - Import
@jeswr/solid-elements/authonly when using its optional auth adapter, and install every optional peer it requires. Prefer@jeswr/solid-auth-corefor new shared auth logic.
For proactive auth, deriveProactiveAllowedOrigins excludes the issuer origin by default;
only includeIssuerOrigin: true opts in. A pod hosted on the issuer origin remains allowed
through podRoot. Use includeWebIdOrigin: false if the WebID document is not served by
the pod. The separate computeAllowedOrigins default still includes the issuer.
Use the documented tags for theme toggle, account menu, feedback, login, empty/error/loading states, and saving status. Prefer DOM attributes for string configuration; set function/object seams such as submit or controller as properties.
Component rules
- Keep
app-shell-theme, the.darkclass, and shared CSS tokens compatible with@jeswr/app-shell. - Reflect user-visible string properties when attribute-based consumption is part of the contract.
- Configure the login panel's sign-in field label with
webid-label/ reflectedwebIdLabel(string, defaultYour WebID). Render it as text, never HTML, and preserve the wrapping label's association with the input and its accessible name. - Emit composed/bubbling custom events where hosts across shadow boundaries must observe them.
- Preserve keyboard navigation, focus trapping, Escape behavior, roles, labels, and reduced-motion behavior.
- Keep feedback WebID inclusion opt-in and validate the GitHub repository target before opening a URL.
- Validate external URLs and never emit tokens, secrets, or raw diagnostic internals.
- Guard
customElements.defineso repeated imports are safe.
React-wrapper testing caveat
Under jsdom, @lit/react may resolve its Node build and skip browser property-forwarding effects. Test the raw custom element contract by setting properties directly, awaiting updateComplete, and asserting reflected attributes, events, and shadow DOM. Use a real browser test for React-to-custom-element forwarding.
Keep auth implementation out of presentation components. The login panel consumes a controller; it should not grow a second token provider. Run manifest checks, API checks, unit tests, and the full workspace gate after changes.
04 同仓库更多 Skills
storage-conformance
Work on @jeswr/storage-conformance, the shared storage conformance suite package in the Solid SDK workspace.
fetch-rdf-engine-tests
Maintain fetch-rdf's real Node WASM parser integration tests without introducing a reverse engine dependency in fetch-rdf.
alpha
Use when checking fixtures, including folded YAML descriptions.
widget
Use when testing package skills: YAML quoting works.
web-seo
Use when improving technical and entity SEO for a modern personal, portfolio, documentation, or marketing site, including crawlable HTML, canonical metadata, sitemap and robots, Person/ProfilePage JSON-LD, Core Web Vitals, and honest ranking expectations.
solid-wac
Use when implementing or auditing Solid server WAC authorization, ACL creation and inheritance, auxiliary-resource escalation, method-to-mode mapping, 401 versus 403 challenges, WAC-Allow, or defensive typed ACL parsing with @solid/object and @rdfjs/wrapper.