ui-next: use kebab-case for file naming

This commit is contained in:
Baoshuo committed 2026-05-10 01:12:47 +08:00
1 parent b44135681c
commit efc9294db9
7 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
// Context
export { type PageData, usePageData } from './src/context/pageData';
export { type PageData, usePageData } from './src/context/page-data';
// Hooks
export { useUrl } from './src/hooks/useUrl';
export { useUrl } from './src/hooks/use-url';
// Registry
export type { ComponentName, RegistryContext } from './src/registry';
+1 -1
View File
@@ -6,7 +6,7 @@ import importMetaUrlPlugin from '@chialab/esbuild-plugin-meta-url';
import react from '@vitejs/plugin-react';
import c2k from 'koa2-connect/ts';
import { createServer, type Plugin } from 'vite';
import type { PageData } from './src/context/pageData';
import type { PageData } from './src/context/page-data';
const INJECT_MARKER = '<!-- __HYDRO_INJECTION__DO_NOT_REMOVE_THIS__ -->';
const buildInject = (str: string) => `<script id="__HYDRO_INJECTION__" type="application/json">${str}</script>`;
+1 -1
View File
@@ -1,4 +1,4 @@
import { usePageData } from './context/pageData';
import { usePageData } from './context/page-data';
import { Component } from './registry';
const AppInner = Component('page:app', () => {
@@ -1,4 +1,4 @@
import { usePageData } from '../context/pageData';
import { usePageData } from '../context/page-data';
export function useRouteMap(): Record<string, string> {
const data = usePageData();
@@ -1,6 +1,6 @@
import { compile } from 'path-to-regexp';
import { useCallback } from 'react';
import { useRouteMap } from './useRouteMap';
import { useRouteMap } from './use-route-map';
function buildUrl(pattern: string, params: Record<string, string> = {}): string {
try {
+2 -2
View File
@@ -1,8 +1,8 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import plugins from 'virtual:hydro-plugins';
import App from './App';
import { type PageData, PageDataProvider } from './context/pageData';
import App from './app';
import { type PageData, PageDataProvider } from './context/page-data';
import { createRegistryContext } from './registry';
const ctx = createRegistryContext();