app-shell
Use when building or modifying React application chrome with @jeswr/app-shell, including light/dark/system theming, WebID account menus, feedback controls, error boundaries, extension-presence detection, CSS token integration, or host-style isolation.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- app-shell
- description
- Use when building or modifying React application chrome with @jeswr/app-shell, including light/dark/system theming, WebID account menus, feedback controls, error boundaries, extension-presence detection, CSS token integration, or host-style isolation.
02 资源文件 37
- 参考文档api-extractor.json2.2 KB
- 参考文档etc/app-shell.api.md6.9 KB
- 许可证LICENSE1.0 KB
- 参考文档package.json1.8 KB
- 参考文档README.md1.8 KB
- 脚本scripts/copy-css.mjs1.6 KB
- 其他src/components/account-menu.tsx4.4 KB
- 其他src/components/error-boundary.tsx4.4 KB
- 其他src/components/error-state.tsx2.6 KB
- 其他src/components/feedback.tsx16.4 KB
- 其他src/components/primitives.tsx6.8 KB
- 其他src/components/theme-provider.tsx8.5 KB
- 其他src/components/theme-toggle.tsx2.6 KB
- 脚本src/hooks/use-solid-extension-present.ts4.2 KB
- 脚本src/index.ts2.3 KB
- 脚本src/lib/cn.ts768 B
- 脚本src/lib/feedback-core.ts5.5 KB
- 脚本src/lib/focus-trap.ts4.1 KB
- 其他src/styles/reset.css8.2 KB
- 其他src/styles/styles.css1.4 KB
- 其他src/styles/theme.css3.4 KB
- 其他src/styles/tokens.css6.3 KB
- 其他test/account-menu.test.tsx3.8 KB
- 脚本test/cn.test.ts1.5 KB
- 其他test/css-isolation.test.tsx5.4 KB
- 其他test/error-boundary.test.tsx6.6 KB
- 其他test/error-state.test.tsx2.7 KB
- 其他test/feedback.test.tsx19.0 KB
- 脚本test/public-api.test.ts2.6 KB
- 脚本test/setup.ts1.9 KB
- 脚本test/styles.test.ts7.4 KB
- 其他test/theme-provider.test.tsx7.3 KB
- 其他test/theme-toggle.test.tsx4.3 KB
- 其他test/use-solid-extension-present.test.tsx2.2 KB
- 参考文档tsconfig.build.json404 B
- 参考文档tsconfig.json626 B
- 脚本vitest.config.ts367 B
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-5 -->
Work with @jeswr/app-shell
Treat this package as the React shell for suite applications. Keep session, routing, and data access in the host app; pass values and callbacks into the shell components.
Use the public surface
- Wrap the app once with
ThemeProvider; read or change the preference throughuseTheme. - Add
themeScript()to the document head when first-paint theme correctness matters. Use the same storage key and dark class asThemeProvider. - Pass
webId, display data, and navigation/sign-out callbacks toAccountMenu. Do not couple this package to an auth implementation. - Configure
FeedbackButtonwith the consuming app's ownowner/repo. Asubmitcallback enables a proxy; without it, the control opens a prefilled GitHub issue. - Wrap routed content in
ErrorBoundaryand pass a route-derivedresetKey. Keep raw error text and stacks in telemetry; show friendly copy throughErrorState. - Use
useSolidExtensionPresent()only as a presence signal. It does not establish identity or authentication.
import {
AccountMenu,
ErrorBoundary,
FeedbackButton,
ThemeProvider,
ThemeToggle,
} from "@jeswr/app-shell";
import "@jeswr/app-shell/styles.css";
<ThemeProvider>
<header>
<ThemeToggle />
<AccountMenu webId={webId} onSignOut={logout} />
<FeedbackButton repo="jeswr/my-app" appName="My App" />
</header>
<ErrorBoundary resetKey={pathname}>{children}</ErrorBoundary>
</ThemeProvider>;
Integrate styling deliberately
- Tailwind v4 consumers normally import
@jeswr/app-shell/styles.cssafter Tailwind and include this package in the content scan. - Non-Tailwind consumers import
tokens.cssandreset.css, then supply the utility classes used by the components. - The package's
--as-*token namespace and[data-app-shell-control]reset protect shell chrome from host globals. Do not bypass them accidentally. - If a consumer intentionally styles the exported
Buttonprimitive, setdefensiveReset={false}on that button. - Keep CSS subpath imports within the declared exports:
styles.css,tokens.css,theme.css, andreset.css.
Preserve package boundaries
- Keep components framework-agnostic within React: no
next/*, router, session, or application-store imports. - Keep feedback diagnostics free of tokens, secrets, and WebIDs unless the user explicitly opts in.
- Maintain SSR safety: DOM and storage access must remain guarded or effect-bound.
- Add or update tests for theme persistence, keyboard/focus behavior, privacy, error fallbacks, and CSS isolation when changing those contracts.
Run the package through the workspace gate after changes. If the public API changes intentionally, update the API report using the package's existing script before running the full gate.
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.