refactor: deduplicate ucode helpers, providers runtime and frontend icons
This commit is contained in:
@@ -1,24 +1,284 @@
|
|||||||
export * from './renderLoaderCircleIcon24';
|
import { svgEl } from '../helpers';
|
||||||
export * from './renderCircleAlertIcon24';
|
|
||||||
export * from './renderCircleCheckIcon24';
|
function createIcon(
|
||||||
export * from './renderCircleSlashIcon24';
|
className: string,
|
||||||
export * from './renderCircleXIcon24';
|
children: (SVGElement | null | undefined)[],
|
||||||
export * from './renderCheckIcon24';
|
extraAttrs: Partial<Record<string, string | number>> = {},
|
||||||
export * from './renderXIcon24';
|
) {
|
||||||
export * from './renderTriangleAlertIcon24';
|
return svgEl(
|
||||||
export * from './renderPauseIcon24';
|
'svg',
|
||||||
export * from './renderPlayIcon24';
|
{
|
||||||
export * from './renderRotateCcwIcon24';
|
xmlns: 'http://www.w3.org/2000/svg',
|
||||||
export * from './renderCircleStopIcon24';
|
viewBox: '0 0 24 24',
|
||||||
export * from './renderCirclePlayIcon24';
|
fill: 'none',
|
||||||
export * from './renderCircleCheckBigIcon24';
|
stroke: 'currentColor',
|
||||||
export * from './renderSquareChartGanttIcon24';
|
'stroke-width': '2',
|
||||||
export * from './renderCogIcon24';
|
'stroke-linecap': 'round',
|
||||||
export * from './renderSearchIcon24';
|
'stroke-linejoin': 'round',
|
||||||
export * from './renderBookOpenTextIcon24';
|
class: className,
|
||||||
export * from './renderCopyIcon24';
|
...extraAttrs,
|
||||||
export * from './renderLinkIcon24';
|
},
|
||||||
export * from './renderDownloadIcon24';
|
children,
|
||||||
export * from './renderInfoIcon24';
|
);
|
||||||
export * from './renderGlobeIcon24';
|
}
|
||||||
export * from './renderSendIcon24';
|
|
||||||
|
export function renderBookOpenTextIcon24() {
|
||||||
|
return createIcon('lucide lucide-book-open-text-icon lucide-book-open-text', [
|
||||||
|
svgEl('path', { d: 'M12 7v14' }),
|
||||||
|
svgEl('path', { d: 'M16 12h2' }),
|
||||||
|
svgEl('path', { d: 'M16 8h2' }),
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z',
|
||||||
|
}),
|
||||||
|
svgEl('path', { d: 'M6 12h2' }),
|
||||||
|
svgEl('path', { d: 'M6 8h2' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCheckIcon24() {
|
||||||
|
return createIcon('lucide lucide-check-icon lucide-check', [
|
||||||
|
svgEl('path', { d: 'M20 6 9 17l-5-5' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCircleAlertIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-circle-alert-icon lucide-circle-alert',
|
||||||
|
[
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('line', { x1: '12', y1: '8', x2: '12', y2: '12' }),
|
||||||
|
svgEl('line', { x1: '12', y1: '16', x2: '12.01', y2: '16' }),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCircleCheckBigIcon24() {
|
||||||
|
return createIcon('lucide lucide-circle-check-big-icon lucide-circle-check-big', [
|
||||||
|
svgEl('path', { d: 'M21.801 10A10 10 0 1 1 17 3.335' }),
|
||||||
|
svgEl('path', { d: 'm9 11 3 3L22 4' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCircleCheckIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-circle-check-icon lucide-circle-check',
|
||||||
|
[
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('path', { d: 'M9 12l2 2 4-4' }),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCirclePlayIcon24() {
|
||||||
|
return createIcon('lucide lucide-circle-play-icon lucide-circle-play', [
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z',
|
||||||
|
}),
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCircleSlashIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-circle-slash-icon lucide-circle-slash',
|
||||||
|
[
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('line', { x1: '9', y1: '15', x2: '15', y2: '9' }),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCircleStopIcon24() {
|
||||||
|
return createIcon('lucide lucide-circle-stop-icon lucide-circle-stop', [
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('rect', { x: '9', y: '9', width: '6', height: '6', rx: '1' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCircleXIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-circle-x-icon lucide-circle-x',
|
||||||
|
[
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('path', { d: 'M15 9L9 15' }),
|
||||||
|
svgEl('path', { d: 'M9 9L15 15' }),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCogIcon24() {
|
||||||
|
return createIcon('lucide lucide-cog-icon lucide-cog', [
|
||||||
|
svgEl('path', { d: 'M11 10.27 7 3.34' }),
|
||||||
|
svgEl('path', { d: 'm11 13.73-4 6.93' }),
|
||||||
|
svgEl('path', { d: 'M12 22v-2' }),
|
||||||
|
svgEl('path', { d: 'M12 2v2' }),
|
||||||
|
svgEl('path', { d: 'M14 12h8' }),
|
||||||
|
svgEl('path', { d: 'm17 20.66-1-1.73' }),
|
||||||
|
svgEl('path', { d: 'm17 3.34-1 1.73' }),
|
||||||
|
svgEl('path', { d: 'M2 12h2' }),
|
||||||
|
svgEl('path', { d: 'm20.66 17-1.73-1' }),
|
||||||
|
svgEl('path', { d: 'm20.66 7-1.73 1' }),
|
||||||
|
svgEl('path', { d: 'm3.34 17 1.73-1' }),
|
||||||
|
svgEl('path', { d: 'm3.34 7 1.73 1' }),
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '2' }),
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '8' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderCopyIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-copy-icon lucide-copy',
|
||||||
|
[
|
||||||
|
svgEl('rect', {
|
||||||
|
width: '14',
|
||||||
|
height: '14',
|
||||||
|
x: '8',
|
||||||
|
y: '8',
|
||||||
|
rx: '2',
|
||||||
|
ry: '2',
|
||||||
|
}),
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderDownloadIcon24() {
|
||||||
|
return createIcon('lucide lucide-download-icon lucide-download', [
|
||||||
|
svgEl('path', { d: 'M12 15V3' }),
|
||||||
|
svgEl('path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' }),
|
||||||
|
svgEl('path', { d: 'm7 10 5 5 5-5' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderGlobeIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-globe-icon lucide-globe',
|
||||||
|
[
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('path', { d: 'M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20' }),
|
||||||
|
svgEl('path', { d: 'M2 12h20' }),
|
||||||
|
],
|
||||||
|
{ width: '14', height: '14' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderInfoIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-info-icon lucide-info',
|
||||||
|
[
|
||||||
|
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
||||||
|
svgEl('path', { d: 'M12 16v-4' }),
|
||||||
|
svgEl('path', { d: 'M12 8h.01' }),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderLinkIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-link-icon lucide-link',
|
||||||
|
[
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71',
|
||||||
|
}),
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderLoaderCircleIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-loader-circle rotate',
|
||||||
|
[
|
||||||
|
svgEl('path', { d: 'M21 12a9 9 0 1 1-6.219-8.56' }),
|
||||||
|
svgEl('animateTransform', {
|
||||||
|
attributeName: 'transform',
|
||||||
|
attributeType: 'XML',
|
||||||
|
type: 'rotate',
|
||||||
|
from: '0 12 12',
|
||||||
|
to: '360 12 12',
|
||||||
|
dur: '1s',
|
||||||
|
repeatCount: 'indefinite',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderPauseIcon24() {
|
||||||
|
return createIcon('lucide lucide-pause-icon lucide-pause', [
|
||||||
|
svgEl('rect', { x: '14', y: '3', width: '5', height: '18', rx: '1' }),
|
||||||
|
svgEl('rect', { x: '5', y: '3', width: '5', height: '18', rx: '1' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderPlayIcon24() {
|
||||||
|
return createIcon('lucide lucide-play-icon lucide-play', [
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z',
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderRotateCcwIcon24() {
|
||||||
|
return createIcon('lucide lucide-rotate-ccw-icon lucide-rotate-ccw', [
|
||||||
|
svgEl('path', { d: 'M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8' }),
|
||||||
|
svgEl('path', { d: 'M3 3v5h5' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderSearchIcon24() {
|
||||||
|
return createIcon('lucide lucide-search-icon lucide-search', [
|
||||||
|
svgEl('path', { d: 'm21 21-4.34-4.34' }),
|
||||||
|
svgEl('circle', { cx: '11', cy: '11', r: '8' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderSendIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
'lucide lucide-send-icon lucide-send',
|
||||||
|
[
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z',
|
||||||
|
}),
|
||||||
|
svgEl('path', { d: 'm21.854 2.147-10.94 10.939' }),
|
||||||
|
],
|
||||||
|
{ width: '24', height: '24' },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderSquareChartGanttIcon24() {
|
||||||
|
return createIcon('lucide lucide-square-chart-gantt-icon lucide-square-chart-gantt', [
|
||||||
|
svgEl('rect', { width: '18', height: '18', x: '3', y: '3', rx: '2' }),
|
||||||
|
svgEl('path', { d: 'M9 8h7' }),
|
||||||
|
svgEl('path', { d: 'M8 12h6' }),
|
||||||
|
svgEl('path', { d: 'M11 16h5' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderTriangleAlertIcon24() {
|
||||||
|
return createIcon('lucide lucide-triangle-alert-icon lucide-triangle-alert', [
|
||||||
|
svgEl('path', {
|
||||||
|
d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3',
|
||||||
|
}),
|
||||||
|
svgEl('path', { d: 'M12 9v4' }),
|
||||||
|
svgEl('path', { d: 'M12 17h.01' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function renderXIcon24() {
|
||||||
|
return createIcon('lucide lucide-x-icon lucide-x', [
|
||||||
|
svgEl('path', { d: 'M18 6 6 18' }),
|
||||||
|
svgEl('path', { d: 'm6 6 12 12' }),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderBookOpenTextIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-book-open-text-icon lucide-book-open-text',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', { d: 'M12 7v14' }),
|
|
||||||
svgEl('path', { d: 'M16 12h2' }),
|
|
||||||
svgEl('path', { d: 'M16 8h2' }),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z',
|
|
||||||
}),
|
|
||||||
svgEl('path', { d: 'M6 12h2' }),
|
|
||||||
svgEl('path', { d: 'M6 8h2' }),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCheckIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-check-icon lucide-check',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M20 6 9 17l-5-5',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCircleAlertIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-alert-icon lucide-circle-alert',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
svgEl('line', {
|
|
||||||
x1: '12',
|
|
||||||
y1: '8',
|
|
||||||
x2: '12',
|
|
||||||
y2: '12',
|
|
||||||
}),
|
|
||||||
svgEl('line', {
|
|
||||||
x1: '12',
|
|
||||||
y1: '16',
|
|
||||||
x2: '12.01',
|
|
||||||
y2: '16',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCircleCheckBigIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-check-big-icon lucide-circle-check-big',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M21.801 10A10 10 0 1 1 17 3.335',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'm9 11 3 3L22 4',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCircleCheckIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-check-icon lucide-circle-check',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M9 12l2 2 4-4',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCirclePlayIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-play-icon lucide-circle-play',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z',
|
|
||||||
}),
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCircleSlashIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-slash-icon lucide-circle-slash',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
svgEl('line', {
|
|
||||||
x1: '9',
|
|
||||||
y1: '15',
|
|
||||||
x2: '15',
|
|
||||||
y2: '9',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCircleStopIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-stop-icon lucide-circle-stop',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
svgEl('rect', {
|
|
||||||
x: '9',
|
|
||||||
y: '9',
|
|
||||||
width: '6',
|
|
||||||
height: '6',
|
|
||||||
rx: '1',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCircleXIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-circle-x-icon lucide-circle-x',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M15 9L9 15',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M9 9L15 15',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderCogIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-cog-icon lucide-cog',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', { d: 'M11 10.27 7 3.34' }),
|
|
||||||
svgEl('path', { d: 'm11 13.73-4 6.93' }),
|
|
||||||
svgEl('path', { d: 'M12 22v-2' }),
|
|
||||||
svgEl('path', { d: 'M12 2v2' }),
|
|
||||||
svgEl('path', { d: 'M14 12h8' }),
|
|
||||||
svgEl('path', { d: 'm17 20.66-1-1.73' }),
|
|
||||||
svgEl('path', { d: 'm17 3.34-1 1.73' }),
|
|
||||||
svgEl('path', { d: 'M2 12h2' }),
|
|
||||||
svgEl('path', { d: 'm20.66 17-1.73-1' }),
|
|
||||||
svgEl('path', { d: 'm20.66 7-1.73 1' }),
|
|
||||||
svgEl('path', { d: 'm3.34 17 1.73-1' }),
|
|
||||||
svgEl('path', { d: 'm3.34 7 1.73 1' }),
|
|
||||||
svgEl('circle', { cx: '12', cy: '12', r: '2' }),
|
|
||||||
svgEl('circle', { cx: '12', cy: '12', r: '8' }),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { svgEl } from '../helpers/svgEl';
|
|
||||||
|
|
||||||
export function renderCopyIcon24() {
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: 'http://www.w3.org/2000/svg',
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-copy-icon lucide-copy',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('rect', {
|
|
||||||
width: '14',
|
|
||||||
height: '14',
|
|
||||||
x: '8',
|
|
||||||
y: '8',
|
|
||||||
rx: '2',
|
|
||||||
ry: '2',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderDownloadIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-download-icon lucide-download',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M12 15V3',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'm7 10 5 5 5-5',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import { svgEl } from '../helpers/svgEl';
|
|
||||||
|
|
||||||
export function renderGlobeIcon24() {
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: 'http://www.w3.org/2000/svg',
|
|
||||||
width: '14',
|
|
||||||
height: '14',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-globe-icon lucide-globe',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', { cx: '12', cy: '12', r: '10' }),
|
|
||||||
svgEl('path', { d: 'M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20' }),
|
|
||||||
svgEl('path', { d: 'M2 12h20' }),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { svgEl } from '../helpers/svgEl';
|
|
||||||
|
|
||||||
export function renderInfoIcon24() {
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: 'http://www.w3.org/2000/svg',
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-info-icon lucide-info',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('circle', {
|
|
||||||
cx: '12',
|
|
||||||
cy: '12',
|
|
||||||
r: '10',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M12 16v-4',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M12 8h.01',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { svgEl } from '../helpers/svgEl';
|
|
||||||
|
|
||||||
export function renderLinkIcon24() {
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: 'http://www.w3.org/2000/svg',
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-link-icon lucide-link',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderLoaderCircleIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-loader-circle rotate',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M21 12a9 9 0 1 1-6.219-8.56',
|
|
||||||
}),
|
|
||||||
svgEl('animateTransform', {
|
|
||||||
attributeName: 'transform',
|
|
||||||
attributeType: 'XML',
|
|
||||||
type: 'rotate',
|
|
||||||
from: '0 12 12',
|
|
||||||
to: '360 12 12',
|
|
||||||
dur: '1s',
|
|
||||||
repeatCount: 'indefinite',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderPauseIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-pause-icon lucide-pause',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('rect', {
|
|
||||||
x: '14',
|
|
||||||
y: '3',
|
|
||||||
width: '5',
|
|
||||||
height: '18',
|
|
||||||
rx: '1',
|
|
||||||
}),
|
|
||||||
svgEl('rect', {
|
|
||||||
x: '5',
|
|
||||||
y: '3',
|
|
||||||
width: '5',
|
|
||||||
height: '18',
|
|
||||||
rx: '1',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderPlayIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-play-icon lucide-play',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderRotateCcwIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-rotate-ccw-icon lucide-rotate-ccw',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M3 3v5h5',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderSearchIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-search-icon lucide-search',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', { d: 'm21 21-4.34-4.34' }),
|
|
||||||
svgEl('circle', { cx: '11', cy: '11', r: '8' }),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { svgEl } from '../helpers/svgEl';
|
|
||||||
|
|
||||||
export function renderSendIcon24() {
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: 'http://www.w3.org/2000/svg',
|
|
||||||
width: '24',
|
|
||||||
height: '24',
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-send-icon lucide-send',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z',
|
|
||||||
}),
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'm21.854 2.147-10.94 10.939',
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderSquareChartGanttIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-square-chart-gantt-icon lucide-square-chart-gantt',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('rect', {
|
|
||||||
width: '18',
|
|
||||||
height: '18',
|
|
||||||
x: '3',
|
|
||||||
y: '3',
|
|
||||||
rx: '2',
|
|
||||||
}),
|
|
||||||
svgEl('path', { d: 'M9 8h7' }),
|
|
||||||
svgEl('path', { d: 'M8 12h6' }),
|
|
||||||
svgEl('path', { d: 'M11 16h5' }),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderTriangleAlertIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-triangle-alert-icon lucide-triangle-alert',
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl('path', {
|
|
||||||
d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3',
|
|
||||||
}),
|
|
||||||
svgEl('path', { d: 'M12 9v4' }),
|
|
||||||
svgEl('path', { d: 'M12 17h.01' }),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { svgEl } from '../helpers';
|
|
||||||
|
|
||||||
export function renderXIcon24() {
|
|
||||||
const NS = 'http://www.w3.org/2000/svg';
|
|
||||||
return svgEl(
|
|
||||||
'svg',
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: '0 0 24 24',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
'stroke-width': '2',
|
|
||||||
'stroke-linecap': 'round',
|
|
||||||
'stroke-linejoin': 'round',
|
|
||||||
class: 'lucide lucide-x-icon lucide-x',
|
|
||||||
},
|
|
||||||
[svgEl('path', { d: 'M18 6 6 18' }), svgEl('path', { d: 'm6 6 12 12' })],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1481,541 +1481,124 @@ function isCopyableProxyLink(link) {
|
|||||||
return COPYABLE_PROXY_URI_RE.test((link || "").trim());
|
return COPYABLE_PROXY_URI_RE.test((link || "").trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/icons/renderLoaderCircleIcon24.ts
|
// src/icons/index.ts
|
||||||
function renderLoaderCircleIcon24() {
|
function createIcon(className, children, extraAttrs = {}) {
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-loader-circle rotate"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M21 12a9 9 0 1 1-6.219-8.56"
|
|
||||||
}),
|
|
||||||
svgEl("animateTransform", {
|
|
||||||
attributeName: "transform",
|
|
||||||
attributeType: "XML",
|
|
||||||
type: "rotate",
|
|
||||||
from: "0 12 12",
|
|
||||||
to: "360 12 12",
|
|
||||||
dur: "1s",
|
|
||||||
repeatCount: "indefinite"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCircleAlertIcon24.ts
|
|
||||||
function renderCircleAlertIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-alert-icon lucide-circle-alert"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
}),
|
|
||||||
svgEl("line", {
|
|
||||||
x1: "12",
|
|
||||||
y1: "8",
|
|
||||||
x2: "12",
|
|
||||||
y2: "12"
|
|
||||||
}),
|
|
||||||
svgEl("line", {
|
|
||||||
x1: "12",
|
|
||||||
y1: "16",
|
|
||||||
x2: "12.01",
|
|
||||||
y2: "16"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCircleCheckIcon24.ts
|
|
||||||
function renderCircleCheckIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-check-icon lucide-circle-check"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M9 12l2 2 4-4"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCircleSlashIcon24.ts
|
|
||||||
function renderCircleSlashIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-slash-icon lucide-circle-slash"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
}),
|
|
||||||
svgEl("line", {
|
|
||||||
x1: "9",
|
|
||||||
y1: "15",
|
|
||||||
x2: "15",
|
|
||||||
y2: "9"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCircleXIcon24.ts
|
|
||||||
function renderCircleXIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-x-icon lucide-circle-x"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M15 9L9 15"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M9 9L15 15"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCheckIcon24.ts
|
|
||||||
function renderCheckIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-check-icon lucide-check"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M20 6 9 17l-5-5"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderXIcon24.ts
|
|
||||||
function renderXIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-x-icon lucide-x"
|
|
||||||
},
|
|
||||||
[svgEl("path", { d: "M18 6 6 18" }), svgEl("path", { d: "m6 6 12 12" })]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderTriangleAlertIcon24.ts
|
|
||||||
function renderTriangleAlertIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-triangle-alert-icon lucide-triangle-alert"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"
|
|
||||||
}),
|
|
||||||
svgEl("path", { d: "M12 9v4" }),
|
|
||||||
svgEl("path", { d: "M12 17h.01" })
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderPauseIcon24.ts
|
|
||||||
function renderPauseIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-pause-icon lucide-pause"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("rect", {
|
|
||||||
x: "14",
|
|
||||||
y: "3",
|
|
||||||
width: "5",
|
|
||||||
height: "18",
|
|
||||||
rx: "1"
|
|
||||||
}),
|
|
||||||
svgEl("rect", {
|
|
||||||
x: "5",
|
|
||||||
y: "3",
|
|
||||||
width: "5",
|
|
||||||
height: "18",
|
|
||||||
rx: "1"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderPlayIcon24.ts
|
|
||||||
function renderPlayIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-play-icon lucide-play"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderRotateCcwIcon24.ts
|
|
||||||
function renderRotateCcwIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-rotate-ccw-icon lucide-rotate-ccw"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M3 3v5h5"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCircleStopIcon24.ts
|
|
||||||
function renderCircleStopIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-stop-icon lucide-circle-stop"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
}),
|
|
||||||
svgEl("rect", {
|
|
||||||
x: "9",
|
|
||||||
y: "9",
|
|
||||||
width: "6",
|
|
||||||
height: "6",
|
|
||||||
rx: "1"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCirclePlayIcon24.ts
|
|
||||||
function renderCirclePlayIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-play-icon lucide-circle-play"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"
|
|
||||||
}),
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCircleCheckBigIcon24.ts
|
|
||||||
function renderCircleCheckBigIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-circle-check-big-icon lucide-circle-check-big"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M21.801 10A10 10 0 1 1 17 3.335"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "m9 11 3 3L22 4"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderSquareChartGanttIcon24.ts
|
|
||||||
function renderSquareChartGanttIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-square-chart-gantt-icon lucide-square-chart-gantt"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("rect", {
|
|
||||||
width: "18",
|
|
||||||
height: "18",
|
|
||||||
x: "3",
|
|
||||||
y: "3",
|
|
||||||
rx: "2"
|
|
||||||
}),
|
|
||||||
svgEl("path", { d: "M9 8h7" }),
|
|
||||||
svgEl("path", { d: "M8 12h6" }),
|
|
||||||
svgEl("path", { d: "M11 16h5" })
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCogIcon24.ts
|
|
||||||
function renderCogIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-cog-icon lucide-cog"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", { d: "M11 10.27 7 3.34" }),
|
|
||||||
svgEl("path", { d: "m11 13.73-4 6.93" }),
|
|
||||||
svgEl("path", { d: "M12 22v-2" }),
|
|
||||||
svgEl("path", { d: "M12 2v2" }),
|
|
||||||
svgEl("path", { d: "M14 12h8" }),
|
|
||||||
svgEl("path", { d: "m17 20.66-1-1.73" }),
|
|
||||||
svgEl("path", { d: "m17 3.34-1 1.73" }),
|
|
||||||
svgEl("path", { d: "M2 12h2" }),
|
|
||||||
svgEl("path", { d: "m20.66 17-1.73-1" }),
|
|
||||||
svgEl("path", { d: "m20.66 7-1.73 1" }),
|
|
||||||
svgEl("path", { d: "m3.34 17 1.73-1" }),
|
|
||||||
svgEl("path", { d: "m3.34 7 1.73 1" }),
|
|
||||||
svgEl("circle", { cx: "12", cy: "12", r: "2" }),
|
|
||||||
svgEl("circle", { cx: "12", cy: "12", r: "8" })
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderSearchIcon24.ts
|
|
||||||
function renderSearchIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-search-icon lucide-search"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", { d: "m21 21-4.34-4.34" }),
|
|
||||||
svgEl("circle", { cx: "11", cy: "11", r: "8" })
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderBookOpenTextIcon24.ts
|
|
||||||
function renderBookOpenTextIcon24() {
|
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-book-open-text-icon lucide-book-open-text"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("path", { d: "M12 7v14" }),
|
|
||||||
svgEl("path", { d: "M16 12h2" }),
|
|
||||||
svgEl("path", { d: "M16 8h2" }),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"
|
|
||||||
}),
|
|
||||||
svgEl("path", { d: "M6 12h2" }),
|
|
||||||
svgEl("path", { d: "M6 8h2" })
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/icons/renderCopyIcon24.ts
|
|
||||||
function renderCopyIcon24() {
|
|
||||||
return svgEl(
|
return svgEl(
|
||||||
"svg",
|
"svg",
|
||||||
{
|
{
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
viewBox: "0 0 24 24",
|
||||||
fill: "none",
|
fill: "none",
|
||||||
stroke: "currentColor",
|
stroke: "currentColor",
|
||||||
"stroke-width": "2",
|
"stroke-width": "2",
|
||||||
"stroke-linecap": "round",
|
"stroke-linecap": "round",
|
||||||
"stroke-linejoin": "round",
|
"stroke-linejoin": "round",
|
||||||
class: "lucide lucide-copy-icon lucide-copy"
|
class: className,
|
||||||
|
...extraAttrs
|
||||||
},
|
},
|
||||||
|
children
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderBookOpenTextIcon24() {
|
||||||
|
return createIcon("lucide lucide-book-open-text-icon lucide-book-open-text", [
|
||||||
|
svgEl("path", { d: "M12 7v14" }),
|
||||||
|
svgEl("path", { d: "M16 12h2" }),
|
||||||
|
svgEl("path", { d: "M16 8h2" }),
|
||||||
|
svgEl("path", {
|
||||||
|
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"
|
||||||
|
}),
|
||||||
|
svgEl("path", { d: "M6 12h2" }),
|
||||||
|
svgEl("path", { d: "M6 8h2" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderCheckIcon24() {
|
||||||
|
return createIcon("lucide lucide-check-icon lucide-check", [
|
||||||
|
svgEl("path", { d: "M20 6 9 17l-5-5" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderCircleAlertIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-circle-alert-icon lucide-circle-alert",
|
||||||
|
[
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
||||||
|
svgEl("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
||||||
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderCircleCheckBigIcon24() {
|
||||||
|
return createIcon("lucide lucide-circle-check-big-icon lucide-circle-check-big", [
|
||||||
|
svgEl("path", { d: "M21.801 10A10 10 0 1 1 17 3.335" }),
|
||||||
|
svgEl("path", { d: "m9 11 3 3L22 4" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderCircleCheckIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-circle-check-icon lucide-circle-check",
|
||||||
|
[
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("path", { d: "M9 12l2 2 4-4" })
|
||||||
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderCirclePlayIcon24() {
|
||||||
|
return createIcon("lucide lucide-circle-play-icon lucide-circle-play", [
|
||||||
|
svgEl("path", {
|
||||||
|
d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"
|
||||||
|
}),
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderCircleSlashIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-circle-slash-icon lucide-circle-slash",
|
||||||
|
[
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("line", { x1: "9", y1: "15", x2: "15", y2: "9" })
|
||||||
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderCircleStopIcon24() {
|
||||||
|
return createIcon("lucide lucide-circle-stop-icon lucide-circle-stop", [
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderCircleXIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-circle-x-icon lucide-circle-x",
|
||||||
|
[
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("path", { d: "M15 9L9 15" }),
|
||||||
|
svgEl("path", { d: "M9 9L15 15" })
|
||||||
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderCogIcon24() {
|
||||||
|
return createIcon("lucide lucide-cog-icon lucide-cog", [
|
||||||
|
svgEl("path", { d: "M11 10.27 7 3.34" }),
|
||||||
|
svgEl("path", { d: "m11 13.73-4 6.93" }),
|
||||||
|
svgEl("path", { d: "M12 22v-2" }),
|
||||||
|
svgEl("path", { d: "M12 2v2" }),
|
||||||
|
svgEl("path", { d: "M14 12h8" }),
|
||||||
|
svgEl("path", { d: "m17 20.66-1-1.73" }),
|
||||||
|
svgEl("path", { d: "m17 3.34-1 1.73" }),
|
||||||
|
svgEl("path", { d: "M2 12h2" }),
|
||||||
|
svgEl("path", { d: "m20.66 17-1.73-1" }),
|
||||||
|
svgEl("path", { d: "m20.66 7-1.73 1" }),
|
||||||
|
svgEl("path", { d: "m3.34 17 1.73-1" }),
|
||||||
|
svgEl("path", { d: "m3.34 7 1.73 1" }),
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "2" }),
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "8" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderCopyIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-copy-icon lucide-copy",
|
||||||
[
|
[
|
||||||
svgEl("rect", {
|
svgEl("rect", {
|
||||||
width: "14",
|
width: "14",
|
||||||
@@ -2028,26 +1611,42 @@ function renderCopyIcon24() {
|
|||||||
svgEl("path", {
|
svgEl("path", {
|
||||||
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
|
||||||
})
|
})
|
||||||
]
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderDownloadIcon24() {
|
||||||
|
return createIcon("lucide lucide-download-icon lucide-download", [
|
||||||
|
svgEl("path", { d: "M12 15V3" }),
|
||||||
|
svgEl("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
||||||
|
svgEl("path", { d: "m7 10 5 5 5-5" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderGlobeIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-globe-icon lucide-globe",
|
||||||
|
[
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
|
||||||
|
svgEl("path", { d: "M2 12h20" })
|
||||||
|
],
|
||||||
|
{ width: "14", height: "14" }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function renderInfoIcon24() {
|
||||||
|
return createIcon(
|
||||||
|
"lucide lucide-info-icon lucide-info",
|
||||||
|
[
|
||||||
|
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
||||||
|
svgEl("path", { d: "M12 16v-4" }),
|
||||||
|
svgEl("path", { d: "M12 8h.01" })
|
||||||
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/icons/renderLinkIcon24.ts
|
|
||||||
function renderLinkIcon24() {
|
function renderLinkIcon24() {
|
||||||
return svgEl(
|
return createIcon(
|
||||||
"svg",
|
"lucide lucide-link-icon lucide-link",
|
||||||
{
|
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-link-icon lucide-link"
|
|
||||||
},
|
|
||||||
[
|
[
|
||||||
svgEl("path", {
|
svgEl("path", {
|
||||||
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"
|
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"
|
||||||
@@ -2055,121 +1654,88 @@ function renderLinkIcon24() {
|
|||||||
svgEl("path", {
|
svgEl("path", {
|
||||||
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
||||||
})
|
})
|
||||||
]
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
function renderLoaderCircleIcon24() {
|
||||||
// src/icons/renderDownloadIcon24.ts
|
return createIcon(
|
||||||
function renderDownloadIcon24() {
|
"lucide lucide-loader-circle rotate",
|
||||||
const NS = "http://www.w3.org/2000/svg";
|
|
||||||
return svgEl(
|
|
||||||
"svg",
|
|
||||||
{
|
|
||||||
xmlns: NS,
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-download-icon lucide-download"
|
|
||||||
},
|
|
||||||
[
|
[
|
||||||
svgEl("path", {
|
svgEl("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }),
|
||||||
d: "M12 15V3"
|
svgEl("animateTransform", {
|
||||||
}),
|
attributeName: "transform",
|
||||||
svgEl("path", {
|
attributeType: "XML",
|
||||||
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
type: "rotate",
|
||||||
}),
|
from: "0 12 12",
|
||||||
svgEl("path", {
|
to: "360 12 12",
|
||||||
d: "m7 10 5 5 5-5"
|
dur: "1s",
|
||||||
|
repeatCount: "indefinite"
|
||||||
})
|
})
|
||||||
]
|
],
|
||||||
|
{ width: "24", height: "24" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
function renderPauseIcon24() {
|
||||||
// src/icons/renderInfoIcon24.ts
|
return createIcon("lucide lucide-pause-icon lucide-pause", [
|
||||||
function renderInfoIcon24() {
|
svgEl("rect", { x: "14", y: "3", width: "5", height: "18", rx: "1" }),
|
||||||
return svgEl(
|
svgEl("rect", { x: "5", y: "3", width: "5", height: "18", rx: "1" })
|
||||||
"svg",
|
]);
|
||||||
{
|
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-info-icon lucide-info"
|
|
||||||
},
|
|
||||||
[
|
|
||||||
svgEl("circle", {
|
|
||||||
cx: "12",
|
|
||||||
cy: "12",
|
|
||||||
r: "10"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M12 16v-4"
|
|
||||||
}),
|
|
||||||
svgEl("path", {
|
|
||||||
d: "M12 8h.01"
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
function renderPlayIcon24() {
|
||||||
// src/icons/renderGlobeIcon24.ts
|
return createIcon("lucide lucide-play-icon lucide-play", [
|
||||||
function renderGlobeIcon24() {
|
svgEl("path", {
|
||||||
return svgEl(
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"
|
||||||
"svg",
|
})
|
||||||
{
|
]);
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
}
|
||||||
width: "14",
|
function renderRotateCcwIcon24() {
|
||||||
height: "14",
|
return createIcon("lucide lucide-rotate-ccw-icon lucide-rotate-ccw", [
|
||||||
viewBox: "0 0 24 24",
|
svgEl("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
||||||
fill: "none",
|
svgEl("path", { d: "M3 3v5h5" })
|
||||||
stroke: "currentColor",
|
]);
|
||||||
"stroke-width": "2",
|
}
|
||||||
"stroke-linecap": "round",
|
function renderSearchIcon24() {
|
||||||
"stroke-linejoin": "round",
|
return createIcon("lucide lucide-search-icon lucide-search", [
|
||||||
class: "lucide lucide-globe-icon lucide-globe"
|
svgEl("path", { d: "m21 21-4.34-4.34" }),
|
||||||
},
|
svgEl("circle", { cx: "11", cy: "11", r: "8" })
|
||||||
[
|
]);
|
||||||
svgEl("circle", { cx: "12", cy: "12", r: "10" }),
|
|
||||||
svgEl("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
|
|
||||||
svgEl("path", { d: "M2 12h20" })
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/icons/renderSendIcon24.ts
|
|
||||||
function renderSendIcon24() {
|
function renderSendIcon24() {
|
||||||
return svgEl(
|
return createIcon(
|
||||||
"svg",
|
"lucide lucide-send-icon lucide-send",
|
||||||
{
|
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
|
||||||
width: "24",
|
|
||||||
height: "24",
|
|
||||||
viewBox: "0 0 24 24",
|
|
||||||
fill: "none",
|
|
||||||
stroke: "currentColor",
|
|
||||||
"stroke-width": "2",
|
|
||||||
"stroke-linecap": "round",
|
|
||||||
"stroke-linejoin": "round",
|
|
||||||
class: "lucide lucide-send-icon lucide-send"
|
|
||||||
},
|
|
||||||
[
|
[
|
||||||
svgEl("path", {
|
svgEl("path", {
|
||||||
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"
|
||||||
}),
|
}),
|
||||||
svgEl("path", {
|
svgEl("path", { d: "m21.854 2.147-10.94 10.939" })
|
||||||
d: "m21.854 2.147-10.94 10.939"
|
],
|
||||||
})
|
{ width: "24", height: "24" }
|
||||||
]
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
function renderSquareChartGanttIcon24() {
|
||||||
|
return createIcon("lucide lucide-square-chart-gantt-icon lucide-square-chart-gantt", [
|
||||||
|
svgEl("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
||||||
|
svgEl("path", { d: "M9 8h7" }),
|
||||||
|
svgEl("path", { d: "M8 12h6" }),
|
||||||
|
svgEl("path", { d: "M11 16h5" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderTriangleAlertIcon24() {
|
||||||
|
return createIcon("lucide lucide-triangle-alert-icon lucide-triangle-alert", [
|
||||||
|
svgEl("path", {
|
||||||
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"
|
||||||
|
}),
|
||||||
|
svgEl("path", { d: "M12 9v4" }),
|
||||||
|
svgEl("path", { d: "M12 17h.01" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function renderXIcon24() {
|
||||||
|
return createIcon("lucide lucide-x-icon lucide-x", [
|
||||||
|
svgEl("path", { d: "M18 6 6 18" }),
|
||||||
|
svgEl("path", { d: "m6 6 12 12" })
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
// src/helpers/prettyBytes.ts
|
// src/helpers/prettyBytes.ts
|
||||||
function prettyBytes(n) {
|
function prettyBytes(n) {
|
||||||
|
|||||||
@@ -5,28 +5,9 @@ let common = require("core.common");
|
|||||||
let as_string = common.as_string;
|
let as_string = common.as_string;
|
||||||
let read_json_file = common.read_json_file;
|
let read_json_file = common.read_json_file;
|
||||||
|
|
||||||
function read_stdin() {
|
let read_stdin = common.read_stdin;
|
||||||
let input = fs.open("/dev/stdin", "r");
|
let read_stdin_json = common.read_stdin_json;
|
||||||
if (!input)
|
let write_json = common.write_json;
|
||||||
return "";
|
|
||||||
let data = input.read("all");
|
|
||||||
input.close();
|
|
||||||
return data == null ? "" : data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function read_stdin_json() {
|
|
||||||
let data = read_stdin();
|
|
||||||
try {
|
|
||||||
return json(data);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function write_json(value) {
|
|
||||||
print(sprintf("%J", value), "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
function stdin_contains_ci(needle) {
|
function stdin_contains_ci(needle) {
|
||||||
needle = lc(as_string(needle));
|
needle = lc(as_string(needle));
|
||||||
@@ -45,14 +26,7 @@ function stdin_first_line_last_field() {
|
|||||||
print(as_string(fields[length(fields) - 1]), "\n");
|
print(as_string(fields[length(fields) - 1]), "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.print_file_first_line;
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null)
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
print(newline >= 0 ? substr(data, 0, newline) : data, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
function json_file_field(path, key, fallback) {
|
function json_file_field(path, key, fallback) {
|
||||||
let value = read_json_file(path);
|
let value = read_json_file(path);
|
||||||
|
|||||||
@@ -200,23 +200,8 @@ function write_state_file(path, value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.print_file_first_line;
|
||||||
let data = fs.readfile(path);
|
let file_first_line_value = common.file_first_line;
|
||||||
if (data == null)
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
print(newline >= 0 ? substr(data, 0, newline) : data, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
function file_first_line_value(path) {
|
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return newline >= 0 ? substr(data, 0, newline) : data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function arg_bool(value) {
|
function arg_bool(value) {
|
||||||
value = lc(as_string(value));
|
value = lc(as_string(value));
|
||||||
@@ -300,9 +285,7 @@ function file_last_nonblank_line_value(path, fallback, max_chars) {
|
|||||||
return text_first_chars(result, max_chars);
|
return text_first_chars(result, max_chars);
|
||||||
}
|
}
|
||||||
|
|
||||||
function section_name(section) {
|
let section_name = common.section_name;
|
||||||
return as_string(object_or_empty(section)[".name"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function file_exists_value(path) {
|
function file_exists_value(path) {
|
||||||
return fs.stat(as_string(path)) != null;
|
return fs.stat(as_string(path)) != null;
|
||||||
|
|||||||
@@ -645,33 +645,7 @@ function mwan3_is_active() {
|
|||||||
command_success_from_args([ "/etc/init.d/mwan3", "enabled" ]);
|
command_success_from_args([ "/etc/init.d/mwan3", "enabled" ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hex_digit_value(value) {
|
let parse_number = common.parse_number;
|
||||||
let pos = index("0123456789abcdef", lc(as_string(value)));
|
|
||||||
return pos >= 0 ? pos : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parse_number(value) {
|
|
||||||
value = lc(trim(as_string(value)));
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
|
|
||||||
if (substr(value, 0, 2) == "0x") {
|
|
||||||
value = substr(value, 2);
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
|
|
||||||
let result = 0;
|
|
||||||
for (let i = 0; i < length(value); i++) {
|
|
||||||
let digit = hex_digit_value(substr(value, i, 1));
|
|
||||||
if (digit == null)
|
|
||||||
return null;
|
|
||||||
result = result * 16 + digit;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return match(value, /^[0-9]+$/) == null ? null : int(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function subscription_parser() {
|
function subscription_parser() {
|
||||||
if (subscription_parser_module == null)
|
if (subscription_parser_module == null)
|
||||||
@@ -764,9 +738,7 @@ function sections_by_type(type_name) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function section_name(section) {
|
let section_name = common.section_name;
|
||||||
return option(section, ".name", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
function section_enabled(section) {
|
function section_enabled(section) {
|
||||||
return bool_option(section, "enabled", true);
|
return bool_option(section, "enabled", true);
|
||||||
|
|||||||
@@ -599,8 +599,68 @@ function get_mixed_port() {
|
|||||||
return info ? info.port : 4534;
|
return info ? info.port : 4534;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hex_digit_value(value) {
|
||||||
|
let pos = index("0123456789abcdef", lc(as_string(value)));
|
||||||
|
return pos >= 0 ? pos : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parse_number(value) {
|
||||||
|
value = lc(trim(as_string(value)));
|
||||||
|
if (value == "")
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (substr(value, 0, 2) == "0x") {
|
||||||
|
value = substr(value, 2);
|
||||||
|
if (value == "")
|
||||||
|
return null;
|
||||||
|
|
||||||
|
let result = 0;
|
||||||
|
for (let i = 0; i < length(value); i++) {
|
||||||
|
let digit = hex_digit_value(substr(value, i, 1));
|
||||||
|
if (digit == null)
|
||||||
|
return null;
|
||||||
|
result = result * 16 + digit;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return match(value, /^[0-9]+$/) == null ? null : int(value, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
function file_first_line(path) {
|
||||||
|
let data = fs.readfile(as_string(path));
|
||||||
|
if (data == null)
|
||||||
|
return "";
|
||||||
|
let newline = index(data, "\n");
|
||||||
|
return trim(newline >= 0 ? substr(data, 0, newline) : data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_file_first_line(path) {
|
||||||
|
let data = fs.readfile(as_string(path));
|
||||||
|
if (data == null)
|
||||||
|
exit(1);
|
||||||
|
let newline = index(data, "\n");
|
||||||
|
print(newline >= 0 ? substr(data, 0, newline) : data, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
function section_name(section) {
|
||||||
|
return as_string(object_or_empty(section)[".name"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function log_message(message, level, tag) {
|
||||||
|
level = as_string(level || "info");
|
||||||
|
tag = as_string(tag || "tachyon");
|
||||||
|
command_success_from_args([ "logger", "-t", tag, "[" + level + "] " + as_string(message) ]);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
as_string,
|
as_string,
|
||||||
|
hex_digit_value,
|
||||||
|
parse_number,
|
||||||
|
file_first_line,
|
||||||
|
print_file_first_line,
|
||||||
|
section_name,
|
||||||
|
log_message,
|
||||||
read_json_file,
|
read_json_file,
|
||||||
read_stdin,
|
read_stdin,
|
||||||
read_stdin_json,
|
read_stdin_json,
|
||||||
|
|||||||
@@ -1553,19 +1553,10 @@ function render_tachyon_logs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path, fallback) {
|
function file_first_line(path, fallback) {
|
||||||
let data = fs.readfile(path);
|
let line = common.file_first_line(path);
|
||||||
let result = "";
|
if (line == "")
|
||||||
|
line = as_string(fallback);
|
||||||
if (data != null) {
|
print_line(line);
|
||||||
let lines = split(as_string(data), "\n");
|
|
||||||
if (length(lines) > 0)
|
|
||||||
result = str_remove_suffix(as_string(lines[0]), "\r");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result == "")
|
|
||||||
result = as_string(fallback);
|
|
||||||
|
|
||||||
print_line(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function js_var_string_value(path, var_name) {
|
function js_var_string_value(path, var_name) {
|
||||||
|
|||||||
@@ -1742,33 +1742,7 @@ function nft_create_runtime_output_rules(table, localv4_set, common_set, port_se
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hex_digit_value(value) {
|
let parse_mark_number = common.parse_number;
|
||||||
let pos = index("0123456789abcdef", lc(as_string(value)));
|
|
||||||
return pos >= 0 ? pos : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parse_mark_number(value) {
|
|
||||||
value = lc(trim(as_string(value)));
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
|
|
||||||
if (substr(value, 0, 2) == "0x") {
|
|
||||||
value = substr(value, 2);
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
|
|
||||||
let result = 0;
|
|
||||||
for (let i = 0; i < length(value); i++) {
|
|
||||||
let digit = hex_digit_value(substr(value, i, 1));
|
|
||||||
if (digit == null)
|
|
||||||
return null;
|
|
||||||
result = result * 16 + digit;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return match(value, /^[0-9]+$/) == null ? null : int(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function nft_provider_mark_hex(route_mark_base, index) {
|
function nft_provider_mark_hex(route_mark_base, index) {
|
||||||
let base = parse_mark_number(route_mark_base);
|
let base = parse_mark_number(route_mark_base);
|
||||||
|
|||||||
@@ -38,19 +38,9 @@ function command_exists(name) {
|
|||||||
return command_success_from_args([ "command", "-v", name ]);
|
return command_success_from_args([ "command", "-v", name ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_message(message, level) {
|
let log_message = common.log_message;
|
||||||
level = as_string(level || "info");
|
let bool_option = common.bool_option;
|
||||||
command_success_from_args([ "logger", "-t", "tachyon", "[" + level + "] " + as_string(message) ]);
|
let section_name = common.section_name;
|
||||||
}
|
|
||||||
|
|
||||||
function bool_option(section, key, fallback) {
|
|
||||||
let value = object_or_empty(section)[key];
|
|
||||||
return value == null ? !!fallback : bool_value(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function section_name(section) {
|
|
||||||
return as_string(object_or_empty(section)[".name"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function uci_sections(type_name) {
|
function uci_sections(type_name) {
|
||||||
return uci_core.section_objects(CONFIG_NAME, as_string(type_name));
|
return uci_core.section_objects(CONFIG_NAME, as_string(type_name));
|
||||||
@@ -185,13 +175,7 @@ function runtime_pid_running(pid) {
|
|||||||
return match(pid, /^[0-9]+$/) != null && command_success_from_args([ "kill", "-0", pid ]);
|
return match(pid, /^[0-9]+$/) != null && command_success_from_args([ "kill", "-0", pid ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.file_first_line;
|
||||||
let data = fs.readfile(as_string(path));
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return trim(newline >= 0 ? substr(data, 0, newline) : data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function kill_pidfile_process(path, signal) {
|
function kill_pidfile_process(path, signal) {
|
||||||
let pid = file_first_line(path);
|
let pid = file_first_line(path);
|
||||||
|
|||||||
@@ -36,19 +36,9 @@ function module_success(args) {
|
|||||||
return command_success(module_command(args));
|
return command_success(module_command(args));
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_message(message, level) {
|
let log_message = common.log_message;
|
||||||
level = as_string(level || "info");
|
let bool_option = common.bool_option;
|
||||||
command_success_from_args([ "logger", "-t", "tachyon", "[" + level + "] " + as_string(message) ]);
|
let section_name = common.section_name;
|
||||||
}
|
|
||||||
|
|
||||||
function bool_option(section, key, fallback) {
|
|
||||||
let value = object_or_empty(section)[key];
|
|
||||||
return value == null ? !!fallback : bool_value(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function section_name(section) {
|
|
||||||
return as_string(object_or_empty(section)[".name"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function uci_sections(type_name) {
|
function uci_sections(type_name) {
|
||||||
return uci_core.section_objects(CONFIG_NAME, as_string(type_name));
|
return uci_core.section_objects(CONFIG_NAME, as_string(type_name));
|
||||||
@@ -94,28 +84,7 @@ function enabled_sections(cfg) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hex_digit_value(value) {
|
let parse_number = common.parse_number;
|
||||||
let pos = index("0123456789abcdef", lc(as_string(value)));
|
|
||||||
return pos >= 0 ? pos : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parse_number(value) {
|
|
||||||
value = lc(trim(as_string(value)));
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
if (substr(value, 0, 2) == "0x") {
|
|
||||||
value = substr(value, 2);
|
|
||||||
let result = 0;
|
|
||||||
for (let i = 0; i < length(value); i++) {
|
|
||||||
let digit = hex_digit_value(substr(value, i, 1));
|
|
||||||
if (digit == null)
|
|
||||||
return null;
|
|
||||||
result = result * 16 + digit;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return match(value, /^[0-9]+$/) == null ? null : int(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function route_mark_value(cfg, index_value) {
|
function route_mark_value(cfg, index_value) {
|
||||||
return parse_number(cfg.route_mark_base) + int(index_value);
|
return parse_number(cfg.route_mark_base) + int(index_value);
|
||||||
@@ -185,13 +154,7 @@ function runtime_pid_running(pid) {
|
|||||||
return match(pid, /^[0-9]+$/) != null && command_success_from_args([ "kill", "-0", pid ]);
|
return match(pid, /^[0-9]+$/) != null && command_success_from_args([ "kill", "-0", pid ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.file_first_line;
|
||||||
let data = fs.readfile(as_string(path));
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return trim(newline >= 0 ? substr(data, 0, newline) : data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function kill_pidfile_process(path, signal) {
|
function kill_pidfile_process(path, signal) {
|
||||||
let pid = file_first_line(path);
|
let pid = file_first_line(path);
|
||||||
|
|||||||
@@ -22,61 +22,15 @@ function log_message(msg, level) {
|
|||||||
system("logger -t " + MODE + " -p " + (level == "fatal" ? "user.err" : level == "warn" ? "user.warning" : "user.info") + " '" + msg + "'");
|
system("logger -t " + MODE + " -p " + (level == "fatal" ? "user.err" : level == "warn" ? "user.warning" : "user.info") + " '" + msg + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
function command_from_args(args) {
|
let command_from_args = common.command_from_args;
|
||||||
let parts = [];
|
let command_output = common.command_output;
|
||||||
for (let arg in args)
|
let command_output_from_args = common.command_output_from_args;
|
||||||
push(parts, common.shell_quote(as_string(arg)));
|
let command_success_from_args = common.command_success_from_args;
|
||||||
return join(" ", parts);
|
let option = common.option;
|
||||||
}
|
let bool_option = common.bool_option;
|
||||||
|
let list_option = common.list_option;
|
||||||
function command_output(cmd) {
|
let section_name = common.section_name;
|
||||||
let output = trim(popen(cmd, "r") || "");
|
let read_json_file = common.read_json_file;
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
function command_output_from_args(args) {
|
|
||||||
return command_output(command_from_args(args));
|
|
||||||
}
|
|
||||||
|
|
||||||
function command_success_from_args(args) {
|
|
||||||
return system(command_from_args(args)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function option(section, key, fallback) {
|
|
||||||
let val = section[key];
|
|
||||||
if (val == null)
|
|
||||||
return fallback || "";
|
|
||||||
if (type(val) == "array")
|
|
||||||
return join(" ", val);
|
|
||||||
return as_string(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bool_option(section, key, fallback) {
|
|
||||||
let val = section[key];
|
|
||||||
if (val == null)
|
|
||||||
return fallback || false;
|
|
||||||
return bool_value(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function list_option(section, key) {
|
|
||||||
let val = section[key];
|
|
||||||
if (val == null)
|
|
||||||
return [];
|
|
||||||
if (type(val) == "array")
|
|
||||||
return val;
|
|
||||||
return split(trim(as_string(val)), " \t\n\r");
|
|
||||||
}
|
|
||||||
|
|
||||||
function section_name(section) {
|
|
||||||
return as_string(section[".name"] || "");
|
|
||||||
}
|
|
||||||
|
|
||||||
function read_json_file(path) {
|
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null || data == "")
|
|
||||||
return null;
|
|
||||||
return json(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function yaml_quote(value) {
|
function yaml_quote(value) {
|
||||||
value = as_string(value);
|
value = as_string(value);
|
||||||
|
|||||||
@@ -10,33 +10,7 @@ let bool_value = common.bool_value;
|
|||||||
|
|
||||||
const CONFIG_NAME = getenv("TACHYON_CONFIG_NAME") || "tachyon";
|
const CONFIG_NAME = getenv("TACHYON_CONFIG_NAME") || "tachyon";
|
||||||
|
|
||||||
function hex_digit_value(value) {
|
let parse_number = common.parse_number;
|
||||||
let pos = index("0123456789abcdef", lc(as_string(value)));
|
|
||||||
return pos >= 0 ? pos : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parse_number(value) {
|
|
||||||
value = lc(trim(as_string(value)));
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
|
|
||||||
if (substr(value, 0, 2) == "0x") {
|
|
||||||
value = substr(value, 2);
|
|
||||||
if (value == "")
|
|
||||||
return null;
|
|
||||||
|
|
||||||
let result = 0;
|
|
||||||
for (let i = 0; i < length(value); i++) {
|
|
||||||
let digit = hex_digit_value(substr(value, i, 1));
|
|
||||||
if (digit == null)
|
|
||||||
return null;
|
|
||||||
result = result * 16 + digit;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return match(value, /^[0-9]+$/) == null ? null : int(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function rule_rows() {
|
function rule_rows() {
|
||||||
let rows = [];
|
let rows = [];
|
||||||
|
|||||||
@@ -22,71 +22,16 @@ function log_message(msg, level) {
|
|||||||
system("logger -t " + MODE + " -p " + (level == "fatal" ? "user.err" : level == "warn" ? "user.warning" : "user.info") + " '" + msg + "'");
|
system("logger -t " + MODE + " -p " + (level == "fatal" ? "user.err" : level == "warn" ? "user.warning" : "user.info") + " '" + msg + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
function command_from_args(args) {
|
let command_from_args = common.command_from_args;
|
||||||
let parts = [];
|
let command_output = common.command_output;
|
||||||
for (let arg in args)
|
let command_output_from_args = common.command_output_from_args;
|
||||||
push(parts, common.shell_quote(as_string(arg)));
|
let command_success_from_args = common.command_success_from_args;
|
||||||
return join(" ", parts);
|
let option = common.option;
|
||||||
}
|
let bool_option = common.bool_option;
|
||||||
|
let list_option = common.list_option;
|
||||||
function command_output(cmd) {
|
let section_name = common.section_name;
|
||||||
let output = trim(popen(cmd, "r") || "");
|
let read_json_file = common.read_json_file;
|
||||||
return output;
|
let write_json_file = common.write_json_file;
|
||||||
}
|
|
||||||
|
|
||||||
function command_output_from_args(args) {
|
|
||||||
return command_output(command_from_args(args));
|
|
||||||
}
|
|
||||||
|
|
||||||
function command_success_from_args(args) {
|
|
||||||
return system(command_from_args(args)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function option(section, key, fallback) {
|
|
||||||
let val = section[key];
|
|
||||||
if (val == null)
|
|
||||||
return fallback || "";
|
|
||||||
if (type(val) == "array")
|
|
||||||
return join(" ", val);
|
|
||||||
return as_string(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bool_option(section, key, fallback) {
|
|
||||||
let val = section[key];
|
|
||||||
if (val == null)
|
|
||||||
return fallback || false;
|
|
||||||
return bool_value(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function list_option(section, key) {
|
|
||||||
let val = section[key];
|
|
||||||
if (val == null)
|
|
||||||
return [];
|
|
||||||
if (type(val) == "array")
|
|
||||||
return val;
|
|
||||||
return split(trim(as_string(val)), " \t\n\r");
|
|
||||||
}
|
|
||||||
|
|
||||||
function section_name(section) {
|
|
||||||
return as_string(section[".name"] || "");
|
|
||||||
}
|
|
||||||
|
|
||||||
function read_json_file(path) {
|
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null || data == "")
|
|
||||||
return null;
|
|
||||||
return json(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function write_json_file(path, data) {
|
|
||||||
let tmp = path + ".tmp";
|
|
||||||
let f = fs.open(tmp, "w");
|
|
||||||
if (!f)
|
|
||||||
return false;
|
|
||||||
f.write(sprintf("%J", data));
|
|
||||||
f.close();
|
|
||||||
return rename(tmp, path) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function lan_mac_address() {
|
function lan_mac_address() {
|
||||||
for (let iface in ["br-lan", "lan", "eth0", "eth1"]) {
|
for (let iface in ["br-lan", "lan", "eth0", "eth1"]) {
|
||||||
|
|||||||
@@ -15,11 +15,7 @@ let write_json = common.write_json;
|
|||||||
const CONFIG_NAME = getenv("TACHYON_CONFIG_NAME") || "tachyon";
|
const CONFIG_NAME = getenv("TACHYON_CONFIG_NAME") || "tachyon";
|
||||||
|
|
||||||
function ascii_lower(value) {
|
function ascii_lower(value) {
|
||||||
let upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
return lc(as_string(value));
|
||||||
let lower = "abcdefghijklmnopqrstuvwxyz";
|
|
||||||
return replace(as_string(value), /[A-Z]/g, function(ch) {
|
|
||||||
return substr(lower, index(upper, ch), 1);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function run(command) {
|
function run(command) {
|
||||||
@@ -262,14 +258,7 @@ function mtproto_base_secret_from_value(value) {
|
|||||||
print(result, "\n");
|
print(result, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
function hex_digit_value(value) {
|
let hex_digit_value = common.hex_digit_value;
|
||||||
value = ord(lc(as_string(value)));
|
|
||||||
if (value >= 48 && value <= 57)
|
|
||||||
return value - 48;
|
|
||||||
if (value >= 97 && value <= 102)
|
|
||||||
return value - 87;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hex_to_string_value(value) {
|
function hex_to_string_value(value) {
|
||||||
value = as_string(value);
|
value = as_string(value);
|
||||||
@@ -280,7 +269,7 @@ function hex_to_string_value(value) {
|
|||||||
for (let i = 0; i < length(value); i += 2) {
|
for (let i = 0; i < length(value); i += 2) {
|
||||||
let high = hex_digit_value(substr(value, i, 1));
|
let high = hex_digit_value(substr(value, i, 1));
|
||||||
let low = hex_digit_value(substr(value, i + 1, 1));
|
let low = hex_digit_value(substr(value, i + 1, 1));
|
||||||
if (high < 0 || low < 0)
|
if (high == null || low == null)
|
||||||
return null;
|
return null;
|
||||||
result += chr(high * 16 + low);
|
result += chr(high * 16 + low);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,15 +85,7 @@ function uci_exists(path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let object_or_empty = common.object_or_empty;
|
let object_or_empty = common.object_or_empty;
|
||||||
|
let file_first_line = common.print_file_first_line;
|
||||||
function file_first_line(path) {
|
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null)
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
print(newline >= 0 ? substr(data, 0, newline) : data, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
function read_state_value(path, needle) {
|
function read_state_value(path, needle) {
|
||||||
let data = fs.readfile(path);
|
let data = fs.readfile(path);
|
||||||
@@ -704,9 +696,7 @@ function bool_option_value(section, key, fallback) {
|
|||||||
return bool_option(section, key, fallback) ? "1" : "0";
|
return bool_option(section, key, fallback) ? "1" : "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
function section_name(section) {
|
let section_name = common.section_name;
|
||||||
return as_string(object_or_empty(section)[".name"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function str_startswith(value, prefix) {
|
function str_startswith(value, prefix) {
|
||||||
value = as_string(value);
|
value = as_string(value);
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ function settings() {
|
|||||||
return common.object_or_empty(uci_core.get_all(CONFIG_NAME, "settings"));
|
return common.object_or_empty(uci_core.get_all(CONFIG_NAME, "settings"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensure_dir(path) {
|
let ensure_dir = common.ensure_dir;
|
||||||
return command_success_from_args([ "mkdir", "-p", path ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function write_state(path, value) {
|
function write_state(path, value) {
|
||||||
if (!ensure_dir(RUNTIME_STATE_DIR))
|
if (!ensure_dir(RUNTIME_STATE_DIR))
|
||||||
@@ -345,12 +343,7 @@ function worker() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.file_first_line;
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
return trim(split(as_string(data), "\n")[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function process_running(pid) {
|
function process_running(pid) {
|
||||||
return match(as_string(pid), /^[0-9]+$/) != null && command_success_from_args([ "kill", "-0", pid ]);
|
return match(as_string(pid), /^[0-9]+$/) != null && command_success_from_args([ "kill", "-0", pid ]);
|
||||||
|
|||||||
@@ -23,17 +23,8 @@ const PRIORITY_PID_FILE = getenv("TACHYON_PRIORITY_PID_FILE") || RUNTIME_STATE_D
|
|||||||
const PRIORITY_UC = getenv("TACHYON_PRIORITY_UC") || LIB_DIR + "/singbox/priority.uc";
|
const PRIORITY_UC = getenv("TACHYON_PRIORITY_UC") || LIB_DIR + "/singbox/priority.uc";
|
||||||
const DIAGNOSTICS_UC = getenv("TACHYON_DIAGNOSTICS_UC") || LIB_DIR + "/diagnostics/runtime.uc";
|
const DIAGNOSTICS_UC = getenv("TACHYON_DIAGNOSTICS_UC") || LIB_DIR + "/diagnostics/runtime.uc";
|
||||||
|
|
||||||
function ensure_dir(path) {
|
let ensure_dir = common.ensure_dir;
|
||||||
return command_success_from_args([ "mkdir", "-p", path ]);
|
let file_first_line = common.file_first_line;
|
||||||
}
|
|
||||||
|
|
||||||
function file_first_line(path) {
|
|
||||||
let data = fs.readfile(as_string(path));
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return trim(newline >= 0 ? substr(data, 0, newline) : data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function log_message(message, level) {
|
function log_message(message, level) {
|
||||||
level = as_string(level || "info");
|
level = as_string(level || "info");
|
||||||
|
|||||||
@@ -85,13 +85,7 @@ function remove_files(paths) {
|
|||||||
remove_file(path);
|
remove_file(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.file_first_line;
|
||||||
let data = fs.readfile(as_string(path));
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return trim(newline >= 0 ? substr(data, 0, newline) : data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function arg_bool(value) {
|
function arg_bool(value) {
|
||||||
value = lc(as_string(value));
|
value = lc(as_string(value));
|
||||||
|
|||||||
@@ -62,14 +62,7 @@ function parse_source_entry(entry) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.file_first_line;
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return newline >= 0 ? substr(data, 0, newline) : data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function valid_metadata_object(value) {
|
function valid_metadata_object(value) {
|
||||||
return type(value) == "object" && object_key_count(value) > 1;
|
return type(value) == "object" && object_key_count(value) > 1;
|
||||||
|
|||||||
@@ -89,23 +89,8 @@ function write_stdout_json(value) {
|
|||||||
print(sprintf("%J", value), "\n");
|
print(sprintf("%J", value), "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
function file_first_line(path) {
|
let file_first_line = common.print_file_first_line;
|
||||||
let data = fs.readfile(path);
|
let file_first_line_value = common.file_first_line;
|
||||||
if (data == null)
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
print(newline >= 0 ? substr(data, 0, newline) : data, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
function file_first_line_value(path) {
|
|
||||||
let data = fs.readfile(path);
|
|
||||||
if (data == null)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
let newline = index(data, "\n");
|
|
||||||
return newline >= 0 ? substr(data, 0, newline) : data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function file_has_exact_line(path, needle) {
|
function file_has_exact_line(path, needle) {
|
||||||
let data = fs.readfile(path);
|
let data = fs.readfile(path);
|
||||||
@@ -249,9 +234,7 @@ function append_word_once(words, value) {
|
|||||||
return words + (words != "" ? " " : "") + value;
|
return words + (words != "" ? " " : "") + value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function section_name(section) {
|
let section_name = common.section_name;
|
||||||
return as_string(object_or_empty(section)[".name"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function source_id(section, index) {
|
function source_id(section, index) {
|
||||||
return as_string(section) + "-subscription-" + as_string(index);
|
return as_string(section) + "-subscription-" + as_string(index);
|
||||||
|
|||||||
Reference in New Issue
Block a user