Skip to content

Inkspan: fix build defect, bundle offline multilingual fonts, product branding#1

Merged
seonghobae merged 2 commits into
mainfrom
feat/build-fonts-branding
Jul 12, 2026
Merged

Inkspan: fix build defect, bundle offline multilingual fonts, product branding#1
seonghobae merged 2 commits into
mainfrom
feat/build-fonts-branding

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

Fixes the blocking build defect, ships bundled offline multilingual fonts, and brands the product as Inkspan (inkspan.io). Repo slug stays cwl-editor.

1. Build fix (blocking, confirmed)

tsconfig.json sets types: ['vitest/globals', 'node'] but @types/node was not in devDependencies, so pnpm typecheck / pnpm build failed with TS2688. Added @types/node pinned (20.19.9). Now typecheck, library build, converter build, demo build, and the test suite all pass.

2. Bundled offline fonts (air-gapped / 폐쇄망)

  • Self-contained Noto Sans (SIL OFL-1.1) woff2 covering Korean, English, Japanese, Chinese (Simplified + Traditional), Vietnamese under src/fonts/files/~9.7 MB across ~470 unicode-range subset files.
  • @font-face CSS references only local bundled files (./files/…) — no CDN / Google Fonts URL. Verified the built demo has 0 gstatic/googleapis references → renders with zero network fetch.
  • src/fonts/fonts.css (all five scripts) and src/fonts/fonts-latin.css (Latin/Vietnamese only) so consumers can tree-shake / opt out of CJK.
  • scripts/fetch-fonts.mjs regenerates the bundle (the only step that touches the network; rendering never does) + pnpm fonts.
  • Default --cwl-font Noto Sans stack in styles.css.
  • src/fonts/OFL.txt license + src/fonts/NOTICE attribution; MIT/OFL compatibility documented.
  • Size tradeoff documented in README (CJK ships weight 400; bold synthesized).

3. Product branding — Inkspan

README (title/description), package.json description + keywords, demo UI, and docs branded as Inkspan (inkspan.io). npm name and repo slug unchanged.

4. Minor fixes

  • Base64Image: removed the docstring's non-existent fetchRemote option (remote fetch conflicts with the offline base64-inline design); clarified intent.
  • imageFileToInlineDataUri: re-applies the maxSizeBytes guard to the re-encoded output after canvas downscale, so the guard covers what actually lands in the document. Added tests.

Verification

  • pnpm install && pnpm typecheck && pnpm build && pnpm build:demo — all green.
  • pnpm test49 passed (was 45).
  • Built demo: 455 woff2 emitted locally, 0 CDN references.

Licensing

Code MIT; fonts OFL-1.1 (permissive, non-copyleft, MIT-compatible — fonts are content, not linked code). No GPL/AGPL.

🤖 Generated with Claude Code

…nkspan

Build fix (blocking):
- Add @types/node (pinned 20.19.9) to devDependencies. tsconfig sets
  types:['vitest/globals','node'] but @types/node was missing, so tsc failed
  with TS2688 and pnpm build/typecheck were broken. Now typecheck, library
  build, converter build, demo build and the test suite all pass.

Bundled offline fonts (air-gapped / 폐쇄망, SIL OFL 1.1):
- Ship self-contained Noto Sans woff2 covering Korean, English, Japanese,
  Chinese (Simplified + Traditional) and Vietnamese under src/fonts/files/
  (~9.7 MB, ~470 unicode-range subset files). @font-face CSS references only
  local bundled files — no CDN / Google Fonts URL, zero network fetch to render.
- Add src/fonts/fonts.css (all five scripts) and src/fonts/fonts-latin.css
  (Latin/Vietnamese only) so consumers can tree-shake the CJK fonts.
- Add scripts/fetch-fonts.mjs generator (the only step that touches the
  network; rendering never does) and a `pnpm fonts` script.
- Apply a Noto Sans default font stack via --cwl-font in styles.css.
- Include OFL.txt license text + NOTICE attribution; note MIT/OFL compatibility.
- Export ./fonts.css, ./fonts-latin.css, ./fonts/* from package.json; mark
  CSS as sideEffects so consumer bundlers keep the imports.
- Demo imports fonts.css and shows all five scripts; built demo has 0 CDN refs.

Product branding — Inkspan (inkspan.io):
- Brand README (title/description), package.json description/keywords, demo,
  and docs as Inkspan. Repo slug stays cwl-editor; npm name unchanged.

Minor fixes:
- Base64Image: remove the docstring's non-existent `fetchRemote` option (remote
  fetch conflicts with the offline base64-inline design) and clarify intent.
- imageFileToInlineDataUri: re-apply the maxSizeBytes guard to the re-encoded
  output after canvas downscale, so the size guard covers what actually lands
  in the document. Add tests (49 tests pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

# Conflicts:
#	package.json
#	pnpm-lock.yaml
#	src/extensions/Base64Image.test.ts

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode model providers were unavailable for this same-head run, but deterministic current-head evidence is clean: coverage evidence passed, peer GitHub Checks are complete, medium-or-higher code-scanning alerts are clear, mergeability is clean, and reviewer threads are resolved or outdated.

Findings

No blocking findings.

Evidence

  • Result: APPROVE
  • Reason: current-head model-unavailable evidence fallback; coverage, docstring, peer GitHub Checks, code-scanning alerts, mergeability, and review threads were clear for current head.
  • Scope: unsupported
  • Changed files: 0
  • Model-pool outcome: exhausted
  • Head SHA: 58e30952b8517b5f58f2b8bee16fde43d025b440
  • Workflow run: 29201473144
  • Workflow attempt: 1

This fallback does not suppress failed checks, medium-or-higher code-scanning alerts, merge conflicts, unresolved reviewer threads, or failed coverage evidence; any of those conditions still publish REQUEST_CHANGES or leave the approval state unchanged.

@seonghobae seonghobae merged commit da84552 into main Jul 12, 2026
22 checks passed
@seonghobae seonghobae deleted the feat/build-fonts-branding branch July 12, 2026 17:17
@github-project-automation github-project-automation Bot moved this from Todo to Done in naruon Platform Roadmap Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants