@svadmin/lite 0.27.0 → 0.31.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.
Files changed (96) 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/LiteCronExpressionBuilder.svelte +4 -1
  16. package/dist/components/LiteDashboardGridLayout.svelte +108 -0
  17. package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
  18. package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
  19. package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
  20. package/dist/components/LiteDataImportDropzone.svelte +89 -0
  21. package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
  22. package/dist/components/LiteDataLineageGraph.svelte +100 -0
  23. package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
  24. package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
  25. package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
  26. package/dist/components/LiteDataScreenContainer.svelte +34 -0
  27. package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
  28. package/dist/components/LiteElectronicSealStamp.svelte +56 -0
  29. package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
  30. package/dist/components/LiteEnvVariableEditor.svelte +114 -0
  31. package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
  32. package/dist/components/LiteFormulaField.svelte +44 -0
  33. package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
  34. package/dist/components/LiteGeoScatterMap.svelte +117 -0
  35. package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
  36. package/dist/components/LiteGrid.svelte +10 -10
  37. package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
  38. package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
  39. package/dist/components/LiteImportPreviewValidator.svelte +136 -0
  40. package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
  41. package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
  42. package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
  43. package/dist/components/LiteMicroAppRouteSync.svelte +72 -0
  44. package/dist/components/LiteMicroAppRouteSync.svelte.d.ts +9 -0
  45. package/dist/components/LiteMicroAppSandbox.svelte +74 -0
  46. package/dist/components/LiteMicroAppSandbox.svelte.d.ts +9 -0
  47. package/dist/components/LiteMicroAppStateBusIndicator.svelte +70 -0
  48. package/dist/components/LiteMicroAppStateBusIndicator.svelte.d.ts +7 -0
  49. package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
  50. package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
  51. package/dist/components/LitePeriodComparisonCard.svelte +60 -0
  52. package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
  53. package/dist/components/LitePermissionSimulator.svelte +90 -0
  54. package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
  55. package/dist/components/LitePivotMatrix.svelte +138 -0
  56. package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
  57. package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
  58. package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
  59. package/dist/components/LitePopconfirm.svelte +2 -0
  60. package/dist/components/LiteQueryAiExplainer.svelte +85 -0
  61. package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
  62. package/dist/components/LiteScheduledJobManager.svelte +116 -0
  63. package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
  64. package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
  65. package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
  66. package/dist/components/LiteSecureDataExporter.svelte +101 -0
  67. package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
  68. package/dist/components/LiteSpace.svelte +6 -6
  69. package/dist/components/LiteSpin.svelte +4 -2
  70. package/dist/components/LiteSpin.svelte.d.ts +2 -0
  71. package/dist/components/LiteSqlConsole.svelte +128 -0
  72. package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
  73. package/dist/components/LiteStatusTabs.svelte +1 -1
  74. package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
  75. package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
  76. package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
  77. package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
  78. package/dist/components/LiteTableAggregationFooter.svelte +76 -0
  79. package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
  80. package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
  81. package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
  82. package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
  83. package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
  84. package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
  85. package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
  86. package/dist/components/LiteTierFeatureComparison.svelte +97 -0
  87. package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
  88. package/dist/components/LiteTwoFactorStepper.svelte +1 -1
  89. package/dist/components/LiteVirtualTreeSelect.svelte +4 -1
  90. package/dist/components/LiteWebhookSimulator.svelte +120 -0
  91. package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
  92. package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
  93. package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
  94. package/dist/index.d.ts +43 -0
  95. package/dist/index.js +51 -0
  96. package/package.json +2 -2
@@ -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;
@@ -19,16 +19,16 @@
19
19
 
20
20
  <style>
21
21
  .lite-grid { display: flex; flex-wrap: wrap; margin: -6px; }
22
- .lite-grid > * { box-sizing: border-box; width: calc(33.333% - 12px); margin: 6px; }
23
- .lite-grid[data-columns='2'] > * { width: calc(50% - 12px); }
24
- .lite-grid[data-columns='4'] > * { width: calc(25% - 12px); }
22
+ :global(.lite-grid > *) { box-sizing: border-box; width: calc(33.333% - 12px); margin: 6px; }
23
+ :global(.lite-grid[data-columns='2'] > *) { width: calc(50% - 12px); }
24
+ :global(.lite-grid[data-columns='4'] > *) { width: calc(25% - 12px); }
25
25
  .lite-grid[data-gap='sm'] { margin: -2px; }
