@vx-oss/docs-story 1.0.3

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.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/css/preset.css +1 -0
  3. package/dist/.translations/index.d.ts +18 -0
  4. package/dist/.translations/keys.js +18 -0
  5. package/dist/_virtual/_rolldown/runtime.js +4 -0
  6. package/dist/cache/fs.d.ts +5 -0
  7. package/dist/cache/fs.js +22 -0
  8. package/dist/cache/index.d.ts +11 -0
  9. package/dist/cache/index.js +15 -0
  10. package/dist/client/arg-form.js +357 -0
  11. package/dist/client/compiled.d.ts +52 -0
  12. package/dist/client/compiled.js +47 -0
  13. package/dist/client/components/input.js +13 -0
  14. package/dist/client/components/select.js +78 -0
  15. package/dist/client/with-control.d.ts +8 -0
  16. package/dist/client/with-control.js +104 -0
  17. package/dist/i18n.d.ts +6 -0
  18. package/dist/i18n.js +7 -0
  19. package/dist/index.d.ts +65 -0
  20. package/dist/index.js +74 -0
  21. package/dist/next/client.d.ts +2 -0
  22. package/dist/next/client.js +2 -0
  23. package/dist/next/index.d.ts +14 -0
  24. package/dist/next/index.js +37 -0
  25. package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js +110 -0
  26. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.4/node_modules/@ungap/structured-clone/esm/deserialize.js +86 -0
  27. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.4/node_modules/@ungap/structured-clone/esm/json.js +23 -0
  28. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.4/node_modules/@ungap/structured-clone/esm/serialize.js +119 -0
  29. package/dist/node_modules/.pnpm/react-error-boundary@6.1.3_@types_react@19.2.18_react@19.2.8/node_modules/react-error-boundary/dist/react-error-boundary.js +61 -0
  30. package/dist/type-tree/builder.d.ts +41 -0
  31. package/dist/type-tree/builder.js +240 -0
  32. package/dist/type-tree/index.d.ts +6 -0
  33. package/dist/type-tree/index.js +5 -0
  34. package/dist/type-tree/sampler.d.ts +5 -0
  35. package/dist/type-tree/sampler.js +21 -0
  36. package/dist/type-tree/stringify.d.ts +9 -0
  37. package/dist/type-tree/stringify.js +20 -0
  38. package/dist/type-tree/types.d.ts +67 -0
  39. package/dist/type-tree/validator.d.ts +5 -0
  40. package/dist/type-tree/validator.js +21 -0
  41. package/dist/utils/cn.js +2 -0
  42. package/dist/utils/date.js +6 -0
  43. package/dist/utils/generate.js +24 -0
  44. package/dist/utils/parse.js +20 -0
  45. package/dist/utils/serialization.js +10 -0
  46. package/dist/utils/transform.js +27 -0
  47. package/dist/vite/client.d.ts +2 -0
  48. package/dist/vite/client.js +2 -0
  49. package/dist/vite/index.d.ts +19 -0
  50. package/dist/vite/index.js +25 -0
  51. package/dist/webpack/story.d.ts +13 -0
  52. package/dist/webpack/story.js +26 -0
  53. package/package.json +96 -0
