@lukoweb/apitogo 0.1.6 → 0.1.8

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/dist/cli/cli.js CHANGED
@@ -3816,7 +3816,7 @@ import {
3816
3816
  // package.json
3817
3817
  var package_default = {
3818
3818
  name: "@lukoweb/apitogo",
3819
- version: "0.1.5",
3819
+ version: "0.1.7",
3820
3820
  type: "module",
3821
3821
  sideEffects: [
3822
3822
  "**/*.css",
@@ -8274,7 +8274,7 @@ async function preview(argv) {
8274
8274
  // src/cli/build/handler.ts
8275
8275
  async function build(argv) {
8276
8276
  const packageJson2 = getZudokuPackageJson();
8277
- printDiagnosticsToConsole(`Starting Zudoku build v${packageJson2.version}`);
8277
+ printDiagnosticsToConsole(`Starting APIToGo build v${packageJson2.version}`);
8278
8278
  printDiagnosticsToConsole("");
8279
8279
  printDiagnosticsToConsole("");
8280
8280
  const dir = path24.resolve(process.cwd(), argv.dir);
@@ -9003,17 +9003,19 @@ var buildTree = (routePaths) => {
9003
9003
  };
9004
9004
  var treeToNavigationItems = (node) => {
9005
9005
  const docs = sortDocPaths(node.docs);
9006
- const categories = sortDirectoryNames([...node.children.keys()]).map((directoryName) => {
9007
- const childNode = node.children.get(directoryName);
9008
- if (!childNode) {
9009
- throw new Error(`Missing child node for directory '${directoryName}'.`);
9010
- }
9011
- return {
9012
- type: "category",
9013
- label: titleCase(directoryName),
9014
- items: treeToNavigationItems(childNode)
9015
- };
9016
- });
9006
+ const categories = sortDirectoryNames([...node.children.keys()]).map(
9007
+ (directoryName) => {
9008
+ const childNode = node.children.get(directoryName);
9009
+ if (!childNode) {
9010
+ throw new Error(`Missing child node for directory '${directoryName}'.`);
9011
+ }
9012
+ return {
9013
+ type: "category",
9014
+ label: titleCase(directoryName),
9015
+ items: treeToNavigationItems(childNode)
9016
+ };
9017
+ }
9018
+ );
9017
9019
  return [...docs, ...categories];
9018
9020
  };
9019
9021
  var formatNavigationItem = (item, indentLevel) => {
@@ -9021,7 +9023,9 @@ var formatNavigationItem = (item, indentLevel) => {
9021
9023
  if (typeof item === "string") {
9022
9024
  return `${indent}"${item}"`;
9023
9025
  }
9024
- const items = item.items.map((subItem) => formatNavigationItem(subItem, indentLevel + 2));
9026
+ const items = item.items.map(
9027
+ (subItem) => formatNavigationItem(subItem, indentLevel + 2)
9028
+ );
9025
9029
  return [
9026
9030
  `${indent}{`,
9027
9031
  `${indent} type: "category",`,
@@ -9146,7 +9150,9 @@ var findConfigPath = async (dir) => {
9146
9150
  };
9147
9151
  async function syncConfig(argv) {
9148
9152
  const dir = path29.resolve(process.cwd(), argv.dir);
9149
- const pagesDir = toPosixPath2(argv.pagesDir.replace(/^[./]+/, "").replace(/\/+$/, ""));
9153
+ const pagesDir = toPosixPath2(
9154
+ argv.pagesDir.replace(/^[./]+/, "").replace(/\/+$/, "")
9155
+ );
9150
9156
  try {
9151
9157
  const configPath = await findConfigPath(dir);
9152
9158
  const pageFiles = await glob4(`${pagesDir}/**/*.{md,mdx}`, {
@@ -9174,7 +9180,9 @@ async function syncConfig(argv) {
9174
9180
  buildRedirectsCode(routePaths[0])
9175
9181
  );
9176
9182
  await writeFile6(configPath, withRedirects, "utf8");
9177
- printResultToConsole(`Updated ${path29.basename(configPath)} from ${pagesDir}/`);
9183
+ printResultToConsole(
9184
+ `Updated ${path29.basename(configPath)} from ${pagesDir}/`
9185
+ );
9178
9186
  } catch (error) {
9179
9187
  await printCriticalFailureToConsoleAndExit(
9180
9188
  error instanceof Error ? error.message : String(error)
@@ -3,7 +3,7 @@ import type { BuildConfig } from "./validators/BuildSchema.js";
3
3
  import type { AuthenticationConfig, ZudokuConfig } from "./validators/ZudokuConfig.js";
4
4
  export type ZudokuBuildConfig = BuildConfig;
5
5
  export type LoadedConfig = ConfigWithMeta;
6
- export type { ZudokuConfig };
6
+ export type { ZudokuConfig as ApitogoConfig };
7
7
  export type ClerkAuthenticationConfig = Extract<AuthenticationConfig, {
8
8
  type: "clerk";
9
9
  }>;
@@ -1,4 +1,4 @@
1
- export type { ZudokuBuildConfig, ZudokuConfig } from "./config/config.js";
1
+ export type { ApitogoConfig, ZudokuBuildConfig } from "./config/config.js";
2
2
  export { createPlugin } from "./config/create-plugin.js";
3
3
  export type { InputNavigation as Navigation } from "./config/validators/InputNavigationSchema.js";
4
4
  export type { SlotType } from "./lib/components/context/SlotProvider.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -1,35 +1,35 @@
1
- import type { ConfigWithMeta } from "./loader.js";
2
- import type { BuildConfig } from "./validators/BuildSchema.js";
3
- import type {
4
- AuthenticationConfig,
5
- ZudokuConfig,
6
- } from "./validators/ZudokuConfig.js";
7
-
8
- export type ZudokuBuildConfig = BuildConfig;
9
- export type LoadedConfig = ConfigWithMeta;
10
- export type { ZudokuConfig };
11
-
12
- export type ClerkAuthenticationConfig = Extract<
13
- AuthenticationConfig,
14
- { type: "clerk" }
15
- >;
16
- export type OpenIDAuthenticationConfig = Extract<
17
- AuthenticationConfig,
18
- { type: "openid" }
19
- >;
20
- export type Auth0AuthenticationConfig = Extract<
21
- AuthenticationConfig,
22
- { type: "auth0" }
23
- >;
24
- export type SupabaseAuthenticationConfig = Extract<
25
- AuthenticationConfig,
26
- { type: "supabase" }
27
- >;
28
- export type FirebaseAuthenticationConfig = Extract<
29
- AuthenticationConfig,
30
- { type: "firebase" }
31
- >;
32
- export type AzureB2CAuthenticationConfig = Extract<
33
- AuthenticationConfig,
34
- { type: "azureb2c" }
35
- >;
1
+ import type { ConfigWithMeta } from "./loader.js";
2
+ import type { BuildConfig } from "./validators/BuildSchema.js";
3
+ import type {
4
+ AuthenticationConfig,
5
+ ZudokuConfig,
6
+ } from "./validators/ZudokuConfig.js";
7
+
8
+ export type ZudokuBuildConfig = BuildConfig;
9
+ export type LoadedConfig = ConfigWithMeta;
10
+ export type { ZudokuConfig as ApitogoConfig };
11
+
12
+ export type ClerkAuthenticationConfig = Extract<
13
+ AuthenticationConfig,
14
+ { type: "clerk" }
15
+ >;
16
+ export type OpenIDAuthenticationConfig = Extract<
17
+ AuthenticationConfig,
18
+ { type: "openid" }
19
+ >;
20
+ export type Auth0AuthenticationConfig = Extract<
21
+ AuthenticationConfig,
22
+ { type: "auth0" }
23
+ >;
24
+ export type SupabaseAuthenticationConfig = Extract<
25
+ AuthenticationConfig,
26
+ { type: "supabase" }
27
+ >;
28
+ export type FirebaseAuthenticationConfig = Extract<
29
+ AuthenticationConfig,
30
+ { type: "firebase" }
31
+ >;
32
+ export type AzureB2CAuthenticationConfig = Extract<
33
+ AuthenticationConfig,
34
+ { type: "azureb2c" }
35
+ >;
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type { ZudokuBuildConfig, ZudokuConfig } from "./config/config.js";
1
+ export type { ApitogoConfig, ZudokuBuildConfig } from "./config/config.js";
2
2
  export { createPlugin } from "./config/create-plugin.js";
3
3
  export type { InputNavigation as Navigation } from "./config/validators/InputNavigationSchema.js";
4
4
  export type { SlotType } from "./lib/components/context/SlotProvider.js";
@@ -1,35 +1,39 @@
1
- import { ChevronRightIcon } from "lucide-react";
2
- import { cn } from "../../util/cn.js";
3
- import ZudokuLogo from "./ZudokuLogo.js";
4
- import ZuploLogo from "./ZuploLogo.js";
5
-
6
- export const PoweredByZudoku = ({ className }: { className?: string }) => (
7
- <a
8
- href={
9
- import.meta.env.IS_ZUPLO ? "https://zuplo.com" : "https://apitogo.com"
10
- }
11
- target="_blank"
12
- rel="noopener noreferrer"
13
- className={cn(
14
- "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
15
- className,
16
- )}
17
- >
18
- <div className="opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap">
19
- {import.meta.env.IS_ZUPLO ? (
20
- <ZuploLogo className="w-3.5 h-3.5 dark:fill-white" />
21
- ) : (
22
- <ZudokuLogo className="w-3.5 h-3.5 dark:fill-white" />
23
- )}
24
- powered by {import.meta.env.IS_ZUPLO ? "Zuplo" : "apitogo"}
25
- </div>
26
- <div className="text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer">
27
- <ChevronRightIcon
28
- size={12}
29
- absoluteStrokeWidth
30
- strokeWidth={1.5}
31
- className="rtl:rotate-180"
32
- />
33
- </div>
34
- </a>
35
- );
1
+ import { ChevronRightIcon } from "lucide-react";
2
+ import { cn } from "../../util/cn.js";
3
+ import ZuploLogo from "./ZuploLogo.js";
4
+
5
+ export const PoweredByZudoku = ({ className }: { className?: string }) => (
6
+ <a
7
+ href={
8
+ import.meta.env.IS_ZUPLO ? "https://zuplo.com" : "https://apitogo.com"
9
+ }
10
+ target="_blank"
11
+ rel="noopener noreferrer"
12
+ className={cn(
13
+ "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
14
+ className,
15
+ )}
16
+ >
17
+ <div className="opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap">
18
+ {import.meta.env.IS_ZUPLO ? (
19
+ <ZuploLogo className="w-3.5 h-3.5 dark:fill-white" />
20
+ ) : (
21
+ <img
22
+ src="/Icon.png"
23
+ alt=""
24
+ aria-hidden="true"
25
+ className="w-3.5 h-3.5"
26
+ />
27
+ )}
28
+ powered by {import.meta.env.IS_ZUPLO ? "Zuplo" : "apitogo"}
29
+ </div>
30
+ <div className="text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer">
31
+ <ChevronRightIcon
32
+ size={12}
33
+ absoluteStrokeWidth
34
+ strokeWidth={1.5}
35
+ className="rtl:rotate-180"
36
+ />
37
+ </div>
38
+ </a>
39
+ );
@@ -12,7 +12,6 @@ import {
12
12
  CheckIcon,
13
13
  ChevronDownIcon,
14
14
  CopyIcon,
15
- EditIcon,
16
15
  ExternalLinkIcon,
17
16
  Link2Icon,
18
17
  } from "lucide-react";
@@ -95,15 +94,6 @@ export const MdxPage = ({
95
94
  ? new Date(frontmatter.lastModifiedTime)
96
95
  : null;
97
96
 
98
- const editConfig =
99
- frontmatter.suggestEdit !== false &&
100
- (frontmatter.suggestEdit ?? defaultOptions?.suggestEdit);
101
-
102
- const editUrl = editConfig
103
- ? editConfig.url.replaceAll("{filePath}", __filepath)
104
- : null;
105
- const editText = editConfig ? editConfig.text || "Edit this page" : null;
106
-
107
97
  const copyMarkdownConfig =
108
98
  frontmatter.copyPage !== false && defaultOptions?.copyPage !== false;
109
99
 
@@ -227,25 +217,10 @@ export const MdxPage = ({
227
217
  components={{ ...useMDXComponents(), ...MarkdownHeadings }}
228
218
  />
229
219
  <div className="h-16" />
230
- {(showLastModified && lastModifiedDate) || editUrl ? (
220
+ {showLastModified && lastModifiedDate ? (
231
221
  <div className="flex justify-between text-xs text-muted-foreground ">
232
222
  <div />
233
223
  <div className="flex items-center gap-2">
234
- <div>
235
- {editUrl && (
236
- <Button asChild variant="ghost" size="sm">
237
- <a
238
- href={editUrl}
239
- target="_blank"
240
- rel="noopener noreferrer"
241
- className="flex items-center gap-1"
242
- >
243
- <EditIcon size={12} />
244
- {editText}
245
- </a>
246
- </Button>
247
- )}
248
- </div>
249
224
  <div>
250
225
  {showLastModified && lastModifiedDate && (
251
226
  <div