@deshlo/react-github 0.1.0

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.
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import { type GitHubBrowserPluginConfig } from "@deshlo/plugin-github";
3
+ export interface GithubPluginProps {
4
+ config?: GitHubBrowserPluginConfig;
5
+ children: ReactNode;
6
+ }
7
+ export declare function GithubPlugin({ children, config }: GithubPluginProps): import("react/jsx-runtime").JSX.Element;
8
+ export type { GitHubBrowserPluginConfig };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,uBAAuB,CAAC;AAG/B,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAInE;AAED,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.GithubPlugin = GithubPlugin;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const plugin_github_1 = require("@deshlo/plugin-github");
7
+ const overlay_1 = require("@deshlo/react/overlay");
8
+ function GithubPlugin({ children, config }) {
9
+ const plugin = (0, plugin_github_1.createGitHubBrowserPlugin)(config || {});
10
+ return (0, jsx_runtime_1.jsx)(overlay_1.OverlayPluginProvider, { plugin: plugin, children: children });
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ const vitest_1 = require("vitest");
5
+ const overlay_1 = require("@deshlo/react/overlay");
6
+ const index_1 = require("./index");
7
+ (0, vitest_1.describe)("GithubPlugin", () => {
8
+ (0, vitest_1.it)("wraps children in OverlayPluginProvider", () => {
9
+ const element = (0, index_1.GithubPlugin)({
10
+ config: { token: "ghp_test" },
11
+ children: "child",
12
+ });
13
+ (0, vitest_1.expect)((0, react_1.isValidElement)(element)).toBe(true);
14
+ (0, vitest_1.expect)(element.type).toBe(overlay_1.OverlayPluginProvider);
15
+ (0, vitest_1.expect)(element.props.plugin.id).toBe("github-browser");
16
+ });
17
+ });
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@deshlo/react-github",
3
+ "version": "0.1.0",
4
+ "description": "React wrapper for Source Inspector GitHub plugin",
5
+ "main": "build/src/index.js",
6
+ "module": "build/src/index.js",
7
+ "types": "build/src/index.d.ts",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "types": "./build/src/index.d.ts",
12
+ "require": "./build/src/index.js",
13
+ "import": "./build/src/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "build"
18
+ ],
19
+ "scripts": {
20
+ "clean": "rm -rf build",
21
+ "build": "tsc -p tsconfig.json",
22
+ "test": "vitest run"
23
+ },
24
+ "keywords": [
25
+ "react",
26
+ "source-inspector",
27
+ "github",
28
+ "plugin"
29
+ ],
30
+ "author": "Nikos Gerontakis",
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "@deshlo/plugin-github": "0.1.0",
34
+ "@deshlo/react": "0.1.0"
35
+ },
36
+ "peerDependencies": {
37
+ "react": ">=18"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^24.10.1",
41
+ "@types/react": "^19.2.2",
42
+ "vitest": "^3.2.4"
43
+ }
44
+ }