@barodoc/core 1.0.0 → 1.0.1

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.
@@ -35,6 +35,7 @@ var topbarSchema = z.object({
35
35
  var searchSchema = z.object({
36
36
  enabled: z.boolean().optional()
37
37
  }).optional();
38
+ var lineNumbersSchema = z.boolean().optional();
38
39
  var pluginConfigSchema = z.union([
39
40
  z.string(),
40
41
  z.tuple([z.string(), z.record(z.unknown())])
@@ -48,6 +49,7 @@ var barodocConfigSchema = z.object({
48
49
  navigation: z.array(navItemSchema),
49
50
  topbar: topbarSchema,
50
51
  search: searchSchema,
52
+ lineNumbers: lineNumbersSchema,
51
53
  plugins: z.array(pluginConfigSchema).optional(),
52
54
  customCss: z.array(z.string()).optional()
53
55
  });
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { R as ResolvedBarodocConfig, a as BarodocConfig } from '../types-DaMSwPOk.js';
2
+ import { R as ResolvedBarodocConfig, a as BarodocConfig } from '../types-Be4n5fTN.js';
3
3
  import 'astro';
4
4
 
5
5
  declare const barodocConfigSchema: z.ZodObject<{
@@ -122,6 +122,7 @@ declare const barodocConfigSchema: z.ZodObject<{
122
122
  }, {
123
123
  enabled?: boolean | undefined;
124
124
  }>>;
125
+ lineNumbers: z.ZodOptional<z.ZodBoolean>;
125
126
  plugins: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>, "many">>;
126
127
  customCss: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
127
128
  }, "strip", z.ZodTypeAny, {
@@ -162,6 +163,7 @@ declare const barodocConfigSchema: z.ZodObject<{
162
163
  search?: {
163
164
  enabled?: boolean | undefined;
164
165
  } | undefined;
166
+ lineNumbers?: boolean | undefined;
165
167
  plugins?: (string | [string, Record<string, unknown>])[] | undefined;
166
168
  customCss?: string[] | undefined;
167
169
  }, {
@@ -202,6 +204,7 @@ declare const barodocConfigSchema: z.ZodObject<{
202
204
  search?: {
203
205
  enabled?: boolean | undefined;
204
206
  } | undefined;
207
+ lineNumbers?: boolean | undefined;
205
208
  plugins?: (string | [string, Record<string, unknown>])[] | undefined;
206
209
  customCss?: string[] | undefined;
207
210
  }>;
@@ -2,7 +2,7 @@ import {
2
2
  barodocConfigSchema,
3
3
  getConfigDefaults,
4
4
  loadConfig
5
- } from "../chunk-UNDAI47C.js";
5
+ } from "../chunk-SX42YS3W.js";
6
6
  export {
7
7
  barodocConfigSchema,
8
8
  getConfigDefaults,
@@ -1,4 +1,4 @@
1
- import { b as BarodocI18nConfig, c as BarodocNavItem } from '../types-DaMSwPOk.js';
1
+ import { b as BarodocI18nConfig, c as BarodocNavItem } from '../types-Be4n5fTN.js';
2
2
  import 'astro';
3
3
 
4
4
  declare function getLocaleFromPath(path: string, i18n: BarodocI18nConfig): string;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AstroIntegration } from 'astro';
2
- import { B as BarodocOptions } from './types-DaMSwPOk.js';
3
- export { a as BarodocConfig, b as BarodocI18nConfig, c as BarodocNavItem, d as BarodocPlugin, e as BarodocPluginFactory, f as BarodocPluginHooks, g as BarodocThemeColors, h as BarodocThemeConfig, i as BuildContext, C as ContentContext, P as PluginConfig, j as PluginContext, R as ResolvedBarodocConfig, k as ResolvedPlugin, T as ThemeExport } from './types-DaMSwPOk.js';
2
+ import { B as BarodocOptions } from './types-Be4n5fTN.js';
3
+ export { a as BarodocConfig, b as BarodocI18nConfig, c as BarodocNavItem, d as BarodocPlugin, e as BarodocPluginFactory, f as BarodocPluginHooks, g as BarodocThemeColors, h as BarodocThemeConfig, i as BuildContext, C as ContentContext, P as PluginConfig, j as PluginContext, R as ResolvedBarodocConfig, k as ResolvedPlugin, T as ThemeExport } from './types-Be4n5fTN.js';
4
4
  export { barodocConfigSchema, loadConfig } from './config/index.js';
5
5
  export { getLocaleFromPath, getLocaleLabel, getLocalizedNavGroup, getLocalizedPath, removeLocaleFromPath } from './i18n/index.js';
6
6
  export { definePlugin, getPluginIntegrations, loadPlugins, runConfigHook, runHook } from './plugins/index.js';
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ import {
2
+ barodocConfigSchema,
3
+ loadConfig
4
+ } from "./chunk-SX42YS3W.js";
1
5
  import {
2
6
  getLocaleFromPath,
3
7
  getLocaleLabel,
@@ -12,10 +16,6 @@ import {
12
16
  runConfigHook,
13
17
  runHook
14
18
  } from "./chunk-UICDSNBG.js";
15
- import {
16
- barodocConfigSchema,
17
- loadConfig
18
- } from "./chunk-UNDAI47C.js";
19
19
 
20
20
  // src/integration.ts
21
21
  var VIRTUAL_CONFIG_ID = "virtual:barodoc/config";
@@ -84,7 +84,7 @@ function barodoc(options) {
84
84
  defaultLocale: "en",
85
85
  locales: ["en"]
86
86
  };
87
- const themeIntegration = options.theme.integration();
87
+ const themeIntegration = options.theme.integration(resolvedConfig);
88
88
  const pluginIntegrations = getPluginIntegrations(plugins, pluginContext);
89
89
  updateConfig({
90
90
  vite: {
@@ -1,5 +1,5 @@
1
- import { k as ResolvedPlugin, j as PluginContext, P as PluginConfig, R as ResolvedBarodocConfig, f as BarodocPluginHooks, d as BarodocPlugin } from '../types-DaMSwPOk.js';
2
- export { e as BarodocPluginFactory, i as BuildContext, C as ContentContext } from '../types-DaMSwPOk.js';
1
+ import { k as ResolvedPlugin, j as PluginContext, P as PluginConfig, R as ResolvedBarodocConfig, f as BarodocPluginHooks, d as BarodocPlugin } from '../types-Be4n5fTN.js';
2
+ export { e as BarodocPluginFactory, i as BuildContext, C as ContentContext } from '../types-Be4n5fTN.js';
3
3
  import * as astro from 'astro';
4
4
 
5
5
  /**
@@ -128,12 +128,14 @@ interface BarodocConfig {
128
128
  search?: {
129
129
  enabled?: boolean;
130
130
  };
131
+ /** When true, code blocks render with line numbers. */
132
+ lineNumbers?: boolean;
131
133
  plugins?: PluginConfig[];
132
134
  customCss?: string[];
133
135
  }
134
136
  interface ThemeExport {
135
137
  name: string;
136
- integration: () => AstroIntegration;
138
+ integration: (config: ResolvedBarodocConfig) => AstroIntegration;
137
139
  pages?: Record<string, () => Promise<unknown>>;
138
140
  layouts?: Record<string, () => Promise<unknown>>;
139
141
  components?: Record<string, () => Promise<unknown>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barodoc/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Core integration for Barodoc documentation framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",