astro-pure 1.4.5 → 1.4.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/bun.lock CHANGED
@@ -7,13 +7,13 @@
7
7
  "dependencies": {
8
8
  "@astrojs/mdx": "5.0.3",
9
9
  "@astrojs/sitemap": "3.7.2",
10
- "@pagefind/default-ui": "^1.5.0",
10
+ "@pagefind/default-ui": "^1.5.2",
11
11
  "@unocss/astro": "^66.6.8",
12
12
  "@unocss/reset": "^66.6.8",
13
- "astro": "6.1.5",
13
+ "astro": "6.1.8",
14
14
  "hast-util-select": "^6.0.4",
15
15
  "node-html-parser": "^7.1.0",
16
- "pagefind": "^1.5.0",
16
+ "pagefind": "^1.5.2",
17
17
  "unocss": "^66.6.8",
18
18
  },
19
19
  },
@@ -33,7 +33,7 @@
33
33
 
34
34
  "@astrojs/sitemap": ["@astrojs/sitemap@3.7.2", "https://registry.npmmirror.com/@astrojs/sitemap/-/sitemap-3.7.2.tgz", { "dependencies": { "sitemap": "^9.0.0", "stream-replace-string": "^2.0.0", "zod": "^4.3.6" } }, "sha512-PqkzkcZTb5ICiyIR8VoKbIAP/laNRXi5tw616N1Ckk+40oNB8Can1AzVV56lrbC5GKSZFCyJYUVYqVivMisvpA=="],
35
35
 
36
- "@astrojs/telemetry": ["@astrojs/telemetry@3.3.0", "https://registry.npmmirror.com/@astrojs/telemetry/-/telemetry-3.3.0.tgz", { "dependencies": { "ci-info": "^4.2.0", "debug": "^4.4.0", "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^3.0.0", "is-wsl": "^3.1.0", "which-pm-runs": "^1.1.0" } }, "sha512-UFBgfeldP06qu6khs/yY+q1cDAaArM2/7AEIqQ9Cuvf7B1hNLq0xDrZkct+QoIGyjq56y8IaE2I3CTvG99mlhQ=="],
36
+ "@astrojs/telemetry": ["@astrojs/telemetry@3.3.1", "https://registry.npmmirror.com/@astrojs/telemetry/-/telemetry-3.3.1.tgz", { "dependencies": { "ci-info": "^4.4.0", "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^4.0.0", "is-wsl": "^3.1.1", "which-pm-runs": "^1.1.0" } }, "sha512-7fcIxXS9J4ls5tr8b3ww9rbAIz2+HrhNJYZdkAhhB4za/I5IZ/60g+Bs8q7zwG0tOIZfNB4JWhVJ1Qkl/OrNCw=="],
37
37
 
38
38
  "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="],
39
39
 
@@ -393,7 +393,7 @@
393
393
 
