@pragma-sh/plugin 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.
- package/README.md +27 -0
- package/dist/catalog.cjs +77 -0
- package/dist/catalog.d.cts +363 -0
- package/dist/catalog.d.ts +363 -0
- package/dist/catalog.js +15 -0
- package/dist/icons.cjs +57 -0
- package/dist/icons.d.cts +13 -0
- package/dist/icons.d.ts +13 -0
- package/dist/icons.js +10 -0
- package/dist/index.cjs +217 -0
- package/dist/index.d.cts +533 -0
- package/dist/index.d.ts +533 -0
- package/dist/index.js +151 -0
- package/dist/jsx-runtime.cjs +61 -0
- package/dist/jsx-runtime.d.cts +5 -0
- package/dist/jsx-runtime.d.ts +5 -0
- package/dist/jsx-runtime.js +14 -0
- package/dist/react-dom.cjs +73 -0
- package/dist/react-dom.d.cts +12 -0
- package/dist/react-dom.d.ts +12 -0
- package/dist/react-dom.js +26 -0
- package/dist/react.cjs +127 -0
- package/dist/react.d.cts +39 -0
- package/dist/react.d.ts +39 -0
- package/dist/react.js +80 -0
- package/dist/shared/chunk-2jf7fbtp.js +10 -0
- package/dist/shared/chunk-qjw1esw6.js +4 -0
- package/dist/shared/chunk-yjtz35sp.js +33 -0
- package/dist/ui.cjs +61 -0
- package/dist/ui.d.cts +21 -0
- package/dist/ui.d.ts +21 -0
- package/dist/ui.js +14 -0
- package/dist/version.cjs +47 -0
- package/dist/version.d.cts +7 -0
- package/dist/version.d.ts +7 -0
- package/dist/version.js +6 -0
- package/package.json +96 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toCommonJS = (from) => {
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
10
|
+
if (entry)
|
|
11
|
+
return entry;
|
|
12
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
__moduleCache.set(from, entry);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, {
|
|
32
|
+
get: all[name],
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/jsx-runtime.ts
|
|
40
|
+
var exports_jsx_runtime = {};
|
|
41
|
+
__export(exports_jsx_runtime, {
|
|
42
|
+
jsxs: () => jsxs,
|
|
43
|
+
jsx: () => jsx,
|
|
44
|
+
Fragment: () => Fragment
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(exports_jsx_runtime);
|
|
47
|
+
|
|
48
|
+
// src/bridge.ts
|
|
49
|
+
function getBridge() {
|
|
50
|
+
const bridge = globalThis.__PRAGMA__;
|
|
51
|
+
if (!bridge) {
|
|
52
|
+
throw new Error("@pragma-sh/plugin: globalThis.__PRAGMA__ is not installed. This module only " + "runs inside a Pragma host, which installs the bridge before loading any " + "plugin bundle. It cannot be imported standalone (e.g. from Node or a " + "non-Pragma bundler build).");
|
|
53
|
+
}
|
|
54
|
+
return bridge;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/jsx-runtime.ts
|
|
58
|
+
var jsxRuntime = getBridge().jsxRuntime;
|
|
59
|
+
var jsx = jsxRuntime.jsx;
|
|
60
|
+
var jsxs = jsxRuntime.jsxs;
|
|
61
|
+
var Fragment = jsxRuntime.Fragment;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBridge
|
|
3
|
+
} from "./shared/chunk-2jf7fbtp.js";
|
|
4
|
+
|
|
5
|
+
// src/jsx-runtime.ts
|
|
6
|
+
var jsxRuntime = getBridge().jsxRuntime;
|
|
7
|
+
var jsx = jsxRuntime.jsx;
|
|
8
|
+
var jsxs = jsxRuntime.jsxs;
|
|
9
|
+
var Fragment = jsxRuntime.Fragment;
|
|
10
|
+
export {
|
|
11
|
+
jsxs,
|
|
12
|
+
jsx,
|
|
13
|
+
Fragment
|
|
14
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toCommonJS = (from) => {
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
10
|
+
if (entry)
|
|
11
|
+
return entry;
|
|
12
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
__moduleCache.set(from, entry);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, {
|
|
32
|
+
get: all[name],
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/react-dom.ts
|
|
40
|
+
var exports_react_dom = {};
|
|
41
|
+
__export(exports_react_dom, {
|
|
42
|
+
version: () => version,
|
|
43
|
+
preload: () => preload,
|
|
44
|
+
preinitModule: () => preinitModule,
|
|
45
|
+
preinit: () => preinit,
|
|
46
|
+
prefetchDNS: () => prefetchDNS,
|
|
47
|
+
preconnect: () => preconnect,
|
|
48
|
+
flushSync: () => flushSync,
|
|
49
|
+
default: () => react_dom_default,
|
|
50
|
+
createPortal: () => createPortal
|
|
51
|
+
});
|
|
52
|
+
module.exports = __toCommonJS(exports_react_dom);
|
|
53
|
+
|
|
54
|
+
// src/bridge.ts
|
|
55
|
+
function getBridge() {
|
|
56
|
+
const bridge = globalThis.__PRAGMA__;
|
|
57
|
+
if (!bridge) {
|
|
58
|
+
throw new Error("@pragma-sh/plugin: globalThis.__PRAGMA__ is not installed. This module only " + "runs inside a Pragma host, which installs the bridge before loading any " + "plugin bundle. It cannot be imported standalone (e.g. from Node or a " + "non-Pragma bundler build).");
|
|
59
|
+
}
|
|
60
|
+
return bridge;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// src/react-dom.ts
|
|
64
|
+
var reactDom = getBridge().reactDom;
|
|
65
|
+
var react_dom_default = reactDom;
|
|
66
|
+
var createPortal = reactDom.createPortal;
|
|
67
|
+
var flushSync = reactDom.flushSync;
|
|
68
|
+
var preconnect = reactDom.preconnect;
|
|
69
|
+
var prefetchDNS = reactDom.prefetchDNS;
|
|
70
|
+
var preinit = reactDom.preinit;
|
|
71
|
+
var preinitModule = reactDom.preinitModule;
|
|
72
|
+
var preload = reactDom.preload;
|
|
73
|
+
var version = reactDom.version;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "react-dom";
|
|
2
|
+
import * as import_ilo9os from "react-dom";
|
|
3
|
+
declare const reactDom: typeof import_ilo9os;
|
|
4
|
+
declare const createPortal: typeof reactDom.createPortal;
|
|
5
|
+
declare const flushSync: typeof reactDom.flushSync;
|
|
6
|
+
declare const preconnect: typeof reactDom.preconnect;
|
|
7
|
+
declare const prefetchDNS: typeof reactDom.prefetchDNS;
|
|
8
|
+
declare const preinit: typeof reactDom.preinit;
|
|
9
|
+
declare const preinitModule: typeof reactDom.preinitModule;
|
|
10
|
+
declare const preload: typeof reactDom.preload;
|
|
11
|
+
declare const version: typeof reactDom.version;
|
|
12
|
+
export { version, preload, preinitModule, preinit, prefetchDNS, preconnect, flushSync, reactDom as default, createPortal };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "react-dom";
|
|
2
|
+
import * as import_ilo9os from "react-dom";
|
|
3
|
+
declare const reactDom: typeof import_ilo9os;
|
|
4
|
+
declare const createPortal: typeof reactDom.createPortal;
|
|
5
|
+
declare const flushSync: typeof reactDom.flushSync;
|
|
6
|
+
declare const preconnect: typeof reactDom.preconnect;
|
|
7
|
+
declare const prefetchDNS: typeof reactDom.prefetchDNS;
|
|
8
|
+
declare const preinit: typeof reactDom.preinit;
|
|
9
|
+
declare const preinitModule: typeof reactDom.preinitModule;
|
|
10
|
+
declare const preload: typeof reactDom.preload;
|
|
11
|
+
declare const version: typeof reactDom.version;
|
|
12
|
+
export { version, preload, preinitModule, preinit, prefetchDNS, preconnect, flushSync, reactDom as default, createPortal };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBridge
|
|
3
|
+
} from "./shared/chunk-2jf7fbtp.js";
|
|
4
|
+
|
|
5
|
+
// src/react-dom.ts
|
|
6
|
+
var reactDom = getBridge().reactDom;
|
|
7
|
+
var react_dom_default = reactDom;
|
|
8
|
+
var createPortal = reactDom.createPortal;
|
|
9
|
+
var flushSync = reactDom.flushSync;
|
|
10
|
+
var preconnect = reactDom.preconnect;
|
|
11
|
+
var prefetchDNS = reactDom.prefetchDNS;
|
|
12
|
+
var preinit = reactDom.preinit;
|
|
13
|
+
var preinitModule = reactDom.preinitModule;
|
|
14
|
+
var preload = reactDom.preload;
|
|
15
|
+
var version = reactDom.version;
|
|
16
|
+
export {
|
|
17
|
+
version,
|
|
18
|
+
preload,
|
|
19
|
+
preinitModule,
|
|
20
|
+
preinit,
|
|
21
|
+
prefetchDNS,
|
|
22
|
+
preconnect,
|
|
23
|
+
flushSync,
|
|
24
|
+
react_dom_default as default,
|
|
25
|
+
createPortal
|
|
26
|
+
};
|
package/dist/react.cjs
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toCommonJS = (from) => {
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
10
|
+
if (entry)
|
|
11
|
+
return entry;
|
|
12
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
__moduleCache.set(from, entry);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, {
|
|
32
|
+
get: all[name],
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/react.ts
|
|
40
|
+
var exports_react = {};
|
|
41
|
+
__export(exports_react, {
|
|
42
|
+
version: () => version,
|
|
43
|
+
useTransition: () => useTransition,
|
|
44
|
+
useSyncExternalStore: () => useSyncExternalStore,
|
|
45
|
+
useState: () => useState,
|
|
46
|
+
useRef: () => useRef,
|
|
47
|
+
useReducer: () => useReducer,
|
|
48
|
+
useOptimistic: () => useOptimistic,
|
|
49
|
+
useMemo: () => useMemo,
|
|
50
|
+
useLayoutEffect: () => useLayoutEffect,
|
|
51
|
+
useInsertionEffect: () => useInsertionEffect,
|
|
52
|
+
useImperativeHandle: () => useImperativeHandle,
|
|
53
|
+
useId: () => useId,
|
|
54
|
+
useEffect: () => useEffect,
|
|
55
|
+
useDeferredValue: () => useDeferredValue,
|
|
56
|
+
useDebugValue: () => useDebugValue,
|
|
57
|
+
useContext: () => useContext,
|
|
58
|
+
useCallback: () => useCallback,
|
|
59
|
+
useActionState: () => useActionState,
|
|
60
|
+
use: () => use,
|
|
61
|
+
startTransition: () => startTransition,
|
|
62
|
+
memo: () => memo,
|
|
63
|
+
lazy: () => lazy,
|
|
64
|
+
isValidElement: () => isValidElement,
|
|
65
|
+
forwardRef: () => forwardRef,
|
|
66
|
+
default: () => react_default,
|
|
67
|
+
createRef: () => createRef,
|
|
68
|
+
createElement: () => createElement,
|
|
69
|
+
createContext: () => createContext,
|
|
70
|
+
cloneElement: () => cloneElement,
|
|
71
|
+
Suspense: () => Suspense,
|
|
72
|
+
StrictMode: () => StrictMode,
|
|
73
|
+
PureComponent: () => PureComponent,
|
|
74
|
+
Profiler: () => Profiler,
|
|
75
|
+
Fragment: () => Fragment,
|
|
76
|
+
Component: () => Component,
|
|
77
|
+
Children: () => Children
|
|
78
|
+
});
|
|
79
|
+
module.exports = __toCommonJS(exports_react);
|
|
80
|
+
|
|
81
|
+
// src/bridge.ts
|
|
82
|
+
function getBridge() {
|
|
83
|
+
const bridge = globalThis.__PRAGMA__;
|
|
84
|
+
if (!bridge) {
|
|
85
|
+
throw new Error("@pragma-sh/plugin: globalThis.__PRAGMA__ is not installed. This module only " + "runs inside a Pragma host, which installs the bridge before loading any " + "plugin bundle. It cannot be imported standalone (e.g. from Node or a " + "non-Pragma bundler build).");
|
|
86
|
+
}
|
|
87
|
+
return bridge;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// src/react.ts
|
|
91
|
+
var react = getBridge().react;
|
|
92
|
+
var react_default = react;
|
|
93
|
+
var Children = react.Children;
|
|
94
|
+
var Component = react.Component;
|
|
95
|
+
var Fragment = react.Fragment;
|
|
96
|
+
var Profiler = react.Profiler;
|
|
97
|
+
var PureComponent = react.PureComponent;
|
|
98
|
+
var StrictMode = react.StrictMode;
|
|
99
|
+
var Suspense = react.Suspense;
|
|
100
|
+
var cloneElement = react.cloneElement;
|
|
101
|
+
var createContext = react.createContext;
|
|
102
|
+
var createElement = react.createElement;
|
|
103
|
+
var createRef = react.createRef;
|
|
104
|
+
var forwardRef = react.forwardRef;
|
|
105
|
+
var isValidElement = react.isValidElement;
|
|
106
|
+
var lazy = react.lazy;
|
|
107
|
+
var memo = react.memo;
|
|
108
|
+
var startTransition = react.startTransition;
|
|
109
|
+
var use = react.use;
|
|
110
|
+
var useActionState = react.useActionState;
|
|
111
|
+
var useCallback = react.useCallback;
|
|
112
|
+
var useContext = react.useContext;
|
|
113
|
+
var useDebugValue = react.useDebugValue;
|
|
114
|
+
var useDeferredValue = react.useDeferredValue;
|
|
115
|
+
var useEffect = react.useEffect;
|
|
116
|
+
var useId = react.useId;
|
|
117
|
+
var useImperativeHandle = react.useImperativeHandle;
|
|
118
|
+
var useInsertionEffect = react.useInsertionEffect;
|
|
119
|
+
var useLayoutEffect = react.useLayoutEffect;
|
|
120
|
+
var useMemo = react.useMemo;
|
|
121
|
+
var useOptimistic = react.useOptimistic;
|
|
122
|
+
var useReducer = react.useReducer;
|
|
123
|
+
var useRef = react.useRef;
|
|
124
|
+
var useState = react.useState;
|
|
125
|
+
var useSyncExternalStore = react.useSyncExternalStore;
|
|
126
|
+
var useTransition = react.useTransition;
|
|
127
|
+
var version = react.version;
|
package/dist/react.d.cts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentProps, ComponentPropsWithoutRef, ComponentPropsWithRef, ComponentType, Context, CSSProperties, DependencyList, Dispatch, EffectCallback, ElementType, FC, FocusEvent, ForwardedRef, FormEvent, JSX, JSXElementConstructor, KeyboardEvent, MouseEvent, PropsWithChildren, ReactElement, ReactNode, Ref, RefObject, SetStateAction, SyntheticEvent } from "react";
|
|
2
|
+
import * as import_1sj3pb from "react";
|
|
3
|
+
declare const react: typeof import_1sj3pb;
|
|
4
|
+
declare const Children: typeof react.Children;
|
|
5
|
+
declare const Component: typeof react.Component;
|
|
6
|
+
declare const Fragment: typeof react.Fragment;
|
|
7
|
+
declare const Profiler: typeof react.Profiler;
|
|
8
|
+
declare const PureComponent: typeof react.PureComponent;
|
|
9
|
+
declare const StrictMode: typeof react.StrictMode;
|
|
10
|
+
declare const Suspense: typeof react.Suspense;
|
|
11
|
+
declare const cloneElement: typeof react.cloneElement;
|
|
12
|
+
declare const createContext: typeof react.createContext;
|
|
13
|
+
declare const createElement: typeof react.createElement;
|
|
14
|
+
declare const createRef: typeof react.createRef;
|
|
15
|
+
declare const forwardRef: typeof react.forwardRef;
|
|
16
|
+
declare const isValidElement: typeof react.isValidElement;
|
|
17
|
+
declare const lazy: typeof react.lazy;
|
|
18
|
+
declare const memo: typeof react.memo;
|
|
19
|
+
declare const startTransition: typeof react.startTransition;
|
|
20
|
+
declare const use: typeof react.use;
|
|
21
|
+
declare const useActionState: typeof react.useActionState;
|
|
22
|
+
declare const useCallback: typeof react.useCallback;
|
|
23
|
+
declare const useContext: typeof react.useContext;
|
|
24
|
+
declare const useDebugValue: typeof react.useDebugValue;
|
|
25
|
+
declare const useDeferredValue: typeof react.useDeferredValue;
|
|
26
|
+
declare const useEffect: typeof react.useEffect;
|
|
27
|
+
declare const useId: typeof react.useId;
|
|
28
|
+
declare const useImperativeHandle: typeof react.useImperativeHandle;
|
|
29
|
+
declare const useInsertionEffect: typeof react.useInsertionEffect;
|
|
30
|
+
declare const useLayoutEffect: typeof react.useLayoutEffect;
|
|
31
|
+
declare const useMemo: typeof react.useMemo;
|
|
32
|
+
declare const useOptimistic: typeof react.useOptimistic;
|
|
33
|
+
declare const useReducer: typeof react.useReducer;
|
|
34
|
+
declare const useRef: typeof react.useRef;
|
|
35
|
+
declare const useState: typeof react.useState;
|
|
36
|
+
declare const useSyncExternalStore: typeof react.useSyncExternalStore;
|
|
37
|
+
declare const useTransition: typeof react.useTransition;
|
|
38
|
+
declare const version: typeof react.version;
|
|
39
|
+
export { version, useTransition, useSyncExternalStore, useState, useRef, useReducer, useOptimistic, useMemo, useLayoutEffect, useInsertionEffect, useImperativeHandle, useId, useEffect, useDeferredValue, useDebugValue, useContext, useCallback, useActionState, use, startTransition, memo, lazy, isValidElement, forwardRef, react as default, createRef, createElement, createContext, cloneElement, SyntheticEvent, Suspense, StrictMode, SetStateAction, RefObject, Ref, ReactNode, ReactElement, PureComponent, PropsWithChildren, Profiler, MouseEvent, KeyboardEvent, JSXElementConstructor, JSX, Fragment, ForwardedRef, FormEvent, FocusEvent, FC, ElementType, EffectCallback, Dispatch, DependencyList, Context, ComponentType, ComponentPropsWithoutRef, ComponentPropsWithRef, ComponentProps, Component, Children, ChangeEvent, CSSProperties };
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentProps, ComponentPropsWithoutRef, ComponentPropsWithRef, ComponentType, Context, CSSProperties, DependencyList, Dispatch, EffectCallback, ElementType, FC, FocusEvent, ForwardedRef, FormEvent, JSX, JSXElementConstructor, KeyboardEvent, MouseEvent, PropsWithChildren, ReactElement, ReactNode, Ref, RefObject, SetStateAction, SyntheticEvent } from "react";
|
|
2
|
+
import * as import_1sj3pb from "react";
|
|
3
|
+
declare const react: typeof import_1sj3pb;
|
|
4
|
+
declare const Children: typeof react.Children;
|
|
5
|
+
declare const Component: typeof react.Component;
|
|
6
|
+
declare const Fragment: typeof react.Fragment;
|
|
7
|
+
declare const Profiler: typeof react.Profiler;
|
|
8
|
+
declare const PureComponent: typeof react.PureComponent;
|
|
9
|
+
declare const StrictMode: typeof react.StrictMode;
|
|
10
|
+
declare const Suspense: typeof react.Suspense;
|
|
11
|
+
declare const cloneElement: typeof react.cloneElement;
|
|
12
|
+
declare const createContext: typeof react.createContext;
|
|
13
|
+
declare const createElement: typeof react.createElement;
|
|
14
|
+
declare const createRef: typeof react.createRef;
|
|
15
|
+
declare const forwardRef: typeof react.forwardRef;
|
|
16
|
+
declare const isValidElement: typeof react.isValidElement;
|
|
17
|
+
declare const lazy: typeof react.lazy;
|
|
18
|
+
declare const memo: typeof react.memo;
|
|
19
|
+
declare const startTransition: typeof react.startTransition;
|
|
20
|
+
declare const use: typeof react.use;
|
|
21
|
+
declare const useActionState: typeof react.useActionState;
|
|
22
|
+
declare const useCallback: typeof react.useCallback;
|
|
23
|
+
declare const useContext: typeof react.useContext;
|
|
24
|
+
declare const useDebugValue: typeof react.useDebugValue;
|
|
25
|
+
declare const useDeferredValue: typeof react.useDeferredValue;
|
|
26
|
+
declare const useEffect: typeof react.useEffect;
|
|
27
|
+
declare const useId: typeof react.useId;
|
|
28
|
+
declare const useImperativeHandle: typeof react.useImperativeHandle;
|
|
29
|
+
declare const useInsertionEffect: typeof react.useInsertionEffect;
|
|
30
|
+
declare const useLayoutEffect: typeof react.useLayoutEffect;
|
|
31
|
+
declare const useMemo: typeof react.useMemo;
|
|
32
|
+
declare const useOptimistic: typeof react.useOptimistic;
|
|
33
|
+
declare const useReducer: typeof react.useReducer;
|
|
34
|
+
declare const useRef: typeof react.useRef;
|
|
35
|
+
declare const useState: typeof react.useState;
|
|
36
|
+
declare const useSyncExternalStore: typeof react.useSyncExternalStore;
|
|
37
|
+
declare const useTransition: typeof react.useTransition;
|
|
38
|
+
declare const version: typeof react.version;
|
|
39
|
+
export { version, useTransition, useSyncExternalStore, useState, useRef, useReducer, useOptimistic, useMemo, useLayoutEffect, useInsertionEffect, useImperativeHandle, useId, useEffect, useDeferredValue, useDebugValue, useContext, useCallback, useActionState, use, startTransition, memo, lazy, isValidElement, forwardRef, react as default, createRef, createElement, createContext, cloneElement, SyntheticEvent, Suspense, StrictMode, SetStateAction, RefObject, Ref, ReactNode, ReactElement, PureComponent, PropsWithChildren, Profiler, MouseEvent, KeyboardEvent, JSXElementConstructor, JSX, Fragment, ForwardedRef, FormEvent, FocusEvent, FC, ElementType, EffectCallback, Dispatch, DependencyList, Context, ComponentType, ComponentPropsWithoutRef, ComponentPropsWithRef, ComponentProps, Component, Children, ChangeEvent, CSSProperties };
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBridge
|
|
3
|
+
} from "./shared/chunk-2jf7fbtp.js";
|
|
4
|
+
|
|
5
|
+
// src/react.ts
|
|
6
|
+
var react = getBridge().react;
|
|
7
|
+
var react_default = react;
|
|
8
|
+
var Children = react.Children;
|
|
9
|
+
var Component = react.Component;
|
|
10
|
+
var Fragment = react.Fragment;
|
|
11
|
+
var Profiler = react.Profiler;
|
|
12
|
+
var PureComponent = react.PureComponent;
|
|
13
|
+
var StrictMode = react.StrictMode;
|
|
14
|
+
var Suspense = react.Suspense;
|
|
15
|
+
var cloneElement = react.cloneElement;
|
|
16
|
+
var createContext = react.createContext;
|
|
17
|
+
var createElement = react.createElement;
|
|
18
|
+
var createRef = react.createRef;
|
|
19
|
+
var forwardRef = react.forwardRef;
|
|
20
|
+
var isValidElement = react.isValidElement;
|
|
21
|
+
var lazy = react.lazy;
|
|
22
|
+
var memo = react.memo;
|
|
23
|
+
var startTransition = react.startTransition;
|
|
24
|
+
var use = react.use;
|
|
25
|
+
var useActionState = react.useActionState;
|
|
26
|
+
var useCallback = react.useCallback;
|
|
27
|
+
var useContext = react.useContext;
|
|
28
|
+
var useDebugValue = react.useDebugValue;
|
|
29
|
+
var useDeferredValue = react.useDeferredValue;
|
|
30
|
+
var useEffect = react.useEffect;
|
|
31
|
+
var useId = react.useId;
|
|
32
|
+
var useImperativeHandle = react.useImperativeHandle;
|
|
33
|
+
var useInsertionEffect = react.useInsertionEffect;
|
|
34
|
+
var useLayoutEffect = react.useLayoutEffect;
|
|
35
|
+
var useMemo = react.useMemo;
|
|
36
|
+
var useOptimistic = react.useOptimistic;
|
|
37
|
+
var useReducer = react.useReducer;
|
|
38
|
+
var useRef = react.useRef;
|
|
39
|
+
var useState = react.useState;
|
|
40
|
+
var useSyncExternalStore = react.useSyncExternalStore;
|
|
41
|
+
var useTransition = react.useTransition;
|
|
42
|
+
var version = react.version;
|
|
43
|
+
export {
|
|
44
|
+
version,
|
|
45
|
+
useTransition,
|
|
46
|
+
useSyncExternalStore,
|
|
47
|
+
useState,
|
|
48
|
+
useRef,
|
|
49
|
+
useReducer,
|
|
50
|
+
useOptimistic,
|
|
51
|
+
useMemo,
|
|
52
|
+
useLayoutEffect,
|
|
53
|
+
useInsertionEffect,
|
|
54
|
+
useImperativeHandle,
|
|
55
|
+
useId,
|
|
56
|
+
useEffect,
|
|
57
|
+
useDeferredValue,
|
|
58
|
+
useDebugValue,
|
|
59
|
+
useContext,
|
|
60
|
+
useCallback,
|
|
61
|
+
useActionState,
|
|
62
|
+
use,
|
|
63
|
+
startTransition,
|
|
64
|
+
memo,
|
|
65
|
+
lazy,
|
|
66
|
+
isValidElement,
|
|
67
|
+
forwardRef,
|
|
68
|
+
react_default as default,
|
|
69
|
+
createRef,
|
|
70
|
+
createElement,
|
|
71
|
+
createContext,
|
|
72
|
+
cloneElement,
|
|
73
|
+
Suspense,
|
|
74
|
+
StrictMode,
|
|
75
|
+
PureComponent,
|
|
76
|
+
Profiler,
|
|
77
|
+
Fragment,
|
|
78
|
+
Component,
|
|
79
|
+
Children
|
|
80
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/bridge.ts
|
|
2
|
+
function getBridge() {
|
|
3
|
+
const bridge = globalThis.__PRAGMA__;
|
|
4
|
+
if (!bridge) {
|
|
5
|
+
throw new Error("@pragma-sh/plugin: globalThis.__PRAGMA__ is not installed. This module only " + "runs inside a Pragma host, which installs the bridge before loading any " + "plugin bundle. It cannot be imported standalone (e.g. from Node or a " + "non-Pragma bundler build).");
|
|
6
|
+
}
|
|
7
|
+
return bridge;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { getBridge };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PLUGIN_API_VERSION
|
|
3
|
+
} from "./chunk-qjw1esw6.js";
|
|
4
|
+
|
|
5
|
+
// src/agent.ts
|
|
6
|
+
function defineAgent(input) {
|
|
7
|
+
return input;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// src/plugin.ts
|
|
11
|
+
function definePlugin(input) {
|
|
12
|
+
return { ...input, __apiVersion: PLUGIN_API_VERSION };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// src/usage-limits.ts
|
|
16
|
+
var CLI_MISSING_STATUS = 20;
|
|
17
|
+
async function runProviderCommand(ctx, command, missingStatus = CLI_MISSING_STATUS) {
|
|
18
|
+
const [result] = await ctx.sdk.exec.run({
|
|
19
|
+
cwd: ctx.project?.path ?? "/tmp",
|
|
20
|
+
commands: [command]
|
|
21
|
+
});
|
|
22
|
+
if (result?.status === missingStatus)
|
|
23
|
+
return { kind: "missing" };
|
|
24
|
+
if (!result || result.status !== 0) {
|
|
25
|
+
return { kind: "failed", stderr: result?.stderr.trim() ?? "" };
|
|
26
|
+
}
|
|
27
|
+
return { kind: "ok", stdout: result.stdout };
|
|
28
|
+
}
|
|
29
|
+
function defineUsageLimitProvider(input) {
|
|
30
|
+
return input;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { defineAgent, definePlugin, CLI_MISSING_STATUS, runProviderCommand, defineUsageLimitProvider };
|
package/dist/ui.cjs
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toCommonJS = (from) => {
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
10
|
+
if (entry)
|
|
11
|
+
return entry;
|
|
12
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
__moduleCache.set(from, entry);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, {
|
|
32
|
+
get: all[name],
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/ui.ts
|
|
40
|
+
var exports_ui = {};
|
|
41
|
+
__export(exports_ui, {
|
|
42
|
+
default: () => ui_default,
|
|
43
|
+
Kbd: () => Kbd,
|
|
44
|
+
Button: () => Button
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(exports_ui);
|
|
47
|
+
|
|
48
|
+
// src/bridge.ts
|
|
49
|
+
function getBridge() {
|
|
50
|
+
const bridge = globalThis.__PRAGMA__;
|
|
51
|
+
if (!bridge) {
|
|
52
|
+
throw new Error("@pragma-sh/plugin: globalThis.__PRAGMA__ is not installed. This module only " + "runs inside a Pragma host, which installs the bridge before loading any " + "plugin bundle. It cannot be imported standalone (e.g. from Node or a " + "non-Pragma bundler build).");
|
|
53
|
+
}
|
|
54
|
+
return bridge;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/ui.ts
|
|
58
|
+
var ui = getBridge().ui;
|
|
59
|
+
var Button = ui.Button;
|
|
60
|
+
var Kbd = ui.Kbd;
|
|
61
|
+
var ui_default = ui;
|
package/dist/ui.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ComponentType as ComponentType3, HTMLAttributes } from "react";
|
|
2
|
+
/** Minimal host Button props exposed through `@pragma-sh/plugin/ui`. */
|
|
3
|
+
type PragmaButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "success" | "warning" | "link";
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
|
|
6
|
+
};
|
|
7
|
+
/** Minimal host keyboard-badge props exposed through `@pragma-sh/plugin/ui`. */
|
|
8
|
+
type PragmaKbdProps = HTMLAttributes<HTMLElement>;
|
|
9
|
+
/** A rendered UI primitive contributed by the host (`@pragma-sh/plugin/ui`). */
|
|
10
|
+
interface PragmaUiBridge {
|
|
11
|
+
Button: ComponentType3<PragmaButtonProps>;
|
|
12
|
+
Kbd: ComponentType3<PragmaKbdProps>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Host-rendered UI primitives. These are runtime delegates onto the host bridge,
|
|
16
|
+
* so plugin bundles never include the host component implementations.
|
|
17
|
+
*/
|
|
18
|
+
declare const ui: PragmaUiBridge;
|
|
19
|
+
declare const Button2: React.ComponentType<PragmaButtonProps>;
|
|
20
|
+
declare const Kbd2: React.ComponentType<PragmaKbdProps>;
|
|
21
|
+
export { ui as default, Kbd2 as Kbd, Button2 as Button };
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ComponentType as ComponentType3, HTMLAttributes } from "react";
|
|
2
|
+
/** Minimal host Button props exposed through `@pragma-sh/plugin/ui`. */
|
|
3
|
+
type PragmaButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "success" | "warning" | "link";
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
|
|
6
|
+
};
|
|
7
|
+
/** Minimal host keyboard-badge props exposed through `@pragma-sh/plugin/ui`. */
|
|
8
|
+
type PragmaKbdProps = HTMLAttributes<HTMLElement>;
|
|
9
|
+
/** A rendered UI primitive contributed by the host (`@pragma-sh/plugin/ui`). */
|
|
10
|
+
interface PragmaUiBridge {
|
|
11
|
+
Button: ComponentType3<PragmaButtonProps>;
|
|
12
|
+
Kbd: ComponentType3<PragmaKbdProps>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Host-rendered UI primitives. These are runtime delegates onto the host bridge,
|
|
16
|
+
* so plugin bundles never include the host component implementations.
|
|
17
|
+
*/
|
|
18
|
+
declare const ui: PragmaUiBridge;
|
|
19
|
+
declare const Button2: React.ComponentType<PragmaButtonProps>;
|
|
20
|
+
declare const Kbd2: React.ComponentType<PragmaKbdProps>;
|
|
21
|
+
export { ui as default, Kbd2 as Kbd, Button2 as Button };
|