Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body:
attributes:
label: Environment
description: Node version, bundler, and the consuming package if any.
placeholder: Node 24, Vite 8, @ichava/react-icon-browser 0.1.0
placeholder: Node 24, Vite 8, ichava/icon-browser 0.1.0
validations:
required: false
- type: textarea
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to `@ichava/js-icon-components` follow [Keep a Changelog](ht

## [Unreleased]

### Changed

- The SVG policy interpreter (`src/generator/svgPolicy.ts`) is pinned to `ichava/icon-browser`'s `resources/js/modules/svg/domain/svgPolicy.ts`, not to the retired react-icon-browser, so `tests/vendored.test.ts` compares it with the live copy. Its body and digest are unchanged.

## [0.1.0] - 2026-11-13

First release.
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ build.

It applies `ichava/core`'s `svg-policy.json` (vendored, digest-pinned): the element and attribute
allow-lists, `href` to a `#fragment` only, CSS values checked by the same functions
react-icon-browser uses (copied verbatim), and core's caps of 30,000 elements and 4,500,000 bytes.
icon-browser's browser uses (copied verbatim from `resources/js/modules/svg/domain/svgPolicy.ts`), and core's caps of 30,000 elements and 4,500,000 bytes.

It **rejects** where core strips. A runtime sanitiser must render something for a user who is
waiting; a build-time gate has no such user, so an icon the policy would alter fails the build and
Expand Down
2 changes: 1 addition & 1 deletion docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tagging a release, and moving a pack to a new commit.
## Distribution is GitHub only

There is no npm release. Consumers install the tarball attached to a GitHub release, or pin
`github:ichava/js-icon-components#vX.Y.Z` and build, the way react-icon-browser pins js-ui-kernel.
`github:ichava/js-icon-components#vX.Y.Z` and build, the way icon-browser and ichava.com pin js-ui-kernel.
Publishing to a registry is a separate decision for the owner.

## Cutting a release
Expand Down
5 changes: 3 additions & 2 deletions src/generator/svgPolicy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// The SVG policy interpreter, copied from ichava/react-icon-browser
// src/modules/svg/domain/svgPolicy.ts at the commit vendor/source.json records under `interpreters`.
// The SVG policy interpreter, copied from ichava/icon-browser
// resources/js/modules/svg/domain/svgPolicy.ts at the commit vendor/source.json records under
// `interpreters`. It came from react-icon-browser, retired since 2026-11-13; the body is unchanged.
// Only this preamble differs: that package bundles the JSON through Vite, this one reads
// vendor/svg-policy.json (a byte copy of core/resources/security/svg-policy.json, pinned by
// digest). Everything after the marker is the source from its second line, pinned by digest in
Expand Down
4 changes: 2 additions & 2 deletions tests/presentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { ROOT } from './helpers.ts';
* The generator rejects rather than strips, so "kept" here means the SVG is accepted with the
* attribute in its tree, and "stripped" means it is refused.
*
* `tests/fixtures/svg/presentation-vectors.json` is byte-identical in core, react-icon-browser and
* js-icon-components, and copies its rows from the Go table in icon-sets-sync.
* `tests/fixtures/svg/presentation-vectors.json` is byte-identical in core, icon-browser
* (`resources/js/test/fixtures/svg/`) and js-icon-components, and copies its rows from the Go table in icon-sets-sync.
*/

interface Vector {
Expand Down
6 changes: 3 additions & 3 deletions vendor/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"$comment_interpreters": "Source files whose body is a copy of another repository's file. Each file holds its own preamble (imports that differ by runtime), then the marker line, then the source file from its second line onward, byte for byte. tests/vendored.test.ts pins the body by sha256 and compares it with the sibling checkout when present. To take a new copy: replace everything after the marker with the source from line 2, then update commit and sha256 here.",
"interpreters": {
"src/generator/svgPolicy.ts": {
"repository": "ichava/react-icon-browser",
"path": "src/modules/svg/domain/svgPolicy.ts",
"commit": "054c2b329b5787c75dac03bfd4b0c905fd5f2d2a",
"repository": "ichava/icon-browser",
"path": "resources/js/modules/svg/domain/svgPolicy.ts",
"commit": "4583aa3d13bb6b7c76886057b4fa80cde09e5ebb",
"sha256": "3555ca7b1c0de456a6cbc85ebacb61a828279e7b9e0da335df36ea8d48c0a72e"
}
}
Expand Down
Loading