poe-svelte-ui-lib 1.31.2 → 1.31.4
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/dist/Graph/Graph.svelte
CHANGED
|
@@ -301,26 +301,35 @@
|
|
|
301
301
|
drawAllGraphs()
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
/* Прозрачность линий сетки — общая с PeriodChart (border-(--faint-color)/40) */
|
|
305
|
+
const GRID_ALPHA = 0.4
|
|
306
|
+
|
|
304
307
|
const drawAllGraphs = () => {
|
|
305
308
|
if (!ctx) return
|
|
306
309
|
ctx.clearRect(0, 0, width, height)
|
|
307
310
|
|
|
308
311
|
const { padding, graphWidth, graphHeight, minX, timeSpan, yMin, yMax, getX, getY } = computeGeometry()
|
|
309
312
|
|
|
310
|
-
/* Сетка
|
|
311
|
-
|
|
312
|
-
ctx.
|
|
313
|
-
ctx.
|
|
313
|
+
/* Сетка в стиле PeriodChart: пунктир цветом --faint-color темы, подписи тем же цветом без прозрачности */
|
|
314
|
+
const gridColor = getComputedStyle(canvas).getPropertyValue("--faint-color").trim() || "#8b93a1"
|
|
315
|
+
ctx.strokeStyle = gridColor
|
|
316
|
+
ctx.fillStyle = gridColor
|
|
317
|
+
ctx.lineWidth = 1
|
|
318
|
+
ctx.setLineDash([3, 3])
|
|
314
319
|
ctx.font = "10px monospace"
|
|
320
|
+
|
|
321
|
+
/* Сетка X */
|
|
315
322
|
ctx.textAlign = "center"
|
|
316
323
|
|
|
317
324
|
for (let i = 0; i <= 10; i++) {
|
|
318
325
|
const t = minX + (i / 10) * timeSpan
|
|
319
326
|
const x = getX(t)
|
|
327
|
+
ctx.globalAlpha = GRID_ALPHA
|
|
320
328
|
ctx.beginPath()
|
|
321
329
|
ctx.moveTo(x, padding.top)
|
|
322
330
|
ctx.lineTo(x, height - padding.bottom)
|
|
323
331
|
ctx.stroke()
|
|
332
|
+
ctx.globalAlpha = 1
|
|
324
333
|
ctx.textBaseline = "top"
|
|
325
334
|
ctx.fillText(formatAxisLabel(t, timeSpan), x, height - padding.bottom + 2)
|
|
326
335
|
}
|
|
@@ -332,12 +341,15 @@
|
|
|
332
341
|
for (let i = 0; i <= ySteps; i++) {
|
|
333
342
|
const yVal = yMax - (i * (yMax - yMin)) / ySteps
|
|
334
343
|
const y = getY(yVal)
|
|
344
|
+
ctx.globalAlpha = GRID_ALPHA
|
|
335
345
|
ctx.beginPath()
|
|
336
346
|
ctx.moveTo(padding.left, y)
|
|
337
347
|
ctx.lineTo(width - padding.right, y)
|
|
338
348
|
ctx.stroke()
|
|
349
|
+
ctx.globalAlpha = 1
|
|
339
350
|
ctx.fillText(yVal.toFixed(1), padding.left - 5, y)
|
|
340
351
|
}
|
|
352
|
+
ctx.setLineDash([])
|
|
341
353
|
|
|
342
354
|
/* Отрисовка графиков */
|
|
343
355
|
ctx.lineWidth = 2
|
|
@@ -119,9 +119,7 @@
|
|
|
119
119
|
<div class="relative flex h-40 w-full items-end gap-1">
|
|
120
120
|
{#each axis.ticks as tick}
|
|
121
121
|
<div
|
|
122
|
-
class="pointer-events-none absolute inset-x-0 border-t {tick === 0
|
|
123
|
-
? 'border-(--hairline-color)'
|
|
124
|
-
: 'border-dashed border-(--hairline-color)/60'}"
|
|
122
|
+
class="pointer-events-none absolute inset-x-0 border-t {tick === 0 ? 'border-(--faint-color)/60' : 'border-dashed border-(--faint-color)/40'}"
|
|
125
123
|
style="bottom: {(tick / axis.top) * 100}%"
|
|
126
124
|
></div>
|
|
127
125
|
{/each}
|
package/dist/Table/README.md
CHANGED
|
@@ -235,6 +235,7 @@
|
|
|
235
235
|
- Компонент использует Tailwind CSS для адаптивного дизайна
|
|
236
236
|
- Таблица автоматически адаптируется под размеры контейнера
|
|
237
237
|
- Используются относительные единицы измерения для обеспечения масштабируемости
|
|
238
|
+
- Размер текста строк задаётся CSS-переменной `--table-font-size` на любом родителе (по умолчанию `13px`), например `style="--table-font-size: 11.5px"` — так потребитель меняет масштаб данных без правки компонента
|
|
238
239
|
|
|
239
240
|
### Ограничения
|
|
240
241
|
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
{@const contentArray = typeof column.content === "function" ? column.content(row) : column.content}
|
|
311
311
|
<div
|
|
312
312
|
id="rowDiv{i}-{j}"
|
|
313
|
-
class="relative grid min-h-7 w-full min-w-0 items-center gap-x-2 px-3 py-1 text-[13px] wrap-break-word
|
|
313
|
+
class="relative grid min-h-7 w-full min-w-0 items-center gap-x-2 px-3 py-1 text-[length:var(--table-font-size,13px)] wrap-break-word
|
|
314
314
|
{column.align === 'center'
|
|
315
315
|
? 'justify-center justify-items-center text-center'
|
|
316
316
|
: column.align === 'right'
|