@pillar-ai/react 0.1.6 → 0.1.7
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 +22 -3
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,15 +35,34 @@ The root provider that initializes the SDK and provides context to child compone
|
|
|
35
35
|
helpCenter="your-help-center"
|
|
36
36
|
publicKey="pk_live_xxx"
|
|
37
37
|
config={{
|
|
38
|
-
panel: { position: 'right' },
|
|
39
|
-
|
|
40
|
-
theme: { mode: '
|
|
38
|
+
panel: { position: 'right', mode: 'push' },
|
|
39
|
+
edgeTrigger: { enabled: true },
|
|
40
|
+
theme: { mode: 'auto' },
|
|
41
41
|
}}
|
|
42
42
|
>
|
|
43
43
|
{children}
|
|
44
44
|
</PillarProvider>
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
### Custom Trigger Button
|
|
48
|
+
|
|
49
|
+
To use your own button instead of the built-in edge trigger:
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<PillarProvider
|
|
53
|
+
helpCenter="your-help-center"
|
|
54
|
+
publicKey="pk_live_xxx"
|
|
55
|
+
config={{ edgeTrigger: { enabled: false } }}
|
|
56
|
+
>
|
|
57
|
+
<MyApp />
|
|
58
|
+
</PillarProvider>
|
|
59
|
+
|
|
60
|
+
function HelpButton() {
|
|
61
|
+
const { toggle } = useHelpPanel();
|
|
62
|
+
return <button onClick={toggle}>Get Help</button>;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
47
66
|
### Tooltip
|
|
48
67
|
|
|
49
68
|
Attach contextual tooltips to any element:
|
package/dist/index.d.ts
CHANGED
|
@@ -46,4 +46,4 @@ export { PillarProvider, usePillarContext, type PillarContextValue, type PillarP
|
|
|
46
46
|
export { PillarPanel, type PillarPanelProps } from './PillarPanel';
|
|
47
47
|
export { useHelpPanel, type UseHelpPanelResult } from './hooks/useHelpPanel';
|
|
48
48
|
export { usePillar, type UsePillarResult, type TypedUsePillarResult } from './hooks/usePillar';
|
|
49
|
-
export type {
|
|
49
|
+
export type { EdgeTriggerConfig, PanelConfig, PillarConfig, PillarEvents, PillarState, ResolvedConfig, ResolvedThemeConfig, TaskExecutePayload, TextSelectionConfig, ThemeColors, ThemeConfig, ThemeMode, CardCallbacks, CardRenderer, SidebarTabConfig, ActionDefinitions, SyncActionDefinitions, ActionDataType, ActionNames, } from '@pillar-ai/sdk';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pillar-ai/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "React bindings for Pillar Embedded Help SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.esm.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react-dom": ">=17.0.0 || >=19.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@pillar-ai/sdk": "^0.1.
|
|
55
|
+
"@pillar-ai/sdk": "^0.1.7"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@rollup/plugin-commonjs": "^25.0.7",
|