icons: give this package a source tree, and emit the Icon class

@hanzo/[email protected].6 was published with no source repository behind
it: on npm it is byte-identical to @posthog/[email protected].6 with only the package
name changed, so the fork existed as a published artifact and nowhere else.
The source here is recovered from that artifact's sourcemaps.

Two things change from 0.36.6.

Icons emit className "Icon" instead of "LemonIcon". Our stylesheets moved to
.Icon, so every icon from this package lost its only sizing rule and rendered
at full viewBox size. Insights carries a transitional rule matching both
selectors; this lets that rule go away.

Build output is dist/icons.* instead of dist/posthog-icons.*, so the upstream
project name no longer appears in consumer-visible paths.

The icon payload itself is untouched: 319 exports and 439 SVG path definitions,
identical to 0.36.6.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-01 10:36:06 -07:00
co-authored by Hanzo Dev
commit fe7cb10494
11 changed files with 5402 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules/
dist/
+22
View File
@@ -0,0 +1,22 @@
MIT License
Copyright (c) 2024-2026 Hanzo AI, Inc.
Copyright (c) 2023 PostHog, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+13
View File
@@ -0,0 +1,13 @@
Hanzo Insights Icons
Copyright (c) 2024-2026 Hanzo AI, Inc.
This product is a derivative work of the MIT-licensed `@posthog/icons`
package by PostHog, Inc. (https://posthog.com). The original copyright
notice and MIT permission notice are retained in LICENSE.
Changes made by Hanzo AI:
- Icons render with the `Icon` class instead of the upstream `LemonIcon`
class, matching the `@hanzo/elements` design-system stylesheet.
- Build output is named `icons.*` rather than carrying the upstream
project name in consumer-visible file paths.
- Package identity (name, author, repository, homepage) is Hanzo's.
+31
View File
@@ -0,0 +1,31 @@
# @hanzo/insights-icons
The product icon set used by [Hanzo Insights](https://github.com/hanzoai/insights) —
319 React SVG icon components.
```tsx
import { IconTrends } from '@hanzo/insights-icons'
<IconTrends />
```
Every icon renders an `<svg>` carrying the `Icon` class, which is the sizing hook
the `@hanzo/elements` design-system stylesheet keys on. Icons inherit `currentColor`
and size from that class, so colour and size are controlled by CSS, not props.
## Build
```bash
pnpm install
pnpm build # -> dist/icons.es.js, dist/icons.cjs.js, dist/index.d.ts
```
## Provenance
Derived from the MIT-licensed `@posthog/icons`. See `NOTICE` for the list of
changes and `LICENSE` for the retained upstream copyright.
Prior to this repository, `@hanzo/insights-icons` was published without a source
tree of its own — version 0.36.6 on npm was a byte-identical republish of
`@posthog/[email protected]` with only the package name changed. This repository is
that package's actual source.
+44
View File
@@ -0,0 +1,44 @@
{
"name": "@hanzo/insights-icons",
"version": "0.36.7",
"description": "Product icon set for Hanzo Insights",
"author": "Hanzo AI <[email protected]>",
"repository": {
"type": "git",
"url": "git+https://github.com/hanzoai/insights-icons.git"
},
"homepage": "https://github.com/hanzoai/insights-icons",
"license": "MIT",
"sideEffects": false,
"main": "./dist/icons.cjs.js",
"module": "./dist/icons.es.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/icons.es.js",
"require": "./dist/icons.cjs.js"
}
},
"files": [
"dist/"
],
"scripts": {
"build": "vite build",
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"react": ">=16.14.0",
"react-dom": ">=16.14.0"
},
"devDependencies": {
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@vitejs/plugin-react": "^4.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.0.2",
"vite": "^4.4.0",
"vite-plugin-dts": "^3.2.0"
}
}
+1421
View File
File diff suppressed because it is too large Load Diff
+3816
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
export * from './Icons'
export type { IconProps, IconComponent } from './types/icon-types'
+5
View File
@@ -0,0 +1,5 @@
import { ComponentProps, FunctionComponent, RefAttributes } from 'react';
export type BaseIconProps = ComponentProps<'svg'>;
export type IconProps = Omit<BaseIconProps, 'children'>;
export type IconComponent<T> = FunctionComponent<T & RefAttributes<SVGSVGElement>>;
+20
View File
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src", "vite.config.ts"]
}
+26
View File
@@ -0,0 +1,26 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import dts from 'vite-plugin-dts'
export default defineConfig({
plugins: [react(), dts({ insertTypesEntry: true })],
build: {
sourcemap: true,
// Ship readable output: consumers minify at their own bundle step, and an
// unminified artifact stays diffable against the upstream it derives from.
minify: false,
lib: {
entry: 'src/index.ts',
// Output is named for what it is. Upstream emitted `posthog-icons.*`,
// which leaked the upstream project name into every consumer's import path.
fileName: (format) => `icons.${format}.js`,
formats: ['es', 'cjs'],
},
rollupOptions: {
external: ['react', 'react-dom', 'react/jsx-runtime'],
output: {
globals: { react: 'React', 'react-dom': 'ReactDOM' },
},
},
},
})