@svadmin/lite 0.26.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 (109) hide show
  1. package/dist/components/LiteAbacPolicyMatrix.svelte +128 -0
  2. package/dist/components/LiteAbacPolicyMatrix.svelte.d.ts +16 -0
  3. package/dist/components/LiteAnnouncementBanner.svelte +88 -0
  4. package/dist/components/LiteAnnouncementBanner.svelte.d.ts +12 -0
  5. package/dist/components/LiteApiPlayground.svelte +103 -0
  6. package/dist/components/LiteApiPlayground.svelte.d.ts +10 -0
  7. package/dist/components/LiteApprovalChainBuilder.svelte +120 -0
  8. package/dist/components/LiteApprovalChainBuilder.svelte.d.ts +15 -0
  9. package/dist/components/LiteAsyncExportModal.svelte +113 -0
  10. package/dist/components/LiteAsyncExportModal.svelte.d.ts +14 -0
  11. package/dist/components/LiteAuditTrailInspector.svelte +166 -0
  12. package/dist/components/LiteAuditTrailInspector.svelte.d.ts +23 -0
  13. package/dist/components/LiteBillingInvoiceDrawer.svelte +100 -0
  14. package/dist/components/LiteBillingInvoiceDrawer.svelte.d.ts +16 -0
  15. package/dist/components/LiteChartAnnotationOverlay.svelte +101 -0
  16. package/dist/components/LiteChartAnnotationOverlay.svelte.d.ts +16 -0
  17. package/dist/components/LiteColumnMappingTable.svelte +105 -0
  18. package/dist/components/LiteColumnMappingTable.svelte.d.ts +14 -0
  19. package/dist/components/LiteContextMenu.svelte +114 -0
  20. package/dist/components/LiteContextMenu.svelte.d.ts +18 -0
  21. package/dist/components/LiteDashboardGridLayout.svelte +108 -0
  22. package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
  23. package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
  24. package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
  25. package/dist/components/LiteDataImportDropzone.svelte +89 -0
  26. package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
  27. package/dist/components/LiteDataLineageGraph.svelte +100 -0
  28. package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
  29. package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
  30. package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
  31. package/dist/components/LiteDataScreenContainer.svelte +34 -0
  32. package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
  33. package/dist/components/LiteDualApprovalGate.svelte +58 -0
  34. package/dist/components/LiteDualApprovalGate.svelte.d.ts +11 -0
  35. package/dist/components/LiteElectronicSealStamp.svelte +56 -0
  36. package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
  37. package/dist/components/LiteEnvVariableEditor.svelte +114 -0
  38. package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
  39. package/dist/components/LiteFormulaField.svelte +44 -0
  40. package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
  41. package/dist/components/LiteGeoScatterMap.svelte +117 -0
  42. package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
  43. package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
  44. package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
  45. package/dist/components/LiteImportPreviewValidator.svelte +136 -0
  46. package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
  47. package/dist/components/LiteJsonViewer.svelte +88 -0
  48. package/dist/components/LiteJsonViewer.svelte.d.ts +9 -0
  49. package/dist/components/LiteKeyboardShortcutsModal.svelte +56 -0
  50. package/dist/components/LiteKeyboardShortcutsModal.svelte.d.ts +13 -0
  51. package/dist/components/LiteKpiCard.svelte +169 -0
  52. package/dist/components/LiteKpiCard.svelte.d.ts +25 -0
  53. package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
  54. package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
  55. package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
  56. package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
  57. package/dist/components/LitePeriodComparisonCard.svelte +60 -0
  58. package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
  59. package/dist/components/LitePermissionSimulator.svelte +90 -0
  60. package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
  61. package/dist/components/LitePivotMatrix.svelte +138 -0
  62. package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
  63. package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
  64. package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
  65. package/dist/components/LiteQueryAiExplainer.svelte +85 -0
  66. package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
  67. package/dist/components/LiteResultPage.svelte +135 -0
  68. package/dist/components/LiteResultPage.svelte.d.ts +17 -0
  69. package/dist/components/LiteScheduledJobManager.svelte +116 -0
  70. package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
  71. package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
  72. package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
  73. package/dist/components/LiteSecureDataExporter.svelte +101 -0
  74. package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
  75. package/dist/components/LiteSensitiveDataMask.svelte +34 -2
  76. package/dist/components/LiteSensitiveDataMask.svelte.d.ts +1 -2
  77. package/dist/components/LiteSqlConsole.svelte +128 -0
  78. package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
  79. package/dist/components/LiteStepWizard.svelte +98 -0
  80. package/dist/components/LiteStepWizard.svelte.d.ts +16 -0
  81. package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
  82. package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
  83. package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
  84. package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
  85. package/dist/components/LiteTableAggregationFooter.svelte +76 -0
  86. package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
  87. package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
  88. package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
  89. package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
  90. package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
  91. package/dist/components/LiteTextDiffViewer.svelte +111 -0
  92. package/dist/components/LiteTextDiffViewer.svelte.d.ts +10 -0
  93. package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
  94. package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
  95. package/dist/components/LiteTierFeatureComparison.svelte +97 -0
  96. package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
  97. package/dist/components/LiteUnsavedChangesGuard.svelte +53 -0
  98. package/dist/components/LiteUnsavedChangesGuard.svelte.d.ts +10 -0
  99. package/dist/components/LiteWatermarkContainer.svelte +58 -0
  100. package/dist/components/LiteWatermarkContainer.svelte.d.ts +9 -0
  101. package/dist/components/LiteWebhookSimulator.svelte +120 -0
  102. package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
  103. package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
  104. package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
  105. package/dist/components/LiteWorkflowStepper.svelte +56 -0
  106. package/dist/components/LiteWorkflowStepper.svelte.d.ts +14 -0
  107. package/dist/index.d.ts +57 -0
  108. package/dist/index.js +61 -0
  109. package/package.json +2 -2
