@svadmin/lite 0.27.0 → 0.30.1

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.
Files changed (81) hide show
  1. package/dist/components/LiteAbacPolicyMatrix.svelte +128 -0
  2. package/dist/components/LiteAbacPolicyMatrix.svelte.d.ts +16 -0
  3. package/dist/components/LiteApiPlayground.svelte +103 -0
  4. package/dist/components/LiteApiPlayground.svelte.d.ts +10 -0
  5. package/dist/components/LiteApprovalChainBuilder.svelte +120 -0
  6. package/dist/components/LiteApprovalChainBuilder.svelte.d.ts +15 -0
  7. package/dist/components/LiteAuditTrailInspector.svelte +166 -0
  8. package/dist/components/LiteAuditTrailInspector.svelte.d.ts +23 -0
  9. package/dist/components/LiteBillingInvoiceDrawer.svelte +100 -0
  10. package/dist/components/LiteBillingInvoiceDrawer.svelte.d.ts +16 -0
  11. package/dist/components/LiteChartAnnotationOverlay.svelte +101 -0
  12. package/dist/components/LiteChartAnnotationOverlay.svelte.d.ts +16 -0
  13. package/dist/components/LiteColumnMappingTable.svelte +105 -0
  14. package/dist/components/LiteColumnMappingTable.svelte.d.ts +14 -0
  15. package/dist/components/LiteDashboardGridLayout.svelte +108 -0
  16. package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
  17. package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
  18. package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
  19. package/dist/components/LiteDataImportDropzone.svelte +89 -0
  20. package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
  21. package/dist/components/LiteDataLineageGraph.svelte +100 -0
  22. package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
  23. package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
  24. package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
  25. package/dist/components/LiteDataScreenContainer.svelte +34 -0
  26. package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
  27. package/dist/components/LiteElectronicSealStamp.svelte +56 -0
  28. package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
  29. package/dist/components/LiteEnvVariableEditor.svelte +114 -0
  30. package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
  31. package/dist/components/LiteFormulaField.svelte +44 -0
  32. package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
  33. package/dist/components/LiteGeoScatterMap.svelte +117 -0
  34. package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
  35. package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
  36. package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
  37. package/dist/components/LiteImportPreviewValidator.svelte +136 -0
  38. package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
  39. package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
  40. package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
  41. package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
  42. package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
  43. package/dist/components/LitePeriodComparisonCard.svelte +60 -0
  44. package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
  45. package/dist/components/LitePermissionSimulator.svelte +90 -0
  46. package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
  47. package/dist/components/LitePivotMatrix.svelte +138 -0
  48. package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
  49. package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
  50. package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
  51. package/dist/components/LiteQueryAiExplainer.svelte +85 -0
  52. package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
  53. package/dist/components/LiteScheduledJobManager.svelte +116 -0
  54. package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
  55. package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
  56. package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
  57. package/dist/components/LiteSecureDataExporter.svelte +101 -0
  58. package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
  59. package/dist/components/LiteSqlConsole.svelte +128 -0
  60. package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
  61. package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
  62. package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
  63. package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
  64. package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
  65. package/dist/components/LiteTableAggregationFooter.svelte +76 -0
  66. package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
  67. package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
  68. package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
  69. package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
  70. package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
  71. package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
  72. package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
  73. package/dist/components/LiteTierFeatureComparison.svelte +97 -0
  74. package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
  75. package/dist/components/LiteWebhookSimulator.svelte +120 -0
  76. package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
  77. package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
  78. package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
  79. package/dist/index.d.ts +40 -0
  80. package/dist/index.js +47 -0
  81. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ interface LineageItem {
2
+ id: string;
3
+ name: string;
4
+ type: string;
5
+ owner: string;
6
+ rows?: string;
7
+ }
8
+ interface Props {
9
+ title?: string;
10
+ nodes?: LineageItem[];
11
+ class?: string;
12
+ }
13
+ declare const LiteDataLineageGraph: import("svelte").Component<Props, {}, "">;
14
+ type LiteDataLineageGraph = ReturnType<typeof LiteDataLineageGraph>;
15
+ export default LiteDataLineageGraph;
@@ -0,0 +1,131 @@
1
+ <script lang="ts">
2
+ interface PolicyItem {
3
+ id: string;
4
+ fieldName: string;
5
+ ruleType: string;
6
+ level: string;
7
+ exemptRole: string;
8
+ enabled: boolean;
9
+ }
10
+
11
+ interface Props {
12
+ title?: string;
13
+ policies?: PolicyItem[];
14
+ class?: string;
15
+ }
16
+
17
+ let {
18
+ title = '动态数据脱敏策略中心',
19
+ policies = [
20
+ { id: 'p1', fieldName: 'mobile_phone', ruleType: '手机号脱敏', level: 'L3 机密', exemptRole: '超级管理员', enabled: true },
21
+ { id: 'p2', fieldName: 'resident_id_card', ruleType: '居民身份证', level: 'L4 极高', exemptRole: '合规风控员', enabled: true },
22
+ { id: 'p3', fieldName: 'bank_card_number', ruleType: '银行借记卡', level: 'L4 极高', exemptRole: '财务主管', enabled: true },
23
+ { id: 'p4', fieldName: 'corporate_email', ruleType: '电子邮箱前缀', level: 'L2 内部', exemptRole: '全员', enabled: false }
24
+ ],
25
+ class: className = '',
26
+ }: Props = $props();
27
+ </script>
28
+
29
+ <div
30
+ class="lite-mask-policy {className}"
31
+ data-svadmin-component="LiteDataMaskPolicyEngine"
32
+ role="region"
33
+ aria-label="Data Mask Policy Engine"
34
+ >
35
+ <header class="lite-mask-header">
36
+ <div>
37
+ <h4 class="lite-mask-title">{title}</h4>
38
+ <span class="lite-mask-meta">基于密级与角色动态下发,纯前端算法沙箱</span>
39
+ </div>
40
+ <span class="lite-policy-count">{policies.length} 项脱敏策略</span>
41
+ </header>
42
+
43
+ <div class="lite-mask-table-wrap">
44
+ <table class="lite-mask-table">
45
+ <thead>
46
+ <tr>
47
+ <th>字段标识</th>
48
+ <th>算法类型</th>
49
+ <th>安全密级</th>
50
+ <th>豁免角色</th>
51
+ <th>状态</th>
52
+ </tr>
53
+ </thead>
54
+ <tbody>
55
+ {#each policies as p (p.id)}
56
+ <tr class:lite-tr-disabled={!p.enabled}>
57
+ <td class="lite-td-field font-mono">{p.fieldName}</td>
58
+ <td>{p.ruleType}</td>
59
+ <td>
60
+ <span
61
+ class="lite-level-badge"
62
+ class:lite-lvl-high={p.level.includes('L4')}
63
+ class:lite-lvl-warn={p.level.includes('L3')}
64
+ >
65
+ {p.level}
66
+ </span>
67
+ </td>
68
+ <td><span class="lite-role-badge">{p.exemptRole}</span></td>
69
+ <td>
70
+ <span class="lite-status-badge" class:lite-st-on={p.enabled}>
71
+ {p.enabled ? '已启用' : '已停用'}
72
+ </span>
73
+ </td>
74
+ </tr>
75
+ {/each}
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ </div>
80
+
81
+ <style>
82
+ .lite-mask-policy {
83
+ border: 1px solid #e5e6eb;
84
+ border-radius: 6px;
85
+ background: #ffffff;
86
+ font-size: 12px;
87
+ overflow: hidden;
88
+ }
89
+ .lite-mask-header {
90
+ display: flex;
91
+ justify-content: space-between;
92
+ align-items: center;
93
+ padding: 10px 14px;
94
+ background: #f7f8fa;
95
+ border-bottom: 1px solid #e5e6eb;
96
+ }
97
+ .lite-mask-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
98
+ .lite-mask-meta { font-size: 11px; color: #86909c; display: block; margin-top: 2px; }
99
+ .lite-policy-count { font-size: 11px; color: #165dff; font-weight: 600; }
100
+ .lite-mask-table-wrap { overflow-x: auto; }
101
+ .lite-mask-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
102
+ .lite-mask-table th {
103
+ padding: 8px 12px;
104
+ background: #f2f3f5;
105
+ border-bottom: 1px solid #e5e6eb;
106
+ color: #4e5969;
107
+ font-weight: 600;
108
+ }
109
+ .lite-mask-table td {
110
+ padding: 8px 12px;
111
+ border-bottom: 1px solid #f2f3f5;
112
+ color: #1d2129;
113
+ }
114
+ .lite-tr-disabled { opacity: 0.6; }
115
+ .lite-td-field { font-weight: 600; }
116
+ .font-mono { font-family: monospace; }
117
+ .lite-level-badge {
118
+ display: inline-block;
119
+ padding: 1px 6px;
120
+ border-radius: 3px;
121
+ font-size: 10px;
122
+ font-weight: 600;
123
+ background: #f2f3f5;
124
+ color: #4e5969;
125
+ }
126
+ .lite-lvl-high { background: #ffece8; color: #f53f3f; }
127
+ .lite-lvl-warn { background: #fff7e8; color: #ff7d00; }
128
+ .lite-role-badge { background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 3px; font-size: 10px; }
129
+ .lite-status-badge { font-size: 10px; color: #86909c; }
130
+ .lite-st-on { color: #00b42a; font-weight: 600; }
131
+ </style>
@@ -0,0 +1,16 @@
1
+ interface PolicyItem {
2
+ id: string;
3
+ fieldName: string;
4
+ ruleType: string;
5
+ level: string;
6
+ exemptRole: string;
7
+ enabled: boolean;
8
+ }
9
+ interface Props {
10
+ title?: string;
11
+ policies?: PolicyItem[];
12
+ class?: string;
13
+ }
14
+ declare const LiteDataMaskPolicyEngine: import("svelte").Component<Props, {}, "">;
15
+ type LiteDataMaskPolicyEngine = ReturnType<typeof LiteDataMaskPolicyEngine>;
16
+ export default LiteDataMaskPolicyEngine;
@@ -0,0 +1,34 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ title?: string;
6
+ class?: string;
7
+ children?: Snippet;
8
+ }
9
+
10
+ let {
11
+ title = 'Data Dashboard',
12
+ class: className = '',
13
+ children,
14
+ }: Props = $props();
15
+ </script>
16
+
17
+ <div
18
+ class="lite-datascreen-container {className}"
19
+ data-svadmin-component="LiteDataScreenContainer"
20
+ >
21
+ <header class="lite-datascreen-header">
22
+ <h2 class="lite-datascreen-title">{title}</h2>
23
+ </header>
24
+ <main class="lite-datascreen-body">
25
+ {#if children}{@render children()}{/if}
26
+ </main>
27
+ </div>
28
+
29
+ <style>
30
+ .lite-datascreen-container { background: #0f172a; color: #f8fafc; border-radius: 8px; padding: 24px; min-height: 480px; }
31
+ .lite-datascreen-header { border-bottom: 1px solid #334155; padding-bottom: 14px; margin-bottom: 20px; }
32
+ .lite-datascreen-title { font-size: 18px; font-weight: 700; color: #f8fafc; margin: 0; }
33
+ .lite-datascreen-body { width: 100%; }
34
+ </style>
@@ -0,0 +1,9 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ title?: string;
4
+ class?: string;
5
+ children?: Snippet;
6
+ }
7
+ declare const LiteDataScreenContainer: import("svelte").Component<Props, {}, "">;
8
+ type LiteDataScreenContainer = ReturnType<typeof LiteDataScreenContainer>;
9
+ export default LiteDataScreenContainer;
@@ -0,0 +1,56 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ companyName?: string;
4
+ sealTitle?: string;
5
+ serialNumber?: string;
6
+ class?: string;
7
+ }
8
+
9
+ let {
10
+ companyName = '上海创智多租户研发网络科技有限公司',
11
+ sealTitle = '电子审批专用章',
12
+ serialNumber = '3101040098214',
13
+ class: className = '',
14
+ }: Props = $props();
15
+ </script>
16
+
17
+ <div
18
+ class="lite-seal-stamp {className}"
19
+ data-svadmin-component="LiteElectronicSealStamp"
20
+ role="img"
21
+ aria-label="{companyName} {sealTitle}"
22
+ >
23
+ <div class="lite-seal-circle">
24
+ <div class="lite-seal-company">{companyName}</div>
25
+ <div class="lite-seal-star">★</div>
26
+ <div class="lite-seal-title">{sealTitle}</div>
27
+ <div class="lite-seal-serial font-mono">{serialNumber}</div>
28
+ </div>
29
+ </div>
30
+
31
+ <style>
32
+ .lite-seal-stamp {
33
+ display: inline-block;
34
+ padding: 8px;
35
+ transform: rotate(-5deg);
36
+ }
37
+ .lite-seal-circle {
38
+ width: 140px;
39
+ height: 140px;
40
+ border: 3px solid #f53f3f;
41
+ border-radius: 50%;
42
+ color: #f53f3f;
43
+ text-align: center;
44
+ box-sizing: border-box;
45
+ padding: 8px 6px;
46
+ display: flex;
47
+ flex-direction: column;
48
+ justify-content: space-between;
49
+ align-items: center;
50
+ }
51
+ .lite-seal-company { font-size: 9px; font-weight: bold; line-height: 1.1; }
52
+ .lite-seal-star { font-size: 22px; line-height: 1; }
53
+ .lite-seal-title { font-size: 11px; font-weight: bold; letter-spacing: 1px; }
54
+ .lite-seal-serial { font-size: 8px; font-family: monospace; letter-spacing: 1px; }
55
+ .font-mono { font-family: monospace; }
56
+ </style>
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ companyName?: string;
3
+ sealTitle?: string;
4
+ serialNumber?: string;
5
+ class?: string;
6
+ }
7
+ declare const LiteElectronicSealStamp: import("svelte").Component<Props, {}, "">;
8
+ type LiteElectronicSealStamp = ReturnType<typeof LiteElectronicSealStamp>;
9
+ export default LiteElectronicSealStamp;
@@ -0,0 +1,114 @@
1
+ <script lang="ts">
2
+ interface EnvItem {
3
+ key: string;
4
+ value: string;
5
+ isSecret?: boolean;
6
+ scope?: string;
7
+ }
8
+
9
+ interface Props {
10
+ title?: string;
11
+ environment?: string;
12
+ variables?: EnvItem[];
13
+ class?: string;
14
+ }
15
+
16
+ let {
17
+ title = '环境变量与配置字典',
18
+ environment = 'production',
19
+ variables = [
20
+ { key: 'DATABASE_URL', value: 'postgresql://postgres:******@db.cluster:5432/main', isSecret: true, scope: 'server' },
21
+ { key: 'REDIS_HOST', value: 'redis-master.internal', isSecret: false, scope: 'all' },
22
+ { key: 'STORAGE_BUCKET_NAME', value: 'corp-assets-prod', isSecret: false, scope: 'server' },
23
+ { key: 'OIDC_CLIENT_SECRET', value: 'sec_live_9941a8******', isSecret: true, scope: 'auth' }
24
+ ],
25
+ class: className = '',
26
+ }: Props = $props();
27
+ </script>
28
+
29
+ <div
30
+ class="lite-env-editor {className}"
31
+ data-svadmin-component="LiteEnvVariableEditor"
32
+ role="region"
33
+ aria-label="Environment Variable Editor"
34
+ >
35
+ <header class="lite-env-header">
36
+ <div>
37
+ <h4 class="lite-env-title">{title}</h4>
38
+ <span class="lite-env-env-tag">环境: {environment}</span>
39
+ </div>
40
+ <span class="lite-env-count">{variables.length} 项环境变量</span>
41
+ </header>
42
+
43
+ <div class="lite-env-list">
44
+ {#each variables as v (v.key)}
45
+ <div class="lite-env-item">
46
+ <div class="lite-env-key-wrap">
47
+ <code class="lite-env-key">{v.key}</code>
48
+ {#if v.isSecret}
49
+ <span class="lite-env-badge-secret">加密机密</span>
50
+ {/if}
51
+ {#if v.scope}
52
+ <span class="lite-env-badge-scope">{v.scope}</span>
53
+ {/if}
54
+ </div>
55
+ <div class="lite-env-val-wrap">
56
+ <code class="lite-env-value">{v.isSecret ? '●●●●●●●●●●●●' : v.value}</code>
57
+ </div>
58
+ </div>
59
+ {/each}
60
+ </div>
61
+ </div>
62
+
63
+ <style>
64
+ .lite-env-editor {
65
+ border: 1px solid #e5e6eb;
66
+ border-radius: 6px;
67
+ background: #ffffff;
68
+ font-size: 12px;
69
+ overflow: hidden;
70
+ }
71
+ .lite-env-header {
72
+ display: flex;
73
+ justify-content: space-between;
74
+ align-items: center;
75
+ padding: 10px 14px;
76
+ background: #f7f8fa;
77
+ border-bottom: 1px solid #e5e6eb;
78
+ }
79
+ .lite-env-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
80
+ .lite-env-env-tag { font-size: 11px; color: #165dff; font-weight: 600; display: block; margin-top: 2px; }
81
+ .lite-env-count { font-size: 11px; color: #86909c; }
82
+ .lite-env-list { padding: 8px 14px; }
83
+ .lite-env-item {
84
+ display: flex;
85
+ justify-content: space-between;
86
+ align-items: center;
87
+ padding: 8px 0;
88
+ border-bottom: 1px solid #f2f3f5;
89
+ }
90
+ .lite-env-item:last-child { border-bottom: none; }
91
+ .lite-env-key-wrap { display: flex; align-items: center; }
92
+ .lite-env-key-wrap > * + * { margin-left: 6px; }
93
+ .lite-env-key { font-weight: 600; color: #1d2129; font-family: monospace; font-size: 11px; }
94
+ .lite-env-badge-secret {
95
+ font-size: 10px;
96
+ padding: 1px 4px;
97
+ border-radius: 3px;
98
+ background: #ffece8;
99
+ color: #f53f3f;
100
+ font-weight: 500;
101
+ }
102
+ .lite-env-badge-scope {
103
+ font-size: 10px;
104
+ padding: 1px 4px;
105
+ border-radius: 3px;
106
+ background: #f2f3f5;
107
+ color: #4e5969;
108
+ }
109
+ .lite-env-value {
110
+ color: #4e5969;
111
+ font-family: monospace;
112
+ font-size: 11px;
113
+ }
114
+ </style>
@@ -0,0 +1,15 @@
1
+ interface EnvItem {
2
+ key: string;
3
+ value: string;
4
+ isSecret?: boolean;
5
+ scope?: string;
6
+ }
7
+ interface Props {
8
+ title?: string;
9
+ environment?: string;
10
+ variables?: EnvItem[];
11
+ class?: string;
12
+ }
13
+ declare const LiteEnvVariableEditor: import("svelte").Component<Props, {}, "">;
14
+ type LiteEnvVariableEditor = ReturnType<typeof LiteEnvVariableEditor>;
15
+ export default LiteEnvVariableEditor;
@@ -0,0 +1,44 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ label?: string;
4
+ formula?: string;
5
+ value?: number | string | null;
6
+ prefix?: string;
7
+ suffix?: string;
8
+ class?: string;
9
+ }
10
+
11
+ let {
12
+ label = 'Formula Field',
13
+ formula = 'a * b',
14
+ value = 0,
15
+ prefix = '',
16
+ suffix = '',
17
+ class: className = '',
18
+ }: Props = $props();
19
+ </script>
20
+
21
+ <div
22
+ class="lite-formula-field {className}"
23
+ data-svadmin-component="LiteFormulaField"
24
+ >
25
+ <div class="lite-formula-header">
26
+ <span class="lite-formula-label">{label}</span>
27
+ <span class="lite-formula-badge">f(x): {formula}</span>
28
+ </div>
29
+ <div class="lite-formula-box">
30
+ {#if prefix}<span class="lite-formula-prefix">{prefix}</span>{/if}
31
+ <span class="lite-formula-val">{value ?? '0.00'}</span>
32
+ {#if suffix}<span class="lite-formula-suffix">{suffix}</span>{/if}
33
+ </div>
34
+ </div>
35
+
36
+ <style>
37
+ .lite-formula-field { margin-bottom: 12px; font-size: 12px; }
38
+ .lite-formula-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
39
+ .lite-formula-label { font-weight: 600; color: #4e5969; }
40
+ .lite-formula-badge { font-family: monospace; font-size: 11px; background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 4px; }
41
+ .lite-formula-box { background: #f7f8fa; border: 1px solid #e5e6eb; border-radius: 4px; padding: 6px 10px; font-family: monospace; font-weight: 600; color: #1d2129; }
42
+ .lite-formula-prefix { margin-right: 4px; color: #86909c; }
43
+ .lite-formula-suffix { margin-left: 4px; color: #86909c; }
44
+ </style>
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ label?: string;
3
+ formula?: string;
4
+ value?: number | string | null;
5
+ prefix?: string;
6
+ suffix?: string;
7
+ class?: string;
8
+ }
9
+ declare const LiteFormulaField: import("svelte").Component<Props, {}, "">;
10
+ type LiteFormulaField = ReturnType<typeof LiteFormulaField>;
11
+ export default LiteFormulaField;
@@ -0,0 +1,117 @@
1
+ <script lang="ts">
2
+ interface RegionItem {
3
+ id: string;
4
+ name: string;
5
+ value: number;
6
+ status?: 'normal' | 'warning' | 'critical' | 'highlight';
7
+ subtext?: string;
8
+ }
9
+
10
+ interface Props {
11
+ title?: string;
12
+ metricLabel?: string;
13
+ regions?: RegionItem[];
14
+ class?: string;
15
+ }
16
+
17
+ let {
18
+ title = '业务地域空间分布与负载排行',
19
+ metricLabel = '并发连接数',
20
+ regions = [
21
+ { id: 'east', name: '华东大区 (上海/江浙)', value: 4820, status: 'highlight', subtext: '含5个超级算力中心' },
22
+ { id: 'north', name: '华北大区 (京津冀)', value: 4120, status: 'normal', subtext: '主核心控制节点' },
23
+ { id: 'south', name: '华南大区 (广深/港澳)', value: 3650, status: 'normal', subtext: '跨境核心中继集群' },
24
+ { id: 'southwest', name: '西南大区 (成渝/云贵)', value: 3100, status: 'warning', subtext: '水冷水电高能效算力' },
25
+ { id: 'central', name: '华中大区 (两湖/河南)', value: 2450, status: 'normal', subtext: '灾备冷备存储仓' }
26
+ ],
27
+ class: className = '',
28
+ }: Props = $props();
29
+
30
+ const maxVal = $derived(Math.max(...regions.map(r => r.value), 1));
31
+ </script>
32
+
33
+ <div
34
+ class="lite-geo-map {className}"
35
+ data-svadmin-component="LiteGeoScatterMap"
36
+ role="region"
37
+ aria-label="Geo Distribution Map"
38
+ >
39
+ <header class="lite-geo-header">
40
+ <div>
41
+ <h4 class="lite-geo-title">{title}</h4>
42
+ <span class="lite-geo-metric">指标基准: {metricLabel}</span>
43
+ </div>
44
+ </header>
45
+
46
+ <div class="lite-geo-body">
47
+ <div class="lite-geo-list">
48
+ {#each regions as r, idx (r.id)}
49
+ {@const pct = Math.round((r.value / maxVal) * 100)}
50
+ <div class="lite-geo-item">
51
+ <div class="lite-item-top">
52
+ <div class="lite-item-left">
53
+ <span class="lite-rank-num" class:lite-rank-top={idx === 0}>{idx + 1}</span>
54
+ <span class="lite-region-name">{r.name}</span>
55
+ </div>
56
+ <span class="lite-region-val font-mono">{r.value.toLocaleString()}</span>
57
+ </div>
58
+ <div class="lite-track">
59
+ <div
60
+ class="lite-bar"
61
+ class:lite-bar-warn={r.status === 'warning'}
62
+ class:lite-bar-danger={r.status === 'critical'}
63
+ style="width: {pct}%;"
64
+ ></div>
65
+ </div>
66
+ {#if r.subtext}
67
+ <div class="lite-item-sub">{r.subtext}</div>
68
+ {/if}
69
+ </div>
70
+ {/each}
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <style>
76
+ .lite-geo-map {
77
+ border: 1px solid #e5e6eb;
78
+ border-radius: 6px;
79
+ background: #ffffff;
80
+ font-size: 12px;
81
+ overflow: hidden;
82
+ }
83
+ .lite-geo-header {
84
+ padding: 10px 14px;
85
+ background: #f7f8fa;
86
+ border-bottom: 1px solid #e5e6eb;
87
+ }
88
+ .lite-geo-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
89
+ .lite-geo-metric { font-size: 11px; color: #86909c; display: block; margin-top: 2px; }
90
+ .lite-geo-body { padding: 12px 14px; }
91
+ .lite-geo-item { margin-bottom: 12px; }
92
+ .lite-geo-item:last-child { margin-bottom: 0; }
93
+ .lite-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
94
+ .lite-item-left { display: flex; align-items: center; }
95
+ .lite-item-left > * + * { margin-left: 8px; }
96
+ .lite-rank-num {
97
+ display: inline-block;
98
+ width: 16px;
99
+ height: 16px;
100
+ line-height: 16px;
101
+ text-align: center;
102
+ border-radius: 3px;
103
+ background: #f2f3f5;
104
+ color: #4e5969;
105
+ font-size: 10px;
106
+ font-weight: 700;
107
+ }
108
+ .lite-rank-top { background: #165dff; color: #ffffff; }
109
+ .lite-region-name { font-weight: 600; color: #1d2129; font-size: 12px; }
110
+ .lite-region-val { font-size: 12px; font-weight: 700; color: #165dff; }
111
+ .font-mono { font-family: monospace; }
112
+ .lite-track { height: 6px; background: #f2f3f5; border-radius: 3px; overflow: hidden; }
113
+ .lite-bar { height: 100%; background: #165dff; border-radius: 3px; }
114
+ .lite-bar-warn { background: #ff7d00; }
115
+ .lite-bar-danger { background: #f53f3f; }
116
+ .lite-item-sub { font-size: 11px; color: #86909c; margin-top: 3px; }
117
+ </style>
@@ -0,0 +1,16 @@
1
+ interface RegionItem {
2
+ id: string;
3
+ name: string;
4
+ value: number;
5
+ status?: 'normal' | 'warning' | 'critical' | 'highlight';
6
+ subtext?: string;
7
+ }
8
+ interface Props {
9
+ title?: string;
10
+ metricLabel?: string;
11
+ regions?: RegionItem[];
12
+ class?: string;
13
+ }
14
+ declare const LiteGeoScatterMap: import("svelte").Component<Props, {}, "">;
15
+ type LiteGeoScatterMap = ReturnType<typeof LiteGeoScatterMap>;
16
+ export default LiteGeoScatterMap;
@@ -0,0 +1,84 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ secret?: string;
4
+ payload?: string;
5
+ algorithm?: string;
6
+ signature?: string;
7
+ class?: string;
8
+ }
9
+
10
+ let {
11
+ secret = 'whsec_sample_secret',
12
+ payload = '{"test":true}',
13
+ algorithm = 'SHA-256',
14
+ signature = '7b5a8e0f9c2d1b4a6e8f3c5d7a9b0e2f4a6c8e0d2b4f6a8c0e2d4f6a8c0e2d4f',
15
+ class: className = '',
16
+ }: Props = $props();
17
+ </script>
18
+
19
+ <div
20
+ class="lite-hmac-calculator {className}"
21
+ data-svadmin-component="LiteHmacSignatureCalculator"
22
+ role="region"
23
+ aria-label="HMAC Signature Calculator"
24
+ >
25
+ <header class="lite-hmac-header">
26
+ <span class="lite-hmac-title">HMAC 签名现场计算器 (SSR)</span>
27
+ <span class="lite-hmac-algo">HMAC-{algorithm}</span>
28
+ </header>
29
+
30
+ <div class="lite-hmac-body">
31
+ <div class="lite-hmac-row">
32
+ <span class="lite-hmac-label">密钥:</span>
33
+ <code class="lite-hmac-val">{secret}</code>
34
+ </div>
35
+
36
+ <div class="lite-hmac-row">
37
+ <span class="lite-hmac-label">待签载荷:</span>
38
+ <code class="lite-hmac-val">{payload}</code>
39
+ </div>
40
+
41
+ <div class="lite-hmac-result">
42
+ <span class="lite-hmac-label">签名结果 (Hex):</span>
43
+ <div class="lite-hmac-sig">{signature}</div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+
48
+ <style>
49
+ .lite-hmac-calculator {
50
+ border: 1px solid #e5e6eb;
51
+ border-radius: 6px;
52
+ background: #ffffff;
53
+ font-size: 12px;
54
+ overflow: hidden;
55
+ }
56
+ .lite-hmac-header {
57
+ display: flex;
58
+ justify-content: space-between;
59
+ align-items: center;
60
+ padding: 8px 12px;
61
+ background: #f7f8fa;
62
+ border-bottom: 1px solid #e5e6eb;
63
+ }
64
+ .lite-hmac-title { font-weight: 600; color: #1d2129; }
65
+ .lite-hmac-algo { font-size: 10px; font-family: monospace; background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 3px; }
66
+ .lite-hmac-body { padding: 12px; }
67
+ .lite-hmac-row { display: flex; margin-bottom: 8px; font-family: monospace; }
68
+ .lite-hmac-row > * + * { margin-left: 8px; }
69
+ .lite-hmac-label { color: #86909c; min-width: 60px; font-family: sans-serif; }
70
+ .lite-hmac-val { color: #1d2129; word-break: break-all; }
71
+ .lite-hmac-result { margin-top: 8px; }
72
+ .lite-hmac-sig {
73
+ margin-top: 4px;
74
+ padding: 8px;
75
+ background: #f7f8fa;
76
+ border: 1px solid #e5e6eb;
77
+ border-radius: 4px;
78
+ font-family: monospace;
79
+ font-weight: 700;
80
+ color: #165dff;
81
+ word-break: break-all;
82
+ font-size: 11px;
83
+ }
84
+ </style>