394
394
  "astring": ["astring@1.9.0", "https://registry.npmmirror.com/astring/-/astring-1.9.0.tgz", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="],
395
395
 
396
- "astro": ["astro@6.1.5", "https://registry.npmmirror.com/astro/-/astro-6.1.5.tgz", { "dependencies": { "@astrojs/compiler": "^3.0.1", "@astrojs/internal-helpers": "0.8.0", "@astrojs/markdown-remark": "7.1.0", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^4.0.0", "@clack/prompts": "^1.1.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.3.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "ci-info": "^4.4.0", "clsx": "^2.1.1", "common-ancestor-path": "^2.0.0", "cookie": "^1.1.1", "devalue": "^5.6.3", "diff": "^8.0.3", "dset": "^3.1.4", "es-module-lexer": "^2.0.0", "esbuild": "^0.27.3", "flattie": "^1.1.1", "fontace": "~0.4.1", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", "js-yaml": "^4.1.1", "magic-string": "^0.30.21", "magicast": "^0.5.2", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "obug": "^2.1.1", "p-limit": "^7.3.0", "p-queue": "^9.1.0", "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.3", "rehype": "^13.0.2", "semver": "^7.7.4", "shiki": "^4.0.2", "smol-toml": "^1.6.0", "svgo": "^4.0.1", "tinyclip": "^0.1.12", "tinyexec": "^1.0.4", "tinyglobby": "^0.2.15", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", "unifont": "~0.7.4", "unist-util-visit": "^5.1.0", "unstorage": "^1.17.4", "vfile": "^6.0.3", "vite": "^7.3.1", "vitefu": "^1.1.2", "xxhash-wasm": "^1.1.0", "yargs-parser": "^22.0.0", "zod": "^4.3.6" }, "optionalDependencies": { "sharp": "^0.34.0" }, "bin": { "astro": "bin/astro.mjs" } }, "sha512-AJVw/JlssxUCBFi3Hp4djL8Pt7wUQqStBBawCd8cNGBBM2lBzp/rXGguzt4OcMfW+86fs0hpFwMyopHM2r6d3g=="],
396
+ "astro": ["astro@6.1.8", "https://registry.npmmirror.com/astro/-/astro-6.1.8.tgz", { "dependencies": { "@astrojs/compiler": "^3.0.1", "@astrojs/internal-helpers": "0.8.0", "@astrojs/markdown-remark": "7.1.0", "@astrojs/telemetry": "3.3.1", "@capsizecss/unpack": "^4.0.0", "@clack/prompts": "^1.1.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.3.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "ci-info": "^4.4.0", "clsx": "^2.1.1", "common-ancestor-path": "^2.0.0", "cookie": "^1.1.1", "devalue": "^5.6.3", "diff": "^8.0.3", "dset": "^3.1.4", "es-module-lexer": "^2.0.0", "esbuild": "^0.27.3", "flattie": "^1.1.1", "fontace": "~0.4.1", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", "js-yaml": "^4.1.1", "magic-string": "^0.30.21", "magicast": "^0.5.2", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "obug": "^2.1.1", "p-limit": "^7.3.0", "p-queue": "^9.1.0", "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.3", "rehype": "^13.0.2", "semver": "^7.7.4", "shiki": "^4.0.2", "smol-toml": "^1.6.0", "svgo": "^4.0.1", "tinyclip": "^0.1.12", "tinyexec": "^1.0.4", "tinyglobby": "^0.2.15", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", "unifont": "~0.7.4", "unist-util-visit": "^5.1.0", "unstorage": "^1.17.4", "vfile": "^6.0.3", "vite": "^7.3.1", "vitefu": "^1.1.2", "xxhash-wasm": "^1.1.0", "yargs-parser": "^22.0.0", "zod": "^4.3.6" }, "optionalDependencies": { "sharp": "^0.34.0" }, "bin": { "astro": "bin/astro.mjs" } }, "sha512-6fT9M12U3fpi13DiPavNKDIoBflASTSxmKTEe+zXhWtlebQuOqfOnIrMWyRmlXp+mgDsojmw+fVFG9LUTzKSog=="],
397
397
 
398
398
  "axobject-query": ["axobject-query@4.1.0", "https://registry.npmmirror.com/axobject-query/-/axobject-query-4.1.0.tgz", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="],
399
399
 
@@ -585,7 +585,7 @@
585
585
 
586
586
  "is-decimal": ["is-decimal@2.0.1", "https://registry.npmmirror.com/is-decimal/-/is-decimal-2.0.1.tgz", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="],
587
587
 
588
- "is-docker": ["is-docker@3.0.0", "https://registry.npmmirror.com/is-docker/-/is-docker-3.0.0.tgz", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="],
588
+ "is-docker": ["is-docker@4.0.0", "https://registry.npmmirror.com/is-docker/-/is-docker-4.0.0.tgz", { "bin": { "is-docker": "cli.js" } }, "sha512-LHE+wROyG/Y/0ZnbktRCoTix2c1RhgWaZraMZ8o1Q7zCh0VSrICJQO5oqIIISrcSBtrXv0o233w1IYwsWCjTzA=="],
589
589
 
590
590
  "is-hexadecimal": ["is-hexadecimal@2.0.1", "https://registry.npmmirror.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="],
591
591
 
@@ -973,6 +973,8 @@
973
973
 
974
974
  "dom-serializer/entities": ["entities@4.5.0", "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
975
975
 
976
+ "is-inside-container/is-docker": ["is-docker@3.0.0", "https://registry.npmmirror.com/is-docker/-/is-docker-3.0.0.tgz", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="],
977
+
976
978
  "parse-entities/@types/unist": ["@types/unist@2.0.11", "https://registry.npmmirror.com/@types/unist/-/unist-2.0.11.tgz", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
977
979
 
978
980
  "csso/css-tree/mdn-data": ["mdn-data@2.0.28", "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.28.tgz", {}, "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g=="],
@@ -31,7 +31,7 @@ import '@pagefind/default-ui/css/ui.css'
31
31
  onIdle(async () => {
32
32
  // @ts-expect-error — Missing types for @pagefind/default-ui package.
33
33
  const { PagefindUI } = await import('@pagefind/default-ui')
34
- const pagefindUI = new PagefindUI({
34
+ new PagefindUI({
35
35
  element: '#site-search',
36
36
  baseUrl: import.meta.env.BASE_URL,
37
37
  bundlePath: `${import.meta.env.BASE_URL.replace(/\/$/, '')}/pagefind/`,
package/libs/icons.ts CHANGED
@@ -135,4 +135,4 @@ export const BuiltInIcons = {
135
135
  export const Icons = {
136
136
  ...BuiltInIcons
137
137
  }
138
- export type IconName = keyof typeof Icons
138
+ export type IconsType = keyof typeof Icons
package/libs/index.ts CHANGED
@@ -1 +1 @@
1
- export { Icons, type IconName } from './icons'
1
+ export { Icons, type IconsType } from './icons'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "astro-pure",
3
3
  "type": "module",
4
4
  "description": "A simple, clean but powerful blog theme build by astro.",
5
- "version": "1.4.5",
5
+ "version": "1.4.6",
6
6
  "homepage": "https://astro-pure.js.org/",
7
7
  "author": "CWorld",
8
8
  "license": "Apache-2.0",
@@ -39,13 +39,13 @@
39
39
  "dependencies": {
40
40
  "@astrojs/mdx": "5.0.3",
41
41
  "@astrojs/sitemap": "3.7.2",
42
- "@pagefind/default-ui": "^1.5.0",
42
+ "@pagefind/default-ui": "^1.5.2",
43
43
  "@unocss/astro": "^66.6.8",
44
44
  "@unocss/reset": "^66.6.8",
45
- "astro": "6.1.5",
45
+ "astro": "6.1.8",
46
46
  "hast-util-select": "^6.0.4",
47
47
  "node-html-parser": "^7.1.0",
48
- "pagefind": "^1.5.0",
48
+ "pagefind": "^1.5.2",
49
49
  "unocss": "^66.6.8"
50
50
  }
51
51
  }
@@ -1,3 +1,5 @@
1
+ // https://github.com/withastro/starlight/blob/main/packages/starlight/integrations/virtual-user-config.ts
2
+
1
3
  import { existsSync } from 'node:fs'
2
4
  import { resolve } from 'node:path'
3
5
  import { fileURLToPath } from 'node:url'
@@ -26,7 +28,7 @@ export function vitePluginUserConfig(
26
28
  trailingSlash
27
29
  }: Pick<AstroConfig, 'root' | 'srcDir' | 'trailingSlash'> & {
28
30
  build: Pick<AstroConfig['build'], 'format'>
29
- legacy: Pick<AstroConfig['legacy'], 'collections'>
31
+ legacy: Pick<AstroConfig['legacy'], 'collectionsBackwardsCompat'>
30
32
  }
31
33
  ): NonNullable<ViteUserConfig['plugins']>[number] {
32
34
  /**
@@ -39,21 +41,12 @@ export function vitePluginUserConfig(
39
41
  const resolveId = (id: string, base = root) =>
40
42
  JSON.stringify(id.startsWith('.') ? resolve(fileURLToPath(base), id) : id)
41
43
 
42
- /**
43
- * Resolves a path to a Starlight file relative to this file.
44
- * @example
45
- * resolveLocalPath('../utils/git.ts');
46
- * // => '"/users/houston/docs/node_modules/@astrojs/starlight/utils/git.ts"'
47
- */
48
- let collectionConfigImportPath = resolve(
49
- fileURLToPath(srcDir),
50
- legacy.collections ? './content/config.ts' : './content.config.ts'
51
- )
44
+ let collectionConfigImportPath = resolve(fileURLToPath(srcDir), './content.config.ts')
52
45
 
53
46
  // If not using legacy collections and the config doesn't exist, fallback to the legacy location.
54
47
  // We need to test this ahead of time as we cannot `try/catch` a failing import in the virtual
55
48
  // module as this would fail at build time when Rollup tries to resolve a non-existent path.
56
- if (!legacy.collections && !existsSync(collectionConfigImportPath)) {
49
+ if (legacy.collectionsBackwardsCompat && !existsSync(collectionConfigImportPath)) {
57
50
  collectionConfigImportPath = resolve(fileURLToPath(srcDir), './content/config.ts')
58
51
  }
59
52
 
@@ -62,7 +55,6 @@ export function vitePluginUserConfig(
62
55
  'virtual:config': `export default ${JSON.stringify(opts)}`,
63
56
  'virtual:project-context': `export default ${JSON.stringify({
64
57
  build: { format: build.format },
65
- legacyCollections: legacy.collections,
66
58
  root,
67
59
  srcDir,
68
60
  trailingSlash
@@ -73,7 +65,7 @@ export function vitePluginUserConfig(
73
65
  'virtual:user-css': opts.customCss.map((id) => `import ${resolveId(id)};`).join(''),
74
66
  'virtual:collection-config': `let userCollections;
75
67
  try {
76
- userCollections = (await import(${resolveId('./content/config.ts', srcDir)})).collections;
68
+ userCollections = (await import(${JSON.stringify(collectionConfigImportPath)})).collections;
77
69
  } catch {}
78
70
  export const collections = userCollections;`
79
71
  } satisfies Record<string, string>
@@ -87,7 +79,7 @@ export function vitePluginUserConfig(
87
79
  )
88
80
 
89
81
  return {
90
- name: 'vite-plugin-starlight-user-config',
82
+ name: 'vite-plugin-user-config',
91
83
  resolveId(id): string | undefined {
92
84
  if (id in modules) return resolveVirtualModuleId(id)
93
85
  },
package/schemas/head.ts CHANGED
@@ -7,7 +7,7 @@ export const HeadConfigSchema = () =>
7
7
  /** Name of the HTML tag to add to `<head>`, e.g. `'meta'`, `'link'`, or `'script'`. */
8
8
  tag: z.enum(['title', 'base', 'link', 'style', 'meta', 'script', 'noscript', 'template']),
9
9
  /** Attributes to set on the tag, e.g. `{ rel: 'stylesheet', href: '/custom.css' }`. */
10
- attrs: z.record(z.union([z.string(), z.boolean(), z.undefined()])).default({}),
10
+ attrs: z.record(z.string(), z.union([z.string(), z.boolean(), z.undefined()])).default({}),
11
11
  /** Content to place inside the tag (optional). */
12
12
  content: z.string().default('')
13
13
  })
package/schemas/icon.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { z } from 'astro/zod'
2
2
 
3
- import { Icons, type IconName } from '../libs'
3
+ import { Icons, type IconsType } from '../libs/icons'
4
4
 
5
- const iconNames = Object.keys(Icons) as [IconName, ...IconName[]]
5
+ const icons = Object.keys(Icons) as [IconsType, ...IconsType[]]
6
6
 
7
7
  /** String that matches the name of one of Starlight’s built-in icons. */
8
- export const IconSchema = () => z.enum(iconNames)
8
+ export const IconSchema = () => z.enum(icons)
package/types/index.ts CHANGED
@@ -1,9 +1,9 @@
1
- import type { Icons } from '../libs/icons'
2
-
3
1
  export type { IntegrationUserConfig } from './integrations-config'
4
2
  export type { ThemeUserConfig } from './theme-config'
5
3
  export type { UserConfig as ConfigOutput, UserInputConfig as Config } from './user-config'
6
4
 
5
+ export type { IconsType } from '../libs/icons'
6
+
7
7
  export interface SiteMeta {
8
8
  title: string
9
9
  description?: string
@@ -26,7 +26,3 @@ export type TimelineEvent = {
26
26
  date: string
27
27
  content: string
28
28
  }
29
-
30
- export type iconsType = keyof typeof Icons
31
-
32
- export { socialLinks } from './constants'
@@ -5,11 +5,9 @@ import { ThemeConfigSchema } from './theme-config'
5
5
 
6
6
  export const UserConfigSchema = ThemeConfigSchema()
7
7
  .strict()
8
- .merge(
9
- z.object({
10
- integ: IntegrationConfigSchema()
11
- })
12
- )
8
+ .extend({
9
+ integ: IntegrationConfigSchema()
10
+ })
13
11
  .transform((config) => ({
14
12
  ...config,
15
13
  // Pagefind only defaults to true if prerender is also true.