Skip to content

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Dec 18, 2024
1 parent 58f84ff commit 1292b02
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 167 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Go to the `v1` branch to see the changelog of Lume 1.
- Samsung: 19 (from 16)

### Fixed
- Updated deps: `sass`, `preact`, `xml` and some plugins.
- Updated deps: `sass`, `preact`, `xml`, `katex`, `jsr`, `pagefind`, `highlight.js`, `tailwindcss`, `magic-string` and some icons.
- `esbuild`: JSR using import maps [#706].

## [2.4.3] - 2024-12-11
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
}
},
"imports": {
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/[email protected].5/"
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/[email protected].6/"
}
}
2 changes: 1 addition & 1 deletion deps/assert.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].9";
export * from "jsr:@std/[email protected].10";
2 changes: 1 addition & 1 deletion deps/base64.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].5/base64";
export * from "jsr:@std/[email protected].6/base64";
2 changes: 1 addition & 1 deletion deps/cli.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].8";
export * from "jsr:@std/[email protected].9";
2 changes: 1 addition & 1 deletion deps/fs.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].6";
export * from "jsr:@std/[email protected].7";
2 changes: 1 addition & 1 deletion deps/hex.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].5/hex";
export * from "jsr:@std/[email protected].6/hex";
6 changes: 3 additions & 3 deletions deps/highlight.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hljs from "npm:highlight.js@11.10.0";
export * from "npm:highlight.js@11.10.0";
import hljs from "npm:highlight.js@11.11.0";
export * from "npm:highlight.js@11.11.0";
export default hljs;

