chore: small updates 77af2e1f
Steve · 2026-02-05 21:41 4 file(s) · +60 −4
packages/ui/package.json +9 −3
1 1
{
2 2
	"name": "sequoia-ui",
3 -
	"version": "0.1.0",
3 +
	"version": "0.0.2",
4 4
	"type": "module",
5 5
	"files": [
6 6
		"dist",
8 8
	],
9 9
	"main": "./dist/index.js",
10 10
	"exports": {
11 -
		".": "./dist/index.js",
12 -
		"./comments": "./dist/index.js"
11 +
		".": {
12 +
			"import": "./dist/index.js",
13 +
			"default": "./dist/index.js"
14 +
		},
15 +
		"./comments": {
16 +
			"import": "./dist/index.js",
17 +
			"default": "./dist/index.js"
18 +
		}
13 19
	},
14 20
	"scripts": {
15 21
		"lint": "biome lint --write",
packages/ui/src/components/sequoia-comments/sequoia-comments.ts +7 −1
26 26
  <path d="m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z"/>
27 27
</svg>`;
28 28
29 -
export class SequoiaComments extends HTMLElement {
29 +
// SSR-safe base class - use HTMLElement in browser, empty class in Node.js
30 +
const BaseElement =
31 +
	typeof HTMLElement !== "undefined"
32 +
		? HTMLElement
33 +
		: (class {} as typeof HTMLElement);
34 +
35 +
export class SequoiaComments extends BaseElement {
30 36
	private shadow: ShadowRoot;
31 37
	private state: State = { type: "loading" };
32 38
	private abortController: AbortController | null = null;
packages/ui/src/index.ts +4 −0
24 24
} from "./types/bluesky";
25 25
26 26
export { isThreadViewPost } from "./types/bluesky";
27 +
28 +
// Styles and theming
29 +
export type { SequoiaTheme, SequoiaCSSVar } from "./types/styles";
30 +
export { SEQUOIA_CSS_VARS } from "./types/styles";
packages/ui/src/types/styles.ts (added) +40 −0
1 +
/**
2 +
 * CSS custom properties for theming SequoiaComments
3 +
 *
4 +
 * @example
5 +
 * ```css
6 +
 * :root {
7 +
 *   --sequoia-fg-color: #1f2937;
8 +
 *   --sequoia-bg-color: #ffffff;
9 +
 *   --sequoia-accent-color: #2563eb;
10 +
 * }
11 +
 * ```
12 +
 */
13 +
export interface SequoiaTheme {
14 +
	/** Primary text color (default: #1f2937) */
15 +
	"--sequoia-fg-color"?: string;
16 +
	/** Background color for comments and containers (default: #ffffff) */
17 +
	"--sequoia-bg-color"?: string;
18 +
	/** Border color for separators and outlines (default: #e5e7eb) */
19 +
	"--sequoia-border-color"?: string;
20 +
	/** Secondary/muted text color (default: #6b7280) */
21 +
	"--sequoia-secondary-color"?: string;
22 +
	/** Accent color for links and buttons (default: #2563eb) */
23 +
	"--sequoia-accent-color"?: string;
24 +
	/** Border radius for cards and buttons (default: 8px) */
25 +
	"--sequoia-border-radius"?: string;
26 +
}
27 +
28 +
/**
29 +
 * All available CSS custom property names
30 +
 */
31 +
export const SEQUOIA_CSS_VARS = [
32 +
	"--sequoia-fg-color",
33 +
	"--sequoia-bg-color",
34 +
	"--sequoia-border-color",
35 +
	"--sequoia-secondary-color",
36 +
	"--sequoia-accent-color",
37 +
	"--sequoia-border-radius",
38 +
] as const;
39 +
40 +
export type SequoiaCSSVar = (typeof SEQUOIA_CSS_VARS)[number];