@sybilion/uilib 1.4.41 → 1.4.43
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 +4 -1
- package/dist/esm/src/chat.js +18 -0
- package/dist/esm/src/index.js +0 -21
- package/dist/esm/types/src/chat.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Input/Input.d.ts +1 -1
- package/dist/esm/types/src/index.d.ts +0 -7
- package/dist/esm/types/src/signin.d.ts +3 -0
- package/package.json +21 -1
- package/src/chat.ts +5 -0
- package/src/components/ui/Select/Select.styl.d.ts +28 -28
- package/src/components/ui/SupplyChainMap/SupplyChainMap.styl.d.ts +19 -19
- package/src/index.ts +1 -7
- package/src/signin.ts +3 -0
- package/dist/esm/src/components/widgets/SignInPage/SignInPage.js +0 -25
- package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.js +0 -18
- package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +0 -7
- package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.js +0 -11
- package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl.js +0 -7
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ The package `[exports](./package.json)` entry `.` resolves to Rollup output and
|
|
|
53
53
|
|
|
54
54
|
```ts
|
|
55
55
|
import { Button } from '@sybilion/uilib';
|
|
56
|
+
import { ChatProvider, ChatSheet } from '@sybilion/uilib/chat';
|
|
57
|
+
import { SignInPage, SybilionSignInPanel } from '@sybilion/uilib/signin';
|
|
56
58
|
|
|
57
59
|
// or, with alias: import { Button } from 'uilib';
|
|
58
60
|
```
|
|
@@ -116,7 +118,8 @@ runs `yarn build` before `npm publish`. `dist/` is build output only (not commit
|
|
|
116
118
|
|
|
117
119
|
These areas expect the **app** to supply behavior or data (not vendored from product code):
|
|
118
120
|
|
|
119
|
-
- **Chat** — `ChatContext` exports types and hooks only. Implement `ChatContext.Provider` with `ChatContextType` in the app. Use `renderMessageChart` (or equivalent props) where charts appear inside messages.
|
|
121
|
+
- **Chat** — import from `@sybilion/uilib/chat` (`Chat`, `ChatSheet`, `ChatProvider`, slash-mention, chat-api types). Not on the main barrel. `ChatContext` exports types and hooks only. Implement `ChatContext.Provider` with `ChatContextType` in the app. Use `renderMessageChart` (or equivalent props) where charts appear inside messages.
|
|
122
|
+
- **Sign-in / SPA chrome** — import from `@sybilion/uilib/signin` (`SybilionSignInPanel`, `SignInPage`, `SybilionAppHeader`). These use `react-router-dom` and are not on the main barrel (webpack evaluates every barrel re-export before tree-shake). Page layout pieces that still use the router (`PageScroll`, `PageFooter`, `Breadcrumbs`) remain on the main index for now.
|
|
120
123
|
- **ChartAreaInteractive** — pass legend/overlay controls such as `toggleLegendSeries`, `ensureAnalysisSeriesVisible`, `hiddenSeries`, and `overlayForecastData` (use an empty object only if quantiles are entirely prop-driven).
|
|
121
124
|
- **PageFooter** — `versionLink` (empty string hides the version badge), `versionLabel`, and optional `children` between the logo block and copyright (debug UI, forms, etc. stay in the app).
|
|
122
125
|
- **Breadcrumbs** / **PageHeader** — `clientLogo`, `companyName`, and breadcrumb item data.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { ChatContext, ChatProvider, isChatEmpty, outboundPendingKey, useChat, useChatOutboundPending, useChats, useChatsForDataset, useChatsForScopeId, useCurrentChat, useIsChatLoading, useSyncChatPanelBusy } from './contexts/chat-context.js';
|
|
2
|
+
export { DEFAULT_CHAT_SLASH_ITEMS, filterSlashItems } from './tiptap/slash-mention/defaultChatSlashItems.js';
|
|
3
|
+
export { createSlashMentionExtension, slashMentionSuggestionRender } from './tiptap/slash-mention/createSlashMentionExtension.js';
|
|
4
|
+
export { Chat } from './components/ui/Chat/Chat.js';
|
|
5
|
+
export { formatChatTranscript, usedPresetIdsFromMessages } from './components/ui/Chat/chat-preset-utils.js';
|
|
6
|
+
export { ChatChrome } from './components/ui/Chat/ChatChrome/ChatChrome.js';
|
|
7
|
+
export { TEXT_ATTACHMENT_ACCEPT_PARTS, filterToTextAttachments } from './components/ui/Chat/chatAttachmentAccept.js';
|
|
8
|
+
export { buildChatSendMessagePayload, displayTextFromSendPayload, normalizeUserTextFileAttachments } from './components/ui/Chat/buildChatSendMessagePayload.js';
|
|
9
|
+
export { sanitizeAttachmentFilename } from './components/ui/Chat/sanitizeAttachmentFilename.js';
|
|
10
|
+
export { ChatSelector } from './components/ui/Chat/ChatSheet/ChatSelector.js';
|
|
11
|
+
export { ChatSheet } from './components/ui/Chat/ChatSheet/ChatSheet.js';
|
|
12
|
+
export { useChatPanelChromeModel } from './components/ui/Chat/ChatSheet/useChatPanelChromeModel.js';
|
|
13
|
+
export { ChatMessage } from './components/ui/Chat/ChatMessage/ChatMessage.js';
|
|
14
|
+
export { ChatPrompt } from './components/ui/Chat/ChatPrompt/ChatPrompt.js';
|
|
15
|
+
export { CHAT_PROMPT_COMMAND_CHIP_CLASS, chatPromptChipHtml, createChatPromptComposerHandle, getChatPromptTokenRangeBeforePos, insertChatPromptContentAtCaret } from './components/ui/Chat/ChatPrompt/chatPromptComposerInsert.js';
|
|
16
|
+
export { ChatPresets } from './components/ui/Chat/ChatPresets/ChatPresets.js';
|
|
17
|
+
export { MessageRole } from './components/ui/Chat/Chat.types.js';
|
|
18
|
+
export { CsvIcon } from './components/icons/CsvIcon/CsvIcon.js';
|
package/dist/esm/src/index.js
CHANGED
|
@@ -6,9 +6,6 @@ export { DEFAULT_THEME_ACTIVE_COLOR } from './docs/lib/theme.js';
|
|
|
6
6
|
export { SybilionAuthProvider, createSybilionApiFetch, getSybilionApiOriginFromSdk, sybilionApiFetch, useSybilionApiFetch, useSybilionAuth } from './sybilion-auth/SybilionAuthProvider.js';
|
|
7
7
|
export { SYBILION_AUTH_LOGIN_PATH, normalizeApiBaseUrl } from './sybilion-auth/authPaths.js';
|
|
8
8
|
export { exchangeAuth0AccessTokenForSybilionJwt } from './sybilion-auth/exchangeSybilionToken.js';
|
|
9
|
-
export { ChatContext, ChatProvider, isChatEmpty, outboundPendingKey, useChat, useChatOutboundPending, useChats, useChatsForDataset, useChatsForScopeId, useCurrentChat, useIsChatLoading, useSyncChatPanelBusy } from './contexts/chat-context.js';
|
|
10
|
-
export { DEFAULT_CHAT_SLASH_ITEMS, filterSlashItems } from './tiptap/slash-mention/defaultChatSlashItems.js';
|
|
11
|
-
export { createSlashMentionExtension, slashMentionSuggestionRender } from './tiptap/slash-mention/createSlashMentionExtension.js';
|
|
12
9
|
export { AnalysesSelector } from './components/ui/AnalysesSelector/AnalysesSelector.js';
|
|
13
10
|
export { AnalysisLineIcon } from './components/ui/AnalysisLineIcon/AnalysisLineIcon.js';
|
|
14
11
|
export { AppHeaderHost, AppHeaderPortal } from './components/ui/AppHeader/AppHeader.js';
|
|
@@ -30,21 +27,6 @@ export { DRAG_TIME_RANGE_PREFIX, encodeDragTimeRange, filterDataForTimeRange, fi
|
|
|
30
27
|
export { ChartLines, FORECAST_COLORS_MAP, FORECAST_LINE_COLORS, getForecastColor, getForecastQuantileBandColor, resolveQuantileBandFillForForecastLine } from './components/ui/ChartAreaInteractive/ChartLines.js';
|
|
31
28
|
export { DonutChart } from './components/ui/DonutChart/DonutChart.js';
|
|
32
29
|
export { BarChart } from './components/ui/BarChart/BarChart.js';
|
|
33
|
-
export { Chat } from './components/ui/Chat/Chat.js';
|
|
34
|
-
export { formatChatTranscript, usedPresetIdsFromMessages } from './components/ui/Chat/chat-preset-utils.js';
|
|
35
|
-
export { ChatChrome } from './components/ui/Chat/ChatChrome/ChatChrome.js';
|
|
36
|
-
export { TEXT_ATTACHMENT_ACCEPT_PARTS, filterToTextAttachments } from './components/ui/Chat/chatAttachmentAccept.js';
|
|
37
|
-
export { buildChatSendMessagePayload, displayTextFromSendPayload, normalizeUserTextFileAttachments } from './components/ui/Chat/buildChatSendMessagePayload.js';
|
|
38
|
-
export { sanitizeAttachmentFilename } from './components/ui/Chat/sanitizeAttachmentFilename.js';
|
|
39
|
-
export { ChatSelector } from './components/ui/Chat/ChatSheet/ChatSelector.js';
|
|
40
|
-
export { ChatSheet } from './components/ui/Chat/ChatSheet/ChatSheet.js';
|
|
41
|
-
export { useChatPanelChromeModel } from './components/ui/Chat/ChatSheet/useChatPanelChromeModel.js';
|
|
42
|
-
export { ChatMessage } from './components/ui/Chat/ChatMessage/ChatMessage.js';
|
|
43
|
-
export { ChatPrompt } from './components/ui/Chat/ChatPrompt/ChatPrompt.js';
|
|
44
|
-
export { CHAT_PROMPT_COMMAND_CHIP_CLASS, chatPromptChipHtml, createChatPromptComposerHandle, getChatPromptTokenRangeBeforePos, insertChatPromptContentAtCaret } from './components/ui/Chat/ChatPrompt/chatPromptComposerInsert.js';
|
|
45
|
-
export { ChatPresets } from './components/ui/Chat/ChatPresets/ChatPresets.js';
|
|
46
|
-
export { MessageRole } from './components/ui/Chat/Chat.types.js';
|
|
47
|
-
export { CsvIcon } from './components/icons/CsvIcon/CsvIcon.js';
|
|
48
30
|
export { Checkbox } from './components/ui/Checkbox/Checkbox.js';
|
|
49
31
|
export { Confirm } from './components/ui/Confirm/Confirm.js';
|
|
50
32
|
export { Calendar } from './components/ui/DatePicker/Calendar.js';
|
|
@@ -157,11 +139,8 @@ export { PerformanceChart } from './components/widgets/PerformanceChart/Performa
|
|
|
157
139
|
export { PerformanceTable } from './components/widgets/PerformanceChart/PerformanceTable.js';
|
|
158
140
|
export { SPAGHETTI_DRIFT_PER_HORIZON_ID_BASE, SPAGHETTI_MODEL_PER_HORIZON_ID_BASE, averageForecastErrorsVsHistoricalForMatrixColumn, buildDriftSpaghettiMatrixForCustomDialog, buildPerHorizonSpaghettiEntries, buildSpaghettiMergedChartData, calculateYRangeFromChartData, extendCustomPerformanceDriftSeedToHistoricalEnd, extendCustomPerformanceMatrixWithDriftSeed, getForecastModelDisplayName, latestHistoricalMonthKey, spaghettiGridFromHistoricalPreviousMonth } from './components/widgets/PerformanceChart/performanceChart.helpers.js';
|
|
159
141
|
export { SPAGHETTI_LOCAL_LS_USER_SERIES_ROW_ID, SPAGHETTI_TIME_SERIES_MATRIX_V, tryParseSpaghettiPerformanceMatrix } from './components/widgets/PerformanceChart/performanceChartUserSeries.js';
|
|
160
|
-
export { SybilionAppHeader } from './components/widgets/SybilionAppHeader/SybilionAppHeader.js';
|
|
161
142
|
export { SybilionAuthLayout } from './components/widgets/SybilionAuthLayout/SybilionAuthLayout.js';
|
|
162
143
|
export { SybilionAuthHeadline } from './components/widgets/SybilionAuthLayout/SybilionAuthHeadline.js';
|
|
163
|
-
export { SybilionSignInPanel } from './components/widgets/SybilionSignInPanel/SybilionSignInPanel.js';
|
|
164
|
-
export { SignInPage } from './components/widgets/SignInPage/SignInPage.js';
|
|
165
144
|
export { ChartTooltipItem } from './components/ui/Chart/components/ChartTooltipItem.js';
|
|
166
145
|
export { ChartLegendItem } from './components/ui/Chart/components/ChartLegendItem.js';
|
|
167
146
|
export { CustomChartLegend } from './components/ui/Chart/components/CustomChartLegend/CustomChartLegend.js';
|
|
@@ -3,7 +3,7 @@ declare const Input: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHT
|
|
|
3
3
|
type?: React.ComponentProps<"input">["type"];
|
|
4
4
|
size?: "sm" | "md" | "lg";
|
|
5
5
|
variant?: "default" | "clean";
|
|
6
|
-
}, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "
|
|
6
|
+
}, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "size" | "type"> & {
|
|
7
7
|
type: "textarea";
|
|
8
8
|
size?: "sm" | "md" | "lg";
|
|
9
9
|
variant?: "default" | "clean";
|
|
@@ -5,9 +5,6 @@ export * from './contexts/theme-context';
|
|
|
5
5
|
export { DEFAULT_THEME_ACTIVE_COLOR } from './docs/lib/theme';
|
|
6
6
|
export * from './sybilion-auth';
|
|
7
7
|
export * from './types/sybilionDatasetSnapshots';
|
|
8
|
-
export * from './contexts/chat-context';
|
|
9
|
-
export * from './tiptap/slash-mention';
|
|
10
|
-
export * from './types/chat-api.types';
|
|
11
8
|
export * from './components/ui/AnalysesSelector';
|
|
12
9
|
export * from './components/ui/AnalysisLineIcon';
|
|
13
10
|
export * from './components/ui/AppHeader';
|
|
@@ -25,7 +22,6 @@ export * from './components/ui/Chart';
|
|
|
25
22
|
export * from './components/ui/ChartAreaInteractive';
|
|
26
23
|
export * from './components/ui/DonutChart';
|
|
27
24
|
export * from './components/ui/BarChart';
|
|
28
|
-
export * from './components/ui/Chat';
|
|
29
25
|
export * from './components/ui/Checkbox';
|
|
30
26
|
export * from './components/ui/Confirm';
|
|
31
27
|
export * from './components/ui/DatePicker';
|
|
@@ -84,7 +80,4 @@ export * from './components/widgets/DriverCard';
|
|
|
84
80
|
export * from './components/widgets/DriverMap';
|
|
85
81
|
export * from './components/widgets/DriversComparisonChart';
|
|
86
82
|
export * from './components/widgets/PerformanceChart';
|
|
87
|
-
export * from './components/widgets/SybilionAppHeader';
|
|
88
83
|
export * from './components/widgets/SybilionAuthLayout';
|
|
89
|
-
export * from './components/widgets/SybilionSignInPanel';
|
|
90
|
-
export * from './components/widgets/SignInPage';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sybilion/uilib",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.43",
|
|
4
4
|
"description": "Sybilion Design System — React UI components (Webpack + Stylus)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -24,11 +24,31 @@
|
|
|
24
24
|
"import": "./dist/esm/src/index.js",
|
|
25
25
|
"default": "./dist/esm/src/index.js"
|
|
26
26
|
},
|
|
27
|
+
"./chat": {
|
|
28
|
+
"types": "./dist/esm/types/src/chat.d.ts",
|
|
29
|
+
"import": "./dist/esm/src/chat.js",
|
|
30
|
+
"default": "./dist/esm/src/chat.js"
|
|
31
|
+
},
|
|
32
|
+
"./signin": {
|
|
33
|
+
"types": "./dist/esm/types/src/signin.d.ts",
|
|
34
|
+
"import": "./dist/esm/src/signin.js",
|
|
35
|
+
"default": "./dist/esm/src/signin.js"
|
|
36
|
+
},
|
|
27
37
|
"./src": {
|
|
28
38
|
"types": "./src/index.ts",
|
|
29
39
|
"import": "./src/index.ts",
|
|
30
40
|
"default": "./src/index.ts"
|
|
31
41
|
},
|
|
42
|
+
"./src/chat": {
|
|
43
|
+
"types": "./src/chat.ts",
|
|
44
|
+
"import": "./src/chat.ts",
|
|
45
|
+
"default": "./src/chat.ts"
|
|
46
|
+
},
|
|
47
|
+
"./src/signin": {
|
|
48
|
+
"types": "./src/signin.ts",
|
|
49
|
+
"import": "./src/signin.ts",
|
|
50
|
+
"default": "./src/signin.ts"
|
|
51
|
+
},
|
|
32
52
|
"./hooks": {
|
|
33
53
|
"types": "./dist/esm/types/src/hooks/index.d.ts",
|
|
34
54
|
"import": "./dist/esm/src/hooks/index.js",
|
package/src/chat.ts
ADDED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
// This file is automatically generated.
|
|
2
2
|
// Please do not change this file!
|
|
3
3
|
interface CssExports {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
clear: string;
|
|
5
|
+
darker: string;
|
|
6
|
+
fadeIn: string;
|
|
7
|
+
fadeOut: string;
|
|
8
|
+
searchable: string;
|
|
9
|
+
selectContent: string;
|
|
10
|
+
selectContentPopper: string;
|
|
11
|
+
selectEmpty: string;
|
|
12
|
+
selectIcon: string;
|
|
13
|
+
selectItem: string;
|
|
14
|
+
selectItemIndicator: string;
|
|
15
|
+
selectItemIndicatorContainer: string;
|
|
16
|
+
selectItemText: string;
|
|
17
|
+
selectLabel: string;
|
|
18
|
+
selectScrollButton: string;
|
|
19
|
+
selectScrollIcon: string;
|
|
20
|
+
selectSeparator: string;
|
|
21
|
+
selectTrigger: string;
|
|
22
|
+
selectTriggerInput: string;
|
|
23
|
+
selectViewport: string;
|
|
24
|
+
selectViewportPopper: string;
|
|
25
|
+
selected: string;
|
|
26
|
+
slideInFromBottom: string;
|
|
27
|
+
slideInFromLeft: string;
|
|
28
|
+
slideInFromRight: string;
|
|
29
|
+
slideInFromTop: string;
|
|
30
|
+
zoomIn: string;
|
|
31
|
+
zoomOut: string;
|
|
32
32
|
}
|
|
33
33
|
export const cssExports: CssExports;
|
|
34
34
|
export default cssExports;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// This file is automatically generated.
|
|
2
2
|
// Please do not change this file!
|
|
3
3
|
interface CssExports {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
action: string;
|
|
5
|
+
baseCanvas: string;
|
|
6
|
+
canvas: string;
|
|
7
|
+
cluster: string;
|
|
8
|
+
dimmed: string;
|
|
9
|
+
disclosure: string;
|
|
10
|
+
empty: string;
|
|
11
|
+
fill: string;
|
|
12
|
+
hint: string;
|
|
13
|
+
inspection: string;
|
|
14
|
+
kicker: string;
|
|
15
|
+
label: string;
|
|
16
|
+
marker: string;
|
|
17
|
+
node: string;
|
|
18
|
+
overlay: string;
|
|
19
|
+
primary: string;
|
|
20
|
+
root: string;
|
|
21
|
+
selected: string;
|
|
22
|
+
zoom: string;
|
|
23
23
|
}
|
|
24
24
|
export const cssExports: CssExports;
|
|
25
25
|
export default cssExports;
|
package/src/index.ts
CHANGED
|
@@ -10,9 +10,6 @@ export * from './contexts/theme-context';
|
|
|
10
10
|
export { DEFAULT_THEME_ACTIVE_COLOR } from './docs/lib/theme';
|
|
11
11
|
export * from './sybilion-auth';
|
|
12
12
|
export * from './types/sybilionDatasetSnapshots';
|
|
13
|
-
export * from './contexts/chat-context';
|
|
14
|
-
export * from './tiptap/slash-mention';
|
|
15
|
-
export * from './types/chat-api.types';
|
|
16
13
|
export * from './components/ui/AnalysesSelector';
|
|
17
14
|
export * from './components/ui/AnalysisLineIcon';
|
|
18
15
|
export * from './components/ui/AppHeader';
|
|
@@ -30,7 +27,6 @@ export * from './components/ui/Chart';
|
|
|
30
27
|
export * from './components/ui/ChartAreaInteractive';
|
|
31
28
|
export * from './components/ui/DonutChart';
|
|
32
29
|
export * from './components/ui/BarChart';
|
|
33
|
-
export * from './components/ui/Chat';
|
|
34
30
|
export * from './components/ui/Checkbox';
|
|
35
31
|
export * from './components/ui/Confirm';
|
|
36
32
|
export * from './components/ui/DatePicker';
|
|
@@ -89,7 +85,5 @@ export * from './components/widgets/DriverCard';
|
|
|
89
85
|
export * from './components/widgets/DriverMap';
|
|
90
86
|
export * from './components/widgets/DriversComparisonChart';
|
|
91
87
|
export * from './components/widgets/PerformanceChart';
|
|
92
|
-
export * from './components/widgets/SybilionAppHeader';
|
|
93
88
|
export * from './components/widgets/SybilionAuthLayout';
|
|
94
|
-
|
|
95
|
-
export * from './components/widgets/SignInPage';
|
|
89
|
+
// SPA/router widgets (react-router-dom): `@sybilion/uilib/signin`
|
package/src/signin.ts
ADDED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { SybilionAuthLayout } from '../SybilionAuthLayout/SybilionAuthLayout.js';
|
|
3
|
-
import '../SybilionAuthLayout/SybilionAuthHeadline.styl.js';
|
|
4
|
-
import { useSybilionAuth } from '../../../sybilion-auth/SybilionAuthProvider.js';
|
|
5
|
-
import { SybilionSignInPanel } from '../SybilionSignInPanel/SybilionSignInPanel.js';
|
|
6
|
-
|
|
7
|
-
const DEFAULT_TITLE = 'Sign In';
|
|
8
|
-
const DEFAULT_SUBTITLE = 'To get access authenticate through google or your email.';
|
|
9
|
-
function SignInPage({ title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, forgotPasswordTo = '/forgot-password', releasesTo = '/releases', versionLabel, primaryButtonLabel, connectingLabel, loginRedirectOptions, logoSize, containerClassName, }) {
|
|
10
|
-
const { error, loginWithRedirect, isLoading, isAuthenticated } = useSybilionAuth();
|
|
11
|
-
const handleSignIn = () => loginWithRedirect({
|
|
12
|
-
...loginRedirectOptions,
|
|
13
|
-
authorizationParams: {
|
|
14
|
-
prompt: 'login',
|
|
15
|
-
screen_hint: 'login',
|
|
16
|
-
...(typeof window !== 'undefined'
|
|
17
|
-
? { origin: window.location.origin }
|
|
18
|
-
: {}),
|
|
19
|
-
...loginRedirectOptions?.authorizationParams,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
return (jsx(SybilionAuthLayout, { title: title, subtitle: subtitle, logoSize: logoSize, containerClassName: containerClassName, children: jsx(SybilionSignInPanel, { onSignIn: handleSignIn, isSigningIn: isLoading && !isAuthenticated, error: error, forgotPasswordTo: forgotPasswordTo, releasesTo: releasesTo, versionLabel: versionLabel, primaryButtonLabel: primaryButtonLabel, connectingLabel: connectingLabel }) }));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { SignInPage };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import cn from 'classnames';
|
|
3
|
-
import { Link } from 'react-router-dom';
|
|
4
|
-
import { AppHeaderPortal } from '../../ui/AppHeader/AppHeader.js';
|
|
5
|
-
import { PAGE_HEADER_ACTIONS_ID } from '../../ui/AppHeader/appChromeAnchors.js';
|
|
6
|
-
import { Gap } from '../../ui/Gap/Gap.js';
|
|
7
|
-
import { Logo } from '../../ui/Logo/Logo.js';
|
|
8
|
-
import { NavUserHeader } from '../../ui/NavUserHeader/NavUserHeader.js';
|
|
9
|
-
import { WorkspaceAppSwitcher } from '../../ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.js';
|
|
10
|
-
import '@phosphor-icons/react';
|
|
11
|
-
import 'lucide-react';
|
|
12
|
-
import S from './SybilionAppHeader.styl.js';
|
|
13
|
-
|
|
14
|
-
function SybilionAppHeader({ pageHeaderId, actionsAnchorId = PAGE_HEADER_ACTIONS_ID, actionsAnchorClassName, actionsStart, actionsEnd, pathname, onNavigate, authenticated, defaultApps, appsStorageKey, logo, logoAreaClassName, ...navUserHeaderProps }) {
|
|
15
|
-
return (jsxs(AppHeaderPortal, { pageHeaderId: pageHeaderId, children: [jsx("div", { className: cn(S.logoArea, logoAreaClassName), children: jsx(Link, { to: "/", className: S.logoLink, children: logo ?? jsx(Logo, { size: "md", "aria-hidden": true }) }) }), jsx(WorkspaceAppSwitcher, { pathname: pathname, onNavigate: onNavigate, authenticated: authenticated, defaultApps: defaultApps, appsStorageKey: appsStorageKey }), jsx(Gap, {}), jsxs("div", { className: cn(S.actionsAnchor, actionsAnchorClassName), children: [jsx("div", { id: actionsAnchorId, className: S.pageActionsPortal }), actionsStart, jsx(NavUserHeader, { ...navUserHeaderProps }), actionsEnd] })] }));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { SybilionAppHeader };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import styleInject from 'style-inject';
|
|
2
|
-
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SybilionAppHeader_actionsAnchor__ress2{align-items:center;display:flex;flex-shrink:0;gap:var(--p-2)}.SybilionAppHeader_pageActionsPortal__9C5ww{align-items:center;display:flex;flex-shrink:0;gap:var(--p-1)}.SybilionAppHeader_pageActionsPortal__9C5ww:empty{display:none}.SybilionAppHeader_logoArea__3HAhG{align-items:center;display:flex;gap:var(--p-2);left:28px;position:absolute;top:22px;z-index:10}@media (max-width:768px){.SybilionAppHeader_logoArea__3HAhG{left:16px}}@media (min-width:768px){[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) header[data-sticky=false] .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:52px;position:fixed;top:22px;top:calc(22px + var(--app-banner-height, 0px))}[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) header[data-sticky=true] .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:calc(var(--sidebar-width)*-1 + 40px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=expanded] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:calc(var(--sidebar-width)*-1 + 44px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=collapsed] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:var(--p-8);position:absolute}}.SybilionAppHeader_logoLink__bH-KX{align-items:center;color:var(--foreground);display:flex;font-size:1.5rem;font-weight:400;gap:.5rem;text-decoration:none;white-space:nowrap;width:-moz-fit-content;width:fit-content}.SybilionAppHeader_logoLink__bH-KX svg{display:inline-flex;flex-shrink:0;height:32px;transition:transform .1s ease-in-out;width:auto}.SybilionAppHeader_logoLink__bH-KX:hover svg{transform:scale(1.05)}";
|
|
4
|
-
var S = {"actionsAnchor":"SybilionAppHeader_actionsAnchor__ress2","pageActionsPortal":"SybilionAppHeader_pageActionsPortal__9C5ww","logoArea":"SybilionAppHeader_logoArea__3HAhG","logoLink":"SybilionAppHeader_logoLink__bH-KX"};
|
|
5
|
-
styleInject(css_248z);
|
|
6
|
-
|
|
7
|
-
export { S as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
import { Button } from '../../ui/Button/Button.js';
|
|
4
|
-
import S from './SybilionSignInPanel.styl.js';
|
|
5
|
-
|
|
6
|
-
function SybilionSignInPanel({ onSignIn, isSigningIn = false, error, forgotPasswordTo, releasesTo, versionLabel, primaryButtonLabel = 'Sign-in', connectingLabel = 'Connecting...', }) {
|
|
7
|
-
const signingIn = Boolean(isSigningIn);
|
|
8
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: S.socialButtonContainer, children: jsx(Button, { variant: "outline", type: "button", className: S.socialButton, onClick: () => void onSignIn(), disabled: signingIn, children: signingIn ? connectingLabel : primaryButtonLabel }) }), error ? jsx("div", { className: S.errorMessage, children: error }) : null, jsx("div", { className: S.forgotPassword, children: jsx(Link, { to: forgotPasswordTo, className: S.forgotPasswordLink, children: "Forgot password?" }) }), releasesTo && versionLabel ? (jsxs(Link, { className: S.version, to: releasesTo, children: ["v", versionLabel] })) : null] }));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { SybilionSignInPanel };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import styleInject from 'style-inject';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".SybilionSignInPanel_socialButtonContainer__lKNpp{display:flex;gap:10px;margin-bottom:10px;width:100%}.SybilionSignInPanel_socialButton__TqlKb{border:1px solid var(--border);border-radius:14px;flex:1;font-size:14px;font-weight:600;height:48px;padding:14px 16px}.SybilionSignInPanel_errorMessage__o8Q-m{color:red;font-size:14px;margin-bottom:10px;padding:10px}.SybilionSignInPanel_forgotPassword__47q20{margin-bottom:24px;text-align:right}.SybilionSignInPanel_forgotPasswordLink__lOJCv{color:var(--primary);font-family:Manrope,sans-serif;font-size:14px;font-weight:500;text-decoration:none;transition:opacity .2s}.SybilionSignInPanel_forgotPasswordLink__lOJCv:hover{opacity:.8}.SybilionSignInPanel_version__d5KAz{bottom:0;box-sizing:border-box;color:var(--muted-foreground);display:block;font-size:14px;margin-top:var(--p-8);opacity:.5;padding-bottom:var(--p-2);position:absolute;right:0;text-align:center;transition:opacity .3s ease-out;white-space:nowrap;width:100%}";
|
|
4
|
-
var S = {"socialButtonContainer":"SybilionSignInPanel_socialButtonContainer__lKNpp","socialButton":"SybilionSignInPanel_socialButton__TqlKb","errorMessage":"SybilionSignInPanel_errorMessage__o8Q-m","forgotPassword":"SybilionSignInPanel_forgotPassword__47q20","forgotPasswordLink":"SybilionSignInPanel_forgotPasswordLink__lOJCv","version":"SybilionSignInPanel_version__d5KAz"};
|
|
5
|
-
styleInject(css_248z);
|
|
6
|
-
|
|
7
|
-
export { S as default };
|