update packages and add valign

This commit is contained in:
2026-04-05 20:00:27 +02:00
parent b062fb98e3
commit 03fb00e374
640 changed files with 109768 additions and 39311 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,56 @@
import type { HLJSApi } from 'highlight.js';
import type { RevealPlugin } from 'reveal.js';
// @ts-expect-error The runtime implementation remains in JS during the migration.
import HighlightImplementation from './plugin.js';
export interface HighlightLine {
start?: number;
end?: number;
}
export interface HighlightLineNumbersOptions {
singleLine?: boolean;
startFrom?: number;
}
export interface HighlightJsApi extends HLJSApi {
initLineNumbersOnLoad(options?: HighlightLineNumbersOptions): void;
lineNumbersBlock(element: HTMLElement, options?: HighlightLineNumbersOptions): void;
lineNumbersValue(code: string, options?: HighlightLineNumbersOptions): string | undefined;
}
export interface HighlightScrollState {
currentBlock?: HTMLElement;
animationFrameID?: number;
}
export interface HighlightLineBounds {
top: number;
bottom: number;
}
export type HighlightLineStep = HighlightLine[];
export interface HighlightPlugin extends RevealPlugin {
id: 'highlight';
HIGHLIGHT_STEP_DELIMITER: '|';
HIGHLIGHT_LINE_DELIMITER: ',';
HIGHLIGHT_LINE_RANGE_DELIMITER: '-';
hljs: HighlightJsApi;
highlightBlock(block: HTMLElement): void;
scrollHighlightedLineIntoView(
block: HTMLElement,
scrollState: HighlightScrollState,
skipAnimation?: boolean
): void;
easeInOutQuart(t: number): number;
getHighlightedLineBounds(block: HTMLElement): HighlightLineBounds;
highlightLines(block: HTMLElement, linesToHighlight?: string): void;
deserializeHighlightSteps(highlightSteps: string): HighlightLineStep[];
serializeHighlightSteps(highlightSteps: HighlightLineStep[]): string;
}
const Highlight = HighlightImplementation as () => HighlightPlugin;
export default Highlight;
@@ -1,71 +0,0 @@
/*
Monokai style - ported by Luigi Maselli - http://grigio.org
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #272822;
color: #ddd;
}
.hljs-tag,
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-strong,
.hljs-name {
color: #f92672;
}
.hljs-code {
color: #66d9ef;
}
.hljs-class .hljs-title {
color: white;
}
.hljs-attribute,
.hljs-symbol,
.hljs-regexp,
.hljs-link {
color: #bf79db;
}
.hljs-string,
.hljs-bullet,
.hljs-subst,
.hljs-title,
.hljs-section,
.hljs-emphasis,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #a6e22e;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-selector-id {
font-weight: bold;
}
@@ -0,0 +1,23 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
import { createPluginDts } from '../vite-plugin-dts.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/highlight': resolve(__dirname, 'index.ts'),
},
name: 'RevealHighlight',
fileName: appendExtension
}
},
plugins: [createPluginDts('highlight')],
})
@@ -1,80 +0,0 @@
/*
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
based on dark.css by Ivan Sagalaev
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #3f3f3f;
color: #dcdcdc;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-tag {
color: #e3ceab;
}
.hljs-template-tag {
color: #dcdcdc;
}
.hljs-number {
color: #8cd0d3;
}
.hljs-variable,
.hljs-template-variable,
.hljs-attribute {
color: #efdcbc;
}
.hljs-literal {
color: #efefaf;
}
.hljs-subst {
color: #8f8f8f;
}
.hljs-title,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-section,
.hljs-type {
color: #efef8f;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link {
color: #dca3a3;
}
.hljs-deletion,
.hljs-string,
.hljs-built_in,
.hljs-builtin-name {
color: #cc9393;
}
.hljs-addition,
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #7f9f7f;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}