vfs-kit 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.
package/README.md CHANGED
@@ -1,2 +1,35 @@
1
1
  # vfs-kit
2
2
  A headless-first Virtual File System for React. Complete with drag-and-drop hierarchy, tab management and pluggable storage adapters.
3
+
4
+ ## Building the library
5
+
6
+ ```bash
7
+ npm install
8
+ npm run build
9
+ ```
10
+
11
+ The package is authored in TypeScript and exports ESM modules with declaration files. React, Tailwind, and any Shadcn UI components are declared as
12
+ peer dependencies – a consuming project must provide them.
13
+
14
+ ## Using locally
15
+
16
+ While developing you can link the package into a demo app:
17
+
18
+ ```bash
19
+ cd ./*/vfs-kit-test
20
+ npm link vfs-kit
21
+ ```
22
+
23
+ Import components in your app:
24
+
25
+ ```tsx
26
+ import { TreeView, useVfs } from "vfs-kit";
27
+ ```
28
+
29
+ ## Notes
30
+
31
+ The current release only includes a simple placeholder component. Real
32
+ Shadcn imports can be added once you’re ready; you may need to supply a
33
+ local `declare module '@shadcn/ui';` or update tsconfig `moduleResolution` to
34
+ `nodenext`.
35
+
package/dist/index.cjs ADDED
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ TreeView: () => TreeView,
24
+ useVfs: () => useVfs
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/components/TreeView.tsx
29
+ var import_react = require("react");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ function TreeView() {
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Placeholder TreeView" });
33
+ }
34
+
35
+ // src/hooks/useVfs.ts
36
+ function useVfs() {
37
+ return {};
38
+ }
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ TreeView,
42
+ useVfs
43
+ });
@@ -0,0 +1,7 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function TreeView(): react_jsx_runtime.JSX.Element;
4
+
5
+ declare function useVfs(): {};
6
+
7
+ export { TreeView, useVfs };
@@ -0,0 +1,7 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function TreeView(): react_jsx_runtime.JSX.Element;
4
+
5
+ declare function useVfs(): {};
6
+
7
+ export { TreeView, useVfs };
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ // src/components/TreeView.tsx
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function TreeView() {
5
+ return /* @__PURE__ */ jsx("div", { children: "Placeholder TreeView" });
6
+ }
7
+
8
+ // src/hooks/useVfs.ts
9
+ function useVfs() {
10
+ return {};
11
+ }
12
+ export {
13
+ TreeView,
14
+ useVfs
15
+ };
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "vfs-kit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A headless-first Virtual File System for React. Complete with drag-and-drop hierarchy, tab management and pluggable storage adapters.",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "license": "MIT",
9
+ "author": {
10
+ "name": "Benjamin Gruber"
8
11
  },
9
12
  "repository": {
10
13
  "type": "git",
11
- "url": "git+https://github.com/bengru07/vfs-kit.git"
14
+ "url": "git+https://github.com/bengru07/vfs-kit.git",
15
+ "directory": "packages/cli"
12
16
  },
13
17
  "keywords": [
14
18
  "react",
@@ -28,10 +32,41 @@
28
32
  "virtual-fs",
29
33
  "history"
30
34
  ],
31
- "author": "Benjamin Gruber",
32
- "license": "ISC",
33
- "bugs": {
34
- "url": "https://github.com/bengru07/vfs-kit/issues"
35
+ "type": "module",
36
+ "exports": "./dist/index.js",
37
+ "bin": {
38
+ "@vfs-kit": "./dist/index.js"
39
+ },
40
+ "dependencies": {
41
+ "chalk": "5.2.0",
42
+ "commander": "^10.0.0",
43
+ "execa": "^7.0.0",
44
+ "fs-extra": "^11.1.0",
45
+ "node-fetch": "^3.3.0",
46
+ "ora": "^6.1.2",
47
+ "prompts": "^2.4.2",
48
+ "zod": "^3.20.2"
35
49
  },
36
- "homepage": "https://github.com/bengru07/vfs-kit#readme"
50
+ "devDependencies": {
51
+ "@types/fs-extra": "^11.0.1",
52
+ "@types/prompts": "^2.4.2",
53
+ "rimraf": "^4.1.3",
54
+ "tsup": "^6.6.3",
55
+ "type-fest": "^3.6.1",
56
+ "typescript": "^4.9.5"
57
+ },
58
+ "scripts": {
59
+ "dev": "tsup --watch",
60
+ "build": "tsup",
61
+ "typecheck": "tsc --noEmit",
62
+ "clean": "rimraf dist && rimraf components",
63
+ "start:dev": "cross-env COMPONENTS_BASE_URL=http://localhost:3000 node dist/index.js",
64
+ "start": "node dist/index.js",
65
+ "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
66
+ "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
67
+ "release": "changeset version",
68
+ "pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
69
+ "pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
70
+ "pub:release": "pnpm build && pnpm publish --access public"
71
+ }
37
72
  }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+
3
+ export function TreeView() {
4
+ return <div>Placeholder TreeView</div>;
5
+ }
@@ -0,0 +1 @@
1
+ export * from "./TreeView.js";
@@ -0,0 +1 @@
1
+ export * from "./useVfs.js";
@@ -0,0 +1,3 @@
1
+ export function useVfs() {
2
+ return {};
3
+ }
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.js";
2
+ export * from "./hooks/index.js";
package/tsconfig.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ // Visit https://aka.ms/tsconfig to read more about this file
3
+ "compilerOptions": {
4
+ // File Layout
5
+ // "rootDir": "./src",
6
+ // "outDir": "./dist",
7
+
8
+ // Environment Settings
9
+ // See also https://aka.ms/tsconfig/module
10
+ "module": "nodenext",
11
+ "target": "esnext",
12
+ "types": [],
13
+ // For nodejs:
14
+ // "lib": ["esnext"],
15
+ // "types": ["node"],
16
+ // and npm install -D @types/node
17
+
18
+ // Other Outputs
19
+ "sourceMap": true,
20
+ "declaration": true,
21
+ "declarationMap": true,
22
+
23
+ // Stricter Typechecking Options
24
+ "noUncheckedIndexedAccess": true,
25
+ "exactOptionalPropertyTypes": true,
26
+
27
+ // Style Options
28
+ // "noImplicitReturns": true,
29
+ // "noImplicitOverride": true,
30
+ // "noUnusedLocals": true,
31
+ // "noUnusedParameters": true,
32
+ // "noFallthroughCasesInSwitch": true,
33
+ // "noPropertyAccessFromIndexSignature": true,
34
+
35
+ // Recommended Options
36
+ "strict": true,
37
+ "jsx": "react-jsx",
38
+ "verbatimModuleSyntax": true,
39
+ "isolatedModules": true,
40
+ "noUncheckedSideEffectImports": true,
41
+ "moduleDetection": "force",
42
+ "skipLibCheck": true,
43
+ }
44
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from "tsup"
2
+
3
+ export default defineConfig({
4
+ format: ["cjs", "esm"],
5
+ entry: ["./src/index.ts"],
6
+ dts: true,
7
+ shims: true,
8
+ skipNodeModulesBundle: true,
9
+ clean: true
10
+ })