export const themesPath =
"https://cdn.jsdelivr.net/npm/highlight.js@11.10.0/styles/";
"https://cdn.jsdelivr.net/npm/highlight.js@11.11.0/styles/";
8 changes: 4 additions & 4 deletions deps/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ export const catalogs: Catalog[] = [
{
// https://remixicon.com/
id: "remix",
src: "https://cdn.jsdelivr.net/npm/remixicon@4.5.0/icons/{name}.svg",
src: "https://cdn.jsdelivr.net/npm/remixicon@4.6.0/icons/{name}.svg",
name: capitalize,
},
{
// https://simpleicons.org/
id: "simpleicons",
src: "https://cdn.jsdelivr.net/npm/simple-icons@13.20.0/icons/{name}.svg",
src: "https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/{name}.svg",
},
{
// https://tabler.io/icons
id: "tabler",
src:
"https://cdn.jsdelivr.net/npm/@tabler/icons@3.24.0/icons/{variant}/{name}.svg",
"https://cdn.jsdelivr.net/npm/@tabler/icons@3.26.0/icons/{variant}/{name}.svg",
variants: ["filled", "outline"],
},
{
Expand Down Expand Up @@ -193,7 +193,7 @@ export const catalogs: Catalog[] = [
// https://openmoji.org/
id: "openmoji",
src:
"https://cdn.jsdelivr.net/npm/openmoji@15.0.0/{variant}/svg/{name}.svg",
"https://cdn.jsdelivr.net/npm/openmoji@15.1.0/{variant}/svg/{name}.svg",
variants: ["color", "black"],
},
];
Expand Down
143 changes: 10 additions & 133 deletions deps/katex.ts
Original file line number Diff line number Diff line change
@@ -1,143 +1,20 @@
import katex from "npm:[email protected].15";
import katex, { type KatexOptions as BaseOptions } from "npm:[email protected].18";

export { katex };

interface TrustContext {
command: string;
url: string;
protocol: string;
}
/**
* Auto-render specific options
*/

/** Documentation: https://katex.org/docs/options.html */
export interface KatexOptions {
/**
* If `true`, math will be rendered in display mode
* (math in display style and center math on page)
*
* If `false`, math will be rendered in inline mode
* @default false
*/
displayMode?: boolean | undefined;
/**
* Determines the markup language of the output. The valid choices are:
* - `html`: Outputs KaTeX in HTML only.
* - `mathml`: Outputs KaTeX in MathML only.
* - `htmlAndMathml`: Outputs HTML for visual rendering
* and includes MathML for accessibility.
*
* @default 'htmlAndMathml'
*/
output?: "html" | "mathml" | "htmlAndMathml" | undefined;
/**
* If `true`, display math has \tags rendered on the left
* instead of the right, like \usepackage[leqno]{amsmath} in LaTeX.
*
* @default false
*/
leqno?: boolean | undefined;
/**
* If `true`, display math renders flush left with a 2em left margin,
* like \documentclass[fleqn] in LaTeX with the amsmath package.
*
* @default false
*/
fleqn?: boolean | undefined;
/**
* If `true`, KaTeX will throw a `ParseError` when
* it encounters an unsupported command or invalid LaTex
*
* If `false`, KaTeX will render unsupported commands as
* text, and render invalid LaTeX as its source code with
* hover text giving the error, in color given by errorColor
* @default true
*/
throwOnError?: boolean | undefined;
/**
* A Color string given in format `#XXX` or `#XXXXXX`
*/
errorColor?: string | undefined;
/**
* A collection of custom macros.
*
* See `src/macros.js` for its usage
*/
// deno-lint-ignore no-explicit-any
macros?: any;
/**
* Specifies a minimum thickness, in ems, for fraction lines,
* \sqrt top lines, {array} vertical lines, \hline, \hdashline,
* \underline, \overline, and the borders of \fbox, \boxed, and
* \fcolorbox.
*/
minRuleThickness?: number | undefined;
/**
* If `true`, `\color` will work like LaTeX's `\textcolor`
* and takes 2 arguments
*
* If `false`, `\color` will work like LaTeX's `\color`
* and takes 1 argument
*
* In both cases, `\textcolor` works as in LaTeX
*
* @default false
*/
colorIsTextColor?: boolean | undefined;
/**
* All user-specified sizes will be caped to `maxSize` ems
*
* If set to Infinity, users can make elements and space
* arbitrarily large
*
* @default Infinity
*/
maxSize?: number | undefined;
/**
* Limit the number of macro expansions to specified number
*
* If set to `Infinity`, marco expander will try to fully expand
* as in LaTex
*
* @default 1000
*/
maxExpand?: number | undefined;
/**
* If `false` or `"ignore"`, allow features that make
* writing in LaTex convenient but not supported by LaTex
*
* If `true` or `"error"`, throw an error for such transgressions
*
* If `"warn"`, warn about behavior via `console.warn`
*
* @default "warn"
*/
// deno-lint-ignore ban-types
strict?: boolean | string | Function | undefined;
/**
* If `false` (do not trust input), prevent any commands that could enable adverse behavior, rendering them instead in errorColor.
*
* If `true` (trust input), allow all such commands.
*
* @default false
*/
trust?: boolean | ((context: TrustContext) => boolean) | undefined;
/**
* Place KaTeX code in the global group.
*
* @default false
*/
globalGroup?: boolean | undefined;
interface Delimiter {
left: string;
right: string;
display?: boolean | undefined;
}

/**
* Auto-render specific options
*/
export interface KatexOptions extends BaseOptions {
delimiters?: Delimiter[] | undefined;
ignoredTags?: string[] | undefined;
ignoredClasses?: string[] | undefined;
preProcess?: ((math: string) => string) | undefined;
}

interface Delimiter {
left: string;
right: string;
display?: boolean | undefined;
}
2 changes: 1 addition & 1 deletion deps/linkedom.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
export * from "npm:[email protected].5";
export * from "npm:[email protected].6";
2 changes: 1 addition & 1 deletion deps/log.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].11";
export * from "jsr:@std/[email protected].12";
4 changes: 2 additions & 2 deletions deps/pagefind.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * as pagefind from "npm:pagefind@1.2.0";
export type { CustomRecord } from "npm:pagefind@1.2.0";
export * as pagefind from "npm:pagefind@1.3.0";
export type { CustomRecord } from "npm:pagefind@1.3.0";

export interface TranslationsOptions {
/** English default: "Search" */
Expand Down
2 changes: 1 addition & 1 deletion deps/snapshot.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "jsr:@std/[email protected].6/snapshot";
export * from "jsr:@std/[email protected].7/snapshot";
4 changes: 2 additions & 2 deletions deps/tailwindcss.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default } from "npm:[email protected].16";
export type { Config } from "npm:[email protected].16";
export { default } from "npm:[email protected].17";
export type { Config } from "npm:[email protected].17";
2 changes: 1 addition & 1 deletion deps/unocss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export {
export { presetUno } from "npm:@unocss/[email protected]";
export { default as transformerVariantGroup } from "npm:@unocss/[email protected]";
export { default as transformerDirectives } from "npm:@unocss/[email protected]";
export { default as MagicString } from "npm:[email protected].15";
export { default as MagicString } from "npm:[email protected].17";

export const resetUrl = "https://cdn.jsdelivr.net/npm/@unocss/[email protected]";
10 changes: 8 additions & 2 deletions plugins/katex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ export interface Options {
/** The css selector to apply katex */
cssSelector?: string;

/** Configuration to pass to katex */
/**
* Documentation for katex options:
* @see https://katex.org/docs/options.html
*
* Documentation for auto-render options:
* @see https://katex.org/docs/autorender.html
*/
options?: KatexOptions;
}

Expand Down Expand Up @@ -65,7 +71,7 @@ export function katex(userOptions?: Options) {
.forEach((element) => {
try {
const rendered = Katex.renderToString(
element.textContent,
element.textContent || "",
options.options,
);
const div = document.createElement("div");
Expand Down
18 changes: 9 additions & 9 deletions tests/__snapshots__/pagefind.test.ts.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/__snapshots__/tailwindcss.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ snapshot[`postcss plugin 3`] = `
--tw-contain-paint: ;
--tw-contain-style: ;
}/*
! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
Expand Down

0 comments on commit 1292b02

Please sign in to comment.