solid-components
Use when offering extension request-access consent after a solid-components DataController AccessDeniedError.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- solid-components
- description
- Use when offering extension request-access consent after a solid-components DataController AccessDeniedError.
02 资源文件 67
- 脚本custom-elements-manifest.config.mjs2.4 KB
- 参考文档custom-elements.json168.4 KB
- 许可证LICENSE1.0 KB
- 参考文档package.json3.8 KB
- 参考文档README.md4.7 KB
- 脚本scripts/build-dist.mjs10.5 KB
- 脚本scripts/cem/solid-binding-plugin.mjs13.4 KB
- 脚本scripts/check-manifest.mjs3.0 KB
- 脚本scripts/dist-imports.mjs2.4 KB
- 脚本scripts/stubs/jsonld.mjs1.4 KB
- 脚本scripts/stubs/leaflet.mjs972 B
- 脚本scripts/stubs/rdfxml-streaming-parser.mjs1018 B
- 脚本src/components/bookmark-form.ts4.4 KB
- 脚本src/components/bookmark-list.ts5.2 KB
- 脚本src/components/collection.ts6.4 KB
- 脚本src/components/contact-form.ts3.3 KB
- 脚本src/components/contact-list.ts4.9 KB
- 脚本src/components/form-base.ts12.9 KB
- 脚本src/components/message-list.ts12.1 KB
- 脚本src/components/profile-card.ts8.9 KB
- 脚本src/components/shacl-form-edit.ts18.9 KB
- 脚本src/components/shacl-view.ts16.1 KB
- 脚本src/components/shapes.ts4.9 KB
- 脚本src/components/shared.ts11.4 KB
- 脚本src/components/solid-view.ts9.9 KB
- 脚本src/components/task-form.ts4.3 KB
- 脚本src/components/task-list.ts5.1 KB
- 脚本src/data-controller.ts15.1 KB
- 脚本src/data-writer.ts31.0 KB
- 脚本src/errors.ts4.7 KB
- 脚本src/index.ts5.5 KB
- 脚本src/rdf.ts2.5 KB
- 脚本src/react/index.ts2.5 KB
- 脚本src/request-access.ts4.1 KB
- 脚本src/resolver.ts10.5 KB
- 脚本src/serialize.ts1.5 KB
- 脚本src/shacl-view-fetch.ts25.2 KB
- 脚本src/vocab.ts3.2 KB
- 脚本test/bookmark-list.test.ts4.8 KB
- 脚本test/collection.test.ts4.7 KB
- 脚本test/contact-form.test.ts5.4 KB
- 脚本test/contact-list.test.ts6.8 KB
- 脚本test/data-controller.test.ts11.7 KB
- 脚本test/data-writer-podscope-shape-guard.test.ts6.6 KB
- 脚本test/data-writer.test.ts21.6 KB
- 脚本test/errors.test.ts3.3 KB
- 脚本test/fixtures.ts10.1 KB
- 脚本test/manifest.test.ts10.0 KB
- 脚本test/merge-roundtrip.test.ts15.0 KB
- 脚本test/message-list.test.ts10.9 KB
- 脚本test/packaged-dist.smoke.test.ts9.0 KB
- 脚本test/per-class-forms.test.ts17.4 KB
- 脚本test/profile-card.test.ts3.7 KB
- 脚本test/request-access-exports.test.ts1.4 KB
- 脚本test/request-access.test.ts9.8 KB
- 脚本test/resolver.test.ts7.1 KB
- 脚本test/serialize.test.ts924 B
- 脚本test/setup.ts3.2 KB
- 脚本test/shacl-form-edit.test.ts13.1 KB
- 脚本test/shacl-view-fetch.test.ts19.0 KB
- 脚本test/shacl-view.test.ts21.0 KB
- 脚本test/solid-view.test.ts4.8 KB
- 脚本test/task-list.test.ts3.6 KB
- 脚本test/write-security.test.ts4.6 KB
- 参考文档tsconfig.build.json437 B
- 参考文档tsconfig.json553 B
- 脚本vitest.config.ts1.0 KB
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-6.1-Sol -->
Request access after denial
Use canRequestAccess() to detect a callable globalThis.solid.requestAccess.
Both the core and ./react entries export the helpers, request/result types, and
RequestAccessUnavailableError. Gate the app's own button on both the error
class and capability:
import { AccessDeniedError, canRequestAccess } from "@jeswr/solid-components";
function renderAccessAction(error: unknown, container: HTMLElement, onRequest: () => void) {
if (error instanceof AccessDeniedError && canRequestAccess()) {
const button = document.createElement("button");
button.textContent = "Request access";
button.addEventListener("click", onRequest);
container.append(button);
}
}
In that user-gesture handler call requestAccessAfterDenial(error, request);
the README example includes
result/error handling. Pass non-empty class/mode arrays; every class must be an
absolute HTTP(S) IRI. Use read, append, or write for compatibility with the
current extension (case-insensitive, trimmed). The helper also accepts the exact
full ACL Read/Append/Write IRIs required by its contract, but the current
extension parser rejects them. Do not guess modes or translate the request.
The exact request object is passed through, including optional purpose and
ISO-8601 duration. The current extension requires a positive bounded duration;
use P30D, for example. Approval means ok === true and non-empty grants, which
can represent partial approval. It does not guarantee a retry will succeed.
The helper never retries a read or calls login. Handle extension rejection and
RequestAccessUnavailableError (the capability can disappear after rendering).
Tests inject fake targets or window.solid; no real accounts or network calls.
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.