v1.3.1: scorecard polish + hide PNG link for SVG-only diagram types#30
Merged
Conversation
Addresses the issues flagged on community.obsidian.md/plugins/obsidian-kroki: Source - main.ts: document → activeDocument for popout-window compatibility (renderer + settings linkFragment). - main.ts: drop the 'General' settings heading per Obsidian style guide. - main.ts: wrap async settings-textarea handler so addEventListener gets a void-returning callback. - styles.css: #fff → #ffffff (6-digit hex). - manifest.json: trailing period on description. PNG action link - main.ts: omit the PNG link for diagram types whose Kroki /png/ endpoint is unsupported (bpmn, bytefield, d2, dbml, excalidraw, nomnoml, pikchr, svgbob, symbolator, wavedrom — verified against kroki.io support matrix and probed live). Edit link now uses svgUrl, which is valid for every type. README and RELEASE_NOTES note this. Build / supply chain - esbuild.config.mjs: switch builtin-modules dep to node:module's builtinModules; drop the dep from package.json. - package.json: pin pako 2.1.0 (was ^2.1.0). - .gitignore: stop ignoring package-lock.json; commit the lockfile. - .github/workflows/main.yml and publish.yml: npm install → npm ci. - publish.yml: add id-token/attestations permissions and an actions/attest-build-provenance@v2 step for main.js, manifest.json, styles.css. Release notes pulled from RELEASE_NOTES.md. Hygiene - New CONTRIBUTING.md. Version bump: 1.3.0 → 1.3.1 (manifest.json, package.json, versions.json).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears the items flagged on community.obsidian.md/plugins/obsidian-kroki and fixes the broken PNG action link for diagram types whose Kroki server doesn't generate PNG.
Source
main.ts:document→activeDocumentin the renderer and settings link helper (popout-window compatibility).main.ts: drop the General settings heading per Obsidian's style guide.main.ts: settings-textarea handler no longer handsaddEventListeneraPromise<void>.styles.css:#fff→#ffffff.manifest.json: trailing period on the description.PNG action link
The PNG action link is now hidden for diagram types whose Kroki
/png/endpoint isn't implemented:bpmn,bytefield,d2,dbml,excalidraw,nomnoml,pikchr,svgbob,symbolator,wavedrom. Verified against kroki.io's support matrix and by probing each endpoint live (SVG=200, PNG=400/404).The Edit link now uses the SVG URL — niolesk just decodes the source out of the encoded fragment, so format doesn't matter to it, and SVG is valid for every diagram type.
README and
RELEASE_NOTES.mdcall this out.Build / supply chain
esbuild.config.mjsusesnode:module'sbuiltinModulesinstead of thebuiltin-modulesdep, which is dropped frompackage.json.pakopinned to2.1.0(was^2.1.0).package-lock.jsonis now committed; both workflows switchednpm install→npm ci.publish.ymlgainedid-token: write+attestations: writepermissions and anactions/attest-build-provenance@v2step coveringmain.js,manifest.json,styles.css. Release body comes fromRELEASE_NOTES.md.Hygiene
CONTRIBUTING.mdcovering dev setup (nix developornpm install), test-vault flow, and the release path.Version
Bumped to 1.3.1 across
manifest.json,package.json,versions.json.Verification
npm run lintandnpm run buildboth clean.grep -c builtin-modules main.js→ 0.Out of scope
atob/btoaandvault.readdisclosures — intentional (Kroki URL encoding and@from_file:include).