@tutti-os/ui-system 0.0.230 → 0.0.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +31 -0
- package/agent/tutti-ui-system/SKILL.md +6 -4
- package/agent/tutti-ui-system/references/extract-base-component.md +9 -7
- package/dist/{chunk-GYBECSSN.js → chunk-FFRTGVNY.js} +2 -2
- package/dist/{chunk-JVOHHYQF.js → chunk-PHUR4KXV.js} +5 -1
- package/dist/chunk-PHUR4KXV.js.map +1 -0
- package/dist/components/index.js +2 -2
- package/dist/dev-vite.js +2 -0
- package/dist/dev-vite.js.map +1 -1
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.js +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/metadata/components.json +121 -0
- package/dist/metadata/components.schema.json +6 -0
- package/dist/metadata/index.d.ts +1 -0
- package/dist/metadata/index.js +121 -0
- package/dist/metadata/index.js.map +1 -1
- package/dist/native.d.ts +222 -0
- package/dist/native.js +405 -0
- package/dist/native.js.map +1 -0
- package/dist/styles/generated/renderer-theme.css +56 -0
- package/dist/styles/native.css +3 -0
- package/dist/styles/native.css.d.ts +1 -0
- package/dist/styles/theme.css +38 -36
- package/package.json +25 -2
- package/ui-system.md +43 -1
- package/dist/chunk-JVOHHYQF.js.map +0 -1
- /package/dist/{chunk-GYBECSSN.js.map → chunk-FFRTGVNY.js.map} +0 -0
package/dist/dev-vite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugins/vite.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport {\n lstat,\n mkdir,\n readdir,\n readFile,\n realpath,\n rm,\n writeFile\n} from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport type { Plugin, ViteDevServer } from \"vite\";\nimport { WebSocket } from \"ws\";\n\nimport type {\n UISystemDevEvent,\n UISystemDevFile,\n UISystemDevManifest\n} from \"../dev-server/protocol.js\";\n\nexport type TuttiUISystemDevOptions = {\n serverUrl?: string;\n cacheDir?: string;\n};\n\nconst defaultServerUrl = \"http://127.0.0.1:4100\";\nconst defaultCacheDir = \".tutti-ui-system-dev\";\nconst cacheMarkerFileName = \".tutti-ui-system-dev-cache\";\nconst packageName = \"@tutti-os/ui-system\";\nconst packageRequire = createRequire(import.meta.url);\nconst stableEntrypoints = [\n \".\",\n \"./components\",\n \"./icons\",\n \"./styles.css\",\n \"./utils\"\n] as const;\nconst packageDependencyAliases = [\n \"class-variance-authority\",\n \"clsx\",\n \"radix-ui\",\n \"react-resizable-panels\",\n \"tailwind-merge\"\n] as const;\nconst packageStyleDependencyAliases = [\"tw-animate-css\"] as const;\nconst packageDependencyAliasSet = new Set<string>(packageDependencyAliases);\nconst packageStyleDependencyAliasSet = new Set<string>(\n packageStyleDependencyAliases\n);\n\ntype StableEntrypoint = (typeof stableEntrypoints)[number];\ntype DevSyncState = {\n cacheRoot: string;\n realCacheRoot: string;\n serverUrl: URL;\n};\n\nexport function tuttiUISystemDev(\n options: TuttiUISystemDevOptions = {}\n): Plugin {\n const serverUrl = normalizeServerUrl(options.serverUrl ?? defaultServerUrl);\n const cacheDir = options.cacheDir ?? defaultCacheDir;\n let syncState: DevSyncState | null = null;\n\n return {\n name: \"tutti-ui-system-dev\",\n async config(config, env) {\n if (env.command !== \"serve\") {\n syncState = null;\n return {};\n }\n\n if (!(await probeHealth(serverUrl))) {\n syncState = null;\n return {};\n }\n\n const projectRoot = path.resolve(config.root ?? process.cwd());\n const cacheState = await prepareCacheRoot(projectRoot, cacheDir);\n const manifest = await fetchJson<UISystemDevManifest>(\n serverUrl,\n \"/manifest\"\n );\n\n validateManifest(manifest);\n await syncFiles(serverUrl, cacheState);\n await fetchComponentsMetadata(serverUrl);\n syncState = { ...cacheState, serverUrl };\n\n return {\n resolve: {\n alias: stableEntrypoints\n .map((entrypoint) => ({\n find: entrypointAlias(entrypoint),\n replacement: path.join(\n cacheState.cacheRoot,\n manifest.entrypoints[entrypoint]\n )\n }))\n .concat(\n packageStyleDependencyAliases.map((dependencyName) => ({\n find: dependencyAlias(dependencyName),\n replacement: dependencyName,\n customResolver: (\n _source: string,\n importer: string | undefined\n ) =>\n isCacheImporter(syncState, importer)\n ? resolvePackageStyleDependency(dependencyName)\n : null\n }))\n )\n }\n };\n },\n async resolveId(source, importer) {\n if (syncState === null || !isCacheImporter(syncState, importer)) {\n return null;\n }\n\n if (packageDependencyAliasSet.has(source)) {\n return packageRequire.resolve(source);\n }\n\n if (packageStyleDependencyAliasSet.has(source)) {\n const resolved = await this.resolve(source, packageContextImporter(), {\n skipSelf: true\n });\n\n return resolved?.id ?? null;\n }\n\n return null;\n },\n configureServer(server) {\n if (syncState === null) {\n return;\n }\n\n subscribeToEvents(server, syncState);\n }\n };\n}\n\nasync function probeHealth(serverUrl: URL): Promise<boolean> {\n try {\n const response = await fetch(new URL(\"/health\", serverUrl));\n\n if (!response.ok) {\n return false;\n }\n\n const payload = (await response.json()) as { packageName?: unknown };\n\n return payload.packageName === packageName;\n } catch {\n return false;\n }\n}\n\nasync function syncFiles(\n serverUrl: URL,\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">\n): Promise<void> {\n const files = await fetchJson<UISystemDevFile[]>(serverUrl, \"/files\");\n\n if (!Array.isArray(files)) {\n throw new Error(\n \"@tutti-os/ui-system dev server returned invalid files list\"\n );\n }\n\n const syncPaths = new Set<string>();\n\n await Promise.all(\n files.map(async (file) => {\n validateSyncFile(file);\n syncPaths.add(file.path);\n\n const destination = resolveCacheFile(cacheState.cacheRoot, file.path);\n await prepareCacheFileTarget(cacheState, destination);\n\n const currentHash = await readCachedHash(destination);\n\n if (currentHash === file.hash) {\n return;\n }\n\n const bytes = await fetchFile(serverUrl, file.path);\n const downloadedHash = hashBytes(bytes);\n\n if (downloadedHash !== file.hash) {\n throw new Error(\n `Hash mismatch while syncing @tutti-os/ui-system file: ${file.path}`\n );\n }\n\n await writeFile(destination, bytes);\n })\n );\n\n await removeStaleCacheFiles(cacheState, syncPaths);\n}\n\nasync function syncChangedFile(\n server: ViteDevServer,\n state: DevSyncState,\n event: Extract<UISystemDevEvent, { type: \"fileChanged\" }>\n): Promise<void> {\n validateEventPath(event.path);\n\n const destination = resolveCacheFile(state.cacheRoot, event.path);\n await prepareCacheFileTarget(state, destination);\n\n const bytes = await fetchFile(state.serverUrl, event.path);\n const downloadedHash = hashBytes(bytes);\n\n if (downloadedHash !== event.hash) {\n throw new Error(\n `Hash mismatch while syncing @tutti-os/ui-system file: ${event.path}`\n );\n }\n\n await writeFile(destination, bytes);\n invalidateFile(server, destination);\n}\n\nasync function removeDeletedFile(\n server: ViteDevServer,\n state: DevSyncState,\n event: Extract<UISystemDevEvent, { type: \"fileDeleted\" }>\n): Promise<void> {\n validateEventPath(event.path);\n\n const destination = resolveCacheFile(state.cacheRoot, event.path);\n\n invalidateFile(server, destination);\n await removeCacheFile(state, destination);\n}\n\nfunction subscribeToEvents(server: ViteDevServer, state: DevSyncState): void {\n let closed = false;\n let reconnectTimer: NodeJS.Timeout | null = null;\n let websocket: WebSocket | null = null;\n\n const close = (): void => {\n closed = true;\n\n if (reconnectTimer !== null) {\n clearTimeout(reconnectTimer);\n reconnectTimer = null;\n }\n\n websocket?.close();\n websocket = null;\n };\n\n const reconnect = (): void => {\n if (closed || reconnectTimer !== null) {\n return;\n }\n\n reconnectTimer = setTimeout(() => {\n reconnectTimer = null;\n connect();\n }, 1000);\n };\n\n const connect = (): void => {\n if (closed) {\n return;\n }\n\n websocket = new WebSocket(eventUrl(state.serverUrl));\n\n websocket.on(\"message\", (message) => {\n void handleEventMessage(server, state, message).catch(() => {\n // Event sync is best-effort; the initial HTTP sync remains authoritative.\n });\n });\n\n websocket.on(\"close\", reconnect);\n websocket.on(\"error\", () => {\n websocket?.close();\n });\n };\n\n connect();\n server.httpServer?.once(\"close\", close);\n}\n\nasync function handleEventMessage(\n server: ViteDevServer,\n state: DevSyncState,\n message: WebSocket.RawData\n): Promise<void> {\n const event = parseEvent(message);\n\n if (event === null) {\n return;\n }\n\n if (event.type === \"fileChanged\") {\n await syncChangedFile(server, state, event);\n return;\n }\n\n if (event.type === \"fileDeleted\") {\n await removeDeletedFile(server, state, event);\n }\n}\n\nfunction parseEvent(message: WebSocket.RawData): UISystemDevEvent | null {\n try {\n const event = JSON.parse(rawMessageToString(message)) as UISystemDevEvent;\n\n if (!isDevEvent(event)) {\n return null;\n }\n\n return event;\n } catch {\n return null;\n }\n}\n\nfunction rawMessageToString(message: WebSocket.RawData): string {\n if (Buffer.isBuffer(message)) {\n return message.toString(\"utf8\");\n }\n\n if (Array.isArray(message)) {\n return Buffer.concat(message).toString(\"utf8\");\n }\n\n return Buffer.from(message).toString(\"utf8\");\n}\n\nfunction isDevEvent(event: UISystemDevEvent): event is UISystemDevEvent {\n if (event === null || typeof event !== \"object\") {\n return false;\n }\n\n if (event.type === \"fileChanged\") {\n return typeof event.path === \"string\" && typeof event.hash === \"string\";\n }\n\n if (event.type === \"fileDeleted\") {\n return typeof event.path === \"string\";\n }\n\n return event.type === \"manifestChanged\" || event.type === \"componentsChanged\";\n}\n\nfunction invalidateFile(server: ViteDevServer, filePath: string): void {\n const modules = server.moduleGraph.getModulesByFile(filePath);\n\n if (modules === undefined) {\n return;\n }\n\n for (const moduleNode of modules) {\n server.moduleGraph.invalidateModule(moduleNode);\n }\n}\n\nasync function fetchComponentsMetadata(serverUrl: URL): Promise<void> {\n try {\n await fetchJson<unknown>(serverUrl, \"/components\");\n } catch {\n // Component diagnostics are best-effort; source sync and aliases are sufficient.\n }\n}\n\nasync function fetchJson<T>(serverUrl: URL, endpoint: string): Promise<T> {\n const response = await fetch(new URL(endpoint, serverUrl));\n\n if (!response.ok) {\n throw new Error(\n `@tutti-os/ui-system dev server ${endpoint} failed with ${response.status}`\n );\n }\n\n return (await response.json()) as T;\n}\n\nasync function fetchFile(serverUrl: URL, syncPath: string): Promise<Buffer> {\n const response = await fetch(\n new URL(`/files/${encodeSyncPath(syncPath)}`, serverUrl)\n );\n\n if (!response.ok) {\n throw new Error(\n `@tutti-os/ui-system dev server file fetch failed for ${syncPath}`\n );\n }\n\n return Buffer.from(await response.arrayBuffer());\n}\n\nasync function readCachedHash(filePath: string): Promise<string | null> {\n try {\n return hashBytes(await readFile(filePath));\n } catch {\n return null;\n }\n}\n\nfunction validateManifest(\n manifest: UISystemDevManifest\n): asserts manifest is UISystemDevManifest & {\n entrypoints: Record<StableEntrypoint, string>;\n} {\n if (\n manifest === null ||\n typeof manifest !== \"object\" ||\n manifest.packageName !== packageName ||\n typeof manifest.entrypoints !== \"object\" ||\n manifest.entrypoints === null\n ) {\n throw new Error(\"@tutti-os/ui-system dev server returned invalid manifest\");\n }\n\n for (const entrypoint of stableEntrypoints) {\n const syncPath = manifest.entrypoints[entrypoint];\n\n if (typeof syncPath !== \"string\" || normalizeSyncPath(syncPath) === null) {\n throw new Error(\n `@tutti-os/ui-system dev server manifest is missing ${entrypoint}`\n );\n }\n }\n}\n\nfunction validateSyncFile(file: UISystemDevFile): void {\n if (\n file === null ||\n typeof file !== \"object\" ||\n typeof file.path !== \"string\" ||\n typeof file.hash !== \"string\" ||\n typeof file.size !== \"number\" ||\n normalizeSyncPath(file.path) === null\n ) {\n throw new Error(\n \"@tutti-os/ui-system dev server returned invalid file entry\"\n );\n }\n}\n\nfunction validateEventPath(syncPath: string): void {\n if (normalizeSyncPath(syncPath) === null) {\n throw new Error(\n `Refusing unsafe @tutti-os/ui-system event path: ${syncPath}`\n );\n }\n}\n\nasync function prepareCacheRoot(\n projectRoot: string,\n cacheDir: string\n): Promise<Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">> {\n const cacheRoot = resolveCacheRoot(projectRoot, cacheDir);\n\n await ensureNoSymlinkAncestors(projectRoot, path.dirname(cacheRoot));\n await mkdir(cacheRoot, { recursive: true });\n await ensureNoSymlinkAncestors(projectRoot, cacheRoot);\n\n const cacheStat = await lstat(cacheRoot);\n\n if (!cacheStat.isDirectory() || cacheStat.isSymbolicLink()) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must be a real directory\"\n );\n }\n\n const realProjectRoot = await realpath(projectRoot);\n const realCacheRoot = await realpath(cacheRoot);\n\n if (!isPathInside(realProjectRoot, realCacheRoot)) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must resolve inside the Vite project root\"\n );\n }\n\n await ensureOwnedCacheRoot(cacheRoot);\n\n return { cacheRoot, realCacheRoot };\n}\n\nfunction resolveCacheRoot(projectRoot: string, cacheDir: string): string {\n const cacheRoot = path.resolve(projectRoot, cacheDir);\n const relative = path.relative(projectRoot, cacheRoot);\n\n if (\n relative === \"\" ||\n relative.startsWith(\"..\") ||\n path.isAbsolute(relative)\n ) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must resolve inside the Vite project root\"\n );\n }\n\n return cacheRoot;\n}\n\nasync function prepareCacheFileTarget(\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">,\n destination: string\n): Promise<void> {\n const parent = path.dirname(destination);\n\n await ensureNoSymlinkAncestors(cacheState.cacheRoot, parent);\n await mkdir(parent, { recursive: true });\n await ensureNoSymlinkAncestors(cacheState.cacheRoot, parent);\n\n const realParent = await realpath(parent);\n\n if (!isPathInside(cacheState.realCacheRoot, realParent)) {\n throw new Error(\n \"@tutti-os/ui-system dev cache file resolved outside cacheDir\"\n );\n }\n\n await rejectExistingSymlink(destination);\n}\n\nasync function removeCacheFile(\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">,\n destination: string\n): Promise<void> {\n const parent = path.dirname(destination);\n\n await ensureNoSymlinkAncestors(cacheState.cacheRoot, parent);\n\n const realParent = await realpath(parent).catch(() => null);\n\n if (\n realParent === null ||\n !isPathInside(cacheState.realCacheRoot, realParent)\n ) {\n throw new Error(\n \"@tutti-os/ui-system dev cache file resolved outside cacheDir\"\n );\n }\n\n await rejectExistingSymlink(destination);\n await rm(destination, { force: true });\n}\n\nasync function removeStaleCacheFiles(\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">,\n authoritativePaths: Set<string>\n): Promise<void> {\n await ensureOwnedCacheRoot(cacheState.cacheRoot);\n\n const cachedFiles = await listCacheFiles(cacheState.cacheRoot);\n\n await Promise.all(\n cachedFiles.map(async (cachedFile) => {\n if (authoritativePaths.has(cachedFile)) {\n return;\n }\n\n await removeCacheFile(\n cacheState,\n resolveCacheFile(cacheState.cacheRoot, cachedFile)\n );\n })\n );\n}\n\nasync function listCacheFiles(\n directory: string,\n prefix = \"\"\n): Promise<string[]> {\n const entries = await readdir(directory, { withFileTypes: true });\n const paths = await Promise.all(\n entries.map(async (entry) => {\n const syncPath = prefix === \"\" ? entry.name : `${prefix}/${entry.name}`;\n const absolutePath = path.join(directory, entry.name);\n\n if (syncPath === cacheMarkerFileName) {\n return [];\n }\n\n if (entry.isSymbolicLink()) {\n throw new Error(\n `Refusing symlink in @tutti-os/ui-system dev cache: ${syncPath}`\n );\n }\n\n if (entry.isDirectory()) {\n return listCacheFiles(absolutePath, syncPath);\n }\n\n return entry.isFile() ? [syncPath] : [];\n })\n );\n\n return paths.flat();\n}\n\nasync function ensureOwnedCacheRoot(cacheRoot: string): Promise<void> {\n const markerPath = path.join(cacheRoot, cacheMarkerFileName);\n\n try {\n const markerStat = await lstat(markerPath);\n\n if (markerStat.isSymbolicLink() || !markerStat.isFile()) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir contains an unsafe ownership marker\"\n );\n }\n\n return;\n } catch (error) {\n if (!isNotFoundError(error)) {\n throw error;\n }\n }\n\n const entries = await readdir(cacheRoot);\n\n if (entries.length > 0) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must be empty or contain a Tutti UI cache marker before stale cleanup\"\n );\n }\n\n await writeFile(\n markerPath,\n JSON.stringify({ packageName, cache: \"ui-system-dev\" }, null, 2)\n );\n}\n\nfunction resolveCacheFile(cacheRoot: string, syncPath: string): string {\n const normalized = normalizeSyncPath(syncPath);\n\n if (normalized === null) {\n throw new Error(\n `Refusing to sync unsafe @tutti-os/ui-system path: ${syncPath}`\n );\n }\n\n const destination = path.resolve(cacheRoot, normalized);\n const relative = path.relative(cacheRoot, destination);\n\n if (relative.startsWith(\"..\") || path.isAbsolute(relative)) {\n throw new Error(`Refusing to sync @tutti-os/ui-system path: ${syncPath}`);\n }\n\n return destination;\n}\n\nasync function ensureNoSymlinkAncestors(\n root: string,\n target: string\n): Promise<void> {\n const relative = path.relative(root, target);\n\n if (relative.startsWith(\"..\") || path.isAbsolute(relative)) {\n throw new Error(\"@tutti-os/ui-system dev cache path escaped cacheDir\");\n }\n\n const segments = relative === \"\" ? [] : relative.split(path.sep);\n let current = root;\n\n for (const segment of segments) {\n current = path.join(current, segment);\n\n try {\n const stat = await lstat(current);\n\n if (stat.isSymbolicLink()) {\n throw new Error(\n `Refusing symlink in @tutti-os/ui-system dev cache path: ${current}`\n );\n }\n } catch (error) {\n if (\n error instanceof Error &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n ) {\n return;\n }\n\n throw error;\n }\n }\n}\n\nasync function rejectExistingSymlink(filePath: string): Promise<void> {\n try {\n const stat = await lstat(filePath);\n\n if (stat.isSymbolicLink() || !stat.isFile()) {\n throw new Error(\n `Refusing unsafe @tutti-os/ui-system cache file: ${filePath}`\n );\n }\n } catch (error) {\n if (isNotFoundError(error)) {\n return;\n }\n\n throw error;\n }\n}\n\nfunction isNotFoundError(error: unknown): boolean {\n return error instanceof Error && \"code\" in error && error.code === \"ENOENT\";\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const relative = path.relative(root, target);\n\n return (\n relative === \"\" ||\n (!relative.startsWith(\"..\") && !path.isAbsolute(relative))\n );\n}\n\nfunction normalizeSyncPath(input: string): string | null {\n if (input.includes(\"\\0\")) {\n return null;\n }\n\n const slashPath = input.replaceAll(\"\\\\\", \"/\").replace(/^\\/+/, \"\");\n const normalized = path.posix.normalize(slashPath);\n\n if (\n normalized === \".\" ||\n normalized.startsWith(\"../\") ||\n normalized.split(\"/\").includes(\"..\")\n ) {\n return null;\n }\n\n return normalized;\n}\n\nfunction encodeSyncPath(syncPath: string): string {\n return syncPath.split(\"/\").map(encodeURIComponent).join(\"/\");\n}\n\nfunction hashBytes(bytes: Buffer): string {\n return `sha256:${createHash(\"sha256\").update(bytes).digest(\"hex\")}`;\n}\n\nfunction normalizeServerUrl(serverUrl: string): URL {\n return new URL(serverUrl);\n}\n\nfunction eventUrl(serverUrl: URL): string {\n const url = new URL(\"/events\", serverUrl);\n\n url.protocol = url.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\n return url.href;\n}\n\nfunction entrypointAlias(entrypoint: StableEntrypoint): RegExp {\n const specifier =\n entrypoint === \".\" ? packageName : `${packageName}${entrypoint.slice(1)}`;\n\n return new RegExp(`^${escapeRegExp(specifier)}$`);\n}\n\nfunction isCacheImporter(\n state: DevSyncState | null,\n importer: string | undefined\n): boolean {\n if (state === null || importer === undefined) {\n return false;\n }\n\n const importerPath = stripViteIdQuery(importer);\n\n if (!path.isAbsolute(importerPath)) {\n return false;\n }\n\n return isPathInside(state.cacheRoot, path.resolve(importerPath));\n}\n\nfunction stripViteIdQuery(id: string): string {\n const [pathWithoutQuery = \"\"] = id.split(\"?\", 1);\n\n return pathWithoutQuery;\n}\n\nfunction packageContextImporter(): string {\n return fileURLToPath(new URL(\"../styles/index.css\", import.meta.url));\n}\n\nfunction resolvePackageStyleDependency(dependencyName: string): string {\n const packageDirectory = findDependencyPackageDirectory(dependencyName);\n const manifest = JSON.parse(\n readFileSync(path.join(packageDirectory, \"package.json\"), \"utf8\")\n ) as {\n exports?: {\n \".\"?: {\n style?: unknown;\n };\n };\n };\n const styleExport = manifest.exports?.[\".\"]?.style;\n\n if (typeof styleExport !== \"string\") {\n throw new Error(`${dependencyName} does not expose a style export`);\n }\n\n return path.join(packageDirectory, styleExport);\n}\n\nfunction findDependencyPackageDirectory(dependencyName: string): string {\n const searchPaths = packageRequire.resolve.paths(dependencyName) ?? [];\n\n for (const searchPath of searchPaths) {\n const packageDirectory = path.join(searchPath, dependencyName);\n\n try {\n const manifest = JSON.parse(\n readFileSync(path.join(packageDirectory, \"package.json\"), \"utf8\")\n ) as { name?: unknown };\n\n if (manifest.name === dependencyName) {\n return packageDirectory;\n }\n } catch {\n // Try the next Node resolution search path.\n }\n }\n\n throw new Error(`Could not resolve ${dependencyName} from ${packageName}`);\n}\n\nfunction dependencyAlias(dependencyName: string): RegExp {\n return new RegExp(`^${escapeRegExp(dependencyName)}$`);\n}\n\nfunction escapeRegExp(input: string): string {\n return input.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAG9B,SAAS,iBAAiB;AAa1B,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;AACxB,IAAM,sBAAsB;AAC5B,IAAM,cAAc;AACpB,IAAM,iBAAiB,cAAc,YAAY,GAAG;AACpD,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,IAAM,2BAA2B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,IAAM,gCAAgC,CAAC,gBAAgB;AACvD,IAAM,4BAA4B,IAAI,IAAY,wBAAwB;AAC1E,IAAM,iCAAiC,IAAI;AAAA,EACzC;AACF;AASO,SAAS,iBACd,UAAmC,CAAC,GAC5B;AACR,QAAM,YAAY,mBAAmB,QAAQ,aAAa,gBAAgB;AAC1E,QAAM,WAAW,QAAQ,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":3,"sources":["../src/plugins/vite.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport {\n lstat,\n mkdir,\n readdir,\n readFile,\n realpath,\n rm,\n writeFile\n} from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport type { Plugin, ViteDevServer } from \"vite\";\nimport { WebSocket } from \"ws\";\n\nimport type {\n UISystemDevEvent,\n UISystemDevFile,\n UISystemDevManifest\n} from \"../dev-server/protocol.js\";\n\nexport type TuttiUISystemDevOptions = {\n serverUrl?: string;\n cacheDir?: string;\n};\n\nconst defaultServerUrl = \"http://127.0.0.1:4100\";\nconst defaultCacheDir = \".tutti-ui-system-dev\";\nconst cacheMarkerFileName = \".tutti-ui-system-dev-cache\";\nconst packageName = \"@tutti-os/ui-system\";\nconst packageRequire = createRequire(import.meta.url);\nconst stableEntrypoints = [\n \".\",\n \"./components\",\n \"./icons\",\n \"./native\",\n \"./native.css\",\n \"./styles.css\",\n \"./utils\"\n] as const;\nconst packageDependencyAliases = [\n \"class-variance-authority\",\n \"clsx\",\n \"radix-ui\",\n \"react-resizable-panels\",\n \"tailwind-merge\"\n] as const;\nconst packageStyleDependencyAliases = [\"tw-animate-css\"] as const;\nconst packageDependencyAliasSet = new Set<string>(packageDependencyAliases);\nconst packageStyleDependencyAliasSet = new Set<string>(\n packageStyleDependencyAliases\n);\n\ntype StableEntrypoint = (typeof stableEntrypoints)[number];\ntype DevSyncState = {\n cacheRoot: string;\n realCacheRoot: string;\n serverUrl: URL;\n};\n\nexport function tuttiUISystemDev(\n options: TuttiUISystemDevOptions = {}\n): Plugin {\n const serverUrl = normalizeServerUrl(options.serverUrl ?? defaultServerUrl);\n const cacheDir = options.cacheDir ?? defaultCacheDir;\n let syncState: DevSyncState | null = null;\n\n return {\n name: \"tutti-ui-system-dev\",\n async config(config, env) {\n if (env.command !== \"serve\") {\n syncState = null;\n return {};\n }\n\n if (!(await probeHealth(serverUrl))) {\n syncState = null;\n return {};\n }\n\n const projectRoot = path.resolve(config.root ?? process.cwd());\n const cacheState = await prepareCacheRoot(projectRoot, cacheDir);\n const manifest = await fetchJson<UISystemDevManifest>(\n serverUrl,\n \"/manifest\"\n );\n\n validateManifest(manifest);\n await syncFiles(serverUrl, cacheState);\n await fetchComponentsMetadata(serverUrl);\n syncState = { ...cacheState, serverUrl };\n\n return {\n resolve: {\n alias: stableEntrypoints\n .map((entrypoint) => ({\n find: entrypointAlias(entrypoint),\n replacement: path.join(\n cacheState.cacheRoot,\n manifest.entrypoints[entrypoint]\n )\n }))\n .concat(\n packageStyleDependencyAliases.map((dependencyName) => ({\n find: dependencyAlias(dependencyName),\n replacement: dependencyName,\n customResolver: (\n _source: string,\n importer: string | undefined\n ) =>\n isCacheImporter(syncState, importer)\n ? resolvePackageStyleDependency(dependencyName)\n : null\n }))\n )\n }\n };\n },\n async resolveId(source, importer) {\n if (syncState === null || !isCacheImporter(syncState, importer)) {\n return null;\n }\n\n if (packageDependencyAliasSet.has(source)) {\n return packageRequire.resolve(source);\n }\n\n if (packageStyleDependencyAliasSet.has(source)) {\n const resolved = await this.resolve(source, packageContextImporter(), {\n skipSelf: true\n });\n\n return resolved?.id ?? null;\n }\n\n return null;\n },\n configureServer(server) {\n if (syncState === null) {\n return;\n }\n\n subscribeToEvents(server, syncState);\n }\n };\n}\n\nasync function probeHealth(serverUrl: URL): Promise<boolean> {\n try {\n const response = await fetch(new URL(\"/health\", serverUrl));\n\n if (!response.ok) {\n return false;\n }\n\n const payload = (await response.json()) as { packageName?: unknown };\n\n return payload.packageName === packageName;\n } catch {\n return false;\n }\n}\n\nasync function syncFiles(\n serverUrl: URL,\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">\n): Promise<void> {\n const files = await fetchJson<UISystemDevFile[]>(serverUrl, \"/files\");\n\n if (!Array.isArray(files)) {\n throw new Error(\n \"@tutti-os/ui-system dev server returned invalid files list\"\n );\n }\n\n const syncPaths = new Set<string>();\n\n await Promise.all(\n files.map(async (file) => {\n validateSyncFile(file);\n syncPaths.add(file.path);\n\n const destination = resolveCacheFile(cacheState.cacheRoot, file.path);\n await prepareCacheFileTarget(cacheState, destination);\n\n const currentHash = await readCachedHash(destination);\n\n if (currentHash === file.hash) {\n return;\n }\n\n const bytes = await fetchFile(serverUrl, file.path);\n const downloadedHash = hashBytes(bytes);\n\n if (downloadedHash !== file.hash) {\n throw new Error(\n `Hash mismatch while syncing @tutti-os/ui-system file: ${file.path}`\n );\n }\n\n await writeFile(destination, bytes);\n })\n );\n\n await removeStaleCacheFiles(cacheState, syncPaths);\n}\n\nasync function syncChangedFile(\n server: ViteDevServer,\n state: DevSyncState,\n event: Extract<UISystemDevEvent, { type: \"fileChanged\" }>\n): Promise<void> {\n validateEventPath(event.path);\n\n const destination = resolveCacheFile(state.cacheRoot, event.path);\n await prepareCacheFileTarget(state, destination);\n\n const bytes = await fetchFile(state.serverUrl, event.path);\n const downloadedHash = hashBytes(bytes);\n\n if (downloadedHash !== event.hash) {\n throw new Error(\n `Hash mismatch while syncing @tutti-os/ui-system file: ${event.path}`\n );\n }\n\n await writeFile(destination, bytes);\n invalidateFile(server, destination);\n}\n\nasync function removeDeletedFile(\n server: ViteDevServer,\n state: DevSyncState,\n event: Extract<UISystemDevEvent, { type: \"fileDeleted\" }>\n): Promise<void> {\n validateEventPath(event.path);\n\n const destination = resolveCacheFile(state.cacheRoot, event.path);\n\n invalidateFile(server, destination);\n await removeCacheFile(state, destination);\n}\n\nfunction subscribeToEvents(server: ViteDevServer, state: DevSyncState): void {\n let closed = false;\n let reconnectTimer: ReturnType<typeof setTimeout> | null = null;\n let websocket: WebSocket | null = null;\n\n const close = (): void => {\n closed = true;\n\n if (reconnectTimer !== null) {\n clearTimeout(reconnectTimer);\n reconnectTimer = null;\n }\n\n websocket?.close();\n websocket = null;\n };\n\n const reconnect = (): void => {\n if (closed || reconnectTimer !== null) {\n return;\n }\n\n reconnectTimer = setTimeout(() => {\n reconnectTimer = null;\n connect();\n }, 1000);\n };\n\n const connect = (): void => {\n if (closed) {\n return;\n }\n\n websocket = new WebSocket(eventUrl(state.serverUrl));\n\n websocket.on(\"message\", (message) => {\n void handleEventMessage(server, state, message).catch(() => {\n // Event sync is best-effort; the initial HTTP sync remains authoritative.\n });\n });\n\n websocket.on(\"close\", reconnect);\n websocket.on(\"error\", () => {\n websocket?.close();\n });\n };\n\n connect();\n server.httpServer?.once(\"close\", close);\n}\n\nasync function handleEventMessage(\n server: ViteDevServer,\n state: DevSyncState,\n message: WebSocket.RawData\n): Promise<void> {\n const event = parseEvent(message);\n\n if (event === null) {\n return;\n }\n\n if (event.type === \"fileChanged\") {\n await syncChangedFile(server, state, event);\n return;\n }\n\n if (event.type === \"fileDeleted\") {\n await removeDeletedFile(server, state, event);\n }\n}\n\nfunction parseEvent(message: WebSocket.RawData): UISystemDevEvent | null {\n try {\n const event = JSON.parse(rawMessageToString(message)) as UISystemDevEvent;\n\n if (!isDevEvent(event)) {\n return null;\n }\n\n return event;\n } catch {\n return null;\n }\n}\n\nfunction rawMessageToString(message: WebSocket.RawData): string {\n if (Buffer.isBuffer(message)) {\n return message.toString(\"utf8\");\n }\n\n if (Array.isArray(message)) {\n return Buffer.concat(message).toString(\"utf8\");\n }\n\n return Buffer.from(message).toString(\"utf8\");\n}\n\nfunction isDevEvent(event: UISystemDevEvent): event is UISystemDevEvent {\n if (event === null || typeof event !== \"object\") {\n return false;\n }\n\n if (event.type === \"fileChanged\") {\n return typeof event.path === \"string\" && typeof event.hash === \"string\";\n }\n\n if (event.type === \"fileDeleted\") {\n return typeof event.path === \"string\";\n }\n\n return event.type === \"manifestChanged\" || event.type === \"componentsChanged\";\n}\n\nfunction invalidateFile(server: ViteDevServer, filePath: string): void {\n const modules = server.moduleGraph.getModulesByFile(filePath);\n\n if (modules === undefined) {\n return;\n }\n\n for (const moduleNode of modules) {\n server.moduleGraph.invalidateModule(moduleNode);\n }\n}\n\nasync function fetchComponentsMetadata(serverUrl: URL): Promise<void> {\n try {\n await fetchJson<unknown>(serverUrl, \"/components\");\n } catch {\n // Component diagnostics are best-effort; source sync and aliases are sufficient.\n }\n}\n\nasync function fetchJson<T>(serverUrl: URL, endpoint: string): Promise<T> {\n const response = await fetch(new URL(endpoint, serverUrl));\n\n if (!response.ok) {\n throw new Error(\n `@tutti-os/ui-system dev server ${endpoint} failed with ${response.status}`\n );\n }\n\n return (await response.json()) as T;\n}\n\nasync function fetchFile(serverUrl: URL, syncPath: string): Promise<Buffer> {\n const response = await fetch(\n new URL(`/files/${encodeSyncPath(syncPath)}`, serverUrl)\n );\n\n if (!response.ok) {\n throw new Error(\n `@tutti-os/ui-system dev server file fetch failed for ${syncPath}`\n );\n }\n\n return Buffer.from(await response.arrayBuffer());\n}\n\nasync function readCachedHash(filePath: string): Promise<string | null> {\n try {\n return hashBytes(await readFile(filePath));\n } catch {\n return null;\n }\n}\n\nfunction validateManifest(\n manifest: UISystemDevManifest\n): asserts manifest is UISystemDevManifest & {\n entrypoints: Record<StableEntrypoint, string>;\n} {\n if (\n manifest === null ||\n typeof manifest !== \"object\" ||\n manifest.packageName !== packageName ||\n typeof manifest.entrypoints !== \"object\" ||\n manifest.entrypoints === null\n ) {\n throw new Error(\"@tutti-os/ui-system dev server returned invalid manifest\");\n }\n\n for (const entrypoint of stableEntrypoints) {\n const syncPath = manifest.entrypoints[entrypoint];\n\n if (typeof syncPath !== \"string\" || normalizeSyncPath(syncPath) === null) {\n throw new Error(\n `@tutti-os/ui-system dev server manifest is missing ${entrypoint}`\n );\n }\n }\n}\n\nfunction validateSyncFile(file: UISystemDevFile): void {\n if (\n file === null ||\n typeof file !== \"object\" ||\n typeof file.path !== \"string\" ||\n typeof file.hash !== \"string\" ||\n typeof file.size !== \"number\" ||\n normalizeSyncPath(file.path) === null\n ) {\n throw new Error(\n \"@tutti-os/ui-system dev server returned invalid file entry\"\n );\n }\n}\n\nfunction validateEventPath(syncPath: string): void {\n if (normalizeSyncPath(syncPath) === null) {\n throw new Error(\n `Refusing unsafe @tutti-os/ui-system event path: ${syncPath}`\n );\n }\n}\n\nasync function prepareCacheRoot(\n projectRoot: string,\n cacheDir: string\n): Promise<Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">> {\n const cacheRoot = resolveCacheRoot(projectRoot, cacheDir);\n\n await ensureNoSymlinkAncestors(projectRoot, path.dirname(cacheRoot));\n await mkdir(cacheRoot, { recursive: true });\n await ensureNoSymlinkAncestors(projectRoot, cacheRoot);\n\n const cacheStat = await lstat(cacheRoot);\n\n if (!cacheStat.isDirectory() || cacheStat.isSymbolicLink()) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must be a real directory\"\n );\n }\n\n const realProjectRoot = await realpath(projectRoot);\n const realCacheRoot = await realpath(cacheRoot);\n\n if (!isPathInside(realProjectRoot, realCacheRoot)) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must resolve inside the Vite project root\"\n );\n }\n\n await ensureOwnedCacheRoot(cacheRoot);\n\n return { cacheRoot, realCacheRoot };\n}\n\nfunction resolveCacheRoot(projectRoot: string, cacheDir: string): string {\n const cacheRoot = path.resolve(projectRoot, cacheDir);\n const relative = path.relative(projectRoot, cacheRoot);\n\n if (\n relative === \"\" ||\n relative.startsWith(\"..\") ||\n path.isAbsolute(relative)\n ) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must resolve inside the Vite project root\"\n );\n }\n\n return cacheRoot;\n}\n\nasync function prepareCacheFileTarget(\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">,\n destination: string\n): Promise<void> {\n const parent = path.dirname(destination);\n\n await ensureNoSymlinkAncestors(cacheState.cacheRoot, parent);\n await mkdir(parent, { recursive: true });\n await ensureNoSymlinkAncestors(cacheState.cacheRoot, parent);\n\n const realParent = await realpath(parent);\n\n if (!isPathInside(cacheState.realCacheRoot, realParent)) {\n throw new Error(\n \"@tutti-os/ui-system dev cache file resolved outside cacheDir\"\n );\n }\n\n await rejectExistingSymlink(destination);\n}\n\nasync function removeCacheFile(\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">,\n destination: string\n): Promise<void> {\n const parent = path.dirname(destination);\n\n await ensureNoSymlinkAncestors(cacheState.cacheRoot, parent);\n\n const realParent = await realpath(parent).catch(() => null);\n\n if (\n realParent === null ||\n !isPathInside(cacheState.realCacheRoot, realParent)\n ) {\n throw new Error(\n \"@tutti-os/ui-system dev cache file resolved outside cacheDir\"\n );\n }\n\n await rejectExistingSymlink(destination);\n await rm(destination, { force: true });\n}\n\nasync function removeStaleCacheFiles(\n cacheState: Pick<DevSyncState, \"cacheRoot\" | \"realCacheRoot\">,\n authoritativePaths: Set<string>\n): Promise<void> {\n await ensureOwnedCacheRoot(cacheState.cacheRoot);\n\n const cachedFiles = await listCacheFiles(cacheState.cacheRoot);\n\n await Promise.all(\n cachedFiles.map(async (cachedFile) => {\n if (authoritativePaths.has(cachedFile)) {\n return;\n }\n\n await removeCacheFile(\n cacheState,\n resolveCacheFile(cacheState.cacheRoot, cachedFile)\n );\n })\n );\n}\n\nasync function listCacheFiles(\n directory: string,\n prefix = \"\"\n): Promise<string[]> {\n const entries = await readdir(directory, { withFileTypes: true });\n const paths = await Promise.all(\n entries.map(async (entry) => {\n const syncPath = prefix === \"\" ? entry.name : `${prefix}/${entry.name}`;\n const absolutePath = path.join(directory, entry.name);\n\n if (syncPath === cacheMarkerFileName) {\n return [];\n }\n\n if (entry.isSymbolicLink()) {\n throw new Error(\n `Refusing symlink in @tutti-os/ui-system dev cache: ${syncPath}`\n );\n }\n\n if (entry.isDirectory()) {\n return listCacheFiles(absolutePath, syncPath);\n }\n\n return entry.isFile() ? [syncPath] : [];\n })\n );\n\n return paths.flat();\n}\n\nasync function ensureOwnedCacheRoot(cacheRoot: string): Promise<void> {\n const markerPath = path.join(cacheRoot, cacheMarkerFileName);\n\n try {\n const markerStat = await lstat(markerPath);\n\n if (markerStat.isSymbolicLink() || !markerStat.isFile()) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir contains an unsafe ownership marker\"\n );\n }\n\n return;\n } catch (error) {\n if (!isNotFoundError(error)) {\n throw error;\n }\n }\n\n const entries = await readdir(cacheRoot);\n\n if (entries.length > 0) {\n throw new Error(\n \"@tutti-os/ui-system dev cacheDir must be empty or contain a Tutti UI cache marker before stale cleanup\"\n );\n }\n\n await writeFile(\n markerPath,\n JSON.stringify({ packageName, cache: \"ui-system-dev\" }, null, 2)\n );\n}\n\nfunction resolveCacheFile(cacheRoot: string, syncPath: string): string {\n const normalized = normalizeSyncPath(syncPath);\n\n if (normalized === null) {\n throw new Error(\n `Refusing to sync unsafe @tutti-os/ui-system path: ${syncPath}`\n );\n }\n\n const destination = path.resolve(cacheRoot, normalized);\n const relative = path.relative(cacheRoot, destination);\n\n if (relative.startsWith(\"..\") || path.isAbsolute(relative)) {\n throw new Error(`Refusing to sync @tutti-os/ui-system path: ${syncPath}`);\n }\n\n return destination;\n}\n\nasync function ensureNoSymlinkAncestors(\n root: string,\n target: string\n): Promise<void> {\n const relative = path.relative(root, target);\n\n if (relative.startsWith(\"..\") || path.isAbsolute(relative)) {\n throw new Error(\"@tutti-os/ui-system dev cache path escaped cacheDir\");\n }\n\n const segments = relative === \"\" ? [] : relative.split(path.sep);\n let current = root;\n\n for (const segment of segments) {\n current = path.join(current, segment);\n\n try {\n const stat = await lstat(current);\n\n if (stat.isSymbolicLink()) {\n throw new Error(\n `Refusing symlink in @tutti-os/ui-system dev cache path: ${current}`\n );\n }\n } catch (error) {\n if (\n error instanceof Error &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n ) {\n return;\n }\n\n throw error;\n }\n }\n}\n\nasync function rejectExistingSymlink(filePath: string): Promise<void> {\n try {\n const stat = await lstat(filePath);\n\n if (stat.isSymbolicLink() || !stat.isFile()) {\n throw new Error(\n `Refusing unsafe @tutti-os/ui-system cache file: ${filePath}`\n );\n }\n } catch (error) {\n if (isNotFoundError(error)) {\n return;\n }\n\n throw error;\n }\n}\n\nfunction isNotFoundError(error: unknown): boolean {\n return error instanceof Error && \"code\" in error && error.code === \"ENOENT\";\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const relative = path.relative(root, target);\n\n return (\n relative === \"\" ||\n (!relative.startsWith(\"..\") && !path.isAbsolute(relative))\n );\n}\n\nfunction normalizeSyncPath(input: string): string | null {\n if (input.includes(\"\\0\")) {\n return null;\n }\n\n const slashPath = input.replaceAll(\"\\\\\", \"/\").replace(/^\\/+/, \"\");\n const normalized = path.posix.normalize(slashPath);\n\n if (\n normalized === \".\" ||\n normalized.startsWith(\"../\") ||\n normalized.split(\"/\").includes(\"..\")\n ) {\n return null;\n }\n\n return normalized;\n}\n\nfunction encodeSyncPath(syncPath: string): string {\n return syncPath.split(\"/\").map(encodeURIComponent).join(\"/\");\n}\n\nfunction hashBytes(bytes: Buffer): string {\n return `sha256:${createHash(\"sha256\").update(bytes).digest(\"hex\")}`;\n}\n\nfunction normalizeServerUrl(serverUrl: string): URL {\n return new URL(serverUrl);\n}\n\nfunction eventUrl(serverUrl: URL): string {\n const url = new URL(\"/events\", serverUrl);\n\n url.protocol = url.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\n return url.href;\n}\n\nfunction entrypointAlias(entrypoint: StableEntrypoint): RegExp {\n const specifier =\n entrypoint === \".\" ? packageName : `${packageName}${entrypoint.slice(1)}`;\n\n return new RegExp(`^${escapeRegExp(specifier)}$`);\n}\n\nfunction isCacheImporter(\n state: DevSyncState | null,\n importer: string | undefined\n): boolean {\n if (state === null || importer === undefined) {\n return false;\n }\n\n const importerPath = stripViteIdQuery(importer);\n\n if (!path.isAbsolute(importerPath)) {\n return false;\n }\n\n return isPathInside(state.cacheRoot, path.resolve(importerPath));\n}\n\nfunction stripViteIdQuery(id: string): string {\n const [pathWithoutQuery = \"\"] = id.split(\"?\", 1);\n\n return pathWithoutQuery;\n}\n\nfunction packageContextImporter(): string {\n return fileURLToPath(new URL(\"../styles/index.css\", import.meta.url));\n}\n\nfunction resolvePackageStyleDependency(dependencyName: string): string {\n const packageDirectory = findDependencyPackageDirectory(dependencyName);\n const manifest = JSON.parse(\n readFileSync(path.join(packageDirectory, \"package.json\"), \"utf8\")\n ) as {\n exports?: {\n \".\"?: {\n style?: unknown;\n };\n };\n };\n const styleExport = manifest.exports?.[\".\"]?.style;\n\n if (typeof styleExport !== \"string\") {\n throw new Error(`${dependencyName} does not expose a style export`);\n }\n\n return path.join(packageDirectory, styleExport);\n}\n\nfunction findDependencyPackageDirectory(dependencyName: string): string {\n const searchPaths = packageRequire.resolve.paths(dependencyName) ?? [];\n\n for (const searchPath of searchPaths) {\n const packageDirectory = path.join(searchPath, dependencyName);\n\n try {\n const manifest = JSON.parse(\n readFileSync(path.join(packageDirectory, \"package.json\"), \"utf8\")\n ) as { name?: unknown };\n\n if (manifest.name === dependencyName) {\n return packageDirectory;\n }\n } catch {\n // Try the next Node resolution search path.\n }\n }\n\n throw new Error(`Could not resolve ${dependencyName} from ${packageName}`);\n}\n\nfunction dependencyAlias(dependencyName: string): RegExp {\n return new RegExp(`^${escapeRegExp(dependencyName)}$`);\n}\n\nfunction escapeRegExp(input: string): string {\n return input.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAG9B,SAAS,iBAAiB;AAa1B,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;AACxB,IAAM,sBAAsB;AAC5B,IAAM,cAAc;AACpB,IAAM,iBAAiB,cAAc,YAAY,GAAG;AACpD,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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BAAgB;AACpC,eAAO;AAAA,MACT;AAAA,IACF,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,QAAM,IAAI,MAAM,qBAAqB,cAAc,SAAS,WAAW,EAAE;AAC3E;AAEA,SAAS,gBAAgB,gBAAgC;AACvD,SAAO,IAAI,OAAO,IAAI,aAAa,cAAc,CAAC,GAAG;AACvD;AAEA,SAAS,aAAa,OAAuB;AAC3C,SAAO,MAAM,QAAQ,uBAAuB,MAAM;AACpD;","names":[]}
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ declare function PinFilledIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
|
94
94
|
declare function RefreshIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
95
95
|
declare function SearchIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
96
96
|
declare function DownloadIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
97
|
+
declare function ShareLinedIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
97
98
|
declare function UpgradeArrowIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
98
99
|
declare function DarkModeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
99
100
|
declare function LightModeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
@@ -147,4 +148,4 @@ declare function BillingIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
|
147
148
|
declare function SignOutIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
148
149
|
declare function MessageCenterIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
149
150
|
|
|
150
|
-
export { AddIcon, AddLinedIcon, AgentSessionsIcon, AppWindowIcon, ArrowLeftIcon, ArrowRightIcon, AskLinedIcon, BillingIcon, CapabilityIcon, ChatIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon, ChromeIcon, CloseEyesIcon, CloseIcon, CollapseLinedIcon, CopyIcon, CreateChatIcon, CreditsIcon, DarkModeIcon, DashboardIcon, DeleteIcon, DirectoryIcon, DiscordIcon, DownloadIcon, EditIcon, EyeIcon, FailedFilledIcon, FailedLinedIcon, FeedbackIcon, FileArchiveIcon, FileCodeIcon, FileCreateIcon, FileIcon, FileLinedIcon, FileTextIcon, FolderFailedFilledIcon, FolderFailedIcon, FolderFilledIcon, FolderIcon, FolderOpenLinedIcon, GitHubBrandIcon, GoogleBrandIcon, GridBottomLinedIcon, GridHorizontalLinedIcon, GridLeftLinedIcon, GridRightLinedIcon, GridTopLinedIcon, GridVerticalLinedIcon, GripVerticalIcon, GuideIcon, HealthIcon, type IconProps, ImageFileIcon, ImageGenerateIcon, ImportLinedIcon, InspectIcon, IssueIcon, KeyboardFilledIcon, KeyboardIcon, LaunchIcon, LayoutMenuIcon, LayoutPresetIcon, type LayoutPresetIconProps, LightModeIcon, LinkIcon, LoadingIcon, type LoadingIconProps, LocateFolderIcon, LockGridHorizontalLinedIcon, LockGridVerticalLinedIcon, LockLayoutLinedIcon, MaximizeIcon, MessageCenterIcon, MessageSquareTextIcon, MinimizeIcon, MoreHorizontalIcon, NavAgentsIcon, NavApplicationsFilledIcon, NavApplicationsLinedIcon, NavLaunchIcon, NewWorkspaceIcon, NewWorkspaceLinedIcon, NoWorkspaceLinedIcon, OpenLinkLinedIcon, OpenSessionsIcon, OverviewLayoutIcon, PanelIcon, PauseIcon, PinFilledIcon, PinIcon, PlatformIcon, PlayIcon, ProductDocIcon, ProductIcon, RecentLinedIcon, RefreshIcon, RestoreIcon, RoomsHintIcon, SearchIcon, SettingsIcon, SignOutIcon, SuccessFilledIcon, SuccessLinedIcon, TaskIcon, TerminalLinedIcon, ThinkingIcon, ToolsIcon, TuttiMark, UnavailableChatIcon, UninstallIcon, UpgradeArrowIcon, UploadFolderIcon, UploadIcon, UserLinedIcon, VideoFileIcon, ViewGridLinedIcon, ViewListLinedIcon, WarningFilledIcon, WarningLinedIcon, WeChatIcon, WebIcon, WebScrapeIcon, WindowTrafficLightIcon, type WindowTrafficLightIconName, type WindowTrafficLightIconProps };
|
|
151
|
+
export { AddIcon, AddLinedIcon, AgentSessionsIcon, AppWindowIcon, ArrowLeftIcon, ArrowRightIcon, AskLinedIcon, BillingIcon, CapabilityIcon, ChatIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon, ChromeIcon, CloseEyesIcon, CloseIcon, CollapseLinedIcon, CopyIcon, CreateChatIcon, CreditsIcon, DarkModeIcon, DashboardIcon, DeleteIcon, DirectoryIcon, DiscordIcon, DownloadIcon, EditIcon, EyeIcon, FailedFilledIcon, FailedLinedIcon, FeedbackIcon, FileArchiveIcon, FileCodeIcon, FileCreateIcon, FileIcon, FileLinedIcon, FileTextIcon, FolderFailedFilledIcon, FolderFailedIcon, FolderFilledIcon, FolderIcon, FolderOpenLinedIcon, GitHubBrandIcon, GoogleBrandIcon, GridBottomLinedIcon, GridHorizontalLinedIcon, GridLeftLinedIcon, GridRightLinedIcon, GridTopLinedIcon, GridVerticalLinedIcon, GripVerticalIcon, GuideIcon, HealthIcon, type IconProps, ImageFileIcon, ImageGenerateIcon, ImportLinedIcon, InspectIcon, IssueIcon, KeyboardFilledIcon, KeyboardIcon, LaunchIcon, LayoutMenuIcon, LayoutPresetIcon, type LayoutPresetIconProps, LightModeIcon, LinkIcon, LoadingIcon, type LoadingIconProps, LocateFolderIcon, LockGridHorizontalLinedIcon, LockGridVerticalLinedIcon, LockLayoutLinedIcon, MaximizeIcon, MessageCenterIcon, MessageSquareTextIcon, MinimizeIcon, MoreHorizontalIcon, NavAgentsIcon, NavApplicationsFilledIcon, NavApplicationsLinedIcon, NavLaunchIcon, NewWorkspaceIcon, NewWorkspaceLinedIcon, NoWorkspaceLinedIcon, OpenLinkLinedIcon, OpenSessionsIcon, OverviewLayoutIcon, PanelIcon, PauseIcon, PinFilledIcon, PinIcon, PlatformIcon, PlayIcon, ProductDocIcon, ProductIcon, RecentLinedIcon, RefreshIcon, RestoreIcon, RoomsHintIcon, SearchIcon, SettingsIcon, ShareLinedIcon, SignOutIcon, SuccessFilledIcon, SuccessLinedIcon, TaskIcon, TerminalLinedIcon, ThinkingIcon, ToolsIcon, TuttiMark, UnavailableChatIcon, UninstallIcon, UpgradeArrowIcon, UploadFolderIcon, UploadIcon, UserLinedIcon, VideoFileIcon, ViewGridLinedIcon, ViewListLinedIcon, WarningFilledIcon, WarningLinedIcon, WeChatIcon, WebIcon, WebScrapeIcon, WindowTrafficLightIcon, type WindowTrafficLightIconName, type WindowTrafficLightIconProps };
|
package/dist/icons/index.js
CHANGED
|
@@ -101,6 +101,7 @@ import {
|
|
|
101
101
|
RoomsHintIcon,
|
|
102
102
|
SearchIcon,
|
|
103
103
|
SettingsIcon,
|
|
104
|
+
ShareLinedIcon,
|
|
104
105
|
SignOutIcon,
|
|
105
106
|
SuccessFilledIcon,
|
|
106
107
|
SuccessLinedIcon,
|
|
@@ -123,7 +124,7 @@ import {
|
|
|
123
124
|
WebIcon,
|
|
124
125
|
WebScrapeIcon,
|
|
125
126
|
WindowTrafficLightIcon
|
|
126
|
-
} from "../chunk-
|
|
127
|
+
} from "../chunk-PHUR4KXV.js";
|
|
127
128
|
export {
|
|
128
129
|
AddIcon,
|
|
129
130
|
AddLinedIcon,
|
|
@@ -224,6 +225,7 @@ export {
|
|
|
224
225
|
RoomsHintIcon,
|
|
225
226
|
SearchIcon,
|
|
226
227
|
SettingsIcon,
|
|
228
|
+
ShareLinedIcon,
|
|
227
229
|
SignOutIcon,
|
|
228
230
|
SuccessFilledIcon,
|
|
229
231
|
SuccessLinedIcon,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Avatar, AvatarProps, Badge, BareIconButton, BareIconButtonProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, ComboboxOption, ConfirmationDialog, ConfirmationDialogTone, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, DatePickerLabels, DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, MentionPill, MentionPillFileKind, MentionPillKind, MentionPillProps, MenuPoint, MenuPointAlignment, MenuSize, MenuSurface, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, RadioIndicator, RadioIndicatorProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SectionTabItem, SectionTabs, SegmentBar, SegmentBarItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectSplitColumn, SelectSplitColumnItems, SelectSplitColumnLabel, SelectSplitDivider, SelectSplitLayout, SelectTrigger, SelectValue, Separator, ShortcutBadge, Slider, SliderProps, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, SortableProps, Spinner, SpinnerProps, StatusDot, Switch, Textarea, ToastClose, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TruncatingPillLabel, TruncatingPillLabelProps, UnderlineTabItem, UnderlineTabs, ViewportMenuPlacement, ViewportMenuSurface, ViewportMenuSurfaceProps, badgeVariants, buttonVariants, menuItemClassName, menuItemIndicatorClassName, menuItemWithIndicatorClassName, menuSurfaceClassName, statusDotVariants, toastVariants, useTextOverflow } from './components/index.js';
|
|
2
|
-
export { AddIcon, AddLinedIcon, AgentSessionsIcon, AppWindowIcon, ArrowLeftIcon, ArrowRightIcon, AskLinedIcon, BillingIcon, CapabilityIcon, ChatIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon, ChromeIcon, CloseEyesIcon, CloseIcon, CollapseLinedIcon, CopyIcon, CreateChatIcon, CreditsIcon, DarkModeIcon, DashboardIcon, DeleteIcon, DirectoryIcon, DiscordIcon, DownloadIcon, EditIcon, EyeIcon, FailedFilledIcon, FailedLinedIcon, FeedbackIcon, FileArchiveIcon, FileCodeIcon, FileCreateIcon, FileIcon, FileLinedIcon, FileTextIcon, FolderFailedFilledIcon, FolderFailedIcon, FolderFilledIcon, FolderIcon, FolderOpenLinedIcon, GitHubBrandIcon, GoogleBrandIcon, GridBottomLinedIcon, GridHorizontalLinedIcon, GridLeftLinedIcon, GridRightLinedIcon, GridTopLinedIcon, GridVerticalLinedIcon, GripVerticalIcon, GuideIcon, HealthIcon, IconProps, ImageFileIcon, ImageGenerateIcon, ImportLinedIcon, InspectIcon, IssueIcon, KeyboardFilledIcon, KeyboardIcon, LaunchIcon, LayoutMenuIcon, LayoutPresetIcon, LayoutPresetIconProps, LightModeIcon, LinkIcon, LoadingIcon, LoadingIconProps, LocateFolderIcon, LockGridHorizontalLinedIcon, LockGridVerticalLinedIcon, LockLayoutLinedIcon, MaximizeIcon, MessageCenterIcon, MessageSquareTextIcon, MinimizeIcon, MoreHorizontalIcon, NavAgentsIcon, NavApplicationsFilledIcon, NavApplicationsLinedIcon, NavLaunchIcon, NewWorkspaceIcon, NewWorkspaceLinedIcon, NoWorkspaceLinedIcon, OpenLinkLinedIcon, OpenSessionsIcon, OverviewLayoutIcon, PanelIcon, PauseIcon, PinFilledIcon, PinIcon, PlatformIcon, PlayIcon, ProductDocIcon, ProductIcon, RecentLinedIcon, RefreshIcon, RestoreIcon, RoomsHintIcon, SearchIcon, SettingsIcon, SignOutIcon, SuccessFilledIcon, SuccessLinedIcon, TaskIcon, TerminalLinedIcon, ThinkingIcon, ToolsIcon, TuttiMark, UnavailableChatIcon, UninstallIcon, UpgradeArrowIcon, UploadFolderIcon, UploadIcon, UserLinedIcon, VideoFileIcon, ViewGridLinedIcon, ViewListLinedIcon, WarningFilledIcon, WarningLinedIcon, WeChatIcon, WebIcon, WebScrapeIcon, WindowTrafficLightIcon, WindowTrafficLightIconName, WindowTrafficLightIconProps } from './icons/index.js';
|
|
2
|
+
export { AddIcon, AddLinedIcon, AgentSessionsIcon, AppWindowIcon, ArrowLeftIcon, ArrowRightIcon, AskLinedIcon, BillingIcon, CapabilityIcon, ChatIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon, ChromeIcon, CloseEyesIcon, CloseIcon, CollapseLinedIcon, CopyIcon, CreateChatIcon, CreditsIcon, DarkModeIcon, DashboardIcon, DeleteIcon, DirectoryIcon, DiscordIcon, DownloadIcon, EditIcon, EyeIcon, FailedFilledIcon, FailedLinedIcon, FeedbackIcon, FileArchiveIcon, FileCodeIcon, FileCreateIcon, FileIcon, FileLinedIcon, FileTextIcon, FolderFailedFilledIcon, FolderFailedIcon, FolderFilledIcon, FolderIcon, FolderOpenLinedIcon, GitHubBrandIcon, GoogleBrandIcon, GridBottomLinedIcon, GridHorizontalLinedIcon, GridLeftLinedIcon, GridRightLinedIcon, GridTopLinedIcon, GridVerticalLinedIcon, GripVerticalIcon, GuideIcon, HealthIcon, IconProps, ImageFileIcon, ImageGenerateIcon, ImportLinedIcon, InspectIcon, IssueIcon, KeyboardFilledIcon, KeyboardIcon, LaunchIcon, LayoutMenuIcon, LayoutPresetIcon, LayoutPresetIconProps, LightModeIcon, LinkIcon, LoadingIcon, LoadingIconProps, LocateFolderIcon, LockGridHorizontalLinedIcon, LockGridVerticalLinedIcon, LockLayoutLinedIcon, MaximizeIcon, MessageCenterIcon, MessageSquareTextIcon, MinimizeIcon, MoreHorizontalIcon, NavAgentsIcon, NavApplicationsFilledIcon, NavApplicationsLinedIcon, NavLaunchIcon, NewWorkspaceIcon, NewWorkspaceLinedIcon, NoWorkspaceLinedIcon, OpenLinkLinedIcon, OpenSessionsIcon, OverviewLayoutIcon, PanelIcon, PauseIcon, PinFilledIcon, PinIcon, PlatformIcon, PlayIcon, ProductDocIcon, ProductIcon, RecentLinedIcon, RefreshIcon, RestoreIcon, RoomsHintIcon, SearchIcon, SettingsIcon, ShareLinedIcon, SignOutIcon, SuccessFilledIcon, SuccessLinedIcon, TaskIcon, TerminalLinedIcon, ThinkingIcon, ToolsIcon, TuttiMark, UnavailableChatIcon, UninstallIcon, UpgradeArrowIcon, UploadFolderIcon, UploadIcon, UserLinedIcon, VideoFileIcon, ViewGridLinedIcon, ViewListLinedIcon, WarningFilledIcon, WarningLinedIcon, WeChatIcon, WebIcon, WebScrapeIcon, WindowTrafficLightIcon, WindowTrafficLightIconName, WindowTrafficLightIconProps } from './icons/index.js';
|
|
3
3
|
export { TuttiDateLocale, formatTuttiDateTime, formatTuttiShortDateTime, getCurrentTuttiDateLocale } from './date-format.js';
|
|
4
4
|
export { cn } from './utils.js';
|
|
5
5
|
export { ExternalToast, ToasterProps, toast } from 'sonner';
|
package/dist/index.js
CHANGED
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
toast,
|
|
127
127
|
toastVariants,
|
|
128
128
|
useTextOverflow
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-FFRTGVNY.js";
|
|
130
130
|
import {
|
|
131
131
|
formatTuttiDateTime,
|
|
132
132
|
formatTuttiShortDateTime,
|
|
@@ -235,6 +235,7 @@ import {
|
|
|
235
235
|
RoomsHintIcon,
|
|
236
236
|
SearchIcon,
|
|
237
237
|
SettingsIcon,
|
|
238
|
+
ShareLinedIcon,
|
|
238
239
|
SignOutIcon,
|
|
239
240
|
SuccessFilledIcon,
|
|
240
241
|
SuccessLinedIcon,
|
|
@@ -257,7 +258,7 @@ import {
|
|
|
257
258
|
WebIcon,
|
|
258
259
|
WebScrapeIcon,
|
|
259
260
|
WindowTrafficLightIcon
|
|
260
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-PHUR4KXV.js";
|
|
261
262
|
import {
|
|
262
263
|
cn
|
|
263
264
|
} from "./chunk-DGPY4WP3.js";
|
|
@@ -452,6 +453,7 @@ export {
|
|
|
452
453
|
SelectValue,
|
|
453
454
|
Separator,
|
|
454
455
|
SettingsIcon,
|
|
456
|
+
ShareLinedIcon,
|
|
455
457
|
ShortcutBadge,
|
|
456
458
|
SignOutIcon,
|
|
457
459
|
Slider,
|
|
@@ -2713,6 +2713,20 @@
|
|
|
2713
2713
|
"migrationHints": [],
|
|
2714
2714
|
"iconVariant": "lined"
|
|
2715
2715
|
},
|
|
2716
|
+
{
|
|
2717
|
+
"id": "share-lined-icon",
|
|
2718
|
+
"layer": "base",
|
|
2719
|
+
"name": "ShareLinedIcon",
|
|
2720
|
+
"export": "ShareLinedIcon",
|
|
2721
|
+
"from": "@tutti-os/ui-system/icons",
|
|
2722
|
+
"category": "icon",
|
|
2723
|
+
"status": "stable",
|
|
2724
|
+
"source": "src/icons/system-icons.tsx",
|
|
2725
|
+
"description": "System icon for sharing a resource with other people or sessions.",
|
|
2726
|
+
"useCases": ["Share buttons", "Share menu items"],
|
|
2727
|
+
"migrationHints": [],
|
|
2728
|
+
"iconVariant": "lined"
|
|
2729
|
+
},
|
|
2716
2730
|
{
|
|
2717
2731
|
"id": "upgrade-arrow-lined-icon",
|
|
2718
2732
|
"layer": "base",
|
|
@@ -3360,6 +3374,113 @@
|
|
|
3360
3374
|
"useCases": ["Application style imports", "Design token styling"],
|
|
3361
3375
|
"migrationHints": []
|
|
3362
3376
|
},
|
|
3377
|
+
{
|
|
3378
|
+
"id": "native-css",
|
|
3379
|
+
"layer": "base",
|
|
3380
|
+
"name": "./native.css",
|
|
3381
|
+
"export": "./native.css",
|
|
3382
|
+
"from": "@tutti-os/ui-system/native.css",
|
|
3383
|
+
"category": "style-entry",
|
|
3384
|
+
"status": "experimental",
|
|
3385
|
+
"source": "src/styles/native.css",
|
|
3386
|
+
"description": "React Native Tailwind entry point for Native UI System primitives.",
|
|
3387
|
+
"useCases": [
|
|
3388
|
+
"Mobile NativeWind bootstrap",
|
|
3389
|
+
"Native UI System primitives"
|
|
3390
|
+
],
|
|
3391
|
+
"migrationHints": []
|
|
3392
|
+
},
|
|
3393
|
+
{
|
|
3394
|
+
"id": "native-theme",
|
|
3395
|
+
"layer": "base",
|
|
3396
|
+
"name": "nativeTheme",
|
|
3397
|
+
"export": "nativeTheme",
|
|
3398
|
+
"from": "@tutti-os/ui-system/native",
|
|
3399
|
+
"category": "utility",
|
|
3400
|
+
"status": "experimental",
|
|
3401
|
+
"source": "src/native/tokens.ts",
|
|
3402
|
+
"description": "Semantic color, radius, and spacing tokens for React Native renderers.",
|
|
3403
|
+
"useCases": ["Native UI System primitives", "Mobile screen composition"],
|
|
3404
|
+
"migrationHints": []
|
|
3405
|
+
},
|
|
3406
|
+
{
|
|
3407
|
+
"id": "native-theme-provider",
|
|
3408
|
+
"layer": "base",
|
|
3409
|
+
"name": "NativeThemeProvider",
|
|
3410
|
+
"export": "NativeThemeProvider",
|
|
3411
|
+
"from": "@tutti-os/ui-system/native",
|
|
3412
|
+
"category": "utility",
|
|
3413
|
+
"status": "experimental",
|
|
3414
|
+
"source": "src/native/theme-provider.tsx",
|
|
3415
|
+
"propsType": "NativeThemeProviderProps",
|
|
3416
|
+
"description": "Resolves a Native light or dark semantic theme for UI System primitives and application composition.",
|
|
3417
|
+
"useCases": ["Native renderer roots", "Product theme preferences"],
|
|
3418
|
+
"migrationHints": []
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
"id": "native-button",
|
|
3422
|
+
"layer": "base",
|
|
3423
|
+
"name": "NativeButton",
|
|
3424
|
+
"export": "NativeButton",
|
|
3425
|
+
"from": "@tutti-os/ui-system/native",
|
|
3426
|
+
"category": "primitive",
|
|
3427
|
+
"status": "experimental",
|
|
3428
|
+
"source": "src/native/button.tsx",
|
|
3429
|
+
"propsType": "NativeButtonProps",
|
|
3430
|
+
"description": "Token-backed pressable button for React Native renderers.",
|
|
3431
|
+
"useCases": [
|
|
3432
|
+
"Primary actions",
|
|
3433
|
+
"Secondary actions",
|
|
3434
|
+
"Destructive actions"
|
|
3435
|
+
],
|
|
3436
|
+
"migrationHints": [],
|
|
3437
|
+
"nativePreview": true
|
|
3438
|
+
},
|
|
3439
|
+
{
|
|
3440
|
+
"id": "native-icon-button",
|
|
3441
|
+
"layer": "base",
|
|
3442
|
+
"name": "NativeIconButton",
|
|
3443
|
+
"export": "NativeIconButton",
|
|
3444
|
+
"from": "@tutti-os/ui-system/native",
|
|
3445
|
+
"category": "primitive",
|
|
3446
|
+
"status": "experimental",
|
|
3447
|
+
"source": "src/native/icon-button.tsx",
|
|
3448
|
+
"propsType": "NativeIconButtonProps",
|
|
3449
|
+
"description": "Accessible icon-only action composed from the Native Button primitive.",
|
|
3450
|
+
"useCases": ["Compact toolbars", "Dismiss actions", "Row actions"],
|
|
3451
|
+
"migrationHints": [],
|
|
3452
|
+
"nativePreview": true
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
"id": "native-list-row",
|
|
3456
|
+
"layer": "base",
|
|
3457
|
+
"name": "NativeListRow",
|
|
3458
|
+
"export": "NativeListRow",
|
|
3459
|
+
"from": "@tutti-os/ui-system/native",
|
|
3460
|
+
"category": "primitive",
|
|
3461
|
+
"status": "experimental",
|
|
3462
|
+
"source": "src/native/list-row.tsx",
|
|
3463
|
+
"propsType": "NativeListRowProps",
|
|
3464
|
+
"description": "Selectable token-backed list row with caller-owned leading and trailing content.",
|
|
3465
|
+
"useCases": ["Session lists", "Settings lists", "Picker rows"],
|
|
3466
|
+
"migrationHints": [],
|
|
3467
|
+
"nativePreview": true
|
|
3468
|
+
},
|
|
3469
|
+
{
|
|
3470
|
+
"id": "native-sheet",
|
|
3471
|
+
"layer": "base",
|
|
3472
|
+
"name": "NativeSheet",
|
|
3473
|
+
"export": "NativeSheet",
|
|
3474
|
+
"from": "@tutti-os/ui-system/native",
|
|
3475
|
+
"category": "primitive",
|
|
3476
|
+
"status": "experimental",
|
|
3477
|
+
"source": "src/native/sheet.tsx",
|
|
3478
|
+
"propsType": "NativeSheetProps",
|
|
3479
|
+
"description": "Controlled modal sheet backed by the shared Bottom Sheet dependency.",
|
|
3480
|
+
"useCases": ["Row actions", "Confirmation flows", "Compact forms"],
|
|
3481
|
+
"migrationHints": [],
|
|
3482
|
+
"nativePreview": true
|
|
3483
|
+
},
|
|
3363
3484
|
{
|
|
3364
3485
|
"id": "cn",
|
|
3365
3486
|
"layer": "base",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"@tutti-os/ui-system",
|
|
55
55
|
"@tutti-os/ui-system/components",
|
|
56
56
|
"@tutti-os/ui-system/icons",
|
|
57
|
+
"@tutti-os/ui-system/metadata",
|
|
58
|
+
"@tutti-os/ui-system/native",
|
|
59
|
+
"@tutti-os/ui-system/native.css",
|
|
57
60
|
"@tutti-os/ui-system/styles.css",
|
|
58
61
|
"@tutti-os/ui-system/utils"
|
|
59
62
|
]
|
|
@@ -102,6 +105,9 @@
|
|
|
102
105
|
},
|
|
103
106
|
"storyboard": {
|
|
104
107
|
"type": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"nativePreview": {
|
|
110
|
+
"type": "boolean"
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
}
|
package/dist/metadata/index.d.ts
CHANGED
package/dist/metadata/index.js
CHANGED
|
@@ -2714,6 +2714,20 @@ var components_default = {
|
|
|
2714
2714
|
migrationHints: [],
|
|
2715
2715
|
iconVariant: "lined"
|
|
2716
2716
|
},
|
|
2717
|
+
{
|
|
2718
|
+
id: "share-lined-icon",
|
|
2719
|
+
layer: "base",
|
|
2720
|
+
name: "ShareLinedIcon",
|
|
2721
|
+
export: "ShareLinedIcon",
|
|
2722
|
+
from: "@tutti-os/ui-system/icons",
|
|
2723
|
+
category: "icon",
|
|
2724
|
+
status: "stable",
|
|
2725
|
+
source: "src/icons/system-icons.tsx",
|
|
2726
|
+
description: "System icon for sharing a resource with other people or sessions.",
|
|
2727
|
+
useCases: ["Share buttons", "Share menu items"],
|
|
2728
|
+
migrationHints: [],
|
|
2729
|
+
iconVariant: "lined"
|
|
2730
|
+
},
|
|
2717
2731
|
{
|
|
2718
2732
|
id: "upgrade-arrow-lined-icon",
|
|
2719
2733
|
layer: "base",
|
|
@@ -3361,6 +3375,113 @@ var components_default = {
|
|
|
3361
3375
|
useCases: ["Application style imports", "Design token styling"],
|
|
3362
3376
|
migrationHints: []
|
|
3363
3377
|
},
|
|
3378
|
+
{
|
|
3379
|
+
id: "native-css",
|
|
3380
|
+
layer: "base",
|
|
3381
|
+
name: "./native.css",
|
|
3382
|
+
export: "./native.css",
|
|
3383
|
+
from: "@tutti-os/ui-system/native.css",
|
|
3384
|
+
category: "style-entry",
|
|
3385
|
+
status: "experimental",
|
|
3386
|
+
source: "src/styles/native.css",
|
|
3387
|
+
description: "React Native Tailwind entry point for Native UI System primitives.",
|
|
3388
|
+
useCases: [
|
|
3389
|
+
"Mobile NativeWind bootstrap",
|
|
3390
|
+
"Native UI System primitives"
|
|
3391
|
+
],
|
|
3392
|
+
migrationHints: []
|
|
3393
|
+
},
|
|
3394
|
+
{
|
|
3395
|
+
id: "native-theme",
|
|
3396
|
+
layer: "base",
|
|
3397
|
+
name: "nativeTheme",
|
|
3398
|
+
export: "nativeTheme",
|
|
3399
|
+
from: "@tutti-os/ui-system/native",
|
|
3400
|
+
category: "utility",
|
|
3401
|
+
status: "experimental",
|
|
3402
|
+
source: "src/native/tokens.ts",
|
|
3403
|
+
description: "Semantic color, radius, and spacing tokens for React Native renderers.",
|
|
3404
|
+
useCases: ["Native UI System primitives", "Mobile screen composition"],
|
|
3405
|
+
migrationHints: []
|
|
3406
|
+
},
|
|
3407
|
+
{
|
|
3408
|
+
id: "native-theme-provider",
|
|
3409
|
+
layer: "base",
|
|
3410
|
+
name: "NativeThemeProvider",
|
|
3411
|
+
export: "NativeThemeProvider",
|
|
3412
|
+
from: "@tutti-os/ui-system/native",
|
|
3413
|
+
category: "utility",
|
|
3414
|
+
status: "experimental",
|
|
3415
|
+
source: "src/native/theme-provider.tsx",
|
|
3416
|
+
propsType: "NativeThemeProviderProps",
|
|
3417
|
+
description: "Resolves a Native light or dark semantic theme for UI System primitives and application composition.",
|
|
3418
|
+
useCases: ["Native renderer roots", "Product theme preferences"],
|
|
3419
|
+
migrationHints: []
|
|
3420
|
+
},
|
|
3421
|
+
{
|
|
3422
|
+
id: "native-button",
|
|
3423
|
+
layer: "base",
|
|
3424
|
+
name: "NativeButton",
|
|
3425
|
+
export: "NativeButton",
|
|
3426
|
+
from: "@tutti-os/ui-system/native",
|
|
3427
|
+
category: "primitive",
|
|
3428
|
+
status: "experimental",
|
|
3429
|
+
source: "src/native/button.tsx",
|
|
3430
|
+
propsType: "NativeButtonProps",
|
|
3431
|
+
description: "Token-backed pressable button for React Native renderers.",
|
|
3432
|
+
useCases: [
|
|
3433
|
+
"Primary actions",
|
|
3434
|
+
"Secondary actions",
|
|
3435
|
+
"Destructive actions"
|
|
3436
|
+
],
|
|
3437
|
+
migrationHints: [],
|
|
3438
|
+
nativePreview: true
|
|
3439
|
+
},
|
|
3440
|
+
{
|
|
3441
|
+
id: "native-icon-button",
|
|
3442
|
+
layer: "base",
|
|
3443
|
+
name: "NativeIconButton",
|
|
3444
|
+
export: "NativeIconButton",
|
|
3445
|
+
from: "@tutti-os/ui-system/native",
|
|
3446
|
+
category: "primitive",
|
|
3447
|
+
status: "experimental",
|
|
3448
|
+
source: "src/native/icon-button.tsx",
|
|
3449
|
+
propsType: "NativeIconButtonProps",
|
|
3450
|
+
description: "Accessible icon-only action composed from the Native Button primitive.",
|
|
3451
|
+
useCases: ["Compact toolbars", "Dismiss actions", "Row actions"],
|
|
3452
|
+
migrationHints: [],
|
|
3453
|
+
nativePreview: true
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
id: "native-list-row",
|
|
3457
|
+
layer: "base",
|
|
3458
|
+
name: "NativeListRow",
|
|
3459
|
+
export: "NativeListRow",
|
|
3460
|
+
from: "@tutti-os/ui-system/native",
|
|
3461
|
+
category: "primitive",
|
|
3462
|
+
status: "experimental",
|
|
3463
|
+
source: "src/native/list-row.tsx",
|
|
3464
|
+
propsType: "NativeListRowProps",
|
|
3465
|
+
description: "Selectable token-backed list row with caller-owned leading and trailing content.",
|
|
3466
|
+
useCases: ["Session lists", "Settings lists", "Picker rows"],
|
|
3467
|
+
migrationHints: [],
|
|
3468
|
+
nativePreview: true
|
|
3469
|
+
},
|
|
3470
|
+
{
|
|
3471
|
+
id: "native-sheet",
|
|
3472
|
+
layer: "base",
|
|
3473
|
+
name: "NativeSheet",
|
|
3474
|
+
export: "NativeSheet",
|
|
3475
|
+
from: "@tutti-os/ui-system/native",
|
|
3476
|
+
category: "primitive",
|
|
3477
|
+
status: "experimental",
|
|
3478
|
+
source: "src/native/sheet.tsx",
|
|
3479
|
+
propsType: "NativeSheetProps",
|
|
3480
|
+
description: "Controlled modal sheet backed by the shared Bottom Sheet dependency.",
|
|
3481
|
+
useCases: ["Row actions", "Confirmation flows", "Compact forms"],
|
|
3482
|
+
migrationHints: [],
|
|
3483
|
+
nativePreview: true
|
|
3484
|
+
},
|
|
3364
3485
|
{
|
|
3365
3486
|
id: "cn",
|
|
3366
3487
|
layer: "base",
|