26
- .lite-grid[data-gap='sm'] > * { width: calc(33.333% - 4px); margin: 2px; }
27
- .lite-grid[data-gap='sm'][data-columns='2'] > * { width: calc(50% - 4px); }
28
- .lite-grid[data-gap='sm'][data-columns='4'] > * { width: calc(25% - 4px); }
26
+ :global(.lite-grid[data-gap='sm'] > *) { width: calc(33.333% - 4px); margin: 2px; }
27
+ :global(.lite-grid[data-gap='sm'][data-columns='2'] > *) { width: calc(50% - 4px); }
28
+ :global(.lite-grid[data-gap='sm'][data-columns='4'] > *) { width: calc(25% - 4px); }
29
29
  .lite-grid[data-gap='lg'] { margin: -10px; }
30
- .lite-grid[data-gap='lg'] > * { width: calc(33.333% - 20px); margin: 10px; }
31
- .lite-grid[data-gap='lg'][data-columns='2'] > * { width: calc(50% - 20px); }
32
- .lite-grid[data-gap='lg'][data-columns='4'] > * { width: calc(25% - 20px); }
33
- @media (max-width: 720px) { .lite-grid > * { width: calc(100% - 12px) !important; } }
30
+ :global(.lite-grid[data-gap='lg'] > *) { width: calc(33.333% - 20px); margin: 10px; }
31
+ :global(.lite-grid[data-gap='lg'][data-columns='2'] > *) { width: calc(50% - 20px); }
32
+ :global(.lite-grid[data-gap='lg'][data-columns='4'] > *) { width: calc(25% - 20px); }
33
+ @media (max-width: 720px) { :global(.lite-grid > *) { width: calc(100% - 12px) !important; } }
34
34
  </style>