@@ -0,0 +1,58 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ actionTitle: string;
6
+ requiredRole?: string;
7
+ formAction?: string;
8
+ class?: string;
9
+ children?: Snippet;
10
+ }
11
+
12
+ let {
13
+ actionTitle,
14
+ requiredRole = '合规主管',
15
+ formAction = '/approval/verify',
16
+ class: className = '',
17
+ children,
18
+ }: Props = $props();
19
+ </script>
20
+
21
+ <div
22
+ class="lite-dual-approval {className}"
23
+ data-svadmin-component="LiteDualApprovalGate"
24
+ >
25
+ <div class="lite-approval-header">
26
+ <span class="lite-approval-badge">双人联签 (Two-Person Rule)</span>
27
+ <h3 class="lite-approval-title">{actionTitle}</h3>
28
+ <p class="lite-approval-desc">特权高危操作,须由第二位具备 [{requiredRole}] 权限的主管输入口令核验。</p>
29
+ </div>
30
+
31
+ {#if children}{@render children()}{/if}
32
+
33
+ <form action={formAction} method="POST" class="lite-approval-form">
34
+ <div class="lite-form-row">
35
+ <label for="lite-rev-id" class="lite-label">复核人工号</label>
36
+ <input id="lite-rev-id" name="reviewerId" type="text" required class="lite-input" placeholder="输入工号" />
37
+ </div>
38
+ <div class="lite-form-row">
39
+ <label for="lite-rev-sec" class="lite-label">复核人口令/2FA</label>
40
+ <input id="lite-rev-sec" name="secret" type="password" required class="lite-input" placeholder="输入独立核验口令" />
41
+ </div>
42
+ <button type="submit" class="lite-approval-btn">确认双人联签并执行</button>
43
+ </form>
44
+ </div>
45
+
46
+ <style>
47
+ .lite-dual-approval { border: 1px solid #fbbbb0; background: #fffdfc; border-radius: 8px; padding: 20px; }
48
+ .lite-approval-badge { display: inline-block; font-size: 11px; font-weight: 600; color: #f53f3f; background: #ffece8; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; }
49
+ .lite-approval-title { font-size: 16px; font-weight: 700; color: #1d2129; margin: 0 0 6px 0; }
50
+ .lite-approval-desc { font-size: 12px; color: #86909c; margin: 0 0 16px 0; }
51
+ .lite-approval-form { display: flex; flex-direction: column; }
52
+ .lite-approval-form > * + * { margin-top: 12px; }
53
+ .lite-form-row { display: flex; flex-direction: column; }
54
+ .lite-form-row > * + * { margin-top: 4px; }
55
+ .lite-label { font-size: 12px; font-weight: 600; color: #4e5969; }
56
+ .lite-input { height: 32px; border: 1px solid #e5e6eb; border-radius: 4px; padding: 0 10px; font-size: 12px; }
57
+ .lite-approval-btn { height: 34px; background: #f53f3f; color: #fff; border: none; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; }
58
+ </style>
@@ -0,0 +1,11 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ actionTitle: string;
4
+ requiredRole?: string;
5
+ formAction?: string;
6
+ class?: string;
7
+ children?: Snippet;
8
+ }
9
+ declare const LiteDualApprovalGate: import("svelte").Component<Props, {}, "">;
10
+ type LiteDualApprovalGate = ReturnType<typeof LiteDualApprovalGate>;
11
+ export default LiteDualApprovalGate;
@@ -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>
@@ -0,0 +1,10 @@
1
+ interface Props {
2
+ secret?: string;
3
+ payload?: string;
4
+ algorithm?: string;
5
+ signature?: string;
6
+ class?: string;
7
+ }
8
+ declare const LiteHmacSignatureCalculator: import("svelte").Component<Props, {}, "">;
9
+ type LiteHmacSignatureCalculator = ReturnType<typeof LiteHmacSignatureCalculator>;
10
+ export default LiteHmacSignatureCalculator;