@sragatiping/cuboid 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/dist/components/CodeSnippet/CodeSnippet.d.ts +50 -0
- package/dist/components/CodeSnippet/CodeSnippet.stories.d.ts +17 -0
- package/dist/components/CodeSnippet/__fixtures__/device-profile-report.d.ts +422 -0
- package/dist/components/CodeSnippet/index.d.ts +2 -0
- package/dist/components/CodeSnippet/tokenizer.d.ts +49 -0
- package/dist/components/DataGrid/DataGrid.d.ts +11 -0
- package/dist/components/DataGrid/index.d.ts +2 -0
- package/dist/components/Graph/GraphCanvas.d.ts +15 -0
- package/dist/components/Graph/GraphCanvas.stories.d.ts +20 -0
- package/dist/components/Graph/GraphCard.d.ts +31 -0
- package/dist/components/Graph/GraphEdge.d.ts +27 -0
- package/dist/components/Graph/GraphHandle.d.ts +16 -0
- package/dist/components/Graph/GraphRow.d.ts +14 -0
- package/dist/components/Graph/context.d.ts +36 -0
- package/dist/components/Graph/index.d.ts +10 -0
- package/dist/components/JsonGraph/DeviceProfileReport.stories.d.ts +11 -0
- package/dist/components/JsonGraph/JsonCardTitle.d.ts +12 -0
- package/dist/components/JsonGraph/JsonFieldRow.d.ts +15 -0
- package/dist/components/JsonGraph/JsonGraph.stories.d.ts +19 -0
- package/dist/components/JsonGraph/JsonInputHandle.d.ts +30 -0
- package/dist/components/JsonGraph/JsonObjectRow.d.ts +22 -0
- package/dist/components/JsonGraph/index.d.ts +8 -0
- package/dist/components/JsonGraph/treeLayout.d.ts +114 -0
- package/dist/components/JsonViewer/JsonViewer.d.ts +15 -0
- package/dist/components/JsonViewer/index.d.ts +2 -0
- package/dist/components/core/ActionMenu/ActionMenu.d.ts +28 -0
- package/dist/components/core/ActionMenu/ActionMenu.stories.d.ts +10 -0
- package/dist/components/core/ActionMenu/ActionMenuItem.d.ts +22 -0
- package/dist/components/core/ActionMenu/ActionMenuList.d.ts +32 -0
- package/dist/components/core/ActionMenu/actionMenuCssVars.d.ts +2 -0
- package/dist/components/core/ActionMenu/actionMenuKeyboard.d.ts +4 -0
- package/dist/components/core/ActionMenu/index.d.ts +6 -0
- package/dist/components/core/Breadcrumb/BreadcrumbLink.d.ts +12 -0
- package/dist/components/core/Breadcrumb/Breadcrumbs.d.ts +13 -0
- package/dist/components/core/Breadcrumb/Breadcrumbs.stories.d.ts +6 -0
- package/dist/components/core/Breadcrumb/index.d.ts +4 -0
- package/dist/components/core/Button/Button.d.ts +22 -0
- package/dist/components/core/Button/Button.stories.d.ts +6 -0
- package/dist/components/core/Button/index.d.ts +2 -0
- package/dist/components/core/Icon/Icon.d.ts +13 -0
- package/dist/components/core/Icon/Icon.stories.d.ts +6 -0
- package/dist/components/core/Icon/index.d.ts +2 -0
- package/dist/components/core/IconButton/IconButton.d.ts +28 -0
- package/dist/components/core/IconButton/IconButton.stories.d.ts +6 -0
- package/dist/components/core/IconButton/index.d.ts +3 -0
- package/dist/components/core/Link/Link.d.ts +18 -0
- package/dist/components/core/Link/Link.stories.d.ts +6 -0
- package/dist/components/core/Link/index.d.ts +2 -0
- package/dist/components/core/Overlay/Overlay.d.ts +21 -0
- package/dist/components/core/Overlay/Overlay.stories.d.ts +10 -0
- package/dist/components/core/Overlay/index.d.ts +2 -0
- package/dist/components/core/Pill/Pill.d.ts +25 -0
- package/dist/components/core/Pill/Pill.stories.d.ts +6 -0
- package/dist/components/core/Pill/index.d.ts +3 -0
- package/dist/components/core/Popover/Popover.d.ts +39 -0
- package/dist/components/core/Popover/Popover.stories.d.ts +10 -0
- package/dist/components/core/Popover/index.d.ts +2 -0
- package/dist/components/core/ResizeHandle/ResizeHandle.d.ts +21 -0
- package/dist/components/core/ResizeHandle/index.d.ts +2 -0
- package/dist/components/core/Sheet/Sheet.d.ts +55 -0
- package/dist/components/core/Sheet/Sheet.stories.d.ts +14 -0
- package/dist/components/core/Sheet/index.d.ts +4 -0
- package/dist/components/core/Sidebar/Sidebar.d.ts +68 -0
- package/dist/components/core/Sidebar/Sidebar.stories.d.ts +11 -0
- package/dist/components/core/Sidebar/index.d.ts +2 -0
- package/dist/components/core/Sidebar/sidebarCssVars.d.ts +2 -0
- package/dist/components/core/SiteHeader/SiteHeader.d.ts +17 -0
- package/dist/components/core/SiteHeader/SiteHeader.stories.d.ts +6 -0
- package/dist/components/core/SiteHeader/index.d.ts +2 -0
- package/dist/components/core/SplitLayout/SplitLayout.d.ts +24 -0
- package/dist/components/core/SplitLayout/SplitLayout.stories.d.ts +6 -0
- package/dist/components/core/SplitLayout/index.d.ts +2 -0
- package/dist/components/core/Stack/Stack.d.ts +43 -0
- package/dist/components/core/Stack/Stack.stories.d.ts +15 -0
- package/dist/components/core/Stack/index.d.ts +3 -0
- package/dist/components/core/Text/Text.d.ts +29 -0
- package/dist/components/core/Text/Text.stories.d.ts +8 -0
- package/dist/components/core/Text/index.d.ts +2 -0
- package/dist/components/core/Tooltip/Tooltip.d.ts +17 -0
- package/dist/components/core/Tooltip/Tooltip.stories.d.ts +10 -0
- package/dist/components/core/Tooltip/index.d.ts +2 -0
- package/dist/components/core/index.d.ts +34 -0
- package/dist/icons/Icons.stories.d.ts +6 -0
- package/dist/icons/index.d.ts +13 -0
- package/dist/icons/manifest.json.d.ts +2489 -0
- package/dist/icons/material/config.d.ts +4 -0
- package/dist/icons/material/createMaterialIcon.d.ts +7 -0
- package/dist/icons/material/index.d.ts +231 -0
- package/dist/icons/material/source.d.ts +220 -0
- package/dist/index.cjs.js +10 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.es.js +8135 -0
- package/dist/index.es.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/theme/ThemeContext.d.ts +20 -0
- package/dist/theme/defaultTheme.d.ts +2 -0
- package/dist/theme/figma/buildFigmaTheme.d.ts +7 -0
- package/dist/theme/output/base.json.d.ts +208 -0
- package/dist/theme/output/theme.json.d.ts +1898 -0
- package/dist/theme/types.d.ts +610 -0
- package/dist/theme/utils.d.ts +6 -0
- package/dist/utils/flattenJson.d.ts +18 -0
- package/dist/utils/parseLengthPx.d.ts +2 -0
- package/dist/utils/responsive.d.ts +8 -0
- package/package.json +71 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CubeTheme } from '../../theme/types';
|
|
3
|
+
export interface CodeSnippetProps {
|
|
4
|
+
/** Any JSON-serialisable value */
|
|
5
|
+
data: unknown;
|
|
6
|
+
/**
|
|
7
|
+
* Start with all collapsible nodes collapsed.
|
|
8
|
+
* The user can then expand nodes individually.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
defaultCollapsed?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Replace the built-in chevron icons with your own SVG components.
|
|
14
|
+
* You are responsible for sizing and coloring them.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { ChevronRight, ChevronDown } from "lucide-react";
|
|
19
|
+
*
|
|
20
|
+
* <CodeSnippet
|
|
21
|
+
* data={data}
|
|
22
|
+
* icons={{
|
|
23
|
+
* collapsed: <ChevronRight size={16} />,
|
|
24
|
+
* expanded: <ChevronDown size={16} />,
|
|
25
|
+
* }}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
icons?: {
|
|
30
|
+
/** Shown when the node is collapsed. Defaults to a Material Design ChevronRight. */
|
|
31
|
+
collapsed?: React.ReactNode;
|
|
32
|
+
/** Shown when the node is expanded. Defaults to a Material Design ExpandMore. */
|
|
33
|
+
expanded?: React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Fix the component to an exact height — content scrolls inside.
|
|
37
|
+
* Accepts any valid CSS value (e.g. "400px", "50vh", "20rem").
|
|
38
|
+
*/
|
|
39
|
+
height?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Cap the component height — content scrolls only when it exceeds this value.
|
|
42
|
+
* Accepts any valid CSS value (e.g. "400px", "50vh", "20rem").
|
|
43
|
+
*/
|
|
44
|
+
maxHeight?: string;
|
|
45
|
+
/** Override any theme tokens for this instance */
|
|
46
|
+
theme?: CubeTheme;
|
|
47
|
+
/** Accessible label for the code region */
|
|
48
|
+
"aria-label"?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function CodeSnippet({ data, defaultCollapsed, icons, height, maxHeight, theme, "aria-label": ariaLabel, }: CodeSnippetProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CodeSnippet } from './CodeSnippet';
|
|
3
|
+
declare const meta: Meta<typeof CodeSnippet>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CodeSnippet>;
|
|
6
|
+
/** Real-world shaped device profile report — all nodes expanded by default */
|
|
7
|
+
export declare const DeviceProfileReport: Story;
|
|
8
|
+
/** Same report starting fully collapsed — drill into sections individually */
|
|
9
|
+
export declare const DeviceProfileCollapsed: Story;
|
|
10
|
+
/** Just the nested sections that benefit most from expand/collapse */
|
|
11
|
+
export declare const PolicyDetails: Story;
|
|
12
|
+
export declare const VelocityVariables: Story;
|
|
13
|
+
export declare const KeyAttributes: Story;
|
|
14
|
+
/** Fills the full viewport height — simulates being dropped into a page layout */
|
|
15
|
+
export declare const FullViewportHeight: Story;
|
|
16
|
+
/** Dark theme override */
|
|
17
|
+
export declare const DarkTheme: Story;
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fictional device-profile report modelled after a real fraud-detection
|
|
3
|
+
* vendor response. All vendor names, personal details, IPs, session IDs,
|
|
4
|
+
* addresses, and phone numbers are fabricated.
|
|
5
|
+
*
|
|
6
|
+
* Vendor name: NexusGuard (fictional)
|
|
7
|
+
*/
|
|
8
|
+
declare const deviceProfileReport: {
|
|
9
|
+
entityName: string;
|
|
10
|
+
requestKey: string;
|
|
11
|
+
active: boolean;
|
|
12
|
+
expiresDn: string;
|
|
13
|
+
createdOn: string;
|
|
14
|
+
reportPullDate: string;
|
|
15
|
+
status: string;
|
|
16
|
+
statusMessage: string;
|
|
17
|
+
data: {
|
|
18
|
+
os: string;
|
|
19
|
+
is_os: string;
|
|
20
|
+
nonce: string;
|
|
21
|
+
ua_os: string;
|
|
22
|
+
dns_ip: string;
|
|
23
|
+
org_id: string;
|
|
24
|
+
policy: string;
|
|
25
|
+
browser: string;
|
|
26
|
+
page_id: string;
|
|
27
|
+
true_ip: string;
|
|
28
|
+
api_type: string;
|
|
29
|
+
gpu_name: string;
|
|
30
|
+
proxy_ip: string;
|
|
31
|
+
ssn_hash: string;
|
|
32
|
+
vm_index: string;
|
|
33
|
+
cpu_clock: string;
|
|
34
|
+
cpu_cores: string;
|
|
35
|
+
device_id: string;
|
|
36
|
+
etag_guid: string;
|
|
37
|
+
time_zone: string;
|
|
38
|
+
ua_os_alt: string;
|
|
39
|
+
vm_rating: string;
|
|
40
|
+
vm_reason: string;
|
|
41
|
+
agent_type: string;
|
|
42
|
+
digital_id: string;
|
|
43
|
+
dns_ip_geo: string;
|
|
44
|
+
dns_ip_isp: string;
|
|
45
|
+
enabled_ck: string;
|
|
46
|
+
enabled_il: string;
|
|
47
|
+
enabled_im: string;
|
|
48
|
+
enabled_js: string;
|
|
49
|
+
event_type: string;
|
|
50
|
+
gpu_vendor: string;
|
|
51
|
+
is_browser: string;
|
|
52
|
+
os_anomaly: string;
|
|
53
|
+
os_version: string;
|
|
54
|
+
proxy_type: string;
|
|
55
|
+
request_id: string;
|
|
56
|
+
screen_res: string;
|
|
57
|
+
session_id: string;
|
|
58
|
+
ua_browser: string;
|
|
59
|
+
webgl_hash: string;
|
|
60
|
+
api_version: string;
|
|
61
|
+
canvas_hash: string;
|
|
62
|
+
cidr_number: string;
|
|
63
|
+
dns_ip_city: string;
|
|
64
|
+
dns_ip_home: string;
|
|
65
|
+
plugin_hash: string;
|
|
66
|
+
proxy_score: string;
|
|
67
|
+
reason_code: string[];
|
|
68
|
+
risk_rating: string;
|
|
69
|
+
true_ip_geo: string;
|
|
70
|
+
true_ip_isp: string;
|
|
71
|
+
ua_platform: string;
|
|
72
|
+
account_name: string;
|
|
73
|
+
bb_bot_score: string;
|
|
74
|
+
device_score: string;
|
|
75
|
+
http_referer: string;
|
|
76
|
+
image_loaded: string;
|
|
77
|
+
input_ip_geo: string;
|
|
78
|
+
input_ip_isp: string;
|
|
79
|
+
mirth_routine: string;
|
|
80
|
+
page_time_on: string;
|
|
81
|
+
policy_score: string;
|
|
82
|
+
profiled_url: string;
|
|
83
|
+
proxy_ip_geo: string;
|
|
84
|
+
proxy_ip_isp: string;
|
|
85
|
+
service_type: string;
|
|
86
|
+
system_state: string;
|
|
87
|
+
true_ip_city: string;
|
|
88
|
+
true_ip_home: string;
|
|
89
|
+
true_ip_result: string;
|
|
90
|
+
uar_os_sig_raw: string;
|
|
91
|
+
turn_os_sig_rtl: string;
|
|
92
|
+
browser_language: string;
|
|
93
|
+
css_image_loaded: string;
|
|
94
|
+
custom_output_10: string;
|
|
95
|
+
custom_output_2: string;
|
|
96
|
+
dns_ip_latitude: string;
|
|
97
|
+
fuzzy_device_id: string;
|
|
98
|
+
input_ip_region: string;
|
|
99
|
+
input_ip_result: string;
|
|
100
|
+
js_fonts_number: string;
|
|
101
|
+
profiled_domain: string;
|
|
102
|
+
profiling_delta: string;
|
|
103
|
+
proxy_ip_region: string;
|
|
104
|
+
proxy_ip_result: string;
|
|
105
|
+
screen_res_zoom: string;
|
|
106
|
+
ssn_hash_result: string;
|
|
107
|
+
ngx_reason_code: string[];
|
|
108
|
+
audio_context: string;
|
|
109
|
+
api_caller_ip: string;
|
|
110
|
+
bb_assessment: string;
|
|
111
|
+
bb_bot_rating: string;
|
|
112
|
+
device_memory: string;
|
|
113
|
+
device_result: string;
|
|
114
|
+
dns_ip_postal_code: string;
|
|
115
|
+
NexusGuardJDRule: null;
|
|
116
|
+
NexusGuardTrueId: string;
|
|
117
|
+
NexusGuardAgentId: null;
|
|
118
|
+
NexusGuardVMIndex: string;
|
|
119
|
+
NexusGuardChasScore: null;
|
|
120
|
+
NexusGuardDeviceID: string;
|
|
121
|
+
NexusGuardDnsIPGeo: string;
|
|
122
|
+
NexusGuardEventing: null;
|
|
123
|
+
NexusGuardTimeZone: string;
|
|
124
|
+
NexusGuardIsMobile: string;
|
|
125
|
+
NexusGuardAPINumber: null;
|
|
126
|
+
NexusGuardAgentName: null;
|
|
127
|
+
NexusGuardCarrierID: null;
|
|
128
|
+
NexusGuardDnsIPCity: string;
|
|
129
|
+
NexusGuardImageLoaded: string;
|
|
130
|
+
NexusGuardInputIPCity: string;
|
|
131
|
+
NexusGuardInputIPRegion: string;
|
|
132
|
+
NexusGuardInputIPResult: string;
|
|
133
|
+
NexusGuardProxyIPCity: string;
|
|
134
|
+
NexusGuardProxyIPRegion: string;
|
|
135
|
+
NexusGuardProxyIPResult: string;
|
|
136
|
+
NexusGuardProxyIPScore: string;
|
|
137
|
+
NexusGuardReviewStatus: string;
|
|
138
|
+
NexusGuardRiskRating: string;
|
|
139
|
+
NexusGuardTrueIPGeo: string;
|
|
140
|
+
NexusGuardTrueIPRegion: string;
|
|
141
|
+
NexusGuardTrueIPResult: string;
|
|
142
|
+
NexusGuardTurnDsSignT: string;
|
|
143
|
+
NexusGuardWebSessionID: null;
|
|
144
|
+
NexusGuardAccountNumber: null;
|
|
145
|
+
NexusGuardBBFraudRating: string;
|
|
146
|
+
NexusGuardBrowserString: string;
|
|
147
|
+
NexusGuardCcNumberHashFirstSeen: null;
|
|
148
|
+
NexusGuardCdNumberHashLastEvent: null;
|
|
149
|
+
NexusGuardChallengeMethod: null;
|
|
150
|
+
NexusGuardDeviceImeResult: null;
|
|
151
|
+
NexusGuardDeviceImeFirstSeen: null;
|
|
152
|
+
NexusGuardDeviceImeLastEvent: null;
|
|
153
|
+
NexusGuardDeviceLastAssertion: null;
|
|
154
|
+
NexusGuardDigitalIdConfidence: string;
|
|
155
|
+
NexusGuardDigitalIdTrustScoreRating: string;
|
|
156
|
+
NexusGuardFuzzyDeviceMatchResult: string;
|
|
157
|
+
NexusGuardHttpRefDomainFirstSeen: null;
|
|
158
|
+
NexusGuardInputIPOrganization: string;
|
|
159
|
+
NexusGuardPasswordHashLastUpdate: null;
|
|
160
|
+
NexusGuardPasswordHashWorstScore: null;
|
|
161
|
+
NexusGuardProxyIPHostingFacility: null;
|
|
162
|
+
NexusGuardShippingAddressCountry: null;
|
|
163
|
+
NexusGuardShippingAddressZipCode: null;
|
|
164
|
+
NexusGuardAccountEmailWorstScore: string;
|
|
165
|
+
NexusGuardAccountLoginLastUpdate: null;
|
|
166
|
+
NexusGuardAccountLoginWorstScore: null;
|
|
167
|
+
NexusGuardAccountNumberFirstSeen: null;
|
|
168
|
+
NexusGuardAccountNumberLastEvent: null;
|
|
169
|
+
NexusGuardBrowserStringMismatch: null;
|
|
170
|
+
NexusGuardCarrierAccountResult: null;
|
|
171
|
+
NexusGuardCarrierIdResult: null;
|
|
172
|
+
NexusGuardChallengeRiskMailing: null;
|
|
173
|
+
NexusGuardDeviceImeLastUpdate: null;
|
|
174
|
+
NexusGuardDnsIpHostingFacility: null;
|
|
175
|
+
NexusGuardFuzzyDeviceFirstSeen: string;
|
|
176
|
+
NexusGuardFuzzyDeviceLastEvent: string;
|
|
177
|
+
NexusGuardInputIPLastAssertion: null;
|
|
178
|
+
NexusGuardInputIPRoutingCode: string;
|
|
179
|
+
NexusGuardLocalTimeOffsetRange: null;
|
|
180
|
+
NexusGuardNationalIdAttributes: null;
|
|
181
|
+
NexusGuardPageFingerprintCheck: null;
|
|
182
|
+
NexusGuardPageFingerprintScore: null;
|
|
183
|
+
NexusGuardPrivateBrowsing: string;
|
|
184
|
+
NexusGuardProfileDomainFirstSeen: null;
|
|
185
|
+
NexusGuardTrueIpFirstSeen: string;
|
|
186
|
+
NexusGuardTrueIpLastEvent: string;
|
|
187
|
+
NexusGuardTrueIpIncSpeed: string;
|
|
188
|
+
NexusGuardAccountFirstName: null;
|
|
189
|
+
NexusGuardAccountNameScore: string;
|
|
190
|
+
NexusGuardAccountTelephone: string;
|
|
191
|
+
NexusGuardAuthStatusReason: null;
|
|
192
|
+
NexusGuardCcBinNumberBrand: null;
|
|
193
|
+
NexusGuardChallengePolicy: null;
|
|
194
|
+
NexusGuardAccountTelephoneResult: string;
|
|
195
|
+
NexusGuardAccountTelephoneLastUpdate: string;
|
|
196
|
+
NexusGuardAccountTelephoneWorstScore: string;
|
|
197
|
+
NexusGuardDeviceFingerprintFirstSeen: null;
|
|
198
|
+
NexusGuardDeviceFingerprintLastUpdate: null;
|
|
199
|
+
NexusGuardDeviceFingerprintWorstScore: null;
|
|
200
|
+
NexusGuardHttpRefDomainAssertHistory: null;
|
|
201
|
+
NexusGuardHttpRefDomainLastAssertion: null;
|
|
202
|
+
NexusGuardInputIPConnectionType: string;
|
|
203
|
+
NexusGuardNationalIdLastUpdate: null;
|
|
204
|
+
NexusGuardNationalIdWorstScore: null;
|
|
205
|
+
NexusGuardPageFingerprintFirstSeen: null;
|
|
206
|
+
NexusGuardPageFingerprintLastEvent: null;
|
|
207
|
+
NexusGuardProfileDomainLastAssertion: null;
|
|
208
|
+
NexusGuardShippingAddressBillVAddress: null;
|
|
209
|
+
NexusGuardShippingAddressFirstSeen: null;
|
|
210
|
+
NexusGuardShippingAddressLastEvent: null;
|
|
211
|
+
NexusGuardSmartLearningFraudRating: null;
|
|
212
|
+
NexusGuardAccountEmailLastAssertion: null;
|
|
213
|
+
NexusGuardAccountLoginLastAssertion: null;
|
|
214
|
+
NexusGuardAccountTelephoneFirstSeen: string;
|
|
215
|
+
NexusGuardAccountTelephoneLastEvent: string;
|
|
216
|
+
NexusGuardCarrierAccountLastAssertion: null;
|
|
217
|
+
NexusGuardCarrierMobileNumberResult: null;
|
|
218
|
+
NexusGuardCcBinNumberCategory: null;
|
|
219
|
+
NexusGuardDeviceAssertHistory: null;
|
|
220
|
+
NexusGuardDeviceImeFirstAssertion: null;
|
|
221
|
+
NexusGuardDeviceImeLastAssertion: null;
|
|
222
|
+
NexusGuardDriversLicenseHashScore: null;
|
|
223
|
+
NexusGuardDriversLicenceHashLastEvent: null;
|
|
224
|
+
NexusGuardProfileDomainAssertHistory: null;
|
|
225
|
+
NexusGuardTransactionShippingCurrency: null;
|
|
226
|
+
NexusGuardTransactionShippingAmount: null;
|
|
227
|
+
NexusGuardAccountAddressLastUpdate: null;
|
|
228
|
+
NexusGuardAccountAddressWorstScore: null;
|
|
229
|
+
NexusGuardAccountNameLastAssertion: null;
|
|
230
|
+
NexusGuardAgentPublickeyHashFirstSeen: string;
|
|
231
|
+
NexusGuardAgentPublickeyHashLastEvent: string;
|
|
232
|
+
NexusGuardAgentPublicKeyHashLastUpdate: string;
|
|
233
|
+
NexusGuardAgentPublickeyHashWorstScore: string;
|
|
234
|
+
NexusGuardDriversLicenseHashFirstSeen: null;
|
|
235
|
+
NexusGuardPageFingerprintLastAssertion: null;
|
|
236
|
+
NexusGuardPasswordHashLastAssertion: null;
|
|
237
|
+
NexusGuardShippingAddressLastUpdate: null;
|
|
238
|
+
NexusGuardShippingAddressWorstScore: null;
|
|
239
|
+
NexusGuardAccountAddressIPNormalized: null;
|
|
240
|
+
NexusGuardAgentPublicKeyHashFirstSeen: string;
|
|
241
|
+
NexusGuardAgentPublicKeyHashLastEvent: string;
|
|
242
|
+
NexusGuardCarrierAccountFirstSeen: null;
|
|
243
|
+
NexusGuardCarrierAccountLastEvent: null;
|
|
244
|
+
NexusGuardDeviceFirstSeen: string;
|
|
245
|
+
NexusGuardDeviceLastUpdate: string;
|
|
246
|
+
NexusGuardDeviceWorstScore: string;
|
|
247
|
+
NexusGuardDnsIPRoutingType: string;
|
|
248
|
+
NexusGuardFuzzyDeviceScale: string;
|
|
249
|
+
NexusGuardInputIPFirstSeen: string;
|
|
250
|
+
NexusGuardInputIPLastEvent: string;
|
|
251
|
+
NexusGuardInputIPLineSpeed: string;
|
|
252
|
+
NexusGuardIpActivitiesDesc: null;
|
|
253
|
+
NexusGuardIpAttributesDesc: null;
|
|
254
|
+
NexusGuardNationalIdNumber: null;
|
|
255
|
+
NexusGuardNationalIdResult: null;
|
|
256
|
+
NexusGuardProxyIPFirstSeen: string;
|
|
257
|
+
NexusGuardProxyIPLastEvent: string;
|
|
258
|
+
NexusGuardProxyIpLineSpeed: string;
|
|
259
|
+
NexusGuardSsnHashFirstSeen: null;
|
|
260
|
+
NexusGuardSsnHashLastEvent: null;
|
|
261
|
+
NexusGuardScreenResAnomaly: null;
|
|
262
|
+
NexusGuardTrueIpLastUpdate: string;
|
|
263
|
+
NexusGuardTrueIpPostalCode: string;
|
|
264
|
+
NexusGuardTrueIpWorstScore: string;
|
|
265
|
+
NexusGuardAccountAddressZip: string;
|
|
266
|
+
NexusGuardAccountEmailScore: string;
|
|
267
|
+
NexusGuardAccountLoginScore: null;
|
|
268
|
+
NexusGuardAccountNameLastUpdate: string;
|
|
269
|
+
NexusGuardAccountNameWorstScore: string;
|
|
270
|
+
NexusGuardAccountTelephoneScore: string;
|
|
271
|
+
NexusGuardBrowserLanguageAnomaly: null;
|
|
272
|
+
NexusGuardDriversLicenseHashResult: null;
|
|
273
|
+
NexusGuardFuzzyDeviceLastAssertion: null;
|
|
274
|
+
NexusGuardHoneypotFingerprintCheck: string;
|
|
275
|
+
NexusGuardHoneypotFingerprintMatch: string;
|
|
276
|
+
NexusGuardPageFingerprintLastUpdate: null;
|
|
277
|
+
NexusGuardPageFingerprintWorstScore: null;
|
|
278
|
+
NexusGuardShippingAddressLastAssertion: null;
|
|
279
|
+
NexusGuardAccountAddressLastAssertion: null;
|
|
280
|
+
NexusGuardAccountAddressZipNormalized: null;
|
|
281
|
+
NexusGuardAccountEmailFirstSeen: string;
|
|
282
|
+
NexusGuardAccountEmailLastEvent: string;
|
|
283
|
+
NexusGuardAccountAddressStreet1: string;
|
|
284
|
+
NexusGuardAccountAddressStreet2: string;
|
|
285
|
+
NexusGuardAccountEmailLastUpdate: string;
|
|
286
|
+
NexusGuardChallengePolicyScore: null;
|
|
287
|
+
NexusGuardFuzzyDeviceLastUpdate: string;
|
|
288
|
+
NexusGuardFuzzyDeviceWorstScore: string;
|
|
289
|
+
NexusGuardOnlineIDLastAssertion: null;
|
|
290
|
+
NexusGuardPageFingerprintResult: null;
|
|
291
|
+
NexusGuardPasswordHashFirstSeen: null;
|
|
292
|
+
NexusGuardPasswordHashLastEvent: null;
|
|
293
|
+
NexusGuardProxyIPConnectionType: string;
|
|
294
|
+
NexusGuardShippingAddressCity: null;
|
|
295
|
+
NexusGuardTransactionAuthAmount: null;
|
|
296
|
+
NexusGuardWebSessionIDFirstSeen: null;
|
|
297
|
+
NexusGuardWebSessionIDLastEvent: null;
|
|
298
|
+
battery_status: {
|
|
299
|
+
level: number;
|
|
300
|
+
status: string;
|
|
301
|
+
};
|
|
302
|
+
bb_fraud_score: string;
|
|
303
|
+
browser_string: string;
|
|
304
|
+
event_datetime: string;
|
|
305
|
+
input_ip_score: string;
|
|
306
|
+
local_attrib_1: string;
|
|
307
|
+
local_attrib_2: string;
|
|
308
|
+
local_attrib_3: string;
|
|
309
|
+
local_attrib_4: string;
|
|
310
|
+
local_attrib_5: string;
|
|
311
|
+
mime_type_hash: string;
|
|
312
|
+
proxy_ip_score: string;
|
|
313
|
+
request_result: string;
|
|
314
|
+
true_ip_region: string;
|
|
315
|
+
ub_browser_alt: string;
|
|
316
|
+
bb_fraud_rating: string;
|
|
317
|
+
browser_version: string;
|
|
318
|
+
proxy_ip_latitude: string;
|
|
319
|
+
ng_variables: {
|
|
320
|
+
_cc_per_exactid_hour: string;
|
|
321
|
+
_cc_per_smartid_hour: string;
|
|
322
|
+
_cc_per_smartid_gbl_hour: string;
|
|
323
|
+
_exactid_gbl_velocity_hour: string;
|
|
324
|
+
_smartid_gbl_velocity_hour: string;
|
|
325
|
+
customerneverprofiledlocal: string;
|
|
326
|
+
_accemail_gbl_velocity_hour: string;
|
|
327
|
+
_accphone_gbl_velocity_hour: string;
|
|
328
|
+
_exactid_per_email_gbl_hour: string;
|
|
329
|
+
universalrulepolicycallout: string;
|
|
330
|
+
_accteeails_per_exactid_hour: string;
|
|
331
|
+
_acnt_login_per_exactid_hour: string;
|
|
332
|
+
_acnt_login_per_smartid_hour: string;
|
|
333
|
+
_acntemails_per_smartid_hour: string;
|
|
334
|
+
_exactid_local_velocity_hour: string;
|
|
335
|
+
_smartid_local_velocity_hour: string;
|
|
336
|
+
_accemail_local_velocity_hour: string;
|
|
337
|
+
_acntemails_per_exactid_gbl_hour: string;
|
|
338
|
+
count_distinct_ssn_per_smart_id_local_7days: string;
|
|
339
|
+
};
|
|
340
|
+
true_ip_score: string;
|
|
341
|
+
NexusGuardAccountLoginLastSeen: null;
|
|
342
|
+
NexusGuardAccountLoginLastEvent: null;
|
|
343
|
+
NexusGuardAccountCountNameFirstSeen: string;
|
|
344
|
+
NexusGuardAccountCountNameLastEvent: string;
|
|
345
|
+
NexusGuardBrowserStringLanguageAnomaly: null;
|
|
346
|
+
NexusGuardCarrierIDLastUpdate: null;
|
|
347
|
+
NexusGuardCdNumberHashFirstSeen: null;
|
|
348
|
+
NexusGuardChallengeReviewStatus: null;
|
|
349
|
+
NexusGuardFuzzyDeviceConfidence: string;
|
|
350
|
+
NexusGuardHttpRefDomainActivities: null;
|
|
351
|
+
NexusGuardHttpRefDomainLastUpdate: null;
|
|
352
|
+
NexusGuardInputIPDomainFirstSeen: null;
|
|
353
|
+
NexusGuardShippingAddressCounty: null;
|
|
354
|
+
NexusGuardShippingAddressStreet1: null;
|
|
355
|
+
NexusGuardShippingAddressStreet2: null;
|
|
356
|
+
NexusGuardSmartLearningRiskRank: null;
|
|
357
|
+
NexusGuardAccountAddressFirstSeen: null;
|
|
358
|
+
NexusGuardAccountAddressLastEvent: null;
|
|
359
|
+
NexusGuardAgentPublicKeyHashResult: string;
|
|
360
|
+
NexusGuardDigitalIdConfidenceRating: string;
|
|
361
|
+
NexusGuardCarrierMobileNumberLastAssertion: null;
|
|
362
|
+
NexusGuardDriversLicenceHashResult: null;
|
|
363
|
+
NexusGuardDriversLicenceHashLastResult: null;
|
|
364
|
+
NexusGuardTransactionAuthCurrency: null;
|
|
365
|
+
NexusGuardTrueIpHostingFacility: null;
|
|
366
|
+
NexusGuardAccountAddressScore: null;
|
|
367
|
+
NexusGuardAccountNumberLastAssertion: null;
|
|
368
|
+
NexusGuardCarrierAccountLastUpdate: null;
|
|
369
|
+
NexusGuardCarrierAccountWorstScore: null;
|
|
370
|
+
NexusGuardCarrierMobileNumberFirstSeen: null;
|
|
371
|
+
NexusGuardCarrierMobileNumberLastEvent: null;
|
|
372
|
+
NexusGuardCarrierMobileNumberMatchResult: null;
|
|
373
|
+
NexusGuardDeviceFingerprintLastAssertion: null;
|
|
374
|
+
NexusGuardDriversLicenceHashFirstSeen: null;
|
|
375
|
+
NexusGuardDriversLicenseHashLastEvent: null;
|
|
376
|
+
policy_details_api: {
|
|
377
|
+
policy_detail_api: {
|
|
378
|
+
type: string;
|
|
379
|
+
customer: {
|
|
380
|
+
pvid: string;
|
|
381
|
+
vars: ({
|
|
382
|
+
rid: string;
|
|
383
|
+
value: string;
|
|
384
|
+
variable: string;
|
|
385
|
+
ovid?: undefined;
|
|
386
|
+
score?: undefined;
|
|
387
|
+
reason_code?: undefined;
|
|
388
|
+
} | {
|
|
389
|
+
rid: string;
|
|
390
|
+
ovid: string;
|
|
391
|
+
score: string;
|
|
392
|
+
reason_code: string;
|
|
393
|
+
value?: undefined;
|
|
394
|
+
variable?: undefined;
|
|
395
|
+
})[];
|
|
396
|
+
};
|
|
397
|
+
}[];
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
keyAttributes: {
|
|
401
|
+
lino: boolean;
|
|
402
|
+
ffreeze: boolean;
|
|
403
|
+
market: string;
|
|
404
|
+
disputed: boolean;
|
|
405
|
+
submarket: string;
|
|
406
|
+
bureauName: string;
|
|
407
|
+
suppressed: boolean;
|
|
408
|
+
doNotPromote: boolean;
|
|
409
|
+
initialFraud: boolean;
|
|
410
|
+
reportStatus: string;
|
|
411
|
+
extendedFraud: boolean;
|
|
412
|
+
reportedNames: {
|
|
413
|
+
person: {
|
|
414
|
+
last: string;
|
|
415
|
+
first: string;
|
|
416
|
+
middle: string;
|
|
417
|
+
};
|
|
418
|
+
source: string;
|
|
419
|
+
}[];
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
export default deviceProfileReport;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts any JSON-compatible value into a flat array of CodeLines.
|
|
3
|
+
*
|
|
4
|
+
* Two-pass design:
|
|
5
|
+
* 1. walkValue() recurses through the data, building lines while respecting
|
|
6
|
+
* the current collapsedPaths set (collapsed subtrees are skipped).
|
|
7
|
+
* 2. The caller re-runs buildLines() whenever collapsedPaths changes,
|
|
8
|
+
* which also recomputes sequential line numbers automatically.
|
|
9
|
+
*
|
|
10
|
+
* No external dependencies — pure TypeScript.
|
|
11
|
+
*/
|
|
12
|
+
export type TokenType = "key" | "string" | "string_url" | "string_email" | "string_uuid" | "number" | "boolean" | "null" | "bracket" | "operator" | "punctuation" | "ellipsis";
|
|
13
|
+
export interface Token {
|
|
14
|
+
type: TokenType;
|
|
15
|
+
value: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CodeLine {
|
|
18
|
+
/** 1-indexed. Recomputed every render pass so it stays correct after collapse. */
|
|
19
|
+
lineNumber: number;
|
|
20
|
+
/** Nesting depth — drives visual indentation. */
|
|
21
|
+
depth: number;
|
|
22
|
+
/** Ordered list of styled tokens that make up this line's content. */
|
|
23
|
+
tokens: Token[];
|
|
24
|
+
/**
|
|
25
|
+
* Present on opening-bracket lines (the first line of an object/array).
|
|
26
|
+
* Used as the key into collapsedPaths and as the toggle button's identifier.
|
|
27
|
+
*/
|
|
28
|
+
collapseKey?: string;
|
|
29
|
+
/**
|
|
30
|
+
* True when collapseKey is set and the node is currently collapsed.
|
|
31
|
+
* Drives which chevron is rendered (▶ vs ▼).
|
|
32
|
+
*/
|
|
33
|
+
isCollapsed?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* "summary" rows are the `… N lines` placeholder emitted between the opening
|
|
36
|
+
* and closing bracket of a collapsed node. Rendered with a muted highlight.
|
|
37
|
+
*/
|
|
38
|
+
kind?: "summary";
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Build the full list of visible CodeLines for the given data and collapse state.
|
|
42
|
+
* Call again whenever collapsedPaths changes.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildLines(data: unknown, collapsedPaths: Set<string>): CodeLine[];
|
|
45
|
+
/**
|
|
46
|
+
* Collect every JSON path that CAN be collapsed (i.e. every non-empty object/array).
|
|
47
|
+
* Used to initialise the fully-collapsed state.
|
|
48
|
+
*/
|
|
49
|
+
export declare function getAllCollapsiblePaths(data: unknown, path?: string): Set<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CubeTheme } from '../../theme/types';
|
|
2
|
+
export interface DataGridProps {
|
|
3
|
+
/** JSON-serializable row data (shape TBD) */
|
|
4
|
+
data: unknown;
|
|
5
|
+
/** Override any theme tokens for this instance */
|
|
6
|
+
theme?: CubeTheme;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Table-style JSON viewer — implementation TBD.
|
|
10
|
+
*/
|
|
11
|
+
export declare function DataGrid({ data }: DataGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
export interface GraphCanvasProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
width?: CSSProperties["width"];
|
|
5
|
+
height?: CSSProperties["height"];
|
|
6
|
+
/** Initial zoom level. Default 1. */
|
|
7
|
+
defaultZoom?: number;
|
|
8
|
+
/** Initial pan offset. Default { x: 0, y: 0 }. */
|
|
9
|
+
defaultPan?: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare function GraphCanvas({ children, width, height, defaultZoom, defaultPan, style, }: GraphCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { GraphCanvas } from './GraphCanvas';
|
|
3
|
+
/**
|
|
4
|
+
* GraphCanvas — generic, use-case agnostic canvas primitives.
|
|
5
|
+
*
|
|
6
|
+
* These stories demonstrate the mechanics of the graph system:
|
|
7
|
+
* pan/zoom, handle registration, and edge drawing.
|
|
8
|
+
*
|
|
9
|
+
* GraphCard already has sensible visual defaults from the theme
|
|
10
|
+
* (background, border, shadow, padding, gap) so it looks good
|
|
11
|
+
* with any ReactNode as children.
|
|
12
|
+
*
|
|
13
|
+
* For the JSON-specific content layer (JsonCardTitle, JsonFieldRow,
|
|
14
|
+
* JsonObjectRow) see the JsonGraph stories.
|
|
15
|
+
*/
|
|
16
|
+
declare const meta: Meta<typeof GraphCanvas>;
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof GraphCanvas>;
|
|
19
|
+
export declare const TwoCards: Story;
|
|
20
|
+
export declare const ThreeCards: Story;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
export interface GraphCardProps {
|
|
3
|
+
/** Unique identifier — used to build handle keys ("id:handleId"). */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Position in canvas space (pixels, before zoom). */
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
/** Minimum card width. Content can make it wider. */
|
|
9
|
+
minWidth?: number;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Override any visual default (background, border, padding, gap …).
|
|
13
|
+
* Merged on top of theme defaults so partial overrides work naturally.
|
|
14
|
+
*/
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A positioned, theme-styled container in the graph canvas.
|
|
20
|
+
*
|
|
21
|
+
* Visual defaults (background, border, shadow, padding, gap, border-radius)
|
|
22
|
+
* come from the active theme so the card looks good out of the box. Override
|
|
23
|
+
* any of them via the `style` prop, or swap the whole theme via `ThemeProvider`.
|
|
24
|
+
*
|
|
25
|
+
* Provides `CardContext` so any nested `GraphHandle` knows which card it
|
|
26
|
+
* belongs to when registering its canvas-space position.
|
|
27
|
+
*
|
|
28
|
+
* `overflow: visible` is intentional — handle dots extend beyond the card
|
|
29
|
+
* boundary and must not be clipped.
|
|
30
|
+
*/
|
|
31
|
+
export declare function GraphCard({ id, x, y, minWidth, children, style, className, }: GraphCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface EdgeEndpoint {
|
|
2
|
+
/** The GraphCard id. */
|
|
3
|
+
node: string;
|
|
4
|
+
/** The GraphHandle id within that card. */
|
|
5
|
+
handle: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GraphEdgeProps {
|
|
8
|
+
from: EdgeEndpoint;
|
|
9
|
+
to: EdgeEndpoint;
|
|
10
|
+
/** Stroke colour. Default: a neutral grey. */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Stroke width in canvas pixels. Default 1.5. */
|
|
13
|
+
strokeWidth?: number;
|
|
14
|
+
/**
|
|
15
|
+
* How strongly the bezier control points pull horizontally.
|
|
16
|
+
* 0 = straight line. 0.5 = gentle S-curve (default). 1 = strong pull.
|
|
17
|
+
*/
|
|
18
|
+
curvature?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Draws a smooth bezier curve between two GraphHandle positions.
|
|
22
|
+
*
|
|
23
|
+
* Renders nothing in its own DOM position — it portals a <path> element
|
|
24
|
+
* directly into the GraphCanvas SVG layer so edges always render in the
|
|
25
|
+
* correct coordinate space (behind cards, inside the canvas transform).
|
|
26
|
+
*/
|
|
27
|
+
export declare function GraphEdge({ from, to, color, strokeWidth, curvature, }: GraphEdgeProps): import('react').ReactPortal | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type HandleSide = "left" | "right" | "top" | "bottom";
|
|
3
|
+
export interface GraphHandleProps {
|
|
4
|
+
/** Must be unique within its card. Edge references: "cardId:handleId". */
|
|
5
|
+
id: string;
|
|
6
|
+
side: HandleSide;
|
|
7
|
+
/**
|
|
8
|
+
* Radius of the D-shape semicircle in pixels — the bump protrudes this far
|
|
9
|
+
* from the card border. Default 12.
|
|
10
|
+
*/
|
|
11
|
+
size?: number;
|
|
12
|
+
/** Dot fill colour. Defaults to the theme's blue accent. */
|
|
13
|
+
color?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export declare function GraphHandle({ id, side, size, color, style }: GraphHandleProps): import("react/jsx-runtime").JSX.Element;
|