@bndynet/vue-site 0.1.5 → 0.1.6

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/bin/vue-site.mjs CHANGED
@@ -175,6 +175,8 @@ function buildEntryCode(siteConfig) {
175
175
  : ''
176
176
  return [
177
177
  bootstrapImport,
178
+ `import 'element-plus/dist/index.css'`,
179
+ `import 'element-plus/theme-chalk/dark/css-vars.css'`,
178
180
  `import { createSiteApp } from '${pkgDir.replace(/\\/g, '/')}/dist/index.es.js'`,
179
181
  `import '${pkgDir.replace(/\\/g, '/')}/dist/style.css'`,
180
182
  `import siteConfig from '/${foundConfig}'`,
@@ -433,7 +435,9 @@ async function run() {
433
435
  <body>
434
436
  <div id="app"></div>
435
437
  <script type="module">
436
- ${bootstrapImport}import { createSiteApp } from '${pkgDir.replace(/\\/g, '/')}/dist/index.es.js'
438
+ ${bootstrapImport}import 'element-plus/dist/index.css'
439
+ import 'element-plus/theme-chalk/dark/css-vars.css'
440
+ import { createSiteApp } from '${pkgDir.replace(/\\/g, '/')}/dist/index.es.js'
437
441
  import '${pkgDir.replace(/\\/g, '/')}/dist/style.css'
438
442
  import siteConfig from './${foundConfig}'
439
443
  import { repositoryUrl } from '${VIRTUAL_PACKAGE}'
@@ -7,8 +7,9 @@ export declare const themeRefKey: InjectionKey<Ref<string>>;
7
7
  * @param themeIds — full list of allowed ids (built-in `light`/`dark` plus any `extraThemes`)
8
8
  * @param palettes — resolved CSS variable maps per id
9
9
  * @param overlay — optional `:root` overrides applied after the active palette
10
+ * @param darkThemeIds — set of theme ids considered "dark" (toggles `html.dark` for Element Plus)
10
11
  */
11
- export declare function initTheme(themeRef: Ref<string>, defaultMode?: string, themeIds?: readonly string[], palettes?: Record<string, Record<string, string>>, overlay?: Record<string, string>): void;
12
+ export declare function initTheme(themeRef: Ref<string>, defaultMode?: string, themeIds?: readonly string[], palettes?: Record<string, Record<string, string>>, overlay?: Record<string, string>, darkThemeIds?: ReadonlySet<string>): void;
12
13
  export declare function useTheme(): {
13
14
  theme: Ref<string, string>;
14
15
  setTheme: (mode: string) => void;
package/dist/index.d.ts CHANGED
@@ -3,5 +3,6 @@ export { createSiteApp } from './create-app';
3
3
  export { useTheme, themeRefKey } from './composables/useTheme';
4
4
  export { useSiteConfig } from './composables/useSiteConfig';
5
5
  export { builtinThemePalettes } from './theme/presets';
6
+ export { ElMessage, ElMessageBox, ElNotification, } from 'element-plus';
6
7
  export type { SiteConfig, SiteEnvConfig, SiteViteConfig, SiteExternalLink, NavItem, ThemeConfig, ThemeOption, ThemePaletteVars, ResolvedNavItem, } from './types';
7
8
  export declare function defineConfig(config: SiteConfig): SiteConfig;