@bnhf/prismcast 1.3.4-2026.2.19
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/LICENSE.md +7 -0
- package/README.md +347 -0
- package/bin/prismcast +6 -0
- package/dist/app.d.ts +6 -0
- package/dist/app.js +315 -0
- package/dist/app.js.map +1 -0
- package/dist/browser/cdp.d.ts +38 -0
- package/dist/browser/cdp.js +155 -0
- package/dist/browser/cdp.js.map +1 -0
- package/dist/browser/channelSelection.d.ts +65 -0
- package/dist/browser/channelSelection.js +202 -0
- package/dist/browser/channelSelection.js.map +1 -0
- package/dist/browser/display.d.ts +34 -0
- package/dist/browser/display.js +54 -0
- package/dist/browser/display.js.map +1 -0
- package/dist/browser/index.d.ts +205 -0
- package/dist/browser/index.js +1205 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/tuning/fox.d.ts +2 -0
- package/dist/browser/tuning/fox.js +83 -0
- package/dist/browser/tuning/fox.js.map +1 -0
- package/dist/browser/tuning/hbo.d.ts +2 -0
- package/dist/browser/tuning/hbo.js +237 -0
- package/dist/browser/tuning/hbo.js.map +1 -0
- package/dist/browser/tuning/hulu.d.ts +2 -0
- package/dist/browser/tuning/hulu.js +550 -0
- package/dist/browser/tuning/hulu.js.map +1 -0
- package/dist/browser/tuning/sling.d.ts +2 -0
- package/dist/browser/tuning/sling.js +518 -0
- package/dist/browser/tuning/sling.js.map +1 -0
- package/dist/browser/tuning/thumbnailRow.d.ts +2 -0
- package/dist/browser/tuning/thumbnailRow.js +108 -0
- package/dist/browser/tuning/thumbnailRow.js.map +1 -0
- package/dist/browser/tuning/tileClick.d.ts +2 -0
- package/dist/browser/tuning/tileClick.js +103 -0
- package/dist/browser/tuning/tileClick.js.map +1 -0
- package/dist/browser/tuning/youtubeTv.d.ts +2 -0
- package/dist/browser/tuning/youtubeTv.js +182 -0
- package/dist/browser/tuning/youtubeTv.js.map +1 -0
- package/dist/browser/video.d.ts +289 -0
- package/dist/browser/video.js +996 -0
- package/dist/browser/video.js.map +1 -0
- package/dist/channels/index.d.ts +3 -0
- package/dist/channels/index.js +392 -0
- package/dist/channels/index.js.map +1 -0
- package/dist/config/index.d.ts +53 -0
- package/dist/config/index.js +233 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/presets.d.ts +98 -0
- package/dist/config/presets.js +241 -0
- package/dist/config/presets.js.map +1 -0
- package/dist/config/profiles.d.ts +79 -0
- package/dist/config/profiles.js +245 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/config/providers.d.ts +120 -0
- package/dist/config/providers.js +450 -0
- package/dist/config/providers.js.map +1 -0
- package/dist/config/sites.d.ts +22 -0
- package/dist/config/sites.js +377 -0
- package/dist/config/sites.js.map +1 -0
- package/dist/config/userChannels.d.ts +178 -0
- package/dist/config/userChannels.js +543 -0
- package/dist/config/userChannels.js.map +1 -0
- package/dist/config/userConfig.d.ts +235 -0
- package/dist/config/userConfig.js +913 -0
- package/dist/config/userConfig.js.map +1 -0
- package/dist/hdhr/channelMap.d.ts +21 -0
- package/dist/hdhr/channelMap.js +82 -0
- package/dist/hdhr/channelMap.js.map +1 -0
- package/dist/hdhr/deviceId.d.ts +11 -0
- package/dist/hdhr/deviceId.js +84 -0
- package/dist/hdhr/deviceId.js.map +1 -0
- package/dist/hdhr/discover.d.ts +6 -0
- package/dist/hdhr/discover.js +155 -0
- package/dist/hdhr/discover.js.map +1 -0
- package/dist/hdhr/index.d.ts +9 -0
- package/dist/hdhr/index.js +87 -0
- package/dist/hdhr/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +144 -0
- package/dist/index.js.map +1 -0
- package/dist/routes/assets.d.ts +6 -0
- package/dist/routes/assets.js +79 -0
- package/dist/routes/assets.js.map +1 -0
- package/dist/routes/auth.d.ts +6 -0
- package/dist/routes/auth.js +77 -0
- package/dist/routes/auth.js.map +1 -0
- package/dist/routes/channels.d.ts +6 -0
- package/dist/routes/channels.js +40 -0
- package/dist/routes/channels.js.map +1 -0
- package/dist/routes/components.d.ts +138 -0
- package/dist/routes/components.js +210 -0
- package/dist/routes/components.js.map +1 -0
- package/dist/routes/config.d.ts +72 -0
- package/dist/routes/config.js +1977 -0
- package/dist/routes/config.js.map +1 -0
- package/dist/routes/debug.d.ts +6 -0
- package/dist/routes/debug.js +274 -0
- package/dist/routes/debug.js.map +1 -0
- package/dist/routes/health.d.ts +6 -0
- package/dist/routes/health.js +85 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/hls.d.ts +6 -0
- package/dist/routes/hls.js +25 -0
- package/dist/routes/hls.js.map +1 -0
- package/dist/routes/index.d.ts +19 -0
- package/dist/routes/index.js +49 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/logs.d.ts +6 -0
- package/dist/routes/logs.js +164 -0
- package/dist/routes/logs.js.map +1 -0
- package/dist/routes/mpegts.d.ts +6 -0
- package/dist/routes/mpegts.js +19 -0
- package/dist/routes/mpegts.js.map +1 -0
- package/dist/routes/play.d.ts +6 -0
- package/dist/routes/play.js +18 -0
- package/dist/routes/play.js.map +1 -0
- package/dist/routes/playlist.d.ts +36 -0
- package/dist/routes/playlist.js +134 -0
- package/dist/routes/playlist.js.map +1 -0
- package/dist/routes/root.d.ts +6 -0
- package/dist/routes/root.js +2920 -0
- package/dist/routes/root.js.map +1 -0
- package/dist/routes/streams.d.ts +6 -0
- package/dist/routes/streams.js +88 -0
- package/dist/routes/streams.js.map +1 -0
- package/dist/routes/theme.d.ts +15 -0
- package/dist/routes/theme.js +275 -0
- package/dist/routes/theme.js.map +1 -0
- package/dist/routes/ui.d.ts +56 -0
- package/dist/routes/ui.js +354 -0
- package/dist/routes/ui.js.map +1 -0
- package/dist/service/commands.d.ts +41 -0
- package/dist/service/commands.js +391 -0
- package/dist/service/commands.js.map +1 -0
- package/dist/service/generators.d.ts +33 -0
- package/dist/service/generators.js +432 -0
- package/dist/service/generators.js.map +1 -0
- package/dist/service/index.d.ts +2 -0
- package/dist/service/index.js +7 -0
- package/dist/service/index.js.map +1 -0
- package/dist/streaming/clients.d.ts +48 -0
- package/dist/streaming/clients.js +114 -0
- package/dist/streaming/clients.js.map +1 -0
- package/dist/streaming/fmp4Segmenter.d.ts +61 -0
- package/dist/streaming/fmp4Segmenter.js +461 -0
- package/dist/streaming/fmp4Segmenter.js.map +1 -0
- package/dist/streaming/hls.d.ts +120 -0
- package/dist/streaming/hls.js +722 -0
- package/dist/streaming/hls.js.map +1 -0
- package/dist/streaming/hlsSegments.d.ts +54 -0
- package/dist/streaming/hlsSegments.js +162 -0
- package/dist/streaming/hlsSegments.js.map +1 -0
- package/dist/streaming/lifecycle.d.ts +33 -0
- package/dist/streaming/lifecycle.js +185 -0
- package/dist/streaming/lifecycle.js.map +1 -0
- package/dist/streaming/monitor.d.ts +74 -0
- package/dist/streaming/monitor.js +1310 -0
- package/dist/streaming/monitor.js.map +1 -0
- package/dist/streaming/mp4Parser.d.ts +74 -0
- package/dist/streaming/mp4Parser.js +566 -0
- package/dist/streaming/mp4Parser.js.map +1 -0
- package/dist/streaming/mpegts.d.ts +14 -0
- package/dist/streaming/mpegts.js +248 -0
- package/dist/streaming/mpegts.js.map +1 -0
- package/dist/streaming/registry.d.ts +119 -0
- package/dist/streaming/registry.js +127 -0
- package/dist/streaming/registry.js.map +1 -0
- package/dist/streaming/setup.d.ts +135 -0
- package/dist/streaming/setup.js +670 -0
- package/dist/streaming/setup.js.map +1 -0
- package/dist/streaming/showInfo.d.ts +30 -0
- package/dist/streaming/showInfo.js +362 -0
- package/dist/streaming/showInfo.js.map +1 -0
- package/dist/streaming/statusEmitter.d.ts +125 -0
- package/dist/streaming/statusEmitter.js +139 -0
- package/dist/streaming/statusEmitter.js.map +1 -0
- package/dist/types/index.d.ts +403 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/debugFilter.d.ts +38 -0
- package/dist/utils/debugFilter.js +157 -0
- package/dist/utils/debugFilter.js.map +1 -0
- package/dist/utils/delay.d.ts +6 -0
- package/dist/utils/delay.js +15 -0
- package/dist/utils/delay.js.map +1 -0
- package/dist/utils/errors.d.ts +15 -0
- package/dist/utils/errors.js +40 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/evaluate.d.ts +51 -0
- package/dist/utils/evaluate.js +124 -0
- package/dist/utils/evaluate.js.map +1 -0
- package/dist/utils/ffmpeg.d.ts +65 -0
- package/dist/utils/ffmpeg.js +317 -0
- package/dist/utils/ffmpeg.js.map +1 -0
- package/dist/utils/fileLogger.d.ts +25 -0
- package/dist/utils/fileLogger.js +248 -0
- package/dist/utils/fileLogger.js.map +1 -0
- package/dist/utils/format.d.ts +16 -0
- package/dist/utils/format.js +46 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/html.d.ts +6 -0
- package/dist/utils/html.js +24 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +20 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logEmitter.d.ts +17 -0
- package/dist/utils/logEmitter.js +30 -0
- package/dist/utils/logEmitter.js.map +1 -0
- package/dist/utils/logger.d.ts +82 -0
- package/dist/utils/logger.js +219 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/m3u.d.ts +32 -0
- package/dist/utils/m3u.js +148 -0
- package/dist/utils/m3u.js.map +1 -0
- package/dist/utils/morganStream.d.ts +7 -0
- package/dist/utils/morganStream.js +33 -0
- package/dist/utils/morganStream.js.map +1 -0
- package/dist/utils/platform.d.ts +64 -0
- package/dist/utils/platform.js +157 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/retry.d.ts +15 -0
- package/dist/utils/retry.js +82 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/streamContext.d.ts +28 -0
- package/dist/utils/streamContext.js +33 -0
- package/dist/utils/streamContext.js.map +1 -0
- package/dist/utils/version.d.ts +37 -0
- package/dist/utils/version.js +228 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +92 -0
- package/prismcast.png +0 -0
- package/prismcast.svg +74 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/* Copyright(C) 2024-2026, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* components.ts: Reusable UI components for PrismCast web pages.
|
|
4
|
+
*/
|
|
5
|
+
import { escapeHtml } from "../utils/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Generates an alert box HTML with title and message.
|
|
8
|
+
* @param type - The alert type (success, error, warning).
|
|
9
|
+
* @param title - The alert title.
|
|
10
|
+
* @param message - The alert message (can include HTML).
|
|
11
|
+
* @param escapeMessage - Whether to escape the message HTML (default true).
|
|
12
|
+
* @returns HTML string for the alert box.
|
|
13
|
+
*/
|
|
14
|
+
export function generateAlert(type, title, message, escapeMessage = true) {
|
|
15
|
+
const escapedMessage = escapeMessage ? escapeHtml(message) : message;
|
|
16
|
+
return [
|
|
17
|
+
"<div class=\"alert alert-" + type + "\">",
|
|
18
|
+
"<div class=\"alert-title\">" + escapeHtml(title) + "</div>",
|
|
19
|
+
escapedMessage,
|
|
20
|
+
"</div>"
|
|
21
|
+
].join("\n");
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generates a simple alert box without a title.
|
|
25
|
+
* @param type - The alert type (success, error, warning).
|
|
26
|
+
* @param message - The alert message.
|
|
27
|
+
* @returns HTML string for the alert box.
|
|
28
|
+
*/
|
|
29
|
+
export function generateSimpleAlert(type, message) {
|
|
30
|
+
return "<div class=\"alert alert-" + type + "\">" + escapeHtml(message) + "</div>";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generates a button HTML element.
|
|
34
|
+
* @param label - The button label text.
|
|
35
|
+
* @param options - Button configuration options.
|
|
36
|
+
* @returns HTML string for the button.
|
|
37
|
+
*/
|
|
38
|
+
export function generateButton(label, options) {
|
|
39
|
+
const { className, disabled, id, onclick, size = "md", type = "button", variant } = options;
|
|
40
|
+
const classes = ["btn", "btn-" + variant];
|
|
41
|
+
if (size === "sm") {
|
|
42
|
+
classes.push("btn-sm");
|
|
43
|
+
}
|
|
44
|
+
if (className) {
|
|
45
|
+
classes.push(className);
|
|
46
|
+
}
|
|
47
|
+
const attrs = [
|
|
48
|
+
"type=\"" + type + "\"",
|
|
49
|
+
"class=\"" + classes.join(" ") + "\""
|
|
50
|
+
];
|
|
51
|
+
if (id) {
|
|
52
|
+
attrs.push("id=\"" + escapeHtml(id) + "\"");
|
|
53
|
+
}
|
|
54
|
+
if (onclick) {
|
|
55
|
+
attrs.push("onclick=\"" + escapeHtml(onclick) + "\"");
|
|
56
|
+
}
|
|
57
|
+
if (disabled) {
|
|
58
|
+
attrs.push("disabled");
|
|
59
|
+
}
|
|
60
|
+
return "<button " + attrs.join(" ") + ">" + escapeHtml(label) + "</button>";
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Generates a badge HTML element.
|
|
64
|
+
* @param label - The badge label text.
|
|
65
|
+
* @param variant - The badge style variant.
|
|
66
|
+
* @returns HTML string for the badge.
|
|
67
|
+
*/
|
|
68
|
+
export function generateBadge(label, variant) {
|
|
69
|
+
return "<span class=\"badge badge-" + variant + "\">" + escapeHtml(label) + "</span>";
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Generates a status indicator (colored dot with label).
|
|
73
|
+
* @param status - The status type (healthy, error, etc.).
|
|
74
|
+
* @param label - The label text.
|
|
75
|
+
* @returns HTML string for the status indicator.
|
|
76
|
+
*/
|
|
77
|
+
export function generateStatusIndicator(status, label) {
|
|
78
|
+
return "<span class=\"status-indicator status-" + escapeHtml(status) + "\"><span class=\"status-dot\">●</span> " + escapeHtml(label) + "</span>";
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Generates a form row with label and text input.
|
|
82
|
+
* @param label - The input label.
|
|
83
|
+
* @param options - Input configuration options.
|
|
84
|
+
* @returns HTML string for the form row.
|
|
85
|
+
*/
|
|
86
|
+
export function generateTextInput(label, options) {
|
|
87
|
+
const { disabled, hint, id, max, min, name, pattern, placeholder, required, step, type = "text", value = "" } = options;
|
|
88
|
+
const lines = [];
|
|
89
|
+
lines.push("<div class=\"form-row\">");
|
|
90
|
+
lines.push("<label for=\"" + escapeHtml(id) + "\">" + escapeHtml(label) + "</label>");
|
|
91
|
+
const inputAttrs = [
|
|
92
|
+
"type=\"" + type + "\"",
|
|
93
|
+
"id=\"" + escapeHtml(id) + "\"",
|
|
94
|
+
"name=\"" + escapeHtml(name) + "\"",
|
|
95
|
+
"value=\"" + escapeHtml(value) + "\""
|
|
96
|
+
];
|
|
97
|
+
if (required) {
|
|
98
|
+
inputAttrs.push("required");
|
|
99
|
+
}
|
|
100
|
+
if (disabled) {
|
|
101
|
+
inputAttrs.push("disabled");
|
|
102
|
+
}
|
|
103
|
+
if (pattern) {
|
|
104
|
+
inputAttrs.push("pattern=\"" + escapeHtml(pattern) + "\"");
|
|
105
|
+
}
|
|
106
|
+
if (placeholder) {
|
|
107
|
+
inputAttrs.push("placeholder=\"" + escapeHtml(placeholder) + "\"");
|
|
108
|
+
}
|
|
109
|
+
if (min !== undefined) {
|
|
110
|
+
inputAttrs.push("min=\"" + String(min) + "\"");
|
|
111
|
+
}
|
|
112
|
+
if (max !== undefined) {
|
|
113
|
+
inputAttrs.push("max=\"" + String(max) + "\"");
|
|
114
|
+
}
|
|
115
|
+
if (step) {
|
|
116
|
+
inputAttrs.push("step=\"" + escapeHtml(step) + "\"");
|
|
117
|
+
}
|
|
118
|
+
lines.push("<input " + inputAttrs.join(" ") + ">");
|
|
119
|
+
if (hint) {
|
|
120
|
+
lines.push("<div class=\"hint\">" + escapeHtml(hint) + "</div>");
|
|
121
|
+
}
|
|
122
|
+
lines.push("</div>");
|
|
123
|
+
return lines.join("\n");
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Generates a form row with label and select dropdown.
|
|
127
|
+
* @param label - The select label.
|
|
128
|
+
* @param config - Select configuration options.
|
|
129
|
+
* @returns HTML string for the form row.
|
|
130
|
+
*/
|
|
131
|
+
export function generateSelect(label, config) {
|
|
132
|
+
const { disabled, hint, id, name, options, required } = config;
|
|
133
|
+
const lines = [];
|
|
134
|
+
lines.push("<div class=\"form-row\">");
|
|
135
|
+
lines.push("<label for=\"" + escapeHtml(id) + "\">" + escapeHtml(label) + "</label>");
|
|
136
|
+
const selectAttrs = [
|
|
137
|
+
"id=\"" + escapeHtml(id) + "\"",
|
|
138
|
+
"name=\"" + escapeHtml(name) + "\""
|
|
139
|
+
];
|
|
140
|
+
if (required) {
|
|
141
|
+
selectAttrs.push("required");
|
|
142
|
+
}
|
|
143
|
+
if (disabled) {
|
|
144
|
+
selectAttrs.push("disabled");
|
|
145
|
+
}
|
|
146
|
+
lines.push("<select " + selectAttrs.join(" ") + ">");
|
|
147
|
+
for (const option of options) {
|
|
148
|
+
const selectedAttr = option.selected ? " selected" : "";
|
|
149
|
+
lines.push("<option value=\"" + escapeHtml(option.value) + "\"" + selectedAttr + ">" + escapeHtml(option.label) + "</option>");
|
|
150
|
+
}
|
|
151
|
+
lines.push("</select>");
|
|
152
|
+
if (hint) {
|
|
153
|
+
lines.push("<div class=\"hint\">" + escapeHtml(hint) + "</div>");
|
|
154
|
+
}
|
|
155
|
+
lines.push("</div>");
|
|
156
|
+
return lines.join("\n");
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Generates a code block with optional copy button.
|
|
160
|
+
* @param content - The code content.
|
|
161
|
+
* @param showCopyButton - Whether to show a copy button.
|
|
162
|
+
* @param copyButtonId - ID for the copy button (required if showCopyButton is true).
|
|
163
|
+
* @returns HTML string for the code block.
|
|
164
|
+
*/
|
|
165
|
+
export function generateCodeBlock(content, showCopyButton = false, copyButtonId) {
|
|
166
|
+
if (showCopyButton && copyButtonId) {
|
|
167
|
+
return [
|
|
168
|
+
"<div class=\"code-block-wrapper\">",
|
|
169
|
+
"<pre>" + escapeHtml(content) + "</pre>",
|
|
170
|
+
"<button type=\"button\" class=\"btn btn-secondary btn-sm code-copy-btn\" id=\"" + escapeHtml(copyButtonId) +
|
|
171
|
+
"\" onclick=\"navigator.clipboard.writeText(this.previousElementSibling.textContent)\">Copy</button>",
|
|
172
|
+
"</div>"
|
|
173
|
+
].join("\n");
|
|
174
|
+
}
|
|
175
|
+
return "<pre>" + escapeHtml(content) + "</pre>";
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Generates a section container with optional heading.
|
|
179
|
+
* @param content - The section content (HTML).
|
|
180
|
+
* @param heading - Optional section heading.
|
|
181
|
+
* @param headingLevel - Heading level (2 or 3, default 3).
|
|
182
|
+
* @returns HTML string for the section.
|
|
183
|
+
*/
|
|
184
|
+
export function generateSection(content, heading, headingLevel = 3) {
|
|
185
|
+
const lines = [];
|
|
186
|
+
lines.push("<div class=\"section\">");
|
|
187
|
+
if (heading) {
|
|
188
|
+
lines.push("<h" + String(headingLevel) + ">" + escapeHtml(heading) + "</h" + String(headingLevel) + ">");
|
|
189
|
+
}
|
|
190
|
+
lines.push(content);
|
|
191
|
+
lines.push("</div>");
|
|
192
|
+
return lines.join("\n");
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Generates a panel header with title and optional action button.
|
|
196
|
+
* @param title - The panel title.
|
|
197
|
+
* @param actionHtml - Optional action button HTML (not escaped).
|
|
198
|
+
* @returns HTML string for the panel header.
|
|
199
|
+
*/
|
|
200
|
+
export function generatePanelHeader(title, actionHtml) {
|
|
201
|
+
const lines = [];
|
|
202
|
+
lines.push("<div class=\"panel-header\">");
|
|
203
|
+
lines.push("<h2>" + escapeHtml(title) + "</h2>");
|
|
204
|
+
if (actionHtml) {
|
|
205
|
+
lines.push(actionHtml);
|
|
206
|
+
}
|
|
207
|
+
lines.push("</div>");
|
|
208
|
+
return lines.join("\n");
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/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AO,EAAE,CAAC;QAEX,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,CAAC;IAC3G,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAErB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,UAAmB;IAEpE,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IAC3C,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;IAEjD,IAAG,UAAU,EAAE,CAAC;QAEd,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAErB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { AdvancedSection } from "../config/userConfig.js";
|
|
2
|
+
import type { Express } from "express";
|
|
3
|
+
import type { Nullable } from "../types/index.js";
|
|
4
|
+
import type { ProfileInfo } from "../config/profiles.js";
|
|
5
|
+
/**
|
|
6
|
+
* Result from generating channel row HTML.
|
|
7
|
+
*/
|
|
8
|
+
export interface ChannelRowHtml {
|
|
9
|
+
displayRow: string;
|
|
10
|
+
editRow: Nullable<string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generates the HTML for a single channel's table rows (display row and optional edit form row).
|
|
14
|
+
* @param key - The channel key.
|
|
15
|
+
* @param profiles - List of available profiles with descriptions for the dropdown.
|
|
16
|
+
* @returns Object with displayRow and editRow HTML strings.
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateChannelRowHtml(key: string, profiles: ProfileInfo[]): ChannelRowHtml;
|
|
19
|
+
/**
|
|
20
|
+
* Generates the provider filter toolbar HTML with a multi-select dropdown, dismissable chips, and a bulk-assign dropdown.
|
|
21
|
+
* @returns HTML string for the provider filter toolbar.
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateProviderFilterToolbar(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Generates the Channels panel HTML content.
|
|
26
|
+
* @param channelMessage - Optional message to display (success or error).
|
|
27
|
+
* @param channelError - If true, display as error; otherwise as success.
|
|
28
|
+
* @param editingChannelKey - If set, show the edit form for this channel.
|
|
29
|
+
* @param showAddForm - If true, show the add channel form.
|
|
30
|
+
* @param formErrors - Validation errors for the channel form.
|
|
31
|
+
* @param formValues - Form values to re-populate after validation error.
|
|
32
|
+
* @returns HTML string for the Channels panel content.
|
|
33
|
+
*/
|
|
34
|
+
export declare function generateChannelsPanel(channelMessage?: string, channelError?: boolean, editingChannelKey?: string, showAddForm?: boolean, formErrors?: Map<string, string>, formValues?: Map<string, string>): string;
|
|
35
|
+
/**
|
|
36
|
+
* Generates the content for the Settings tab with non-collapsible section headers.
|
|
37
|
+
* @param validationErrors - Map of setting path to validation error message.
|
|
38
|
+
* @param formValues - Map of setting path to submitted form value.
|
|
39
|
+
* @returns HTML string for the Settings tab content.
|
|
40
|
+
*/
|
|
41
|
+
export declare function generateSettingsTabContent(validationErrors?: Map<string, string>, formValues?: Map<string, string>): string;
|
|
42
|
+
/**
|
|
43
|
+
* Generates the content for a collapsible section within the Advanced tab.
|
|
44
|
+
* @param section - The section definition.
|
|
45
|
+
* @param validationErrors - Map of setting path to validation error message.
|
|
46
|
+
* @param formValues - Map of setting path to submitted form value.
|
|
47
|
+
* @returns HTML string for the section.
|
|
48
|
+
*/
|
|
49
|
+
export declare function generateCollapsibleSection(section: AdvancedSection, validationErrors?: Map<string, string>, formValues?: Map<string, string>): string;
|
|
50
|
+
/**
|
|
51
|
+
* Generates the content for the Advanced tab with collapsible sections.
|
|
52
|
+
* @param validationErrors - Map of setting path to validation error message.
|
|
53
|
+
* @param formValues - Map of setting path to submitted form value.
|
|
54
|
+
* @returns HTML string for the Advanced tab content.
|
|
55
|
+
*/
|
|
56
|
+
export declare function generateAdvancedTabContent(validationErrors?: Map<string, string>, formValues?: Map<string, string>): string;
|
|
57
|
+
/**
|
|
58
|
+
* Generates the config path display for settings.
|
|
59
|
+
* @returns HTML string with config path.
|
|
60
|
+
*/
|
|
61
|
+
export declare function generateSettingsFormFooter(): string;
|
|
62
|
+
/**
|
|
63
|
+
* Checks if there are any environment variable overrides for configuration settings.
|
|
64
|
+
* @returns True if any settings are overridden by environment variables.
|
|
65
|
+
*/
|
|
66
|
+
export declare function hasEnvOverrides(): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Configures the configuration endpoints. The GET /config endpoint has been removed - configuration is now accessed via hash navigation on the main page
|
|
69
|
+
* (e.g., /#config/server). Channels are accessed via /#channels. POST endpoints remain for form submission handling.
|
|
70
|
+
* @param app - The Express application.
|
|
71
|
+
*/
|
|
72
|
+
export declare function setupConfigEndpoint(app: Express): void;
|