@sampleapp.ai/sdk 1.0.42 → 1.0.44
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/dist/components/sandbox/Sandbox.js +96 -29
- package/dist/components/sandbox/api.js +73 -1
- package/dist/components/sandbox/guardian/code-focus-section.js +4 -2
- package/dist/components/sandbox/guardian/context/theme-context.js +47 -0
- package/dist/components/sandbox/guardian/demo/guardian-demo.js +4 -4
- package/dist/components/sandbox/guardian/demo/left-view.js +13 -7
- package/dist/components/sandbox/guardian/guardian-component.js +39 -8
- package/dist/components/sandbox/guardian/guardian-playground.js +14 -15
- package/dist/components/sandbox/guardian/guardian-style-wrapper.js +8 -6
- package/dist/components/sandbox/guardian/header.js +37 -41
- package/dist/components/sandbox/guardian/hooks/use-frame-messages.js +24 -8
- package/dist/components/sandbox/guardian/hooks/use-frame-params.js +94 -36
- package/dist/components/sandbox/guardian/hooks/use-sandbox-url-loader.js +16 -4
- package/dist/components/sandbox/guardian/index.js +2 -0
- package/dist/components/sandbox/guardian/right-view/pill-file-selector.js +70 -20
- package/dist/components/sandbox/guardian/right-view/preview-control-bar.js +5 -2
- package/dist/components/sandbox/guardian/right-view/right-top-down-view/network-requests-view.js +117 -0
- package/dist/components/sandbox/guardian/right-view/right-top-down-view.js +38 -140
- package/dist/components/sandbox/guardian/right-view/right-view.js +3 -3
- package/dist/components/sandbox/guardian/right-view/simplified-editor.js +9 -2
- package/dist/components/sandbox/guardian/ui/markdown/code-group/code-block.js +7 -33
- package/dist/components/sandbox/guardian/ui/markdown.js +23 -14
- package/dist/components/sandbox/guardian/utils.js +4 -16
- package/dist/components/sandbox/sandbox-home/SandboxCard.js +7 -5
- package/dist/components/sandbox/sandbox-home/SandboxHome.js +32 -13
- package/dist/components/sandbox/sandbox-home/SearchBar.js +5 -3
- package/dist/hooks/use-tree-selector.js +98 -0
- package/dist/index.d.ts +631 -21
- package/dist/index.es.js +22806 -22028
- package/dist/index.js +13 -4
- package/dist/index.standalone.umd.js +8 -8
- package/dist/lib/api-client.js +68 -0
- package/dist/lib/content-matcher.js +99 -0
- package/dist/lib/generated-css.js +1 -1
- package/dist/lib/shadow-dom-wrapper.js +31 -10
- package/dist/lib/tree-utils.js +193 -0
- package/dist/lib/types/tree-config.js +36 -0
- package/dist/sdk.css +1 -1
- package/dist/tailwind.css +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,8 +15,17 @@ const SandboxHome = (props) => React.createElement(ShadowDomWrapper, null, React
|
|
|
15
15
|
export { ChatButton, ModalSearchAndChat, ChatBar, TailwindExample, SandboxHome };
|
|
16
16
|
// Export Sandbox component and types
|
|
17
17
|
export { Sandbox } from "./components/sandbox";
|
|
18
|
+
// Export sandbox API functions
|
|
19
|
+
export { fetchSandboxConfig, fetchSandboxConfigWithContent, buildConfigFromContent } from "./components/sandbox/api";
|
|
20
|
+
// Export tree selector utilities and types
|
|
21
|
+
export { useTreeSelector } from "./hooks/use-tree-selector";
|
|
22
|
+
export { NODE_TYPE_LABELS, NODE_TYPES, SELECTABLE_NODE_TYPES } from "./lib/types/tree-config";
|
|
23
|
+
export { getNodeAtPath, getNodesAlongPath, pathToByType, getDefaultPath, getSelectableSections, updateSelectionPath, createSelection, isPathComplete, getNodeLabel } from "./lib/tree-utils";
|
|
24
|
+
export { findMatchingContent, hasContentForSelection, getUniqueFieldValues, filterContent } from "./lib/content-matcher";
|
|
25
|
+
// Export API client
|
|
26
|
+
export { createApiClient, extractContainerIdFromUrl } from "./lib/api-client";
|
|
18
27
|
// Export Guardian components (now nested under sandbox)
|
|
19
|
-
export { GuardianPlayground, GuardianComponent, GuardianProvider, VmProvider, buildGuardianConfig, } from "./components/sandbox/guardian";
|
|
28
|
+
export { GuardianPlayground, GuardianComponent, GuardianProvider, VmProvider, buildGuardianConfig, Header } from "./components/sandbox/guardian";
|
|
20
29
|
// Export themes
|
|
21
30
|
export { themes, getTheme, DEFAULT_THEME } from "./themes";
|
|
22
31
|
// SDK class for loadScript programmatic usage
|
|
@@ -33,7 +42,7 @@ class SampleAppSDK {
|
|
|
33
42
|
onClose: () => {
|
|
34
43
|
root.unmount();
|
|
35
44
|
modalContainer.remove();
|
|
36
|
-
}
|
|
45
|
+
}
|
|
37
46
|
});
|
|
38
47
|
root.render(component);
|
|
39
48
|
return {
|
|
@@ -46,7 +55,7 @@ class SampleAppSDK {
|
|
|
46
55
|
},
|
|
47
56
|
hide: () => {
|
|
48
57
|
modalContainer.style.display = "none";
|
|
49
|
-
}
|
|
58
|
+
}
|
|
50
59
|
};
|
|
51
60
|
};
|
|
52
61
|
this.ChatButton = (settings, container) => {
|
|
@@ -58,7 +67,7 @@ class SampleAppSDK {
|
|
|
58
67
|
unmount: () => {
|
|
59
68
|
root.unmount();
|
|
60
69
|
targetContainer.remove();
|
|
61
|
-
}
|
|
70
|
+
}
|
|
62
71
|
};
|
|
63
72
|
};
|
|
64
73
|
}
|