@@ -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;
@@ -0,0 +1,136 @@
1
+ <script lang="ts">
2
+ interface ValidationError {
3
+ row: number;
4
+ col: string;
5
+ value: string;
6
+ message: string;
7
+ }
8
+
9
+ interface Props {
10
+ title?: string;
11
+ totalRows?: number;
12
+ validRows?: number;
13
+ errors?: ValidationError[];
14
+ class?: string;
15
+ }
16
+
17
+ let {
18
+ title = '导入数据预检与错误定位',
19
+ totalRows = 100,
20
+ validRows = 98,
21
+ errors = [
22
+ { row: 14, col: 'mobile_phone', value: '138000', message: '手机号格式非法,必须为11位国内有效号码' },
23
+ { row: 42, col: 'email', value: 'invalid-email', message: '电子邮箱格式不合规' }
24
+ ],
25
+ class: className = '',
26
+ }: Props = $props();
27
+
28
+ const errorCount = $derived(errors.length);
29
+ </script>
30
+
31
+ <div
32
+ class="lite-preview-validator {className}"
33
+ data-svadmin-component="LiteImportPreviewValidator"
34
+ role="region"
35
+ aria-label="Import Preview Validator"
36
+ >
37
+ <header class="lite-validator-header">
38
+ <h4 class="lite-validator-title">{title}</h4>
39
+ <div class="lite-stats-wrap">
40
+ <span class="lite-stat-total">总记录: {totalRows}</span>
41
+ <span class="lite-stat-valid">合格: {validRows}</span>
42
+ {#if errorCount > 0}
43
+ <span class="lite-stat-err">异常: {errorCount}</span>
44
+ {/if}
45
+ </div>
46
+ </header>
47
+
48
+ <div class="lite-validator-body">
49
+ {#if errorCount === 0}
50
+ <div class="lite-valid-notice">
51
+ ✓ 所有导入记录校验通过,未发现格式或必填项异常。
52
+ </div>
53
+ {:else}
54
+ <div class="lite-errors-list">
55
+ <div class="lite-err-notice">
56
+ 发现 {errorCount} 处数据格式异常,建议修正后重新上传或选择忽略错误行入库。
57
+ </div>
58
+ <table class="lite-errors-table">
59
+ <thead>
60
+ <tr>
61
+ <th>数据行号</th>
62
+ <th>异常列</th>
63
+ <th>当前取值</th>
64
+ <th>失败原因说明</th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ {#each errors as err (err.row + err.col)}
69
+ <tr>
70
+ <td class="font-mono">第 {err.row} 行</td>
71
+ <td><code>{err.col}</code></td>
72
+ <td class="lite-err-val">{err.value}</td>
73
+ <td class="lite-err-msg">{err.message}</td>
74
+ </tr>
75
+ {/each}
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ {/if}
80
+ </div>
81
+ </div>
82
+
83
+ <style>
84
+ .lite-preview-validator {
85
+ border: 1px solid #e5e6eb;
86
+ border-radius: 6px;
87
+ background: #ffffff;
88
+ font-size: 12px;
89
+ overflow: hidden;
90
+ }
91
+ .lite-validator-header {
92
+ display: flex;
93
+ justify-content: space-between;
94
+ align-items: center;
95
+ padding: 10px 14px;
96
+ background: #f7f8fa;
97
+ border-bottom: 1px solid #e5e6eb;
98
+ }
99
+ .lite-validator-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
100
+ .lite-stats-wrap { display: flex; font-size: 11px; font-weight: 500; }
101
+ .lite-stats-wrap > * + * { margin-left: 8px; }
102
+ .lite-stat-total { color: #4e5969; }
103
+ .lite-stat-valid { color: #00b42a; }
104
+ .lite-stat-err { color: #f53f3f; }
105
+ .lite-validator-body { padding: 12px 14px; }
106
+ .lite-valid-notice {
107
+ padding: 10px;
108
+ background: #e8ffea;
109
+ color: #00b42a;
110
+ border-radius: 4px;
111
+ font-weight: 500;
112
+ }
113
+ .lite-err-notice {
114
+ padding: 8px 10px;
115
+ background: #ffece8;
116
+ color: #f53f3f;
117
+ border-radius: 4px;
118
+ font-size: 11px;
119
+ margin-bottom: 10px;
120
+ }
121
+ .lite-errors-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
122
+ .lite-errors-table th {
123
+ padding: 6px 10px;
124
+ background: #f2f3f5;
125
+ border-bottom: 1px solid #e5e6eb;
126
+ color: #4e5969;
127
+ }
128
+ .lite-errors-table td {
129
+ padding: 6px 10px;
130
+ border-bottom: 1px solid #f2f3f5;
131
+ }
132
+ .font-mono { font-family: monospace; font-weight: 600; }
133
+ code { font-family: monospace; color: #165dff; }
134
+ .lite-err-val { color: #f53f3f; font-family: monospace; }
135
+ .lite-err-msg { color: #4e5969; }
136
+ </style>
@@ -0,0 +1,16 @@
1
+ interface ValidationError {
2
+ row: number;
3
+ col: string;
4
+ value: string;
5
+ message: string;
6
+ }
7
+ interface Props {
8
+ title?: string;
9
+ totalRows?: number;
10
+ validRows?: number;
11
+ errors?: ValidationError[];
12
+ class?: string;
13
+ }
14
+ declare const LiteImportPreviewValidator: import("svelte").Component<Props, {}, "">;
15
+ type LiteImportPreviewValidator = ReturnType<typeof LiteImportPreviewValidator>;
16
+ export default LiteImportPreviewValidator;
@@ -0,0 +1,84 @@
1
+ <script lang="ts">
2
+ interface LogItem {
3
+ id: string;
4
+ timestamp: string;
5
+ level: string;
6
+ message: string;
7
+ }
8
+
9
+ interface Props {
10
+ title?: string;
11
+ logs?: LogItem[];
12
+ class?: string;
13
+ }
14
+
15
+ let {
16
+ title = '实时日志控制台',
17
+ logs = [
18
+ { id: '1', timestamp: '08:45:10', level: 'INFO', message: '[Gateway] Inbound HTTP POST /api/v1/orders/create (200 OK)' },
19
+ { id: '2', timestamp: '08:45:11', level: 'WARN', message: '[Redis] Cache miss on key "session:usr_9901"' },
20
+ { id: '3', timestamp: '08:45:12', level: 'ERROR', message: '[NotificationService] Third-party SMS webhook timed out' }
21
+ ],
22
+ class: className = '',
23
+ }: Props = $props();
24
+
25
+ function getLevelColor(lvl: string): string {
26
+ if (lvl === 'ERROR') return '#f53f3f';
27
+ if (lvl === 'WARN') return '#ff7d00';
28
+ return '#165dff';
29
+ }
30
+ </script>
31
+
32
+ <div
33
+ class="lite-log-viewer {className}"
34
+ data-svadmin-component="LiteLiveStreamLogViewer"
35
+ role="region"
36
+ aria-label="Live Stream Log Viewer"
37
+ >
38
+ <header class="lite-log-header">
39
+ <h4 class="lite-log-title">{title}</h4>
40
+ <span class="lite-log-count">{logs.length} 条日志记录</span>
41
+ </header>
42
+
43
+ <div class="lite-log-console">
44
+ {#each logs as log (log.id)}
45
+ <div class="lite-log-line font-mono">
46
+ <span class="lite-log-time">{log.timestamp}</span>
47
+ <span class="lite-log-badge" style="color: {getLevelColor(log.level)};">[{log.level}]</span>
48
+ <span class="lite-log-msg">{log.message}</span>
49
+ </div>
50
+ {/each}
51
+ </div>
52
+ </div>
53
+
54
+ <style>
55
+ .lite-log-viewer {
56
+ border: 1px solid #e5e6eb;
57
+ border-radius: 6px;
58
+ background: #ffffff;
59
+ font-size: 12px;
60
+ overflow: hidden;
61
+ }
62
+ .lite-log-header {
63
+ display: flex;
64
+ justify-content: space-between;
65
+ align-items: center;
66
+ padding: 10px 14px;
67
+ background: #f7f8fa;
68
+ border-bottom: 1px solid #e5e6eb;
69
+ }
70
+ .lite-log-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
71
+ .lite-log-count { font-size: 11px; color: #86909c; }
72
+ .lite-log-console {
73
+ background: #1e293b;
74
+ color: #f8fafc;
75
+ padding: 12px 14px;
76
+ font-size: 11px;
77
+ overflow-x: auto;
78
+ }
79
+ .lite-log-line { line-height: 1.6; }
80
+ .font-mono { font-family: monospace; }
81
+ .lite-log-time { color: #94a3b8; margin-right: 6px; }
82
+ .lite-log-badge { font-weight: 700; margin-right: 6px; }
83
+ .lite-log-msg { color: #f8fafc; }
84
+ </style>
@@ -0,0 +1,14 @@
1
+ interface LogItem {
2
+ id: string;
3
+ timestamp: string;
4
+ level: string;
5
+ message: string;
6
+ }
7
+ interface Props {
8
+ title?: string;
9
+ logs?: LogItem[];
10
+ class?: string;
11
+ }
12
+ declare const LiteLiveStreamLogViewer: import("svelte").Component<Props, {}, "">;
13
+ type LiteLiveStreamLogViewer = ReturnType<typeof LiteLiveStreamLogViewer>;
14
+ export default LiteLiveStreamLogViewer;
@@ -0,0 +1,72 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ title?: string;
4
+ subAppRoute?: string;
5
+ hostUrl?: string;
6
+ class?: string;
7
+ }
8
+
9
+ let {
10
+ title = '微前端路由双向同步协调器 (SSR 静态映射)',
11
+ subAppRoute = '/reports/quarterly-gmv/details',
12
+ hostUrl = 'https://admin.example.com/portal/bi-workspace?subAppRoute=%2Freports%2Fquarterly-gmv',
13
+ class: className = '',
14
+ }: Props = $props();
15
+ </script>
16
+
17
+ <div
18
+ class="lite-routesync-box {className}"
19
+ data-svadmin-component="LiteMicroAppRouteSync"
20
+ role="region"
21
+ aria-label="MicroApp Route Sync"
22
+ >
23
+ <header class="lite-sync-header">
24
+ <div class="lite-sync-title-row">
25
+ <span class="lite-sync-icon">🧭</span>
26
+ <h4 class="lite-sync-title">{title}</h4>
27
+ </div>
28
+ </header>
29
+
30
+ <div class="lite-sync-body">
31
+ <div class="lite-sync-row">
32
+ <span class="lite-sync-label">子应用内部路径:</span>
33
+ <span class="lite-sync-val font-mono">{subAppRoute}</span>
34
+ </div>
35
+ <div class="lite-sync-row">
36
+ <span class="lite-sync-label">宿主映射地址:</span>
37
+ <span class="lite-sync-val font-mono text-muted">{hostUrl}</span>
38
+ </div>
39
+ </div>
40
+ </div>
41
+
42
+ <style>
43
+ .lite-routesync-box {
44
+ border: 1px solid #e5e6eb;
45
+ border-radius: 6px;
46
+ background: #ffffff;
47
+ font-size: 12px;
48
+ overflow: hidden;
49
+ }
50
+ .lite-sync-header {
51
+ display: flex;
52
+ align-items: center;
53
+ padding: 10px 14px;
54
+ background: #f7f8fa;
55
+ border-bottom: 1px solid #e5e6eb;
56
+ }
57
+ .lite-sync-title-row { display: flex; align-items: center; }
58
+ .lite-sync-icon { font-size: 14px; margin-right: 6px; }
59
+ .lite-sync-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
60
+ .lite-sync-body { padding: 12px 14px; }
61
+ .lite-sync-row {
62
+ display: flex;
63
+ justify-content: space-between;
64
+ padding: 6px 0;
65
+ border-bottom: 1px dashed #f2f3f5;
66
+ }
67
+ .lite-sync-row:last-child { border-bottom: none; }
68
+ .lite-sync-label { color: #86909c; }
69
+ .lite-sync-val { font-weight: 500; color: #1d2129; }
70
+ .font-mono { font-family: monospace; font-size: 11px; }
71
+ .text-muted { color: #86909c; }
72
+ </style>
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ title?: string;
3
+ subAppRoute?: string;
4
+ hostUrl?: string;
5
+ class?: string;
6
+ }
7
+ declare const LiteMicroAppRouteSync: import("svelte").Component<Props, {}, "">;
8
+ type LiteMicroAppRouteSync = ReturnType<typeof LiteMicroAppRouteSync>;
9
+ export default LiteMicroAppRouteSync;
@@ -0,0 +1,74 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ src?: string;
4
+ appName?: string;
5
+ appId?: string;
6
+ class?: string;
7
+ }
8
+
9
+ let {
10
+ src = 'https://sub-bi.example.internal/embed',
11
+ appName = '企业商业智能 (BI) 报表子应用',
12
+ appId = 'app-bi-micro-01',
13
+ class: className = '',
14
+ }: Props = $props();
15
+ </script>
16
+
17
+ <div
18
+ class="lite-microapp-sandbox {className}"
19
+ data-svadmin-component="LiteMicroAppSandbox"
20
+ role="region"
21
+ aria-label="MicroApp Isolated Sandbox"
22
+ >
23
+ <header class="lite-sandbox-header">
24
+ <div class="lite-sandbox-title-row">
25
+ <span class="lite-sandbox-icon">📦</span>
26
+ <h4 class="lite-sandbox-title">{appName}</h4>
27
+ <span class="lite-sandbox-id font-mono">({appId})</span>
28
+ </div>
29
+ <span class="lite-sandbox-status">[SSR 静态沙箱预览]</span>
30
+ </header>
31
+
32
+ <div class="lite-sandbox-body">
33
+ <div class="lite-sandbox-placeholder">
34
+ <p class="lite-placeholder-text">子应用受限环境沙箱已就绪。在无 JavaScript 环境中展示静态预留位,客户端加载后通过 Shadow DOM / iframe 挂载真实子应用。</p>
35
+ <div class="lite-sandbox-meta">
36
+ <span>安全沙箱源: <span class="font-mono">{src}</span></span>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+
42
+ <style>
43
+ .lite-microapp-sandbox {
44
+ border: 1px solid #e5e6eb;
45
+ border-radius: 6px;
46
+ background: #ffffff;
47
+ font-size: 12px;
48
+ overflow: hidden;
49
+ }
50
+ .lite-sandbox-header {
51
+ display: flex;
52
+ justify-content: space-between;
53
+ align-items: center;
54
+ padding: 10px 14px;
55
+ background: #f7f8fa;
56
+ border-bottom: 1px solid #e5e6eb;
57
+ }
58
+ .lite-sandbox-title-row { display: flex; align-items: center; }
59
+ .lite-sandbox-icon { font-size: 14px; margin-right: 6px; }
60
+ .lite-sandbox-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; margin-right: 6px; }
61
+ .lite-sandbox-id { font-size: 10px; color: #86909c; }
62
+ .font-mono { font-family: monospace; font-size: 11px; }
63
+ .lite-sandbox-status { font-size: 11px; color: #165dff; font-weight: 500; }
64
+ .lite-sandbox-body { padding: 16px 14px; }
65
+ .lite-sandbox-placeholder {
66
+ border: 1px dashed #c9cdd4;
67
+ background: #fafafa;
68
+ border-radius: 4px;
69
+ padding: 16px;
70
+ text-align: center;
71
+ }
72
+ .lite-placeholder-text { margin: 0 0 10px 0; color: #4e5969; font-size: 12px; line-height: 1.5; }
73
+ .lite-sandbox-meta { font-size: 11px; color: #86909c; }
74
+ </style>
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ src?: string;
3
+ appName?: string;
4
+ appId?: string;
5
+ class?: string;
6
+ }
7
+ declare const LiteMicroAppSandbox: import("svelte").Component<Props, {}, "">;
8
+ type LiteMicroAppSandbox = ReturnType<typeof LiteMicroAppSandbox>;
9
+ export default LiteMicroAppSandbox;
@@ -0,0 +1,70 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ channel?: string;
4
+ class?: string;
5
+ }
6
+
7
+ let {
8
+ channel = 'svadmin_microapp_global_bus',
9
+ class: className = '',
10
+ }: Props = $props();
11
+ </script>
12
+
13
+ <div
14
+ class="lite-statebus-box {className}"
15
+ data-svadmin-component="LiteMicroAppStateBusIndicator"
16
+ role="region"
17
+ aria-label="MicroApp State Bus"
18
+ >
19
+ <header class="lite-bus-header">
20
+ <div class="lite-bus-title-row">
21
+ <span class="lite-bus-icon">📡</span>
22
+ <h4 class="lite-bus-title">跨应用响应式状态总线 (SSR 静态说明)</h4>
23
+ </div>
24
+ <span class="lite-bus-channel font-mono">[{channel}]</span>
25
+ </header>
26
+
27
+ <div class="lite-bus-body">
28
+ <div class="lite-bus-row">
29
+ <span class="lite-bus-label">总线状态:</span>
30
+ <span class="lite-bus-val">SSR 就绪 (客户端通过 BroadcastChannel 双向流转)</span>
31
+ </div>
32
+ <div class="lite-bus-row">
33
+ <span class="lite-bus-label">广播策略:</span>
34
+ <span class="lite-bus-val">租户切换、Token 刷新与全局主题联动广播</span>
35
+ </div>
36
+ </div>
37
+ </div>
38
+
39
+ <style>
40
+ .lite-statebus-box {
41
+ border: 1px solid #e5e6eb;
42
+ border-radius: 6px;
43
+ background: #ffffff;
44
+ font-size: 12px;
45
+ overflow: hidden;
46
+ }
47
+ .lite-bus-header {
48
+ display: flex;
49
+ justify-content: space-between;
50
+ align-items: center;
51
+ padding: 10px 14px;
52
+ background: #f7f8fa;
53
+ border-bottom: 1px solid #e5e6eb;
54
+ }
55
+ .lite-bus-title-row { display: flex; align-items: center; }
56
+ .lite-bus-icon { font-size: 14px; margin-right: 6px; }
57
+ .lite-bus-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
58
+ .lite-bus-channel { font-size: 10px; color: #165dff; }
59
+ .font-mono { font-family: monospace; font-size: 11px; }
60
+ .lite-bus-body { padding: 12px 14px; }
61
+ .lite-bus-row {
62
+ display: flex;
63
+ justify-content: space-between;
64
+ padding: 6px 0;
65
+ border-bottom: 1px dashed #f2f3f5;
66
+ }
67
+ .lite-bus-row:last-child { border-bottom: none; }
68
+ .lite-bus-label { color: #86909c; }
69
+ .lite-bus-val { font-weight: 500; color: #1d2129; }
70
+ </style>
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ channel?: string;
3
+ class?: string;
4
+ }
5
+ declare const LiteMicroAppStateBusIndicator: import("svelte").Component<Props, {}, "">;
6
+ type LiteMicroAppStateBusIndicator = ReturnType<typeof LiteMicroAppStateBusIndicator>;
7
+ export default LiteMicroAppStateBusIndicator;