Initial commit: Paperclip plugin for Legal AI integration
16 agent tools, event handler for auto-linking, sync job every 15m. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
node_modules/@paperclipai/plugin-sdk/dist/ui/runtime.js
generated
vendored
Normal file
30
node_modules/@paperclipai/plugin-sdk/dist/ui/runtime.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
function getBridgeRegistry() {
|
||||
return globalThis.__paperclipPluginBridge__;
|
||||
}
|
||||
function missingBridgeValueError(name) {
|
||||
return new Error(`Paperclip plugin UI runtime is not initialized for "${name}". ` +
|
||||
'Ensure the host loaded the plugin bridge before rendering this UI module.');
|
||||
}
|
||||
export function getSdkUiRuntimeValue(name) {
|
||||
const value = getBridgeRegistry()?.sdkUi?.[name];
|
||||
if (value === undefined) {
|
||||
throw missingBridgeValueError(name);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
export function renderSdkUiComponent(name, props) {
|
||||
const registry = getBridgeRegistry();
|
||||
const component = registry?.sdkUi?.[name];
|
||||
if (component === undefined) {
|
||||
throw missingBridgeValueError(name);
|
||||
}
|
||||
const createElement = registry?.react?.createElement;
|
||||
if (typeof createElement === "function") {
|
||||
return createElement(component, props);
|
||||
}
|
||||
if (typeof component === "function") {
|
||||
return component(props);
|
||||
}
|
||||
throw new Error(`Paperclip plugin UI component "${name}" is not callable`);
|
||||
}
|
||||
//# sourceMappingURL=runtime.js.map
|
||||
Reference in New Issue
Block a user