@@ -0,0 +1,13 @@
1
+ import { LoaderDefinitionFunction } from "webpack";
2
+ //#region src/webpack/story.d.ts
3
+ interface StoryLoaderOptions {
4
+ /**
5
+ * Path to `tsconfig.json`.
6
+ *
7
+ * @default "tsconfig.json"
8
+ */
9
+ tsconfigPath?: string;
10
+ }
11
+ declare const loader: LoaderDefinitionFunction<StoryLoaderOptions>;
12
+ //#endregion
13
+ export { StoryLoaderOptions, loader as default };
@@ -0,0 +1,26 @@
1
+ import { createControlsProject } from "../utils/generate.js";
2
+ import { transformStoryFile } from "../utils/transform.js";
3
+ import path from "node:path";
4
+ //#region src/webpack/story.ts
5
+ let projectPromise;
6
+ const loader = function(source) {
7
+ const callback = this.async();
8
+ const options = this.getOptions();
9
+ this.cacheable(true);
10
+ const run = async () => {
11
+ if (!projectPromise) {
12
+ const resolvedTsconfig = options.tsconfigPath ?? path.join(this.rootContext, "tsconfig.json");
13
+ projectPromise = createControlsProject(resolvedTsconfig);
14
+ }
15
+ try {
16
+ const transformed = transformStoryFile("@vx-oss/docs-story/next/client", source, this.resourcePath, await projectPromise);
17
+ callback(void 0, transformed ?? source);
18
+ } catch (error) {
19
+ if (!(error instanceof Error)) throw error;
20
+ callback(error);
21
+ }
22
+ };
23
+ run();
24
+ };
25
+ //#endregion
26
+ export { loader as default };
package/package.json ADDED
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "@vx-oss/docs-story",
3
+ "version": "1.0.3",
4
+ "description": "Story integration to Fumadocs.",
5
+ "keywords": [],
6
+ "license": "MIT",
7
+ "author": "Fuma Nama",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/vezham/fumadocs",
11
+ "directory": "packages/story"
12
+ },
13
+ "files": [
14
+ "css",
15
+ "dist"
16
+ ],
17
+ "type": "module",
18
+ "exports": {
19
+ ".": "./dist/index.js",
20
+ "./i18n": "./dist/i18n.js",
21
+ "./next": "./dist/next/index.js",
22
+ "./next/client": "./dist/next/client.js",
23
+ "./type-tree": "./dist/type-tree/index.js",
24
+ "./vite": "./dist/vite/index.js",
25
+ "./vite/client": "./dist/vite/client.js",
26
+ "./webpack/story": "./dist/webpack/story.js",
27
+ "./package.json": "./package.json",
28
+ "./css/*": "./css/*"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "dependencies": {
34
+ "@base-ui/react": "^1.7.0",
35
+ "@fuma-translate/react": "^1.0.2",
36
+ "class-variance-authority": "^0.7.1",
37
+ "cnfast": "^0.1.0",
38
+ "lucide-react": "^1.34.0",
39
+ "ts-morph": "^28.0.0",
40
+ "@vx-oss/docs-stf": "1.0.3"
41
+ },
42
+ "devDependencies": {
43
+ "@fastify/deepmerge": "^3.2.1",
44
+ "@types/node": "26.3.0",
45
+ "@types/react": "^19.2.18",
46
+ "@types/ungap__structured-clone": "^1.2.0",
47
+ "@ungap/structured-clone": "^1.3.4",
48
+ "next": "^16.3.3",
49
+ "react": "^19.2.8",
50
+ "react-dom": "^19.2.8",
51
+ "react-error-boundary": "^6.1.3",
52
+ "tailwindcss": "^4.3.3",
53
+ "tsdown": "0.22.14",
54
+ "vite": "^8.2.2",
55
+ "webpack": "^5.109.2",
56
+ "tsconfig": "0.0.1",
57
+ "@vx-oss/docs-core": "1.0.3",
58
+ "@vx-oss/docs-react": "1.0.3"
59
+ },
60
+ "peerDependencies": {
61
+ "@types/react": "*",
62
+ "next": "^15.3.0 || ^16.0.0",
63
+ "react": "^19.2.0",
64
+ "react-dom": "^19.2.0",
65
+ "vite": "^8",
66
+ "webpack": "^5",
67
+ "@vx-oss/docs-core": "^1.0.1",
68
+ "@vx-oss/docs-react": "^1.0.1"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "next": {
72
+ "optional": true
73
+ },
74
+ "vite": {
75
+ "optional": true
76
+ },
77
+ "webpack": {
78
+ "optional": true
79
+ },
80
+ "@types/react": {
81
+ "optional": true
82
+ }
83
+ },
84
+ "inlinedDependencies": {
85
+ "@fastify/deepmerge": "3.2.1",
86
+ "@ungap/structured-clone": "1.3.4",
87
+ "react-error-boundary": "6.1.3"
88
+ },
89
+ "scripts": {
90
+ "build": "tsdown",
91
+ "clean": "rimraf dist",
92
+ "dev": "tsdown --watch",
93
+ "lint": "oxlint .",
94
+ "types:check": "tsc --noEmit"
95
+ }
96
+ }