Establish npm-workspace monorepo layout for theme tokens and icon assets#271
Draft
Establish npm-workspace monorepo layout for theme tokens and icon assets#271
Conversation
Agent-Logs-Url: https://github.com/SolidOS/profile-pane/sessions/be073d7f-b124-45a5-b6ed-854f1bcb73f7 Co-authored-by: timea-solid <4144203+timea-solid@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SolidOS/profile-pane/sessions/be073d7f-b124-45a5-b6ed-854f1bcb73f7 Co-authored-by: timea-solid <4144203+timea-solid@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SolidOS/profile-pane/sessions/be073d7f-b124-45a5-b6ed-854f1bcb73f7 Co-authored-by: timea-solid <4144203+timea-solid@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create repository structure for theme tokens and icons
Establish npm-workspace monorepo layout for theme tokens and icon assets
Apr 19, 2026
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.
This PR introduces a frameworkless TypeScript monorepo layout for reusable theming and icon distribution, adding two publishable packages:
@solidos/tokensand@solidos/icons. It standardizes light/dark theme tokens and per-file SVG asset consumption for webpack apps to keep bundles lean.Root monorepo/tooling
packages/*) at repo root.tsconfig.base.jsonfor monorepo TypeScript baseline.buildorchestration to run existing profile build plus workspace package builds.@solidos/tokenspackagepackages/tokens/src/themes.csswith base tokens and[data-theme='light'|'dark']variants.files, CSS exports/style field).@solidos/iconspackagesrc/icons/for single-color UI SVGs (currentColor)src/logos/for multi-color brand assetsdist/icons/*.svgdist/logos/*.svgConsumer guidance (webpack + theme usage)
asset/resourceSVG handling.@solidos/icons.--icon-color, and<img>usage for logos.Original prompt
Create a new repository structure in
SolidOS/profile-pane(branchmain) that implements a recommended monorepo-style layout for theme tokens and icons suitable for a frameworkless TypeScript + webpack ecosystem.Goals
@solidos/tokens(CSS variables for themes)@solidos/icons(SVG assets split into single-color UI icons vs multi-color logos)mask-imageand multi-color logos via<img>Required repository layout
packages/directory with:packages/tokens/src/themes.css(includes base tokens + light/dark theme via[data-theme])package.jsonset up for npm publishing, with properfilesfieldREADME.mdwith usage instructions (importing CSS, togglingdata-theme)packages/icons/src/icons/(single-color SVGs)src/logos/(multi-color SVGs)icons/+logos/ordist/icons+dist/logos, but document the import paths)package.jsonset up for npm publishingREADME.mdexplaining:--icon-color<img>Tooling / configuration
package.jsonusing workspaces (npm/yarn/pnpm—pick one and document it)tsconfig.base.jsonREADME.mddescribing the packages and how to buildsvgoconfiguration for icons (and more conservative config for logos, if needed)examples/webpack-demo/or in root README showing:type: "asset/resource"for SVG@solidos/tokens/src/themes.css(or built path) and toggling theme@solidos/icons/...and applying mask CSSAcceptance criteria
npm installat root andnpm run buildbuilds both packages (at least copies/optimizes assets and prepares publishable outputs).The following is the prior conversation context from the user's chat exploration (may be truncated):
User: I am interested in the state of the art way to work with icons. Please do a research and explain what is best for a javascript/typescript based repo.
Assistant: For a JavaScript/TypeScript repo in 2026, the state-of-the-art approach is:
Below are the best-practice options and when to choose each.
Option A (best default): “Local SVG components” (tree-shaken)
Best when: you have a design system / a chosen icon set (e.g., Lucide, Heroicons, Material icons as SVG), and you care about performance, offline builds, and deterministic bundles.
How it works
currentColor+ CSS (so they follow text color), and sized viawidth/heightorem.Why it’s “state of the art”
Typical tooling
*.svg→ React component)vite-plugin-svgror similaricons/package exporting typed componentsAccessibility best practice
aria-hidden="true" focusable="false"role="img"+aria-label="..."(or<title>inside SVG)Option B (best when you want huge selection): Iconify (on-demand SVG)
Best when: you want access to many icon sets (Material Design Icons, etc.) without installing each set, and you’re OK with either (a) runtime fetching or (b) pre-bundling icons you use.
Iconify’s pitch is: one API/syntax for 200k+ icons across 150+ icon sets, rendered as SVG and (optionally) loaded on demand. (iconify.design)
Two Iconify modes
This pull request was created from Copilot chat.