@nuasite/nua 0.0.102 → 0.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuasite/nua",
3
- "version": "0.0.102",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "module": "src/index.ts",
@@ -39,11 +39,11 @@
39
39
  "@astrojs/mdx": "4.3.8",
40
40
  "@astrojs/rss": "4.0.13",
41
41
  "@astrojs/sitemap": "3.6.0",
42
- "@nuasite/llm-enhancements": "0.0.102",
43
- "@nuasite/cli": "0.0.102",
44
- "@nuasite/cms-marker": "0.0.102",
45
- "@nuasite/components": "0.0.102",
46
- "@nuasite/core": "0.0.102",
42
+ "@nuasite/llm-enhancements": "0.2.2",
43
+ "@nuasite/cli": "0.2.2",
44
+ "@nuasite/cms": "0.2.2",
45
+ "@nuasite/components": "0.2.2",
46
+ "@nuasite/core": "0.2.2",
47
47
  "@tailwindcss/vite": "^4.1.11",
48
48
  "@tailwindcss/typography": "^0.5.19",
49
49
  "astro": "^5.16.6",
package/src/config.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { defineConfig as astroDefineConfig } from 'astro/config'
2
- import type { AstroUserConfig } from 'astro/config'
3
2
  import nua from './integration'
4
3
  import type { NuaIntegrationOptions } from './types'
5
4
 
6
5
  export type { NuaIntegrationOptions } from './types'
7
6
 
7
+ type AstroUserConfig = Parameters<typeof astroDefineConfig>[0]
8
+
8
9
  export interface NuaConfig extends AstroUserConfig {
9
10
  /**
10
11
  * Configure the nua integration options.
@@ -1,6 +1,6 @@
1
1
  import mdx from '@astrojs/mdx'
2
2
  import sitemap from '@astrojs/sitemap'
3
- import cmsMarker from '@nuasite/cms-marker'
3
+ import cms from '@nuasite/cms'
4
4
  import tailwindcss from '@tailwindcss/vite'
5
5
  import type { AstroIntegration } from 'astro'
6
6
  import pageMarkdown from '../../llm-enhancements/src'
@@ -14,18 +14,18 @@ export default function nua(options: NuaIntegrationOptions = {}): AstroIntegrati
14
14
  hooks: {
15
15
  'astro:config:setup': ({ updateConfig, logger }) => {
16
16
  const integrations: AstroIntegration[] = []
17
- const vitePlugins: unknown[] = []
17
+ const vitePlugins = []
18
18
 
19
19
  // Add Tailwind CSS Vite plugin
20
20
  if (resolved.tailwindcss) {
21
- vitePlugins.push(tailwindcss())
21
+ vitePlugins.push(...tailwindcss())
22
22
  logger.info('Tailwind CSS enabled')
23
23
  }
24
24
 
25
25
  // Add nuasite integrations
26
- if (resolved.cmsMarker !== false) {
27
- integrations.push(cmsMarker(resolved.cmsMarker))
28
- logger.info('CMS Marker enabled')
26
+ if (resolved.cms !== false) {
27
+ integrations.push(cms(resolved.cms))
28
+ logger.info('CMS enabled')
29
29
  }
30
30
 
31
31
  if (resolved.pageMarkdown !== false) {
package/src/types.ts CHANGED
@@ -1,16 +1,16 @@
1
- import type { Options as MdxOptions } from '@astrojs/mdx'
1
+ import type { MdxOptions } from '@astrojs/mdx'
2
2
  import type { SitemapOptions } from '@astrojs/sitemap'
3
- import type { CmsMarkerOptions } from '@nuasite/cms-marker'
3
+ import type { CmsMarkerOptions } from '../../cms/src'
4
4
  import type { PageMarkdownOptions } from '../../llm-enhancements/src'
5
5
 
6
- export type { Options as MdxOptions } from '@astrojs/mdx'
6
+ export type { MdxOptions } from '@astrojs/mdx'
7
7
  export type { SitemapOptions } from '@astrojs/sitemap'
8
- export type { CmsMarkerOptions } from '@nuasite/cms-marker'
8
+ export type { CmsMarkerOptions } from '../../cms/src'
9
9
  export type { PageMarkdownOptions } from '../../llm-enhancements/src'
10
10
 
11
11
  export interface NuaIntegrationOptions {
12
- /** Enable/disable or configure @nuasite/cms-marker (default: true) */
13
- cmsMarker?: boolean | CmsMarkerOptions
12
+ /** Enable/disable or configure @nuasite/astro-cms (default: true) */
13
+ cms?: boolean | CmsMarkerOptions
14
14
  /** Enable/disable or configure @nuasite/llm-enhancements (default: true) */
15
15
  pageMarkdown?: boolean | PageMarkdownOptions
16
16
  /** Enable/disable or configure @astrojs/mdx (default: true) */
@@ -22,7 +22,7 @@ export interface NuaIntegrationOptions {
22
22
  }
23
23
 
24
24
  export interface ResolvedIntegrationOptions {
25
- cmsMarker: CmsMarkerOptions | false
25
+ cms: CmsMarkerOptions | false
26
26
  pageMarkdown: PageMarkdownOptions | false
27
27
  mdx: MdxOptions | false
28
28
  sitemap: SitemapOptions | false
@@ -40,7 +40,7 @@ function resolveOption<T extends object>(value: boolean | T | undefined, default
40
40
 
41
41
  export function resolveOptions(options: NuaIntegrationOptions = {}): ResolvedIntegrationOptions {
42
42
  return {
43
- cmsMarker: resolveOption(options.cmsMarker),
43
+ cms: resolveOption(options.cms),
44
44
  pageMarkdown: resolveOption(options.pageMarkdown),
45
45
  mdx: resolveOption(options.mdx),
46
46
  sitemap: resolveOption(options.sitemap),