diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77edf8a..3e9aa9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,8 @@ jobs: - name: Run lint run: pnpm lint - - name: Run prettier - run: pnpm prettier + - name: Run format check + run: pnpm format:check build: runs-on: ubuntu-latest diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 08179d5..6972f86 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,3 +1,3 @@ module.exports = { - "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write --ignore-unknown"], -}; + '*.{js,jsx,ts,tsx}': ['oxlint -c .oxlintrc.json --fix', 'oxfmt --write'], +} diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..abc6c2c --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,27 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "trailingComma": "es5", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "printWidth": 80, + "sortImports": { + "groups": [ + "type-import", + ["value-builtin", "value-external"], + "type-internal", + "value-internal", + ["type-parent", "type-sibling", "type-index"], + ["value-parent", "value-sibling", "value-index"], + "unknown" + ] + }, + "ignorePatterns": [ + "pnpm-lock.yaml", + "**/storybook-static", + "**/lib", + "**/.storybook", + "**/tests/data/*.md", + "**/templates/*.md" + ] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..45d15bd --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,26 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "nextjs", "jsx-a11y", "import", "typescript"], + "categories": { + "correctness": "error", + "suspicious": "warn", + "perf": "warn" + }, + "rules": { + "no-unused-vars": "off", + "react/react-in-jsx-scope": "off", + "jsx-a11y/click-events-have-key-events": "warn", + "jsx-a11y/no-static-element-interactions": "warn", + "import/order": "error" + }, + "settings": { + "next": { + "rootDir": ["."] + }, + "react": { + "formComponents": [], + "linkComponents": [{ "name": "Link", "linkAttribute": "href" }] + } + }, + "ignorePatterns": [".next", "out", "build", "milkdown", "next-env.d.ts"] +} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 53392b0..0000000 --- a/.prettierignore +++ /dev/null @@ -1,10 +0,0 @@ -.next -docs/api-out -next-env.d.ts - -.idea/ -.vscode/ -**/templates/*.md - -pnpm-lock.yaml -milkdown/ \ No newline at end of file diff --git a/docs/blogs/announcing-telemetry-inspector.md b/docs/blogs/announcing-telemetry-inspector.md index 5dc9d14..2b2d9a4 100644 --- a/docs/blogs/announcing-telemetry-inspector.md +++ b/docs/blogs/announcing-telemetry-inspector.md @@ -13,16 +13,16 @@ You can even use visualizer to visualize the data. We create a simple example on Inspector will be a top-level API in Milkdown. You can use it like this: ```ts -import { Editor } from "@milkdown/core"; -import { Telemetry } from "@milkdown/ctx"; +import { Editor } from '@milkdown/core' +import { Telemetry } from '@milkdown/ctx' const editor = await Editor.make() // Inspector is disabled by default considering performance. You need to enable it manually. .enableInspector() // ... - .create(); + .create() -const telemetry: Telemetry[] = editor.inspect(); +const telemetry: Telemetry[] = editor.inspect() ``` The `Telemetry` interface will have the following fields: @@ -30,30 +30,30 @@ The `Telemetry` interface will have the following fields: ```ts interface Telemetry { // User defined information for the plugin. - metadata: Meta; + metadata: Meta // The slices and their current value defined by the plugin. - injectedSlices: { name: string; value: unknown }[]; + injectedSlices: { name: string; value: unknown }[] // The slices and their current value consumed by the plugin. - consumedSlices: { name: string; value: unknown }[]; + consumedSlices: { name: string; value: unknown }[] // The timers and their duration defined by the plugin. - recordedTimers: { name: string; duration: number; status: TimerStatus }[]; + recordedTimers: { name: string; duration: number; status: TimerStatus }[] // The timers and their duration consumed by the plugin. // Generally, the plugin will wait for them. - waitTimers: { name: string; duration: number; status: TimerStatus }[]; + waitTimers: { name: string; duration: number; status: TimerStatus }[] } -type TimerStatus = "pending" | "resolved" | "rejected"; +type TimerStatus = 'pending' | 'resolved' | 'rejected' interface Meta { - displayName: string; - description?: string; - package: string; - group?: string; - additional?: Record; + displayName: string + description?: string + package: string + group?: string + additional?: Record } ``` @@ -62,12 +62,12 @@ With the data, you'll know the sequence of the plugins loaded, the slices and ti For example: ```ts -[ +;[ { metadata: { - displayName: "Config", - package: "@milkdown/core", - group: "System", + displayName: 'Config', + package: '@milkdown/core', + group: 'System', }, injectedSlices: [], consumedSlices: [ @@ -75,18 +75,18 @@ For example: ], recordedTimers: [ { - name: "ConfigReady", + name: 'ConfigReady', duration: 3, - status: "resolved", + status: 'resolved', }, ], waitTimers: [], }, { metadata: { - displayName: "Init", - package: "@milkdown/core", - group: "System", + displayName: 'Init', + package: '@milkdown/core', + group: 'System', }, injectedSlices: [], consumedSlices: [ @@ -94,20 +94,20 @@ For example: ], recordedTimers: [ { - name: "InitReady", + name: 'InitReady', duration: 5, - status: "resolved", + status: 'resolved', }, ], waitTimers: [ { - name: "ConfigReady", + name: 'ConfigReady', duration: 5, - status: "resolved", + status: 'resolved', }, ], }, -]; +] ``` From above information, we can know that the `Init` plugin wait for `Config` plugin to be ready. @@ -120,23 +120,23 @@ We can build a sequence diagram from the data. For plugin maintainers, you can add metadata to your plugin to make it more friendly to the inspector. ```ts -import { MilkdownPlugin } from "@milkdown/ctx"; +import { MilkdownPlugin } from '@milkdown/ctx' const yourMilkdownPlugin: MilkdownPlugin = () => { /* your implementation */ -}; +} yourMilkdownPlugin.metadata = { - displayName: "Your Plugin", - package: "your-plugin-package", - description: "Your plugin description", - group: "If you have a lot of plugins in your package, you can group them.", + displayName: 'Your Plugin', + package: 'your-plugin-package', + description: 'Your plugin description', + group: 'If you have a lot of plugins in your package, you can group them.', addtitional: { /* You can add any additional information here. */ - version: "1.0.0", - authror: "Mike", + version: '1.0.0', + authror: 'Mike', }, -}; +} ``` With metadata, your plugin will report telemetry correctly to the inspector. diff --git a/docs/blogs/build-your-own-milkdown-copilot.md b/docs/blogs/build-your-own-milkdown-copilot.md index 51b50cd..7ced02e 100644 --- a/docs/blogs/build-your-own-milkdown-copilot.md +++ b/docs/blogs/build-your-own-milkdown-copilot.md @@ -21,34 +21,34 @@ I'll use Node.js to build the backend. You can use any language you like. The backend is very simple. It just calls the OpenAI API and returns the result. ```ts -import { Configuration, OpenAIApi } from "openai"; +import { Configuration, OpenAIApi } from 'openai' const configuration = new Configuration({ // Get your API key from env variable apiKey: process.env.OPENAPI_KEY, -}); -const openai = new OpenAIApi(configuration); +}) +const openai = new OpenAIApi(configuration) export const handler = async (req, res, next) => { - if (req.path === "/api/copilot" && req.method === "POST") { - const buffers = []; + if (req.path === '/api/copilot' && req.method === 'POST') { + const buffers = [] // Get the body of the request. - const body = JSON.parse(req.body); + const body = JSON.parse(req.body) // Get prompt from the body. - const { prompt } = body; + const { prompt } = body const completion = await openai.createCompletion({ // Pick a model you like - model: "text-davinci-003", + model: 'text-davinci-003', prompt, - }); - const hint = completion.data.choices[0].text; - return res.end(JSON.stringify({ hint })); + }) + const hint = completion.data.choices[0].text + return res.end(JSON.stringify({ hint })) } - next(); - return; -}; + next() + return +} ``` We watch the `/api/copilot` route and call the OpenAI API when we receive a POST request. @@ -58,13 +58,13 @@ To call our API, we just need one single helper in browser environment: ```ts async function fetchAIHint(prompt: string) { - const data: Record = { prompt }; - const response = await fetch("/api/copilot", { - method: "POST", + const data: Record = { prompt } + const response = await fetch('/api/copilot', { + method: 'POST', body: JSON.stringify(data), - }); - const res = (await response.json()) as { hint: string }; - return res.hint; + }) + const res = (await response.json()) as { hint: string } + return res.hint } ``` @@ -84,19 +84,19 @@ we can build a prosemirror plugin and use the `onKeyDown` hook to listen to the ```ts function keyDownHandler(ctx: Ctx, event: Event) { - if (event.key === "Enter" || event.code === "Space") { - getHint(ctx); - return; + if (event.key === 'Enter' || event.code === 'Space') { + getHint(ctx) + return } - if (event.key === "Tab") { + if (event.key === 'Tab') { // prevent the browser from focusing on the next element. - event.preventDefault(); + event.preventDefault() - applyHint(ctx); - return; + applyHint(ctx) + return } - hideHint(ctx); + hideHint(ctx) } ``` @@ -108,60 +108,60 @@ And we also need a component to render the hint. Here I choose to use a simple [ ```ts function renderHint(message: string) { - const dom = document.createElement("pre"); - dom.className = "copilot-hint"; - dom.innerHTML = message; - return dom; + const dom = document.createElement('pre') + dom.className = 'copilot-hint' + dom.innerHTML = message + return dom } ``` So our component looks like: ```ts -import { Plugin, PluginKey } from "@milkdown/prose/state"; -import { Decoration, DecorationSet } from "@milkdown/prose/view"; -import { $prose } from "@milkdown/utils"; +import { Plugin, PluginKey } from '@milkdown/prose/state' +import { Decoration, DecorationSet } from '@milkdown/prose/view' +import { $prose } from '@milkdown/utils' const initialState = { deco: DecorationSet.empty, - message: "", -}; + message: '', +} -export const copilotPluginKey = new PluginKey("milkdown-copilot"); +export const copilotPluginKey = new PluginKey('milkdown-copilot') export const copilotPlugin = $prose( (ctx) => new Plugin({ key: copilotPluginKey, props: { handleKeyDwon(view, event) { - keydownHandler(ctx, event); + keydownHandler(ctx, event) }, decorations(state) { - return copilotPluginKey.getState(state).deco; + return copilotPluginKey.getState(state).deco }, }, state: { init() { - return { ...initialState }; + return { ...initialState } }, apply(tr, value, _prevState, state) { - const message = tr.getMeta(copilotPluginKey); - if (typeof message !== "string") return value; + const message = tr.getMeta(copilotPluginKey) + if (typeof message !== 'string') return value if (message.length === 0) { - return { ...initialState }; + return { ...initialState } } - const { to } = tr.selection; - const widget = Decoration.widget(to + 1, () => renderHint(message)); + const { to } = tr.selection + const widget = Decoration.widget(to + 1, () => renderHint(message)) return { deco: DecorationSet.create(state.doc, [widget]), message, - }; + } }, }, - }), -); + }) +) ``` ### Get Hint @@ -170,21 +170,21 @@ To get a hint from the copilot, we need to get the text before the cursor. ```ts function getHint(ctx: Ctx) { - const view = ctx.get(editorViewCtx); - const { state } = view; - const { tr, schema } = state; - const { from } = tr.selection; + const view = ctx.get(editorViewCtx) + const { state } = view + const { tr, schema } = state + const { from } = tr.selection - const slice = tr.doc.slice(0, from); - const serializer = ctx.get(serializerCtx); - const doc = schema.topNodeType.createAndFill(undefined, slice.content); - if (!doc) return; + const slice = tr.doc.slice(0, from) + const serializer = ctx.get(serializerCtx) + const doc = schema.topNodeType.createAndFill(undefined, slice.content) + if (!doc) return - const markdown = serializer(doc); + const markdown = serializer(doc) fetchAIHint(markdown).then((hint) => { - const tr = view.state.tr; - view.dispatch(tr.setMeta(copilotPluginKey, hint)); - }); + const tr = view.state.tr + view.dispatch(tr.setMeta(copilotPluginKey, hint)) + }) } ``` @@ -200,10 +200,10 @@ To hide the hint, we just need to dispatch a transaction with an empty message. ```ts function hideHint(ctx: Ctx) { - const view = ctx.get(editorViewCtx); - const { state } = view; - const { tr } = state; - view.dispatch(tr.setMeta(copilotPluginKey, "")); + const view = ctx.get(editorViewCtx) + const { state } = view + const { tr } = state + view.dispatch(tr.setMeta(copilotPluginKey, '')) } ``` @@ -215,22 +215,22 @@ So, before we apply the hint to the editor, we need to convert the markdown snip ```ts function applyHint(ctx: Ctx) { - const view = ctx.get(editorViewCtx); - const { state } = view; - const { tr, schema } = state; + const view = ctx.get(editorViewCtx) + const { state } = view + const { tr, schema } = state - const { message } = copilotPluginKey.getState(state); - const parser = ctx.get(parserCtx); - const slice = parser(message); - const dom = DOMSerializer.fromSchema(schema).serializeFragment(slice.content); - const node = DOMParser.fromSchema(schema).parseSlice(dom); + const { message } = copilotPluginKey.getState(state) + const parser = ctx.get(parserCtx) + const slice = parser(message) + const dom = DOMSerializer.fromSchema(schema).serializeFragment(slice.content) + const node = DOMParser.fromSchema(schema).parseSlice(dom) // Reset the hint since it's applied - tr.setMeta(copilotPluginKey, "") + tr.setMeta(copilotPluginKey, '') // Replace the selection with the hint - .replaceSelection(node); + .replaceSelection(node) - view.dispatch(tr); + view.dispatch(tr) } ``` diff --git a/docs/blogs/introducing-milkdown@7.md b/docs/blogs/introducing-milkdown@7.md index 64c4a81..c5563fc 100644 --- a/docs/blogs/introducing-milkdown@7.md +++ b/docs/blogs/introducing-milkdown@7.md @@ -69,17 +69,17 @@ The composable plugins can keep the atomicity of the plugins and make the plugin They also make the plugin system easier to maintain. ```ts -const nodeSchema = $node("node", someSchema); -const nodeInputRules = $inputRules(someInputRules); -const nodeCommands = $commands(someCommands); +const nodeSchema = $node('node', someSchema) +const nodeInputRules = $inputRules(someInputRules) +const nodeCommands = $commands(someCommands) ``` If you want to reuse them, it also will be very easy. ```ts const anotherCommand = $commands(() => { - return setBlockType(nodeSchema.type()); -}); + return setBlockType(nodeSchema.type()) +}) ``` ## Runtime Plugin Toggling @@ -89,24 +89,24 @@ In V7, we support runtime plugin toggling by providing two new API: `editor.remo They can let users remove the plugins and configs at runtime. ```ts -import { Editor } from "@milkdown/core"; -import { someMilkdownPlugin } from "some-milkdown-plugin"; +import { Editor } from '@milkdown/core' +import { someMilkdownPlugin } from 'some-milkdown-plugin' const editor = await Editor.config(configForPlugin) .use(someMilkdownPlugin) - .create(); + .create() // remove plugin -await editor.remove(someMilkdownPlugin); +await editor.remove(someMilkdownPlugin) // remove config -editor.removeConfig(configForPlugin); +editor.removeConfig(configForPlugin) // add another plugin -editor.use(anotherMilkdownPlugin); +editor.use(anotherMilkdownPlugin) // Recreate the editor to apply changes. -await editor.create(); +await editor.create() ``` Also, if you call the `editor.create` method after the editor is created, diff --git a/docs/blogs/understanding-headless-slash-plugin.md b/docs/blogs/understanding-headless-slash-plugin.md index 5308cdd..6db24c7 100644 --- a/docs/blogs/understanding-headless-slash-plugin.md +++ b/docs/blogs/understanding-headless-slash-plugin.md @@ -29,61 +29,61 @@ And you'll also need to provide the UI of the dropdown menu. So, you'll need to create a `SlashProvider` instance. ```ts -import { slashPlugin, SlashProvider } from "@milkdown/plugin-slash"; +import { slashPlugin, SlashProvider } from '@milkdown/plugin-slash' const slashProvider = new SlashProvider({ content: YourDropdownUI, shouldShow(this: SlashProvider, view: EditorView) { - const currentText = this.getContent(view); + const currentText = this.getContent(view) - if (currentText === "") { - return false; + if (currentText === '') { + return false } // Display the menu if the last character is `/`. - if (currentText.endsWith("/")) { - return true; + if (currentText.endsWith('/')) { + return true } - return false; + return false }, -}); +}) ``` Then, you can use the slash provider in your plugin view. ```ts -import { EditorState } from "@milkdown/prose/state"; -import { EditorView, PluginView } from "@milkdown/prose/view"; +import { EditorState } from '@milkdown/prose/state' +import { EditorView, PluginView } from '@milkdown/prose/view' function yourSlashView(): PluginView { return { update: (view: EditorView, prevState: EditorState) => { - slashProvider.update(view, prevState); + slashProvider.update(view, prevState) }, destroy: () => { - slashProvider.destroy(); + slashProvider.destroy() }, - }; + } } ``` Last, you'll need to add the slash plugin to your editor. ```ts -import { Editor } from "@milkdown/core"; -import { slashFactory } from "@milkdown/plugin-slash"; +import { Editor } from '@milkdown/core' +import { slashFactory } from '@milkdown/plugin-slash' -const slash = slashFactory("my-slash"); +const slash = slashFactory('my-slash') Editor.make() .config((ctx) => { ctx.set(slash.key, { view: slashPluginView, - }); + }) }) .use(slash) - .create(); + .create() ``` ## Use with Prosemirror Adapter @@ -95,33 +95,33 @@ It can help you build prosemirror UI components with your favorite UI framework. For example, if you're using React: ```tsx -import { SlashProvider } from "@milkdown/plugin-slash"; -import { useInstance } from "@milkdown/react"; -import { usePluginViewContext } from "@prosemirror-adapter/react"; +import { SlashProvider } from '@milkdown/plugin-slash' +import { useInstance } from '@milkdown/react' +import { usePluginViewContext } from '@prosemirror-adapter/react' export const DropdownMenu = () => { - const { view, prevState } = usePluginViewContext(); - const slashProvider = useRef(); - const divRef = useRef(null); - const [loading] = useInstance(); + const { view, prevState } = usePluginViewContext() + const slashProvider = useRef() + const divRef = useRef(null) + const [loading] = useInstance() useEffect(() => { - if (!ref.current || loading) return; + if (!ref.current || loading) return slashProvider.current ??= new SlashProvider({ content: divRef.current, // ... - }); + }) return () => { - slashProvider.current?.destroy(); - slashProvider.current = undefined; - }; - }, [loading, root, setOpened, setSearch, setSelected]); + slashProvider.current?.destroy() + slashProvider.current = undefined + } + }, [loading, root, setOpened, setSearch, setSelected]) useEffect(() => { - slashProvider.current?.update(view, prevState); - }); + slashProvider.current?.update(view, prevState) + }) // Add a wrapper `div` to hide the dropdown menu when initializing. return ( @@ -130,17 +130,17 @@ export const DropdownMenu = () => {

Hi! I'm a dropdown menu.

- ); -}; + ) +} ``` And in your editor component: ```ts -import { usePluginViewFactory } from "@prosemirror-adapter/react"; +import { usePluginViewFactory } from '@prosemirror-adapter/react' export const YourEditor = () => { - const pluginViewFactory = usePluginViewFactory(); + const pluginViewFactory = usePluginViewFactory() useEditor((editor) => { return Editor.make() @@ -149,13 +149,13 @@ export const YourEditor = () => { view: pluginViewFactory({ component: DopdownMenu, }), - }); + }) }) - .use(slash); - }); + .use(slash) + }) // ... -}; +} ``` ## Real World Example diff --git a/docs/guide/architecture-overview.md b/docs/guide/architecture-overview.md index bf205e8..6b224b8 100644 --- a/docs/guide/architecture-overview.md +++ b/docs/guide/architecture-overview.md @@ -2,7 +2,7 @@ Milkdown is built with a modular, layered architecture that provides flexibility and extensibility. This document explains the core architectural concepts and how they work together. -![0.75](/guide/milkdown-architecture.png "Milkdown Architecture") +![0.75](/guide/milkdown-architecture.png 'Milkdown Architecture') ## Core Architecture Layers @@ -53,7 +53,7 @@ This layered approach provides several key benefits: ## Markdown Transformation -![0.75](/guide/transformer.png "Transformer") +![0.75](/guide/transformer.png 'Transformer') Milkdown's transformation system handles the conversion between Markdown and the editor's internal document model: @@ -80,7 +80,7 @@ This transformation system ensures: The Context System is a powerful state management and dependency coordination system that enables plugins to work together seamlessly. -![1.00](/guide/plugin-sequence.png "Plugin Sequence") +![1.00](/guide/plugin-sequence.png 'Plugin Sequence') ### Core Concepts @@ -90,12 +90,12 @@ The main interface for plugins to interact with the system: ```typescript interface Ctx { - get: (slice: Slice) => T; - set: (slice: Slice, value: T) => void; - wait: (timer: Timer) => Promise; - done: (timer: Timer) => void; - inject: (slice: Slice, value: T) => void; - remove: (slice: Slice) => void; + get: (slice: Slice) => T + set: (slice: Slice, value: T) => void + wait: (timer: Timer) => Promise + done: (timer: Timer) => void + inject: (slice: Slice, value: T) => void + remove: (slice: Slice) => void } ``` @@ -105,23 +105,23 @@ State containers that can be shared between plugins: ```typescript // Create a slice with initial value and name -const themeSlice = createSlice("light", "theme"); +const themeSlice = createSlice('light', 'theme') // Use in a plugin const themePlugin: MilkdownPlugin = (ctx) => { return () => { // Read current theme - const theme = ctx.get(themeSlice); + const theme = ctx.get(themeSlice) // Update theme - ctx.set(themeSlice, "dark"); + ctx.set(themeSlice, 'dark') // React to theme changes ctx.watch(themeSlice, (newTheme) => { // Handle theme change - }); - }; -}; + }) + } +} ``` #### 3. Timers @@ -130,23 +130,23 @@ Dependency management system for plugin coordination: ```typescript // Define a timer -const dataReady = createTimer("DataReady"); +const dataReady = createTimer('DataReady') // Use in a plugin const dataPlugin: MilkdownPlugin = (ctx) => { - ctx.record(dataReady); + ctx.record(dataReady) return async () => { // Wait for dependencies - await ctx.wait(SchemaReady); + await ctx.wait(SchemaReady) // Do work // ... // Mark as ready - ctx.done(dataReady); - }; -}; + ctx.done(dataReady) + } +} ``` ### Plugin Lifecycle @@ -156,23 +156,23 @@ Plugins follow a consistent lifecycle pattern: ```typescript const examplePlugin: MilkdownPlugin = (ctx) => { // 1. Setup Phase - ctx.inject(mySlice, defaultValue); - ctx.record(myTimer); + ctx.inject(mySlice, defaultValue) + ctx.record(myTimer) return async () => { // 2. Initialization Phase - await ctx.wait(RequiredTimer); + await ctx.wait(RequiredTimer) // 3. Runtime Phase - const value = ctx.get(mySlice); - ctx.set(mySlice, newValue); + const value = ctx.get(mySlice) + ctx.set(mySlice, newValue) // 4. Cleanup Phase return () => { - ctx.remove(mySlice); - }; - }; -}; + ctx.remove(mySlice) + } + } +} ``` ### Best Practices diff --git a/docs/guide/code-highlighting.md b/docs/guide/code-highlighting.md index ef41668..3b082e5 100644 --- a/docs/guide/code-highlighting.md +++ b/docs/guide/code-highlighting.md @@ -13,22 +13,22 @@ npm install @milkdown/plugin-highlight The highlight plugin requires a parser to be configured. Here's a basic example using the Shiki parser: ```typescript -import { Editor } from "@milkdown/core"; -import { commonmark } from "@milkdown/preset-commonmark"; -import { highlight, highlightPluginConfig } from "@milkdown/plugin-highlight"; -import { createParser } from "@milkdown/plugin-highlight/shiki"; +import { Editor } from '@milkdown/core' +import { commonmark } from '@milkdown/preset-commonmark' +import { highlight, highlightPluginConfig } from '@milkdown/plugin-highlight' +import { createParser } from '@milkdown/plugin-highlight/shiki' const editor = Editor.make() .config(async (ctx) => { const parser = await createParser({ - theme: "github-light", - langs: ["javascript", "typescript", "python", "html", "css"], - }); - ctx.set(highlightPluginConfig.key, { parser }); + theme: 'github-light', + langs: ['javascript', 'typescript', 'python', 'html', 'css'], + }) + ctx.set(highlightPluginConfig.key, { parser }) }) .use(commonmark) .use(highlight) - .create(); + .create() ``` ## Available Parsers @@ -40,13 +40,13 @@ The plugin supports multiple syntax highlighting libraries: Provides high-quality syntax highlighting with VS Code themes. Learn more at [Shiki](https://shiki.style/): ```typescript -import { createParser } from "@milkdown/plugin-highlight/shiki"; +import { createParser } from '@milkdown/plugin-highlight/shiki' const parser = await createParser({ - theme: "github-light", - langs: ["javascript", "typescript", "python"], -}); -ctx.set(highlightPluginConfig.key, { parser }); + theme: 'github-light', + langs: ['javascript', 'typescript', 'python'], +}) +ctx.set(highlightPluginConfig.key, { parser }) ``` ### Lowlight @@ -54,11 +54,11 @@ ctx.set(highlightPluginConfig.key, { parser }); Based on [highlight.js](https://highlightjs.org/), supports many languages: ```typescript -import { createParser } from "@milkdown/plugin-highlight/lowlight"; -import { common } from "lowlight"; +import { createParser } from '@milkdown/plugin-highlight/lowlight' +import { common } from 'lowlight' -const parser = createParser({ common }); -ctx.set(highlightPluginConfig.key, { parser }); +const parser = createParser({ common }) +ctx.set(highlightPluginConfig.key, { parser }) ``` Learn more about Lowlight at [lowlight](https://github.com/wooorm/lowlight). @@ -68,11 +68,11 @@ Learn more about Lowlight at [lowlight](https://github.com/wooorm/lowlight). Based on [Prism.js](https://prismjs.com/): ```typescript -import { createParser } from "@milkdown/plugin-highlight/refractor"; -import { refractor } from "refractor"; +import { createParser } from '@milkdown/plugin-highlight/refractor' +import { refractor } from 'refractor' -const parser = createParser({ refractor }); -ctx.set(highlightPluginConfig.key, { parser }); +const parser = createParser({ refractor }) +ctx.set(highlightPluginConfig.key, { parser }) ``` Learn more about Refractor at [refractor](https://github.com/wooorm/refractor). @@ -82,10 +82,10 @@ Learn more about Refractor at [refractor](https://github.com/wooorm/refractor). A lightweight and fast syntax highlighter. Learn more at [Sugar High](https://github.com/huozhi/sugar-high): ```typescript -import { createParser } from "@milkdown/plugin-highlight/sugar-high"; +import { createParser } from '@milkdown/plugin-highlight/sugar-high' -const parser = createParser(); -ctx.set(highlightPluginConfig.key, { parser }); +const parser = createParser() +ctx.set(highlightPluginConfig.key, { parser }) ``` ## Styling @@ -125,26 +125,26 @@ For Lowlight, Refractor, and Shiki, refer to their respective documentation for Here's a complete example with Shiki: ```typescript -import { Editor } from "@milkdown/core"; -import { commonmark } from "@milkdown/preset-commonmark"; -import { highlight, highlightPluginConfig } from "@milkdown/plugin-highlight"; -import { createParser } from "@milkdown/plugin-highlight/shiki"; +import { Editor } from '@milkdown/core' +import { commonmark } from '@milkdown/preset-commonmark' +import { highlight, highlightPluginConfig } from '@milkdown/plugin-highlight' +import { createParser } from '@milkdown/plugin-highlight/shiki' async function createHighlightedEditor() { const parser = await createParser({ - theme: "github-light", - langs: ["javascript", "typescript", "python", "html", "css", "json"], - }); + theme: 'github-light', + langs: ['javascript', 'typescript', 'python', 'html', 'css', 'json'], + }) const editor = Editor.make() .config((ctx) => { - ctx.set(highlightPluginConfig.key, { parser }); + ctx.set(highlightPluginConfig.key, { parser }) }) .use(commonmark) - .use(highlight); + .use(highlight) - await editor.create(); - return editor; + await editor.create() + return editor } ``` @@ -152,8 +152,8 @@ With this setup, your code blocks will be automatically highlighted: ````markdown ```javascript -console.log("Hello, world!"); -const greeting = (name) => `Hello, ${name}!`; +console.log('Hello, world!') +const greeting = (name) => `Hello, ${name}!` ``` ```` diff --git a/docs/guide/collaborative-editing.md b/docs/guide/collaborative-editing.md index be552dc..671e928 100644 --- a/docs/guide/collaborative-editing.md +++ b/docs/guide/collaborative-editing.md @@ -26,28 +26,28 @@ After the installation, you can configure your editor: ```typescript // ...import other plugins -import { collab, collabServiceCtx } from "@milkdown/plugin-collab"; +import { collab, collabServiceCtx } from '@milkdown/plugin-collab' async function setup() { const editor = await Editor.make() .config(nord) .use(commonmark) .use(collab) - .create(); + .create() - const doc = new Doc(); - const wsProvider = new WebsocketProvider("", "milkdown", doc); + const doc = new Doc() + const wsProvider = new WebsocketProvider('', 'milkdown', doc) editor.action((ctx) => { - const collabService = ctx.get(collabServiceCtx); + const collabService = ctx.get(collabServiceCtx) collabService // bind doc and awareness .bindDoc(doc) .setAwareness(wsProvider.awareness) // connect yjs with milkdown - .connect(); - }); + .connect() + }) } ``` @@ -59,22 +59,22 @@ You may want to control the connect status of the editor manually. ```typescript editor.action((ctx) => { - const collabService = ctx.get(collabServiceCtx); - const doc = new Doc(); - const wsProvider = new WebsocketProvider("", "milkdown", doc); - - collabService.bindDoc(doc).setAwareness(wsProvider.awareness); - - document.getElementById("connect").onclick = () => { - wsProvider.connect(); - collabService.connect(); - }; - - document.getElementById("disconnect").onclick = () => { - wsProvider.disconnect(); - collabService.disconnect(); - }; -}); + const collabService = ctx.get(collabServiceCtx) + const doc = new Doc() + const wsProvider = new WebsocketProvider('', 'milkdown', doc) + + collabService.bindDoc(doc).setAwareness(wsProvider.awareness) + + document.getElementById('connect').onclick = () => { + wsProvider.connect() + collabService.connect() + } + + document.getElementById('disconnect').onclick = () => { + wsProvider.disconnect() + collabService.disconnect() + } +}) ``` ## Default Template @@ -82,25 +82,25 @@ editor.action((ctx) => { By default, the editor will show a empty document. You may want to use a template to show a document. ```typescript -const template = `# Heading`; +const template = `# Heading` editor.action((ctx) => { - const collabService = ctx.get(collabServiceCtx); - const doc = new Doc(); - const wsProvider = new WebsocketProvider("", "milkdown", doc); + const collabService = ctx.get(collabServiceCtx) + const doc = new Doc() + const wsProvider = new WebsocketProvider('', 'milkdown', doc) - collabService.bindDoc(doc).setAwareness(wsProvider.awareness); + collabService.bindDoc(doc).setAwareness(wsProvider.awareness) - wsProvider.once("synced", async (isSynced: boolean) => { + wsProvider.once('synced', async (isSynced: boolean) => { if (isSynced) { collabService // apply your template .applyTemplate(markdown) // don't forget connect - .connect(); + .connect() } - }); -}); + }) +}) ``` Keep in mind that applying a template multiple times may cause some unexpected behavior, such as duplicate content. @@ -115,7 +115,7 @@ collabService // return true to apply template }) // don't forget connect - .connect(); + .connect() ``` Here the nodes we get are [prosemirror nodes](https://prosemirror.net/docs/ref/#model.Node). diff --git a/docs/guide/commands.md b/docs/guide/commands.md index 0960db2..d421e96 100644 --- a/docs/guide/commands.md +++ b/docs/guide/commands.md @@ -20,26 +20,26 @@ The command manager is the central place for handling all editor commands. It pr You can execute commands using the command manager through the editor's action system: ```typescript -import { Editor, commandsCtx } from "@milkdown/kit/core"; +import { Editor, commandsCtx } from '@milkdown/kit/core' import { commonmark, toggleEmphasisCommand, -} from "@milkdown/kit/preset/commonmark"; +} from '@milkdown/kit/preset/commonmark' async function setup() { - const editor = await Editor.make().use(commonmark).create(); + const editor = await Editor.make().use(commonmark).create() const toggleItalic = () => editor.action((ctx) => { // get command manager - const commandManager = ctx.get(commandsCtx); + const commandManager = ctx.get(commandsCtx) // call command - commandManager.call(toggleEmphasisCommand.key); - }); + commandManager.call(toggleEmphasisCommand.key) + }) // get markdown string: - $button.onClick = toggleItalic; + $button.onClick = toggleItalic } ``` @@ -50,41 +50,41 @@ async function setup() { You can chain multiple commands together using the command manager's `chain` method. Commands in the chain will be executed in order until one of them returns `true`: ```typescript -import { Editor, commandsCtx } from "@milkdown/kit/core"; +import { Editor, commandsCtx } from '@milkdown/kit/core' import { commonmark, toggleEmphasisCommand, toggleStrongCommand, -} from "@milkdown/kit/preset/commonmark"; +} from '@milkdown/kit/preset/commonmark' -const editor = await Editor.make().use(commonmark).create(); +const editor = await Editor.make().use(commonmark).create() editor.action((ctx) => { - const commandManager = ctx.get(commandsCtx); + const commandManager = ctx.get(commandsCtx) // Chain multiple commands commandManager .chain() .pipe(toggleEmphasisCommand.key) // Try to toggle emphasis .pipe(toggleStrongCommand.key) // If emphasis fails, try to toggle strong - .run(); -}); + .run() +}) ``` You can also mix inline commands with registered commands: ```typescript -import { chainCommands } from "@milkdown/prose/commands"; +import { chainCommands } from '@milkdown/prose/commands' editor.action((ctx) => { - const commandManager = ctx.get(commandsCtx); + const commandManager = ctx.get(commandsCtx) commandManager .chain() .inline(someInlineCommand) // Add an inline command .pipe(toggleEmphasisCommand.key) // Add a registered command - .run(); -}); + .run() +}) ``` ## Create a Command @@ -96,21 +96,21 @@ To create a command, use the `$command` utility from `@milkdown/utils`. Commands ### Example: Command without argument ```typescript -import { Editor } from "@milkdown/kit/core"; -import { blockquoteSchema } from "@milkdown/kit/preset/commonmark"; -import { wrapIn } from "@milkdown/kit/prose/commands"; -import { $command, callCommand } from "@milkdown/kit/utils"; +import { Editor } from '@milkdown/kit/core' +import { blockquoteSchema } from '@milkdown/kit/preset/commonmark' +import { wrapIn } from '@milkdown/kit/prose/commands' +import { $command, callCommand } from '@milkdown/kit/utils' const wrapInBlockquoteCommand = $command( - "WrapInBlockquote", - (ctx) => () => wrapIn(blockquoteSchema.type(ctx)), -); + 'WrapInBlockquote', + (ctx) => () => wrapIn(blockquoteSchema.type(ctx)) +) // register the command when creating the editor -const editor = Editor().make().use(wrapInBlockquoteCommand).create(); +const editor = Editor().make().use(wrapInBlockquoteCommand).create() // call command -editor.action(callCommand(wrapInBlockquoteCommand.key)); +editor.action(callCommand(wrapInBlockquoteCommand.key)) ``` ### Example: Command with argument @@ -118,43 +118,43 @@ editor.action(callCommand(wrapInBlockquoteCommand.key)); Commands can accept arguments of any type: ```typescript -import { headingSchema } from "@milkdown/kit/preset/commonmark"; -import { setBlockType } from "@milkdown/kit/prose/commands"; -import { $command, callCommand } from "@milkdown/kit/utils"; +import { headingSchema } from '@milkdown/kit/preset/commonmark' +import { setBlockType } from '@milkdown/kit/prose/commands' +import { $command, callCommand } from '@milkdown/kit/utils' // use number as the type of argument -export const WrapInHeading = createCmdKey(); +export const WrapInHeading = createCmdKey() const wrapInHeadingCommand = $command( - "WrapInHeading", + 'WrapInHeading', (ctx) => (level = 1) => - setBlockType(headingSchema.type(ctx), { level }), -); + setBlockType(headingSchema.type(ctx), { level }) +) // call command -editor.action(callCommand(wrapInHeadingCommand.key)); // turn to h1 by default -editor.action(callCommand(wrapInHeadingCommand.key, 2)); // turn to h2 +editor.action(callCommand(wrapInHeadingCommand.key)) // turn to h1 by default +editor.action(callCommand(wrapInHeadingCommand.key, 2)) // turn to h2 ``` ### Example: Command with Multiple Arguments ```typescript interface TableConfig { - rows: number; - cols: number; - withHeader: boolean; + rows: number + cols: number + withHeader: boolean } const insertTableCommand = $command( - "InsertTable", + 'InsertTable', (ctx) => (config: TableConfig) => { // Implementation for inserting a table return (state, dispatch) => { // ... table insertion logic - return true; - }; - }, -); + return true + } + } +) // Usage editor.action( @@ -162,8 +162,8 @@ editor.action( rows: 3, cols: 3, withHeader: true, - }), -); + }) +) ``` ## Best Practices @@ -203,48 +203,48 @@ editor.action( ```typescript const toggleCommand = $command( - "ToggleFeature", + 'ToggleFeature', (ctx) => () => (state, dispatch) => { - const isActive = checkIfActive(state); + const isActive = checkIfActive(state) return isActive ? removeFeature(state, dispatch) - : addFeature(state, dispatch); - }, -); + : addFeature(state, dispatch) + } +) ``` ### Insert Commands ```typescript const insertCommand = $command( - "InsertContent", + 'InsertContent', (ctx) => (content: string) => (state, dispatch) => { - const { selection } = state; - if (!selection) return false; - - const tr = state.tr.insertText(content, selection.from); - dispatch?.(tr); - return true; - }, -); + const { selection } = state + if (!selection) return false + + const tr = state.tr.insertText(content, selection.from) + dispatch?.(tr) + return true + } +) ``` ### Transform Commands ```typescript const transformCommand = $command( - "TransformContent", + 'TransformContent', (ctx) => (transform: (node: ProseNode) => ProseNode) => (state, dispatch) => { - const { selection } = state; - if (!selection) return false; + const { selection } = state + if (!selection) return false const tr = state.tr.replaceWith( selection.from, selection.to, - transform(state.doc.nodeAt(selection.from)!), - ); - dispatch?.(tr); - return true; - }, -); + transform(state.doc.nodeAt(selection.from)!) + ) + dispatch?.(tr) + return true + } +) ``` diff --git a/docs/guide/faq.md b/docs/guide/faq.md index 41e6c7e..30fe4c5 100644 --- a/docs/guide/faq.md +++ b/docs/guide/faq.md @@ -10,15 +10,15 @@ You should use `editor.action` to change the contents. We provide two macros for that allow you to change content in milkdown, `insert` and `replaceAll`. ```typescript -import { insert, replaceAll } from "@milkdown/kit/utils"; +import { insert, replaceAll } from '@milkdown/kit/utils' const editor = await Editor.make() // .use() - .create(); + .create() -editor.action(insert("# New Heading")); +editor.action(insert('# New Heading')) -editor.action(replaceAll("# New Document")); +editor.action(replaceAll('# New Document')) ``` --- @@ -26,14 +26,14 @@ editor.action(replaceAll("# New Document")); ### How to configure remark? ```typescript -import { remarkStringifyOptionsCtx } from "@milkdown/kit/core"; +import { remarkStringifyOptionsCtx } from '@milkdown/kit/core' editor.config((ctx) => { ctx.set(remarkStringifyOptionsCtx, { // some options, for example: - bullet: "*", + bullet: '*', fences: true, incrementListMarker: false, - }); -}); + }) +}) ``` diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index bb3ef4e..ff9be6b 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -11,16 +11,16 @@ npm install @milkdown/crepe ``` ```typescript -import { Crepe } from "@milkdown/crepe"; -import "@milkdown/crepe/theme/common/style.css"; -import "@milkdown/crepe/theme/frame.css"; +import { Crepe } from '@milkdown/crepe' +import '@milkdown/crepe/theme/common/style.css' +import '@milkdown/crepe/theme/frame.css' const crepe = new Crepe({ - root: "#app", - defaultValue: "Hello, Milkdown!", -}); + root: '#app', + defaultValue: 'Hello, Milkdown!', +}) -crepe.create(); +crepe.create() ``` ::iframe{src="https://stackblitz.com/github/Milkdown/examples/tree/main/editor-crepe"} @@ -84,12 +84,12 @@ npm install @milkdown/kit Create a basic editor with commonmark syntax: ```typescript -import { Editor } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; +import { Editor } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' // This is the must have css for prosemirror -import "@milkdown/kit/prose/view/style/prosemirror.css"; +import '@milkdown/kit/prose/view/style/prosemirror.css' -Editor.make().use(commonmark).create(); +Editor.make().use(commonmark).create() ``` ::iframe{src="https://stackblitz.com/github/Milkdown/examples/tree/main/vanilla-commonmark"} @@ -97,11 +97,11 @@ Editor.make().use(commonmark).create(); Add undo & redo support: ```typescript -import { Editor } from "@milkdown/kit/core"; -import { history } from "@milkdown/kit/plugin/history"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { nord } from "@milkdown/theme-nord"; -import "@milkdown/theme-nord/style.css"; +import { Editor } from '@milkdown/kit/core' +import { history } from '@milkdown/kit/plugin/history' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { nord } from '@milkdown/theme-nord' +import '@milkdown/theme-nord/style.css' const milkdown = Editor.make() .config(nord) @@ -109,11 +109,11 @@ const milkdown = Editor.make() .use(history) .create() .then(() => { - console.log("Editor created"); - }); + console.log('Editor created') + }) // To destroy the editor -milkdown.destroy(); +milkdown.destroy() ``` > **Note**: `` is `` for macOS and `` for other platforms. @@ -132,26 +132,26 @@ npm install @milkdown/crepe ``` ```typescript -import { Crepe } from "@milkdown/crepe"; -import "@milkdown/crepe/theme/common/style.css"; +import { Crepe } from '@milkdown/crepe' +import '@milkdown/crepe/theme/common/style.css' /** * Available themes: * frame, classic, nord * frame-dark, classic-dark, nord-dark */ -import "@milkdown/crepe/theme/frame.css"; +import '@milkdown/crepe/theme/frame.css' const crepe = new Crepe({ - root: "#app", - defaultValue: "Hello, Milkdown!", -}); + root: '#app', + defaultValue: 'Hello, Milkdown!', +}) crepe.create().then(() => { - console.log("Editor created"); -}); + console.log('Editor created') +}) // To destroy the editor -crepe.destroy(); +crepe.destroy() ``` ::iframe{src="https://stackblitz.com/github/Milkdown/examples/tree/main/editor-crepe"} diff --git a/docs/guide/interacting-with-editor.md b/docs/guide/interacting-with-editor.md index 45bde14..f197b8b 100644 --- a/docs/guide/interacting-with-editor.md +++ b/docs/guide/interacting-with-editor.md @@ -9,51 +9,51 @@ This guide covers the essential ways to interact with the Milkdown editor, inclu Crepe is a high-level wrapper around Milkdown that provides a simpler API for common editor operations. Here's how to use it: ```typescript -import { Crepe } from "@milkdown/crepe"; +import { Crepe } from '@milkdown/crepe' // Create a new editor instance const editor = new Crepe({ // Optional: specify root element (DOM node or selector) - root: "#editor", + root: '#editor', // Optional: set default content, supports markdown, json and dom. - defaultValue: "# Hello Crepe!", -}); + defaultValue: '# Hello Crepe!', +}) // Create the editor -await editor.create(); +await editor.create() // Get markdown content -const markdown = editor.getMarkdown(); +const markdown = editor.getMarkdown() // Set readonly mode -editor.setReadonly(true); +editor.setReadonly(true) // Register event listeners editor.on((listener) => { listener.markdownUpdated((ctx, markdown) => { - console.log("Content updated:", markdown); - }); + console.log('Content updated:', markdown) + }) listener.focus((ctx) => { - console.log("Editor focused"); - }); + console.log('Editor focused') + }) listener.blur((ctx) => { - console.log("Editor blurred"); - }); + console.log('Editor blurred') + }) listener.selectionUpdated((ctx, selection, prevSelection) => { - console.log("Selection updated:", selection); - }); + console.log('Selection updated:', selection) + }) listener.updated((ctx, doc, prevDoc) => { - console.log("Document updated:", doc); - }); -}); + console.log('Document updated:', doc) + }) +}) // Destroy the editor when done -await editor.destroy(); +await editor.destroy() ``` ## Register to DOM @@ -63,11 +63,11 @@ await editor.destroy(); By default, milkdown will create editor on the `document.body`. Alternatively, you can also point out which dom node you want it to load into: ```typescript -import { rootCtx } from "@milkdown/kit/core"; +import { rootCtx } from '@milkdown/kit/core' Editor.make().config((ctx) => { - ctx.set(rootCtx, document.querySelector("#editor")); -}); + ctx.set(rootCtx, document.querySelector('#editor')) +}) ``` It's also possible to just pass a selector to `rootCtx`: @@ -75,11 +75,11 @@ It's also possible to just pass a selector to `rootCtx`: > The selector will be passed to `document.querySelector` to get the dom. ```typescript -import { rootCtx } from "@milkdown/kit/core"; +import { rootCtx } from '@milkdown/kit/core' Editor.make().config((ctx) => { - ctx.set(rootCtx, "#editor"); -}); + ctx.set(rootCtx, '#editor') +}) ``` ## Setting Default Value @@ -97,12 +97,12 @@ We support three types of default values: You can set a markdown string as the default value of the editor. ```typescript -import { defaultValueCtx } from "@milkdown/kit/core"; +import { defaultValueCtx } from '@milkdown/kit/core' -const defaultValue = "# Hello milkdown"; +const defaultValue = '# Hello milkdown' Editor.make().config((ctx) => { - ctx.set(defaultValueCtx, defaultValue); -}); + ctx.set(defaultValueCtx, defaultValue) +}) ``` ### Dom @@ -120,15 +120,15 @@ Let's assume that we have the following html snippets: Then we can use it as a defaultValue with a `type` specification: ```typescript -import { defaultValueCtx } from "@milkdown/kit/core"; +import { defaultValueCtx } from '@milkdown/kit/core' const defaultValue = { - type: "html", - dom: document.querySelector("#pre"), -}; + type: 'html', + dom: document.querySelector('#pre'), +} Editor.make().config((ctx) => { - ctx.set(defaultValueCtx, defaultValue); -}); + ctx.set(defaultValueCtx, defaultValue) +}) ``` ### JSON @@ -138,31 +138,31 @@ We can also use a JSON object as a default value. This JSON object can be obtained by a listener through the [listener-plugin](https://www.npmjs.com/package/@milkdown/plugin-listener), for example: ```typescript -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' -let jsonOutput; +let jsonOutput Editor.make() .config((ctx) => { ctx.get(listenerCtx).updated((ctx, doc, prevDoc) => { - jsonOutput = doc.toJSON(); - }); + jsonOutput = doc.toJSON() + }) }) - .use(listener); + .use(listener) ``` Then we can use this `jsonOutput` as default Value: ```typescript -import { defaultValueCtx } from "@milkdown/kit/core"; +import { defaultValueCtx } from '@milkdown/kit/core' const defaultValue = { - type: "json", + type: 'json', value: jsonOutput, -}; +} Editor.make().config((ctx) => { - ctx.set(defaultValueCtx, defaultValue); -}); + ctx.set(defaultValueCtx, defaultValue) +}) ``` ## Inspecting Editor Status @@ -172,35 +172,35 @@ Editor.make().config((ctx) => { You can inspect the editor's status through the `status` property. ```typescript -import { Editor, EditorStatus } from "@milkdown/kit/core"; +import { Editor, EditorStatus } from '@milkdown/kit/core' -const editor = Editor.make().use(/* some plugins */); +const editor = Editor.make().use(/* some plugins */) -assert(editor.status === EditorStatus.Idle); +assert(editor.status === EditorStatus.Idle) editor.create().then(() => { - assert(editor.status === EditorStatus.Created); -}); + assert(editor.status === EditorStatus.Created) +}) -assert(editor.status === EditorStatus.OnCreate); +assert(editor.status === EditorStatus.OnCreate) editor.destroy().then(() => { - assert(editor.status === EditorStatus.Destroyed); -}); + assert(editor.status === EditorStatus.Destroyed) +}) -assert(editor.status === EditorStatus.OnDestroyed); +assert(editor.status === EditorStatus.OnDestroyed) ``` You can also listen to the status changes: ```typescript -import { Editor, EditorStatus } from "@milkdown/kit/core"; +import { Editor, EditorStatus } from '@milkdown/kit/core' -const editor = Editor.make().use(/* some plugins */); +const editor = Editor.make().use(/* some plugins */) editor.onStatusChange((status: EditorStatus) => { - console.log(status); -}); + console.log(status) +}) ``` ### Status Lifecycle @@ -226,17 +226,17 @@ You can add markdown listener to get the editor's contents as a markdown string. > If you have a large document, I suggest you to only `parse` and `serialize` the document when needed. ```typescript -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' -let output = ""; +let output = '' Editor.make() .config((ctx) => { ctx.get(listenerCtx).markdownUpdated((ctx, markdown, prevMarkdown) => { - output = markdown; - }); + output = markdown + }) }) - .use(listener); + .use(listener) ``` ### Doc Listener @@ -244,17 +244,17 @@ Editor.make() You can also listen to the [raw prosemirror document node](https://prosemirror.net/docs/ref/#model.Node), and do things you want from there. ```typescript -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' -let jsonOutput; +let jsonOutput Editor.make() .config((ctx) => { ctx.get(listenerCtx).updated((ctx, doc, prevDoc) => { - jsonOutput = doc.toJSON(); - }); + jsonOutput = doc.toJSON() + }) }) - .use(listener); + .use(listener) ``` ### Selection Listener @@ -266,26 +266,26 @@ You can track changes to the editor's selection using the `selectionUpdated` eve - Selection-based formatting controls ```typescript -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; -import { Selection, TextSelection } from "@milkdown/prose/state"; +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' +import { Selection, TextSelection } from '@milkdown/prose/state' Editor.make() .config((ctx) => { ctx.get(listenerCtx).selectionUpdated((ctx, selection, prevSelection) => { if (selection instanceof TextSelection) { // Get selection range - const { from, to } = selection; + const { from, to } = selection // Example: Update toolbar based on selection updateToolbar({ hasSelection: from !== to, selectionStart: from, selectionEnd: to, - }); + }) } - }); + }) }) - .use(listener); + .use(listener) ``` The selection listener will be triggered when the selection is changed. @@ -300,23 +300,23 @@ For more details about listeners, please check [Using Listeners](/docs/api/plugi You can set the editor to readonly mode by setting the `editable` property. ```typescript -import { editorViewOptionsCtx } from "@milkdown/kit/core"; +import { editorViewOptionsCtx } from '@milkdown/kit/core' -let readonly = false; +let readonly = false -const editable = () => !readonly; +const editable = () => !readonly Editor.make().config((ctx) => { ctx.update(editorViewOptionsCtx, (prev) => ({ ...prev, editable, - })); -}); + })) +}) // set to readonly after 5 secs. setTimeout(() => { - readonly = true; -}, 5000); + readonly = true +}, 5000) ``` ### Use Cases for Readonly Mode @@ -335,29 +335,29 @@ You can use an action to get the context value in a running editor on demand. For example, to get the markdown string by running an action: ```typescript -import { Editor, editorViewCtx, serializerCtx } from "@milkdown/kit/core"; +import { Editor, editorViewCtx, serializerCtx } from '@milkdown/kit/core' async function playWithEditor() { - const editor = await Editor.make().use(commonmark).create(); + const editor = await Editor.make().use(commonmark).create() const getMarkdown = () => editor.action((ctx) => { - const editorView = ctx.get(editorViewCtx); - const serializer = ctx.get(serializerCtx); - return serializer(editorView.state.doc); - }); + const editorView = ctx.get(editorViewCtx) + const serializer = ctx.get(serializerCtx) + return serializer(editorView.state.doc) + }) // get markdown string: - getMarkdown(); + getMarkdown() } ``` We provide some macros out of the box, you can use them as actions: ```typescript -import { insert } from "@milkdown/kit/utils"; +import { insert } from '@milkdown/kit/utils' -editor.action(insert("# Hello milkdown")); +editor.action(insert('# Hello milkdown')) ``` ### Common Actions @@ -376,23 +376,23 @@ For more details about macros, please check [macros](/docs/guide/macros). You can call `editor.destroy` to destroy an existing editor. You can create a new editor again with `editor.create`. ```typescript -await editor.destroy(); +await editor.destroy() // Then create again -await editor.create(); +await editor.create() ``` If you just want to recreate the editor, you can use `editor.create`, it will **destroy the old editor and create a new one**. ```typescript -await editor.create(); +await editor.create() // This equals to call `editor.destroy` and `editor.create` again. -await editor.create(); +await editor.create() ``` If you want to **clear the plugins and configs for the editor** when calling `editor.destroy`, you can pass `true` to `editor.destroy`. ```typescript -await editor.destroy(true); +await editor.destroy(true) ``` diff --git a/docs/guide/keyboard-shortcuts.md b/docs/guide/keyboard-shortcuts.md index 96f9bfe..06e5438 100644 --- a/docs/guide/keyboard-shortcuts.md +++ b/docs/guide/keyboard-shortcuts.md @@ -71,17 +71,17 @@ Milkdown comes with a set of default keyboard shortcuts from both presets and pl You can customize keyboard shortcuts by configuring the keymap in the editor setup: ```typescript -import { blockquoteKeymap, commonmark } from "@milkdown/kit/preset/commonmark"; +import { blockquoteKeymap, commonmark } from '@milkdown/kit/preset/commonmark' Editor.make() .config((ctx) => { ctx.set(blockquoteKeymap.key, { - WrapInBlockquote: "Mod-Shift-b", + WrapInBlockquote: 'Mod-Shift-b', // or you may want to bind multiple keys: - WrapInBlockquote: ["Mod-Shift-b", "Mod-b"], - }); + WrapInBlockquote: ['Mod-Shift-b', 'Mod-b'], + }) }) - .use(commonmark); + .use(commonmark) ``` ## Defining Keymaps @@ -93,50 +93,50 @@ Keymaps in Milkdown are defined using the `$useKeymap` utility. Here's how to de ### Heading Keymap Example ```typescript -import { $useKeymap } from "@milkdown/utils"; -import { commandsCtx } from "@milkdown/core"; +import { $useKeymap } from '@milkdown/utils' +import { commandsCtx } from '@milkdown/core' -export const headingKeymap = $useKeymap("headingKeymap", { +export const headingKeymap = $useKeymap('headingKeymap', { TurnIntoH1: { - shortcuts: "Mod-Alt-1", + shortcuts: 'Mod-Alt-1', command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(wrapInHeadingCommand.key, 1); + const commands = ctx.get(commandsCtx) + return () => commands.call(wrapInHeadingCommand.key, 1) }, }, TurnIntoH2: { - shortcuts: "Mod-Alt-2", + shortcuts: 'Mod-Alt-2', command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(wrapInHeadingCommand.key, 2); + const commands = ctx.get(commandsCtx) + return () => commands.call(wrapInHeadingCommand.key, 2) }, }, // ... more heading levels DowngradeHeading: { - shortcuts: ["Delete", "Backspace"], + shortcuts: ['Delete', 'Backspace'], command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(downgradeHeadingCommand.key); + const commands = ctx.get(commandsCtx) + return () => commands.call(downgradeHeadingCommand.key) }, }, -}); +}) ``` ### Strong (Bold) Keymap Example ```typescript -import { $useKeymap } from "@milkdown/utils"; -import { commandsCtx } from "@milkdown/core"; +import { $useKeymap } from '@milkdown/utils' +import { commandsCtx } from '@milkdown/core' -export const strongKeymap = $useKeymap("strongKeymap", { +export const strongKeymap = $useKeymap('strongKeymap', { ToggleBold: { - shortcuts: ["Mod-b"], + shortcuts: ['Mod-b'], command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(toggleStrongCommand.key); + const commands = ctx.get(commandsCtx) + return () => commands.call(toggleStrongCommand.key) }, }, -}); +}) ``` ### Keymap Structure @@ -163,50 +163,50 @@ $useKeymap('keymapName', { If you need to add custom shortcuts, you can create a keymap plugin: ```typescript -import { $useKeymap } from "@milkdown/utils"; -import { commandsCtx } from "@milkdown/core"; +import { $useKeymap } from '@milkdown/utils' +import { commandsCtx } from '@milkdown/core' -const customKeymap = $useKeymap("customKeymap", { +const customKeymap = $useKeymap('customKeymap', { CustomCommand: { - shortcuts: "F1", + shortcuts: 'F1', command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(someCommand.key); + const commands = ctx.get(commandsCtx) + return () => commands.call(someCommand.key) }, }, -}); +}) // Usage -Editor.make().use(customKeymap).use(commonmark); +Editor.make().use(customKeymap).use(commonmark) ``` ### Example: Custom Command with Shortcut ```typescript -import { $command, $useKeymap } from "@milkdown/utils"; -import { commandsCtx } from "@milkdown/core"; +import { $command, $useKeymap } from '@milkdown/utils' +import { commandsCtx } from '@milkdown/core' // Create a custom command -const customCommand = $command("CustomCommand", (ctx) => () => { +const customCommand = $command('CustomCommand', (ctx) => () => { return (state, dispatch) => { // Command implementation - return true; - }; -}); + return true + } +}) // Create a keymap -const customKeymap = $useKeymap("customKeymap", { +const customKeymap = $useKeymap('customKeymap', { CustomCommand: { - shortcuts: ["F1", "Mod-F1"], // Multiple shortcuts + shortcuts: ['F1', 'Mod-F1'], // Multiple shortcuts command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(customCommand.key); + const commands = ctx.get(commandsCtx) + return () => commands.call(customCommand.key) }, }, -}); +}) // Usage -Editor.make().use(customCommand).use(customKeymap); +Editor.make().use(customCommand).use(customKeymap) ``` ## Shortcut Priority @@ -222,31 +222,31 @@ When multiple shortcuts are registered for the same key, they are executed in or #### Example: Using Priority ```typescript -import { $useKeymap } from "@milkdown/utils"; -import { commandsCtx } from "@milkdown/core"; +import { $useKeymap } from '@milkdown/utils' +import { commandsCtx } from '@milkdown/core' -export const customKeymap = $useKeymap("customKeymap", { +export const customKeymap = $useKeymap('customKeymap', { CustomBold: { - shortcuts: "Mod-b", + shortcuts: 'Mod-b', priority: 100, // Highest in the normal range, so this runs first command: (ctx) => { - const commands = ctx.get(commandsCtx); + const commands = ctx.get(commandsCtx) return () => { // Custom bold logic - return true; - }; + return true + } }, }, CustomAnotherBold: { - shortcuts: "Mod-b", + shortcuts: 'Mod-b', priority: 75, // Lower priority, will run only if CustomBold returns false command: (ctx) => { - const commands = ctx.get(commandsCtx); + const commands = ctx.get(commandsCtx) return () => { // Custom italic logic - return true; - }; + return true + } }, }, -}); +}) ``` diff --git a/docs/guide/macros.md b/docs/guide/macros.md index 7a2c05e..e88f1b2 100644 --- a/docs/guide/macros.md +++ b/docs/guide/macros.md @@ -7,16 +7,16 @@ Macros are helper functions that provide a convenient way to interact with the e There are two main ways to use macros: ```typescript -import { insert } from "@milkdown/kit/utils"; -import { listenerCtx } from "@milkdown/plugin-listener"; +import { insert } from '@milkdown/kit/utils' +import { listenerCtx } from '@milkdown/plugin-listener' // Method 1: Using editor.action() -editor.action(insert("# Hello Macro")); +editor.action(insert('# Hello Macro')) // Method 2: Using listener editor.config((ctx) => { - ctx.get(listenerCtx).mounted(insert("# Default Title")); -}); + ctx.get(listenerCtx).mounted(insert('# Default Title')) +}) ``` ## Available Macros @@ -31,13 +31,13 @@ Inserts content at the current cursor position. The macro accepts two parameters - `inline`: Optional boolean flag (default: false) that determines how the content is inserted ```typescript -import { insert } from "@milkdown/kit/utils"; +import { insert } from '@milkdown/kit/utils' // Insert as block content (default) -editor.action(insert("# Hello World")); +editor.action(insert('# Hello World')) // Insert as inline content -editor.action(insert("inline text", true)); +editor.action(insert('inline text', true)) ``` The behavior differs based on the `inline` parameter: @@ -59,10 +59,10 @@ Inserts markdown at a given position. The macro accepts two parameters: - `pos`: The position to insert the content at ```typescript -import { insertPos } from "@milkdown/kit/utils"; +import { insertPos } from '@milkdown/kit/utils' // Insert "Hello" at the beginning of the document -editor.action(insertPos("Hello", 0)); +editor.action(insertPos('Hello', 0)) ``` #### `replaceAll` @@ -73,13 +73,13 @@ Replaces all content in the editor. The macro accepts two parameters: - `flush`: Optional boolean flag (default: false) that determines how the replacement is performed ```typescript -import { replaceAll } from "@milkdown/kit/utils"; +import { replaceAll } from '@milkdown/kit/utils' // Replace content without flushing state -editor.action(replaceAll("# New Content")); +editor.action(replaceAll('# New Content')) // Replace content and flush editor state -editor.action(replaceAll("# New Content", true)); +editor.action(replaceAll('# New Content', true)) ``` The behavior differs based on the `flush` parameter: @@ -98,10 +98,10 @@ The behavior differs based on the `flush` parameter: Replaces the content of the given range with a markdown string. ```typescript -import { replaceRange } from "@milkdown/kit/utils"; +import { replaceRange } from '@milkdown/kit/utils' // Replace content from position 0 to 5 with "Hello" -editor.action(replaceRange("Hello", { from: 0, to: 5 })); +editor.action(replaceRange('Hello', { from: 0, to: 5 })) ``` ### Content Retrieval @@ -111,13 +111,13 @@ editor.action(replaceRange("Hello", { from: 0, to: 5 })); Gets the current content as markdown. If a range is provided, it will return the markdown for that range; otherwise, it will return the markdown for the entire document. ```typescript -import { getMarkdown } from "@milkdown/kit/utils"; +import { getMarkdown } from '@milkdown/kit/utils' // Get markdown for the entire document -const markdown = editor.action(getMarkdown()); +const markdown = editor.action(getMarkdown()) // Get markdown for a specific range -const selectionMarkdown = editor.action(getMarkdown({ from: 0, to: 5 })); +const selectionMarkdown = editor.action(getMarkdown({ from: 0, to: 5 })) ``` #### `getHTML` @@ -125,9 +125,9 @@ const selectionMarkdown = editor.action(getMarkdown({ from: 0, to: 5 })); Gets the current content as HTML. ```typescript -import { getHTML } from "@milkdown/kit/utils"; +import { getHTML } from '@milkdown/kit/utils' -const html = editor.action(getHTML()); +const html = editor.action(getHTML()) ``` ### Editor State @@ -137,9 +137,9 @@ const html = editor.action(getHTML()); Forces the editor to update its state. ```typescript -import { forceUpdate } from "@milkdown/kit/utils"; +import { forceUpdate } from '@milkdown/kit/utils' -editor.action(forceUpdate()); +editor.action(forceUpdate()) ``` #### `setAttr` @@ -150,23 +150,23 @@ Sets attributes for a node at a specific position. The macro accepts two paramet - `update`: A function that takes the previous attributes and returns the new attributes ```typescript -import { setAttr } from "@milkdown/kit/utils"; +import { setAttr } from '@milkdown/kit/utils' // Update node attributes at position 10 editor.action( setAttr(10, (prevAttrs) => ({ ...prevAttrs, - class: "custom-class", - })), -); + class: 'custom-class', + })) +) // Example: Update heading level editor.action( setAttr(10, (prevAttrs) => ({ ...prevAttrs, level: 2, - })), -); + })) +) ``` The macro: @@ -185,9 +185,9 @@ Note: The position must be valid and contain a node, otherwise the operation wil Gets the outline of the document. ```typescript -import { outline } from "@milkdown/kit/utils"; +import { outline } from '@milkdown/kit/utils' -const docOutline = editor.action(outline()); +const docOutline = editor.action(outline()) ``` ### Command Execution @@ -199,20 +199,20 @@ Calls a registered command with optional payload. The macro has two overloads: Examples: ```typescript -import { callCommand } from "@milkdown/kit/utils"; -import { wrapInHeadingCommand } from "@milkdown/plugin-heading"; +import { callCommand } from '@milkdown/kit/utils' +import { wrapInHeadingCommand } from '@milkdown/plugin-heading' // Using command key -editor.action(callCommand(wrapInHeadingCommand.key, 1)); +editor.action(callCommand(wrapInHeadingCommand.key, 1)) // With complex payload editor.action( - callCommand("CustomCommand", { - type: "heading", + callCommand('CustomCommand', { + type: 'heading', level: 1, - content: "New Heading", - }), -); + content: 'New Heading', + }) +) ``` The macro: @@ -230,9 +230,9 @@ Note: The command must be registered in the editor's command context before it c Converts a markdown string to a [slice](https://prosemirror.net/docs/ref/#model.Slice). This is useful when you need to manipulate the content before inserting it into the editor. ```typescript -import { markdownToSlice } from "@milkdown/kit/utils"; +import { markdownToSlice } from '@milkdown/kit/utils' -const slice = editor.action(markdownToSlice("# Hello Slice")); +const slice = editor.action(markdownToSlice('# Hello Slice')) ``` ## Examples @@ -240,39 +240,39 @@ const slice = editor.action(markdownToSlice("# Hello Slice")); ### Adding Content ```typescript -import { insert } from "@milkdown/kit/utils"; -import { listenerCtx } from "@milkdown/plugin-listener"; +import { insert } from '@milkdown/kit/utils' +import { listenerCtx } from '@milkdown/plugin-listener' editor.config((ctx) => { - ctx.get(listenerCtx).mounted(insert("# Welcome\nStart editing...")); -}); + ctx.get(listenerCtx).mounted(insert('# Welcome\nStart editing...')) +}) ``` ### Saving Content ```typescript -import { getMarkdown } from "@milkdown/kit/utils"; +import { getMarkdown } from '@milkdown/kit/utils' editor.config((ctx) => { ctx.get(listenerCtx).updated(() => { - const content = getMarkdown()(ctx); - localStorage.setItem("editor-content", content); - }); -}); + const content = getMarkdown()(ctx) + localStorage.setItem('editor-content', content) + }) +}) ``` ### Custom Command with Macro ```typescript -import { callCommand } from "@milkdown/kit/utils"; +import { callCommand } from '@milkdown/kit/utils' editor.action( - callCommand("customCommand", { - type: "heading", + callCommand('customCommand', { + type: 'heading', level: 1, - content: "New Heading", - }), -); + content: 'New Heading', + }) +) ``` For more details about each macro's parameters and return types, check the [API Reference](/docs/api/utils#macros). diff --git a/docs/guide/prosemirror-api.md b/docs/guide/prosemirror-api.md index 4ae104b..ae02d37 100644 --- a/docs/guide/prosemirror-api.md +++ b/docs/guide/prosemirror-api.md @@ -12,9 +12,9 @@ For example: ```ts // Originally in prosemirror-state -import { EditorState } from "@milkdown/kit/prose/state"; +import { EditorState } from '@milkdown/kit/prose/state' // Originally in prosemirror-view -import { EditorView } from "@milkdown/kit/prose/view"; +import { EditorView } from '@milkdown/kit/prose/view' ``` ## List of packages diff --git a/docs/guide/styling.md b/docs/guide/styling.md index f0b7b48..97bf064 100644 --- a/docs/guide/styling.md +++ b/docs/guide/styling.md @@ -25,10 +25,10 @@ To use the Crepe theme in your project: ```ts // Import base styles first -import "@milkdown/crepe/theme/common/style.css"; +import '@milkdown/crepe/theme/common/style.css' // Choose the theme you want to use -import "@milkdown/crepe/theme/crepe.css"; +import '@milkdown/crepe/theme/crepe.css' ``` ## Theme Variables @@ -73,10 +73,10 @@ Crepe theme uses CSS variables for consistent styling. Here are all the availabl ```css .milkdown { /* Font Families */ - --crepe-font-title: Georgia, Cambria, "Times New Roman", Times, serif; - --crepe-font-default: "Open Sans", Arial, Helvetica, sans-serif; + --crepe-font-title: Georgia, Cambria, 'Times New Roman', Times, serif; + --crepe-font-default: 'Open Sans', Arial, Helvetica, sans-serif; --crepe-font-code: - Fira Code, Menlo, Monaco, "Courier New", Courier, monospace; + Fira Code, Menlo, Monaco, 'Courier New', Courier, monospace; } ``` @@ -105,7 +105,7 @@ You can customize the Crepe theme by overriding its variables: --crepe-color-background: #your-background-color; /* Override typography */ - --crepe-font-default: "Your Font", sans-serif; + --crepe-font-default: 'Your Font', sans-serif; /* Override shadows */ --crepe-shadow-1: your-shadow-value; @@ -165,12 +165,12 @@ Milkdown provides default class names for each node and mark. Here are some comm You can add custom attributes to nodes and marks, which is particularly useful when working with CSS frameworks like Tailwind CSS. ```typescript -import { Editor, editorViewOptionsCtx } from "@milkdown/kit/core"; +import { Editor, editorViewOptionsCtx } from '@milkdown/kit/core' import { commonmark, headingAttr, paragraphAttr, -} from "@milkdown/kit/preset/commonmark"; +} from '@milkdown/kit/preset/commonmark' Editor.make() .config((ctx) => { @@ -178,25 +178,25 @@ Editor.make() ctx.update(editorViewOptionsCtx, (prev) => ({ ...prev, attributes: { - class: "milkdown-editor mx-auto outline-hidden", - spellcheck: "false", + class: 'milkdown-editor mx-auto outline-hidden', + spellcheck: 'false', }, - })); + })) // Add attributes to nodes and marks ctx.set(headingAttr.key, (node) => { - const level = node.attrs.level; + const level = node.attrs.level return { class: `heading-${level} font-bold`, - "data-level": level, - }; - }); + 'data-level': level, + } + }) ctx.set(paragraphAttr.key, () => ({ - class: "text-base leading-relaxed", - })); + class: 'text-base leading-relaxed', + })) }) - .use(commonmark); + .use(commonmark) ``` # Best Practices diff --git a/docs/guide/using-crepe.md b/docs/guide/using-crepe.md index 870c47b..9fc7ea2 100644 --- a/docs/guide/using-crepe.md +++ b/docs/guide/using-crepe.md @@ -32,23 +32,23 @@ pnpm add @milkdown/crepe ### Basic Usage ```typescript -import { Crepe } from "@milkdown/crepe"; -import "@milkdown/crepe/theme/common/style.css"; -import "@milkdown/crepe/theme/frame.css"; +import { Crepe } from '@milkdown/crepe' +import '@milkdown/crepe/theme/common/style.css' +import '@milkdown/crepe/theme/frame.css' // Choose your preferred theme // Create editor instance const crepe = new Crepe({ - root: document.getElementById("app"), - defaultValue: "# Hello, Crepe!\n\nStart writing your markdown...", -}); + root: document.getElementById('app'), + defaultValue: '# Hello, Crepe!\n\nStart writing your markdown...', +}) // Initialize the editor -await crepe.create(); +await crepe.create() // Clean up when done -crepe.destroy(); +crepe.destroy() ``` ::iframe{src="https://stackblitz.com/github/Milkdown/examples/tree/main/editor-crepe"} @@ -75,9 +75,9 @@ To use a theme: ```typescript // Import base styles first -import "@milkdown/crepe/theme/common/style.css"; +import '@milkdown/crepe/theme/common/style.css' // Then import your chosen theme -import "@milkdown/crepe/theme/frame.css"; +import '@milkdown/crepe/theme/frame.css' ``` ### Custom Themes @@ -104,10 +104,10 @@ const crepe = new Crepe({ featureConfigs: { // Configure feature behavior [Crepe.Feature.LinkTooltip]: { - inputPlaceholder: "Enter URL...", + inputPlaceholder: 'Enter URL...', }, }, -}); +}) ``` ### Available Features @@ -163,9 +163,9 @@ For detailed configuration options of each feature, please refer to the [API doc Access the underlying Milkdown editor instance. ```typescript -const editor = crepe.editor; -editor.use(customPlugin); -editor.action(insert("Hello")); +const editor = crepe.editor +editor.use(customPlugin) +editor.action(insert('Hello')) ``` #### `crepe.create()` @@ -173,7 +173,7 @@ editor.action(insert("Hello")); Initialize the editor. ```typescript -await crepe.create(); +await crepe.create() ``` #### `crepe.destroy()` @@ -181,7 +181,7 @@ await crepe.create(); Clean up the editor instance. ```typescript -crepe.destroy(); +crepe.destroy() ``` #### `crepe.setReadonly(value: boolean)` @@ -189,8 +189,8 @@ crepe.destroy(); Toggle readonly mode. ```typescript -crepe.setReadonly(true); // Make editor read-only -crepe.setReadonly(false); // Make editor editable +crepe.setReadonly(true) // Make editor read-only +crepe.setReadonly(false) // Make editor editable ``` #### `crepe.on` @@ -200,21 +200,21 @@ Add event listeners. ```typescript crepe.on((listener) => { listener.markdownUpdated((markdown) => { - console.log("Markdown updated:", markdown); - }); + console.log('Markdown updated:', markdown) + }) listener.updated((doc) => { - console.log("Document updated"); - }); + console.log('Document updated') + }) listener.focus(() => { - console.log("Editor focused"); - }); + console.log('Editor focused') + }) listener.blur(() => { - console.log("Editor blurred"); - }); -}); + console.log('Editor blurred') + }) +}) ``` #### `crepe.getMarkdown()` @@ -222,7 +222,7 @@ crepe.on((listener) => { Get current markdown content. ```typescript -const markdown = crepe.getMarkdown(); +const markdown = crepe.getMarkdown() ``` ## Next Steps diff --git a/docs/playground/template.md b/docs/playground/template.md index e36352e..1ed996b 100644 --- a/docs/playground/template.md +++ b/docs/playground/template.md @@ -8,32 +8,32 @@ > > Please try something on the left side. -![1.00](/polar.jpeg "Hello by a polar bear") +![1.00](/polar.jpeg 'Hello by a polar bear') You're seeing this editor called **🥞Crepe**, which is an editor built on top of Milkdown. If you want to install this editor, you can run `npm install @milkdown/crepe`. Then you can use it like this: ```js -import { Crepe } from "@milkdown/crepe"; -import "@milkdown/crepe/theme/common/style.css"; +import { Crepe } from '@milkdown/crepe' +import '@milkdown/crepe/theme/common/style.css' // We have some themes for you to choose, ex. -import "@milkdown/crepe/theme/frame.css"; +import '@milkdown/crepe/theme/frame.css' // Or you can create your own theme -import "./your-theme.css"; +import './your-theme.css' const crepe = new Crepe({ - root: "#app", - defaultValue: "# Hello, Milkdown!", -}); + root: '#app', + defaultValue: '# Hello, Milkdown!', +}) crepe.create().then(() => { - console.log("Milkdown is ready!"); -}); + console.log('Milkdown is ready!') +}) // Before unmount -crepe.destroy(); +crepe.destroy() ``` --- diff --git a/docs/plugin/composable-plugins.md b/docs/plugin/composable-plugins.md index 4adbfb3..486f097 100644 --- a/docs/plugin/composable-plugins.md +++ b/docs/plugin/composable-plugins.md @@ -11,27 +11,27 @@ The schema plugin is the most important plugin in Milkdown. It defines the struc Let's create a simple blockquote node plugin as an example: ```typescript -import { $node } from "@milkdown/kit/utils"; +import { $node } from '@milkdown/kit/utils' -const blockquote = $node("blockquote", () => ({ - content: "block+", - group: "block", +const blockquote = $node('blockquote', () => ({ + content: 'block+', + group: 'block', defining: true, - parseDOM: [{ tag: "blockquote" }], - toDOM: (node) => ["blockquote", ctx.get(blockquoteAttr.key)(node), 0], + parseDOM: [{ tag: 'blockquote' }], + toDOM: (node) => ['blockquote', ctx.get(blockquoteAttr.key)(node), 0], parseMarkdown: { - match: ({ type }) => type === "blockquote", + match: ({ type }) => type === 'blockquote', runner: (state, node, type) => { - state.openNode(type).next(node.children).closeNode(); + state.openNode(type).next(node.children).closeNode() }, }, toMarkdown: { - match: (node) => node.type.name === "blockquote", + match: (node) => node.type.name === 'blockquote', runner: (state, node) => { - state.openNode("blockquote").next(node.content).closeNode(); + state.openNode('blockquote').next(node.content).closeNode() }, }, -})); +})) ``` ## Input Rule @@ -40,12 +40,12 @@ Since we have a blockquote node, we can create an input rule plugin to make it e We expect that when we type `> ` at the beginning of a line, the blockquote node will be created. ```typescript -import { wrappingInputRule } from "@milkdown/kit/prose/inputrules"; -import { $inputRule } from "@milkdown/kit/utils"; +import { wrappingInputRule } from '@milkdown/kit/prose/inputrules' +import { $inputRule } from '@milkdown/kit/utils' export const wrapInBlockquoteInputRule = $inputRule(() => - wrappingInputRule(/^\s*>\s$/, blockquoteSchema.type()), -); + wrappingInputRule(/^\s*>\s$/, blockquoteSchema.type()) +) ``` ## Command @@ -54,13 +54,13 @@ We can also create a command plugin to create a blockquote node. The command is useful when we want to create a button to create a blockquote node. ```typescript -import { wrapIn } from "@milkdown/kit/prose/commands"; -import { $command } from "@milkdown/kit/utils"; +import { wrapIn } from '@milkdown/kit/prose/commands' +import { $command } from '@milkdown/kit/utils' export const wrapInBlockquoteCommand = $command( - "WrapInBlockquote", - () => () => wrapIn(blockquoteSchema.type()), -); + 'WrapInBlockquote', + () => () => wrapIn(blockquoteSchema.type()) +) ``` ## Shortcut @@ -70,16 +70,16 @@ Here we use `Ctrl + Shift + B` as the shortcut. When we press this shortcut, the And we can also use the command we created in the previous section. ```typescript -import { commandsCtx } from "@milkdown/kit/core"; -import { $useKeymap } from "@milkdown/kit/utils"; +import { commandsCtx } from '@milkdown/kit/core' +import { $useKeymap } from '@milkdown/kit/utils' -export const blockquoteKeymap = $useKeymap("blockquoteKeymap", { +export const blockquoteKeymap = $useKeymap('blockquoteKeymap', { WrapInBlockquote: { - shortcuts: "Mod-Shift-b", + shortcuts: 'Mod-Shift-b', command: (ctx) => { - const commands = ctx.get(commandsCtx); - return () => commands.call(wrapInBlockquoteCommand.key); + const commands = ctx.get(commandsCtx) + return () => commands.call(wrapInBlockquoteCommand.key) }, }, -}); +}) ``` diff --git a/docs/plugin/example-block-plugin.md b/docs/plugin/example-block-plugin.md index 0e506ee..a43e9c7 100644 --- a/docs/plugin/example-block-plugin.md +++ b/docs/plugin/example-block-plugin.md @@ -22,7 +22,7 @@ This guide covers: Unlike tooltip/slash, `@milkdown/plugin-block` ships its factory slices directly: ```ts -import { blockSpec, blockPlugin } from "@milkdown/plugin-block"; +import { blockSpec, blockPlugin } from '@milkdown/plugin-block' ``` You normally interact with **BlockProvider** which talks to an internal _BlockService_: the service listens to mouse / drag events, figures out which node is **active** and sends `show` / `hide` messages to the provider. @@ -41,19 +41,19 @@ Key APIs: Below we build a small **drag handle** that appears on hover and lets you drag-n-drop any block. ```ts -import { block, blockPlugin } from "@milkdown/plugin-block"; -import { BlockProvider } from "@milkdown/plugin-block/block-provider"; // path depending on bundler -import { Editor } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; +import { block, blockPlugin } from '@milkdown/plugin-block' +import { BlockProvider } from '@milkdown/plugin-block/block-provider' // path depending on bundler +import { Editor } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' // 1️⃣ Create DOM element for the handle -const handle = document.createElement("div"); -handle.className = "drag-handle"; -handle.innerHTML = "≡"; +const handle = document.createElement('div') +handle.className = 'drag-handle' +handle.innerHTML = '≡' handle.style.cssText = ` width:20px;height:20px;display:flex;align-items:center;justify-content:center; cursor:grab;border-radius:4px;background:#f2f3f5;color:#555;user-select:none; -`; +` // 2️⃣ Build provider – show only when mouse is over a block const provider = (ctx: Ctx) => { @@ -61,22 +61,22 @@ const provider = (ctx: Ctx) => { ctx, content: handle, getOffset: () => 8, - }); + }) return { update: provider.update, destroy: provider.destroy, - }; -}; + } +} // 3️⃣ Wire provider to Milkdown const blockConfig = (ctx: Ctx) => { ctx.set(blockSpec.key, { view: provider(ctx), - }); -}; + }) +} -Editor.make().config(blockConfig).use(commonmark).use(block).create(); +Editor.make().config(blockConfig).use(commonmark).use(block).create() ``` Drag & Drop: diff --git a/docs/plugin/example-iframe-plugin.md b/docs/plugin/example-iframe-plugin.md index 4336c1f..ce05921 100644 --- a/docs/plugin/example-iframe-plugin.md +++ b/docs/plugin/example-iframe-plugin.md @@ -35,10 +35,10 @@ Let's implement each component: First, we use the `remark-directive` plugin to support our custom syntax. This plugin allows us to define custom directives in markdown. ```typescript -import directive from "remark-directive"; -import { $remark } from "@milkdown/kit/utils"; +import directive from 'remark-directive' +import { $remark } from '@milkdown/kit/utils' -const remarkDirective = $remark("remarkDirective", () => directive); +const remarkDirective = $remark('remarkDirective', () => directive) ``` ## 2. Schema Definition @@ -48,31 +48,31 @@ const remarkDirective = $remark("remarkDirective", () => directive); Next, we define the schema for our iframe node. The schema specifies how the node behaves and appears in the editor. ```typescript -import { $node } from "@milkdown/kit/utils"; -import { Node } from "@milkdown/kit/prose/model"; +import { $node } from '@milkdown/kit/utils' +import { Node } from '@milkdown/kit/prose/model' -const iframeNode = $node("iframe", () => ({ - group: "block", // Block-level node +const iframeNode = $node('iframe', () => ({ + group: 'block', // Block-level node atom: true, // Cannot be split isolating: true, // Cannot be merged with adjacent nodes - marks: "", // No marks allowed + marks: '', // No marks allowed attrs: { src: { default: null }, // URL attribute }, parseDOM: [ { - tag: "iframe", + tag: 'iframe', getAttrs: (dom) => ({ - src: (dom as HTMLElement).getAttribute("src"), + src: (dom as HTMLElement).getAttribute('src'), }), }, ], toDOM: (node: Node) => [ - "iframe", + 'iframe', { ...node.attrs, contenteditable: false }, // Prevent editing iframe content 0, ], -})); +})) ``` ## 3. Parser @@ -115,23 +115,23 @@ toMarkdown: { Input rules handle user typing and convert the syntax into an iframe node. ```typescript -import { InputRule } from "@milkdown/kit/prose"; -import { $inputRule } from "@milkdown/kit/utils"; +import { InputRule } from '@milkdown/kit/prose' +import { $inputRule } from '@milkdown/kit/utils' const iframeInputRule = $inputRule( () => new InputRule( /::iframe\{src\="(?[^"]+)?"?\}/, (state, match, start, end) => { - const [okay, src = ""] = match; - const { tr } = state; + const [okay, src = ''] = match + const { tr } = state if (okay) { - tr.replaceWith(start - 1, end, iframeNode.type().create({ src })); + tr.replaceWith(start - 1, end, iframeNode.type().create({ src })) } - return tr; - }, - ), -); + return tr + } + ) +) ``` ## Usage @@ -141,13 +141,13 @@ const iframeInputRule = $inputRule( To use the iframe plugin, add it to your Milkdown editor configuration: ```typescript -import { Editor } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; +import { Editor } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' Editor.make() .use([remarkDirective, iframeNode, iframeInputRule]) .use(commonmark) - .create(); + .create() ``` ## Example diff --git a/docs/plugin/example-marker-plugin.md b/docs/plugin/example-marker-plugin.md index dfc291c..811aa2e 100644 --- a/docs/plugin/example-marker-plugin.md +++ b/docs/plugin/example-marker-plugin.md @@ -40,26 +40,26 @@ First, we create a remark plugin to handle our custom marker syntax: > Under the hood, you'll need to write a [micromark extension](https://github.com/micromark/micromark) to make it works correctly. ```typescript -import { $remark } from "@milkdown/kit/utils"; +import { $remark } from '@milkdown/kit/utils' const remarkMarkColor = () => { return (tree: any) => { - visit(tree, "text", (node: any, index: number, parent: any) => { - const match = node.value.match(/==(?:{#([^}]+)})?([^=]+)==/); + visit(tree, 'text', (node: any, index: number, parent: any) => { + const match = node.value.match(/==(?:{#([^}]+)})?([^=]+)==/) if (match) { - const [_, color, text] = match; + const [_, color, text] = match const mark = { - type: "mark", + type: 'mark', data: { color }, - children: [{ type: "text", value: text }], - }; - parent.children.splice(index, 1, mark); + children: [{ type: 'text', value: text }], + } + parent.children.splice(index, 1, mark) } - }); - }; -}; + }) + } +} -const milkdownMarkColorPlugin = $remark("markColor", () => remarkMarkColor); +const milkdownMarkColorPlugin = $remark('markColor', () => remarkMarkColor) ``` ## 2. Schema Definition @@ -69,49 +69,49 @@ const milkdownMarkColorPlugin = $remark("markColor", () => remarkMarkColor); Next, we define the schema for our marker: ```typescript -import { $markSchema } from "@milkdown/kit/utils"; -import { Mark } from "mdast"; +import { $markSchema } from '@milkdown/kit/utils' +import { Mark } from 'mdast' -export const DEFAULT_COLOR = "#ffff00"; +export const DEFAULT_COLOR = '#ffff00' -export const markSchema = $markSchema("mark", () => ({ +export const markSchema = $markSchema('mark', () => ({ attrs: { color: { default: DEFAULT_COLOR, - validate: "string", + validate: 'string', }, }, parseDOM: [ { - tag: "mark", + tag: 'mark', getAttrs: (node: HTMLElement) => ({ color: node.style.backgroundColor, }), }, ], - toDOM: (mark) => ["mark", { style: `background-color: ${mark.attrs.color}` }], + toDOM: (mark) => ['mark', { style: `background-color: ${mark.attrs.color}` }], parseMarkdown: { - match: (node) => node.type === "mark", + match: (node) => node.type === 'mark', runner: (state, node, markType) => { - const color = (node as Mark).data?.color; - state.openMark(markType, { color }); - state.next(node.children); - state.closeMark(markType); + const color = (node as Mark).data?.color + state.openMark(markType, { color }) + state.next(node.children) + state.closeMark(markType) }, }, toMarkdown: { - match: (node) => node.type.name === "mark", + match: (node) => node.type.name === 'mark', runner: (state, mark) => { - let color = mark.attrs.color; + let color = mark.attrs.color if (color?.toLowerCase() === DEFAULT_COLOR.toLowerCase()) { - color = undefined; + color = undefined } - state.withMark(mark, "mark", undefined, { + state.withMark(mark, 'mark', undefined, { data: { color }, - }); + }) }, }, -})); +})) ``` ## 3. Input Rules @@ -121,24 +121,24 @@ export const markSchema = $markSchema("mark", () => ({ We add input rules to handle user typing: ```typescript -import { $inputRule } from "@milkdown/kit/utils"; -import { InputRule } from "@milkdown/kit/prose"; +import { $inputRule } from '@milkdown/kit/utils' +import { InputRule } from '@milkdown/kit/prose' const markInputRule = $inputRule( () => new InputRule(/==(?:{#([^}]+)})?([^=]+)==/, (state, match, start, end) => { - const [okay, color, text] = match; - const { tr } = state; + const [okay, color, text] = match + const { tr } = state if (okay) { tr.addMark( start, end, - markSchema.type().create({ color: color || DEFAULT_COLOR }), - ); + markSchema.type().create({ color: color || DEFAULT_COLOR }) + ) } - return tr; - }), -); + return tr + }) +) ``` ## 4. Color Picker Tooltip @@ -148,7 +148,7 @@ const markInputRule = $inputRule( To enhance the user experience, we add a color picker tooltip: ```typescript -export const colorPickerTooltip = tooltipFactory("color-picker"); +export const colorPickerTooltip = tooltipFactory('color-picker') class TooltipPluginView { // ... implementation @@ -157,8 +157,8 @@ class TooltipPluginView { export const colorPickerTooltipConfig = (ctx: Ctx) => { ctx.set(colorPickerTooltip.key, { view: () => new TooltipPluginView(ctx), - }); -}; + }) +} ``` ## Usage @@ -168,8 +168,8 @@ export const colorPickerTooltipConfig = (ctx: Ctx) => { To use the marker plugin, add it to your Milkdown editor configuration: ```typescript -import { Editor } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; +import { Editor } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' Editor.make() .use(milkdownMarkColorPlugin) @@ -177,7 +177,7 @@ Editor.make() .use(markInputRule) .use(colorPickerTooltip) .use(commonmark) - .create(); + .create() ``` ## Example diff --git a/docs/plugin/example-slash-plugin.md b/docs/plugin/example-slash-plugin.md index 3517d4d..fa4a428 100644 --- a/docs/plugin/example-slash-plugin.md +++ b/docs/plugin/example-slash-plugin.md @@ -20,9 +20,9 @@ This document shows you how to: 2. **`slashFactory(id)`** – Generates a ctx slice & ProseMirror plugin pair that plugs the provider into the editor. ```ts -import { slashFactory } from "@milkdown/plugin-slash"; +import { slashFactory } from '@milkdown/plugin-slash' -export const [mySlashSpec, mySlashPlugin] = slashFactory("my"); +export const [mySlashSpec, mySlashPlugin] = slashFactory('my') ``` Just like the tooltip factory: @@ -37,50 +37,50 @@ Just like the tooltip factory: Below we create a small menu that suggests two commands whenever the user types `/`. ```ts -import { SlashProvider, slashFactory } from "@milkdown/plugin-slash"; -import { Editor } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; +import { SlashProvider, slashFactory } from '@milkdown/plugin-slash' +import { Editor } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' // DOM content of the menu – plain HTML for the demo -const menu = document.createElement("div"); -menu.className = "slash-menu"; +const menu = document.createElement('div') +menu.className = 'slash-menu' menu.style.cssText = ` position:absolute;padding:4px 0;background:white;border:1px solid #eee; box-shadow:0 2px 8px rgba(0,0,0,.15);border-radius:6px;font-size:14px; -`; +` menu.innerHTML = `
  • Heading 1
  • Bullet List
  • -
`; +` // Click handler – replace with real commands -menu.addEventListener("click", (e) => { - const target = e.target as HTMLElement; - const cmd = target.dataset.cmd; - alert(`Run command: ${cmd}`); -}); +menu.addEventListener('click', (e) => { + const target = e.target as HTMLElement + const cmd = target.dataset.cmd + alert(`Run command: ${cmd}`) +}) // Provider positions & shows above DOM element const provider = new SlashProvider({ content: menu, // show the menu when the last character before caret is '/' shouldShow(view) { - return provider.getContent(view)?.endsWith("/") ?? false; + return provider.getContent(view)?.endsWith('/') ?? false }, offset: 8, -}); +}) -const slash = slashFactory("demo"); +const slash = slashFactory('demo') const slashConfig = (ctx: Ctx) => { ctx.set(slash.key, { view: () => ({ update: provider.update, destroy: provider.destroy, }), - }); -}; + }) +} -Editor.make().config(slashConfig).use(commonmark).use(slash).create(); +Editor.make().config(slashConfig).use(commonmark).use(slash).create() ``` Key takeaways: diff --git a/docs/plugin/example-tooltip-plugin.md b/docs/plugin/example-tooltip-plugin.md index 7b03182..d15ee2a 100644 --- a/docs/plugin/example-tooltip-plugin.md +++ b/docs/plugin/example-tooltip-plugin.md @@ -19,10 +19,10 @@ At its core the tooltip plugin exported from `@milkdown/plugin-tooltip` contains The factory is extremely small (≈40 lines): ```ts -import { tooltipFactory } from "@milkdown/plugin-tooltip"; +import { tooltipFactory } from '@milkdown/plugin-tooltip' // Create a tooltip identified by the string "my". -export const [myTooltipSpec, myTooltipPlugin] = tooltipFactory("my"); +export const [myTooltipSpec, myTooltipPlugin] = tooltipFactory('my') ``` The first element (`myTooltipSpec`) is a **ctx slice** that stores a `PluginSpec`, while the second one (`myTooltipPlugin`) is the real ProseMirror plugin which consumes that spec. @@ -34,36 +34,36 @@ The first element (`myTooltipSpec`) is a **ctx slice** that stores a `PluginSpec Below is the complete code for a tooltip that shows the **length of the current selection**. ```ts -import { Editor } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { TooltipProvider, tooltipFactory } from "@milkdown/plugin-tooltip"; +import { Editor } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { TooltipProvider, tooltipFactory } from '@milkdown/plugin-tooltip' // 1) Prepare DOM that we will mount into the page. -const el = document.createElement("div"); -el.className = "selection-length"; +const el = document.createElement('div') +el.className = 'selection-length' el.style.cssText = ` pointer-events:none; background:#333;color:#fff;padding:2px 6px;border-radius:4px;font-size:12px; -`; +` // 2) Build a provider which updates the content. const provider = new TooltipProvider({ content: el, shouldShow: (view) => !!view.state.selection.content().size, -}); +}) // 3) Bridge provider & editor. -const tooltip = tooltipFactory("sel-length"); +const tooltip = tooltipFactory('sel-length') const tooltipConfig = (ctx: Ctx) => { ctx.set(selectionTooltipSpec.key, { view: () => ({ update: provider.update, destroy: provider.destroy, }), - }); -}; + }) +} -Editor.make().config(tooltipConfig).use(commonmark).use(tooltip).create(); +Editor.make().config(tooltipConfig).use(commonmark).use(tooltip).create() ``` Key points: diff --git a/docs/plugin/plugins-101.md b/docs/plugin/plugins-101.md index 47f72ee..23699ce 100644 --- a/docs/plugin/plugins-101.md +++ b/docs/plugin/plugins-101.md @@ -9,7 +9,7 @@ But it can help you understand the plugin system and what happens under the hood Generally speaking, a plugin will have following structure: ```typescript -import { MilkdownPlugin } from "@milkdown/kit/ctx"; +import { MilkdownPlugin } from '@milkdown/kit/ctx' const myPlugin: MilkdownPlugin = (ctx) => { // #1 prepare plugin @@ -17,9 +17,9 @@ const myPlugin: MilkdownPlugin = (ctx) => { // #2 run plugin return async () => { // #3 clean up plugin - }; - }; -}; + } + } +} ``` Each plugin is composed by three parts: @@ -35,19 +35,19 @@ Timer can be used to decide when to load the current plugin and how current plug You can use `ctx.wait` to wait a timer to finish. ```typescript -import { MilkdownPlugin, Complete } from "@milkdown/kit/core"; +import { MilkdownPlugin, Complete } from '@milkdown/kit/core' const myPlugin: MilkdownPlugin = (ctx) => { return async () => { - const start = Date.now(); + const start = Date.now() - await ctx.wait(Complete); + await ctx.wait(Complete) - const end = Date.now(); + const end = Date.now() - console.log("Milkdown load duration: ", end - start); - }; -}; + console.log('Milkdown load duration: ', end - start) + } +} ``` You can also create your own timer and influence other plugins load time. @@ -59,32 +59,32 @@ import { editorStateTimerCtx, defaultValueCtx, createTimer, -} from "@milkdown/kit/core"; +} from '@milkdown/kit/core' -const RemoteTimer = createTimer("RemoteTimer"); +const RemoteTimer = createTimer('RemoteTimer') const remotePlugin: MilkdownPlugin = (ctx) => { // register timer - ctx.record(RemoteTimer); + ctx.record(RemoteTimer) return async () => { // the editorState plugin will wait for this timer to finish before initialize editor state. - ctx.update(editorStateTimerCtx, (timers) => timers.concat(RemoteTimer)); + ctx.update(editorStateTimerCtx, (timers) => timers.concat(RemoteTimer)) - const defaultMarkdown = await fetchMarkdownAPI(); - ctx.set(defaultValueCtx, defaultMarkdown); + const defaultMarkdown = await fetchMarkdownAPI() + ctx.set(defaultValueCtx, defaultMarkdown) // mark timer as complete - ctx.done(RemoteTimer); + ctx.done(RemoteTimer) return async () => { - await SomeAPI(); + await SomeAPI() // remove timer when plugin is removed - ctx.clearTimer(RemoteTimer); - }; - }; -}; + ctx.clearTimer(RemoteTimer) + } + } +} ``` It has following steps: @@ -100,37 +100,37 @@ We have used `ctx` several times in the above example, now we can try to underst Ctx is a data container which is shared in the entire editor instance. It's composed by a lot of slices. Every `slice` has a unique key and a value. You can change the value of a slice by `ctx.set` and `ctx.update`. And you can get the value of a slice by `ctx.get` with the slice key or name. Last but not least, you can remove a slice by `post.remove`. ```typescript -import { MilkdownPlugin, createSlice } from "@milkdown/kit/ctx"; +import { MilkdownPlugin, createSlice } from '@milkdown/kit/ctx' -const counterCtx = createSlice(0, "counter"); +const counterCtx = createSlice(0, 'counter') const counterPlugin: MilkdownPlugin = (ctx) => { - ctx.inject(counterCtx); + ctx.inject(counterCtx) return () => { // count is 0 - const count0 = ctx.get(counterCtx); + const count0 = ctx.get(counterCtx) // set count to 1 - ctx.set(counterCtx, 1); + ctx.set(counterCtx, 1) // now count is 1 - const count1 = ctx.get(counterCtx); + const count1 = ctx.get(counterCtx) // set count to n + 2 - ctx.update(counterCtx, (prev) => prev + 2); + ctx.update(counterCtx, (prev) => prev + 2) // now count is 3 - const count2 = ctx.get(counterCtx); + const count2 = ctx.get(counterCtx) // we can also get value by the slice name - const count3 = ctx.get("counter"); + const count3 = ctx.get('counter') return () => { // remove the slice - ctx.remove(counterCtx); - }; - }; -}; + ctx.remove(counterCtx) + } + } +} ``` We can use `createSlice` to create a ctx, and use `pre.inject` to inject the ctx into the editor. @@ -145,22 +145,22 @@ import { SchemaReady, Timer, createSlice, -} from "@milkdown/kit/core"; +} from '@milkdown/kit/core' -const examplePluginTimersCtx = createSlice([], "example-timer"); +const examplePluginTimersCtx = createSlice([], 'example-timer') const examplePlugin: MilkdownPlugin = (ctx) => { - ctx.inject(examplePluginTimersCtx, [SchemaReady]); + ctx.inject(examplePluginTimersCtx, [SchemaReady]) return async () => { await Promise.all( - ctx.get(examplePluginTimersCtx).map((timer) => ctx.wait(timer)), - ); + ctx.get(examplePluginTimersCtx).map((timer) => ctx.wait(timer)) + ) // or we can use a simplified syntax sugar - await ctx.waitTimers(examplePluginTimersCtx); + await ctx.waitTimers(examplePluginTimersCtx) // do something - }; -}; + } +} ``` With this pattern, if other plugins want to delay the process of `examplePlugin`, all they need to do is just add a timer into `examplePluginTimersCtx` with `ctx.update`. diff --git a/docs/plugin/using-components.md b/docs/plugin/using-components.md index d718cca..10e63d9 100644 --- a/docs/plugin/using-components.md +++ b/docs/plugin/using-components.md @@ -5,10 +5,10 @@ Each component is a separate module. You can use them by importing them from `@m All components can be used just like plugins. ```ts -import { imageBlock } from "@milkdown/kit/component/image-block"; -import { Editor } from "@milkdown/kit/core"; +import { imageBlock } from '@milkdown/kit/component/image-block' +import { Editor } from '@milkdown/kit/core' -Editor.make().use(/* some other plugins */).use(imageBlock).create(); +Editor.make().use(/* some other plugins */).use(imageBlock).create() ``` Components are designed to be headless, which means they are not opinionated about the UI. diff --git a/docs/plugin/using-plugins.md b/docs/plugin/using-plugins.md index cff3cf7..76145dd 100644 --- a/docs/plugin/using-plugins.md +++ b/docs/plugin/using-plugins.md @@ -5,12 +5,12 @@ Such as syntax, components, etc. Now we can try more plugins: ```typescript -import { Editor } from "@milkdown/kit/core"; -import { slash } from "@milkdown/kit/plugin/slash"; -import { tooltip } from "@milkdown/kit/plugin/tooltip"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; +import { Editor } from '@milkdown/kit/core' +import { slash } from '@milkdown/kit/plugin/slash' +import { tooltip } from '@milkdown/kit/plugin/tooltip' +import { commonmark } from '@milkdown/kit/preset/commonmark' -Editor.make().use(commonmark).use(tooltip).use(slash).create(); +Editor.make().use(commonmark).use(tooltip).use(slash).create() ``` --- @@ -20,24 +20,24 @@ Editor.make().use(commonmark).use(tooltip).use(slash).create(); You can also toggle plugins programmatically: ```typescript -import { Editor } from "@milkdown/kit/core"; -import { someMilkdownPlugin } from "some-milkdown-plugin"; +import { Editor } from '@milkdown/kit/core' +import { someMilkdownPlugin } from 'some-milkdown-plugin' const editor = await Editor.config(configForPlugin) .use(someMilkdownPlugin) - .create(); + .create() // remove plugin -await editor.remove(someMilkdownPlugin); +await editor.remove(someMilkdownPlugin) // remove config -editor.removeConfig(configForPlugin); +editor.removeConfig(configForPlugin) // add another plugin -editor.use(anotherMilkdownPlugin); +editor.use(anotherMilkdownPlugin) // Recreate the editor to apply changes. -await editor.create(); +await editor.create() ``` --- diff --git a/docs/recipes/angular.md b/docs/recipes/angular.md index 8824e00..020b2b2 100644 --- a/docs/recipes/angular.md +++ b/docs/recipes/angular.md @@ -21,28 +21,28 @@ Create a component is pretty easy. ```typescript // editor.component.ts -import { Component, ElementRef, ViewChild } from "@angular/core"; -import { defaultValueCtx, Editor, rootCtx } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { nord } from "@milkdown/theme-nord"; +import { Component, ElementRef, ViewChild } from '@angular/core' +import { defaultValueCtx, Editor, rootCtx } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { nord } from '@milkdown/theme-nord' @Component({ - templateUrl: "./editor.component.html", + templateUrl: './editor.component.html', }) export class AppComponent { - @ViewChild("editorRef") editorRef: ElementRef; + @ViewChild('editorRef') editorRef: ElementRef - defaultValue = "# Milkdown x Angular"; + defaultValue = '# Milkdown x Angular' ngAfterViewInit() { Editor.make() .config((ctx) => { - ctx.set(rootCtx, this.editorRef.nativeElement); - ctx.set(defaultValueCtx, this.defaultValue); + ctx.set(rootCtx, this.editorRef.nativeElement) + ctx.set(defaultValueCtx, this.defaultValue) }) .config(nord) .use(commonmark) - .create(); + .create() } } ``` diff --git a/docs/recipes/nextjs.md b/docs/recipes/nextjs.md index 2d616f0..00460fc 100644 --- a/docs/recipes/nextjs.md +++ b/docs/recipes/nextjs.md @@ -18,32 +18,32 @@ npm install @milkdown/theme-nord Create a component is pretty easy. ```tsx -import { Editor, rootCtx } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { Milkdown, MilkdownProvider, useEditor } from "@milkdown/react"; -import { nord } from "@milkdown/theme-nord"; -import React from "react"; +import { Editor, rootCtx } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { Milkdown, MilkdownProvider, useEditor } from '@milkdown/react' +import { nord } from '@milkdown/theme-nord' +import React from 'react' const MilkdownEditor: React.FC = () => { const { editor } = useEditor((root) => Editor.make() .config(nord) .config((ctx) => { - ctx.set(rootCtx, root); + ctx.set(rootCtx, root) }) - .use(commonmark), - ); + .use(commonmark) + ) - return ; -}; + return +} export const MilkdownEditorWrapper: React.FC = () => { return ( - ); -}; + ) +} ``` ## Online Demo diff --git a/docs/recipes/nuxtjs.md b/docs/recipes/nuxtjs.md index 391da10..f55f89d 100644 --- a/docs/recipes/nuxtjs.md +++ b/docs/recipes/nuxtjs.md @@ -28,14 +28,14 @@ First, we need to create a `MilkdownEditor` component. ``` @@ -64,16 +64,16 @@ Then, we need to create a `MilkdownEditorWrapper` component. ``` diff --git a/docs/recipes/react.md b/docs/recipes/react.md index 45e1683..eeeedf0 100644 --- a/docs/recipes/react.md +++ b/docs/recipes/react.md @@ -17,24 +17,24 @@ npm install @milkdown/crepe @milkdown/react @milkdown/kit ### Implementation ```tsx -import { Crepe } from "@milkdown/crepe"; -import { Milkdown, MilkdownProvider, useEditor } from "@milkdown/react"; +import { Crepe } from '@milkdown/crepe' +import { Milkdown, MilkdownProvider, useEditor } from '@milkdown/react' const CrepeEditor: React.FC = () => { const { get } = useEditor((root) => { - return new Crepe({ root }); - }); + return new Crepe({ root }) + }) - return ; -}; + return +} export const MilkdownEditorWrapper: React.FC = () => { return ( - ); -}; + ) +} ``` ### Online Demo @@ -58,31 +58,31 @@ npm install @milkdown/react @milkdown/kit Here's a minimal example to get started: ```tsx -import { Editor, rootCtx } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { Milkdown, MilkdownProvider, useEditor } from "@milkdown/react"; -import { nord } from "@milkdown/theme-nord"; +import { Editor, rootCtx } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { Milkdown, MilkdownProvider, useEditor } from '@milkdown/react' +import { nord } from '@milkdown/theme-nord' const MilkdownEditor: React.FC = () => { const { get } = useEditor((root) => Editor.make() .config(nord) .config((ctx) => { - ctx.set(rootCtx, root); + ctx.set(rootCtx, root) }) - .use(commonmark), - ); + .use(commonmark) + ) - return ; -}; + return +} export const MilkdownEditorWrapper: React.FC = () => { return ( - ); -}; + ) +} ``` ::iframe{src="https://stackblitz.com/github/Milkdown/examples/tree/main/react-commonmark"} @@ -96,35 +96,35 @@ export const MilkdownEditorWrapper: React.FC = () => { The `useInstance()` hook can only be used within components that are children of `MilkdownProvider`. It returns a tuple containing a loading state and a getter function to access the editor instance. ```tsx -import { useInstance } from "@milkdown/react"; -import { getMarkdown } from "@milkdown/utils"; +import { useInstance } from '@milkdown/react' +import { getMarkdown } from '@milkdown/utils' // ❌ This won't work - ParentComponent is outside MilkdownProvider const ParentComponent: React.FC = () => { - const [isLoading, getInstance] = useInstance(); // This will be [true, () => undefined] - return ; -}; + const [isLoading, getInstance] = useInstance() // This will be [true, () => undefined] + return +} // ✅ This is the correct way - EditorControls is inside MilkdownProvider const EditorControls: React.FC = () => { - const [isLoading, getInstance] = useInstance(); + const [isLoading, getInstance] = useInstance() const handleSave = () => { - if (isLoading) return; + if (isLoading) return - const editor = getInstance(); - if (!editor) return; + const editor = getInstance() + if (!editor) return - const content = editor.action(getMarkdown()); + const content = editor.action(getMarkdown()) // Do something with the content - }; + } return ( - ); -}; + ) +} // ✅ Proper component structure const EditorWithControls: React.FC = () => { @@ -133,8 +133,8 @@ const EditorWithControls: React.FC = () => { - ); -}; + ) +} ``` ### Best Practices @@ -155,18 +155,18 @@ const EditorWithControls: React.FC = () => { ```tsx const FormWithEditor: React.FC = () => { - const [isLoading, getInstance] = useInstance(); + const [isLoading, getInstance] = useInstance() const handleSubmit = (e: React.FormEvent) => { - e.preventDefault(); - if (isLoading) return; + e.preventDefault() + if (isLoading) return - const editor = getInstance(); - if (!editor) return; + const editor = getInstance() + if (!editor) return - const content = editor.action(getMarkdown()); + const content = editor.action(getMarkdown()) // Submit form with content - }; + } return (
@@ -175,35 +175,35 @@ const FormWithEditor: React.FC = () => { Submit
- ); -}; + ) +} ``` **Auto-save** ```tsx -import { Editor, rootCtx } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; -import { Milkdown, useEditor } from "@milkdown/react"; +import { Editor, rootCtx } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' +import { Milkdown, useEditor } from '@milkdown/react' const AutoSaveEditor: React.FC = () => { const { get } = useEditor((root) => Editor.make() .config((ctx) => { - ctx.set(rootCtx, root); + ctx.set(rootCtx, root) // Add markdown listener for auto-save ctx.get(listenerCtx).markdownUpdated((ctx, markdown) => { // Save content to your backend or storage - saveToBackend(markdown); - }); + saveToBackend(markdown) + }) }) .use(commonmark) - .use(listener), - ); + .use(listener) + ) - return ; -}; + return +} ``` ## More Examples diff --git a/docs/recipes/solidjs.md b/docs/recipes/solidjs.md index a806767..7b59a7b 100644 --- a/docs/recipes/solidjs.md +++ b/docs/recipes/solidjs.md @@ -15,30 +15,30 @@ npm install @milkdown/theme-nord Create a component is pretty easy. ```tsx -import { defaultValueCtx, Editor, rootCtx } from "@milkdown/kit/core"; -import { commonmark } from "@milkdown/kit/preset/commonmark"; -import { nord } from "@milkdown/theme-nord"; -import { onCleanup, onMount } from "solid-js"; +import { defaultValueCtx, Editor, rootCtx } from '@milkdown/kit/core' +import { commonmark } from '@milkdown/kit/preset/commonmark' +import { nord } from '@milkdown/theme-nord' +import { onCleanup, onMount } from 'solid-js' const Milkdown = () => { - let ref; - let editor; + let ref + let editor onMount(async () => { editor = await Editor.make() .config((ctx) => { - ctx.set(rootCtx, ref); + ctx.set(rootCtx, ref) }) .config(nord) .use(commonmark) - .create(); - }); + .create() + }) onCleanup(() => { - editor.destroy(); - }); + editor.destroy() + }) - return
; -}; + return
+} ``` ## Online Demo diff --git a/docs/recipes/svelte.md b/docs/recipes/svelte.md index 079bb7d..ce1aec8 100644 --- a/docs/recipes/svelte.md +++ b/docs/recipes/svelte.md @@ -16,24 +16,24 @@ Creating a component is pretty easy. ```html diff --git a/docs/recipes/vue.md b/docs/recipes/vue.md index de05ca0..8dd1767 100644 --- a/docs/recipes/vue.md +++ b/docs/recipes/vue.md @@ -25,21 +25,21 @@ npm install @milkdown/crepe @milkdown/vue @milkdown/kit @@ -50,15 +50,15 @@ export default defineComponent({ ``` @@ -89,14 +89,14 @@ Here's a minimal example to get started: @@ -121,15 +121,15 @@ export default defineComponent({ ``` @@ -150,30 +150,30 @@ The `useInstance()` hook can only be used within components that are children of @@ -185,15 +185,15 @@ export default defineComponent({ ``` @@ -222,30 +222,30 @@ export default defineComponent({ ``` @@ -257,14 +257,14 @@ export default defineComponent({ ``` diff --git a/docs/recipes/vue2.md b/docs/recipes/vue2.md index 71575f0..69f4e4b 100644 --- a/docs/recipes/vue2.md +++ b/docs/recipes/vue2.md @@ -20,25 +20,25 @@ Create a component is pretty easy. ``` diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index fa075a4..0000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { FlatCompat } from "@eslint/eslintrc"; -import js from "@eslint/js"; -import nextVitals from "eslint-config-next/core-web-vitals"; -import perfectionist from "eslint-plugin-perfectionist"; -import { defineConfig, globalIgnores } from "eslint/config"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, -}); - -const config = defineConfig([ - ...nextVitals, - globalIgnores([ - // Default ignores of eslint-config-next: - ".next/**", - "out/**", - "build/**", - "next-env.d.ts", - "milkdown/**", - ]), - ...compat.config({ - extends: ["prettier"], - }), - { - plugins: { - perfectionist, - }, - rules: { - "perfectionist/sort-imports": "error", - "@typescript-eslint/no-unused-vars": "off", - }, - }, -]); - -export default config; diff --git a/next-env.d.ts b/next-env.d.ts index 1970904..1a1bf60 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import './.next/types/routes.d.ts' // NOTE: This file should not be edited // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/next.config.js b/next.config.js index a0f6ec4..fb5b799 100644 --- a/next.config.js +++ b/next.config.js @@ -1,14 +1,14 @@ -const withPWA = require("next-pwa")({ - dest: "public", - disable: process.env.NODE_ENV === "development", +const withPWA = require('next-pwa')({ + dest: 'public', + disable: process.env.NODE_ENV === 'development', // For PWA Updater skipWaiting: false, register: false, -}); +}) /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: false, -}; +} -module.exports = withPWA(nextConfig); +module.exports = withPWA(nextConfig) diff --git a/package.json b/package.json index 286ba93..9980799 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "dev": "next dev --webpack", "build": "pnpm build:doc && pnpm build:next", "start": "next start", - "lint": "eslint . && tsc --noEmit", - "format": "prettier --write .", - "prettier": "prettier --check .", + "lint": "oxlint -c .oxlintrc.json . && tsc --noEmit", + "format": "oxfmt --write .", + "format:check": "oxfmt --check .", "sync": "git submodule update --remote", "prepare": "husky" }, @@ -57,8 +57,6 @@ "next": "16.2.1", "next-pwa": "^5.6.0", "postcss": "^8.4.21", - "prettier": "^3.5.1", - "prettier-plugin-tailwindcss": "^0.7.0", "react": "19.2.4", "react-dom": "19.2.4", "react-json-tree": "^0.20.0", @@ -71,41 +69,10 @@ "workbox-window": "^7.0.0" }, "devDependencies": { - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "^9.27.0", - "eslint": "9.39.4", - "eslint-config-next": "16.2.1", - "eslint-config-prettier": "^10.0.1", - "eslint-plugin-perfectionist": "^5.0.0", + "oxfmt": "^0.41.0", + "oxlint": "^1.56.0", "tsx": "^4.18.0" }, - "pnpm": { - "overrides": { - "array-includes": "npm:@nolyfill/array-includes@^1", - "array.prototype.flat": "npm:@nolyfill/array.prototype.flat@^1", - "array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@^1", - "array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@^1", - "deep-equal": "npm:@nolyfill/deep-equal@^1", - "has": "npm:@nolyfill/has@^1", - "object.assign": "npm:@nolyfill/object.assign@^1", - "object.entries": "npm:@nolyfill/object.entries@^1", - "object.fromentries": "npm:@nolyfill/object.fromentries@^1", - "object.hasown": "npm:@nolyfill/object.hasown@^1", - "object.values": "npm:@nolyfill/object.values@^1", - "string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@^1", - "is-core-module": "npm:@nolyfill/is-core-module@^1", - "array.prototype.findlast": "npm:@nolyfill/array.prototype.findlast@^1", - "array.prototype.findlastindex": "npm:@nolyfill/array.prototype.findlastindex@^1", - "es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@^1", - "hasown": "npm:@nolyfill/hasown@^1", - "object.groupby": "npm:@nolyfill/object.groupby@^1", - "safe-buffer": "npm:@nolyfill/safe-buffer@^1", - "safe-regex-test": "npm:@nolyfill/safe-regex-test@^1", - "string.prototype.includes": "npm:@nolyfill/string.prototype.includes@^1", - "string.prototype.repeat": "npm:@nolyfill/string.prototype.repeat@^1", - "string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@^1" - } - }, "engines": { "node": ">=22.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf8bfa6..411b29a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,31 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - array-includes: npm:@nolyfill/array-includes@^1 - array.prototype.flat: npm:@nolyfill/array.prototype.flat@^1 - array.prototype.flatmap: npm:@nolyfill/array.prototype.flatmap@^1 - array.prototype.tosorted: npm:@nolyfill/array.prototype.tosorted@^1 - deep-equal: npm:@nolyfill/deep-equal@^1 - has: npm:@nolyfill/has@^1 - object.assign: npm:@nolyfill/object.assign@^1 - object.entries: npm:@nolyfill/object.entries@^1 - object.fromentries: npm:@nolyfill/object.fromentries@^1 - object.hasown: npm:@nolyfill/object.hasown@^1 - object.values: npm:@nolyfill/object.values@^1 - string.prototype.matchall: npm:@nolyfill/string.prototype.matchall@^1 - is-core-module: npm:@nolyfill/is-core-module@^1 - array.prototype.findlast: npm:@nolyfill/array.prototype.findlast@^1 - array.prototype.findlastindex: npm:@nolyfill/array.prototype.findlastindex@^1 - es-iterator-helpers: npm:@nolyfill/es-iterator-helpers@^1 - hasown: npm:@nolyfill/hasown@^1 - object.groupby: npm:@nolyfill/object.groupby@^1 - safe-buffer: npm:@nolyfill/safe-buffer@^1 - safe-regex-test: npm:@nolyfill/safe-regex-test@^1 - string.prototype.includes: npm:@nolyfill/string.prototype.includes@^1 - string.prototype.repeat: npm:@nolyfill/string.prototype.repeat@^1 - string.prototype.trimend: npm:@nolyfill/string.prototype.trimend@^1 - importers: .: @@ -159,12 +134,6 @@ importers: postcss: specifier: ^8.4.21 version: 8.5.6 - prettier: - specifier: ^3.5.1 - version: 3.8.1 - prettier-plugin-tailwindcss: - specifier: ^0.7.0 - version: 0.7.2(prettier@3.8.1) react: specifier: 19.2.4 version: 19.2.4 @@ -196,24 +165,12 @@ importers: specifier: ^7.0.0 version: 7.4.0 devDependencies: - '@eslint/eslintrc': - specifier: ^3.3.1 - version: 3.3.5 - '@eslint/js': - specifier: ^9.27.0 - version: 9.39.4 - eslint: - specifier: 9.39.4 - version: 9.39.4(jiti@2.6.1) - eslint-config-next: - specifier: 16.2.1 - version: 16.2.1(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - eslint-config-prettier: - specifier: ^10.0.1 - version: 10.1.8(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-perfectionist: - specifier: ^5.0.0 - version: 5.4.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) + oxfmt: + specifier: ^0.41.0 + version: 0.41.0 + oxlint: + specifier: ^1.56.0 + version: 1.56.0 tsx: specifier: ^4.18.0 version: 4.21.0 @@ -824,15 +781,9 @@ packages: '@docsearch/js@4.5.3': resolution: {integrity: sha512-rcBiUMCXbZLqrLIT6F6FDcrG/tyvM2WM0zum6NPbIiQNDQxbSgmNc+/bToS0rxBsXaxiU64esiWoS02WqrWLsg==} - '@emnapi/core@1.8.1': - resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==} - '@emnapi/runtime@1.8.1': resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==} - '@emnapi/wasi-threads@1.1.0': - resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} - '@esbuild/aix-ppc64@0.27.2': resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} engines: {node: '>=18'} @@ -989,44 +940,6 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/config-array@0.21.2': - resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/config-helpers@0.4.2': - resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/core@0.17.0': - resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.3.5': - resolution: {integrity: sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.39.4': - resolution: {integrity: sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/object-schema@2.1.7': - resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/plugin-kit@0.4.1': - resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@floating-ui/core@1.7.4': resolution: {integrity: sha512-C3HlIdsBxszvm5McXlB8PeOEWfBhcGBTZGkGlWc2U0KFY5IwG5OQEuQ8rq52DZmcHDlPLd+YFBK+cZcytwIFWg==} @@ -1048,22 +961,6 @@ packages: '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} - '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} - engines: {node: '>=18.18.0'} - - '@humanfs/node@0.16.7': - resolution: {integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==} - engines: {node: '>=18.18.0'} - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/retry@0.4.3': - resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} - engines: {node: '>=18.18'} - '@img/colour@1.0.0': resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==} engines: {node: '>=18'} @@ -1363,15 +1260,9 @@ packages: '@milkdown/utils@7.19.2': resolution: {integrity: sha512-lYX0nwA748hnFzxqOj7k0h0PlzPfj1OXRbph70lWBaMDPqk4c1ILKZQFHMRowgonGP2CkuE+t2PcYBsJyBXS4g==} - '@napi-rs/wasm-runtime@0.2.12': - resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@next/env@16.2.1': resolution: {integrity: sha512-n8P/HCkIWW+gVal2Z8XqXJ6aB3J0tuM29OcHpCsobWlChH/SITBs1DFBk/HajgrwDkqqBXPbuUuzgDvUekREPg==} - '@next/eslint-plugin-next@16.2.1': - resolution: {integrity: sha512-r0epZGo24eT4g08jJlg2OEryBphXqO8aL18oajoTKLzHJ6jVr6P6FI58DLMug04MwD3j8Fj0YK0slyzneKVyzA==} - '@next/swc-darwin-arm64@16.2.1': resolution: {integrity: sha512-BwZ8w8YTaSEr2HIuXLMLxIdElNMPvY9fLqb20LX9A9OMGtJilhHLbCL3ggyd0TwjmMcTxi0XXt+ur1vWUoxj2Q==} engines: {node: '>= 10'} @@ -1436,94 +1327,252 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nolyfill/array-includes@1.0.44': - resolution: {integrity: sha512-IVEqpEgFbLaU0hUoMwJYXNSdi6lq+FxHdxd8xTKDLxh8k6u5YNGz4Bo6bT46l7p0x8PbJmHViBtngqhvE528fA==} - engines: {node: '>=12.4.0'} + '@ocavue/utils@1.4.0': + resolution: {integrity: sha512-hB6uTz58shfG/ZyrBkMjub2YyJ1ue0vE14zRLZWJl/zEcgMBFTX6nBBV6ncyRHK4qOIBwFNpXzZrjTFj1ofxRA==} + + '@oxfmt/binding-android-arm-eabi@0.41.0': + resolution: {integrity: sha512-REfrqeMKGkfMP+m/ScX4f5jJBSmVNYcpoDF8vP8f8eYPDuPGZmzp56NIUsYmx3h7f6NzC6cE3gqh8GDWrJHCKw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.41.0': + resolution: {integrity: sha512-s0b1dxNgb2KomspFV2LfogC2XtSJB42POXF4bMCLJyvQmAGos4ZtjGPfQreToQEaY0FQFjz3030ggI36rF1q5g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.41.0': + resolution: {integrity: sha512-EGXGualADbv/ZmamE7/2DbsrYmjoPlAmHEpTL4vapLF4EfVD6fr8/uQDFnPJkUBjiSWFJZtFNsGeN1B6V3owmA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.41.0': + resolution: {integrity: sha512-WxySJEvdQQYMmyvISH3qDpTvoS0ebnIP63IMxLLWowJyPp/AAH0hdWtlo+iGNK5y3eVfa5jZguwNaQkDKWpGSw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.41.0': + resolution: {integrity: sha512-Y2kzMkv3U3oyuYaR4wTfGjOTYTXiFC/hXmG0yVASKkbh02BJkvD98Ij8bIevr45hNZ0DmZEgqiXF+9buD4yMYQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.41.0': + resolution: {integrity: sha512-ptazDjdUyhket01IjPTT6ULS1KFuBfTUU97osTP96X5y/0oso+AgAaJzuH81oP0+XXyrWIHbRzozSAuQm4p48g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.41.0': + resolution: {integrity: sha512-UkoL2OKxFD+56bPEBcdGn+4juTW4HRv/T6w1dIDLnvKKWr6DbarB/mtHXlADKlFiJubJz8pRkttOR7qjYR6lTA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.41.0': + resolution: {integrity: sha512-gofu0PuumSOHYczD8p62CPY4UF6ee+rSLZJdUXkpwxg6pILiwSDBIouPskjF/5nF3A7QZTz2O9KFNkNxxFN9tA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.41.0': + resolution: {integrity: sha512-VfVZxL0+6RU86T8F8vKiDBa+iHsr8PAjQmKGBzSCAX70b6x+UOMFl+2dNihmKmUwqkCazCPfYjt6SuAPOeQJ3g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.41.0': + resolution: {integrity: sha512-bwzokz2eGvdfJbc0i+zXMJ4BBjQPqg13jyWpEEZDOrBCQ91r8KeY2Mi2kUeuMTZNFXju+jcAbAbpyJxRGla0eg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.41.0': + resolution: {integrity: sha512-POLM//PCH9uqDeNDwWL3b3DkMmI3oI2cU6hwc2lnztD1o7dzrQs3R9nq555BZ6wI7t2lyhT9CS+CRaz5X0XqLA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.41.0': + resolution: {integrity: sha512-NNK7PzhFqLUwx/G12Xtm6scGv7UITvyGdAR5Y+TlqsG+essnuRWR4jRNODWRjzLZod0T3SayRbnkSIWMBov33w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.41.0': + resolution: {integrity: sha512-qVf/zDC5cN9eKe4qI/O/m445er1IRl6swsSl7jHkqmOSVfknwCe5JXitYjZca+V/cNJSU/xPlC5EFMabMMFDpw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.41.0': + resolution: {integrity: sha512-ojxYWu7vUb6ysYqVCPHuAPVZHAI40gfZ0PDtZAMwVmh2f0V8ExpPIKoAKr7/8sNbAXJBBpZhs2coypIo2jJX4w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.41.0': + resolution: {integrity: sha512-O2exZLBxoCMIv2vlvcbkdedazJPTdG0VSup+0QUCfYQtx751zCZNboX2ZUOiQ/gDTdhtXvSiot0h6GEGkOyalA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] - '@nolyfill/array.prototype.findlast@1.0.44': - resolution: {integrity: sha512-vtrf2HM9BoxlYt2s3vTngfhUKef9c2lIw9ALvOCKS1pwXSIxWfSlf8UvQzG5vRImgflqbaXw+Pj6Y77SomHMaA==} - engines: {node: '>=12.4.0'} + '@oxfmt/binding-openharmony-arm64@0.41.0': + resolution: {integrity: sha512-N+31/VoL+z+NNBt8viy3I4NaIdPbiYeOnB884LKqvXldaE2dRztdPv3q5ipfZYv0RwFp7JfqS4I27K/DSHCakg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] - '@nolyfill/array.prototype.findlastindex@1.0.44': - resolution: {integrity: sha512-BLeHS3SulsR3iFxxETL9q21lArV2KS7lh2wcUnhue1ppx19xah1W7MdFxepyeGbM3Umk9S90snfboXAds5HkTg==} - engines: {node: '>=12.4.0'} + '@oxfmt/binding-win32-arm64-msvc@0.41.0': + resolution: {integrity: sha512-Z7NAtu/RN8kjCQ1y5oDD0nTAeRswh3GJ93qwcW51srmidP7XPBmZbLlwERu1W5veCevQJtPS9xmkpcDTYsGIwQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] - '@nolyfill/array.prototype.flat@1.0.44': - resolution: {integrity: sha512-HnOqOT4te0l+XU9UKhy3ry+pc+ZRNsUJFR7omMEtjXf4+dq6oXmIBk7vR35+hSTk4ldjwm/27jwV3ZIGp3l4IQ==} - engines: {node: '>=12.4.0'} + '@oxfmt/binding-win32-ia32-msvc@0.41.0': + resolution: {integrity: sha512-uNxxP3l4bJ6VyzIeRqCmBU2Q0SkCFgIhvx9/9dJ9V8t/v+jP1IBsuaLwCXGR8JPHtkj4tFp+RHtUmU2ZYAUpMA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] - '@nolyfill/array.prototype.flatmap@1.0.44': - resolution: {integrity: sha512-P6OsaEUrpBJ9NdNekFDQVM9LOFHPDKSJzwOWRBaC6LqREX+4lkZT2Q+to78R6aG6atuOQsxBVqPjMGCKjWdvyQ==} - engines: {node: '>=12.4.0'} + '@oxfmt/binding-win32-x64-msvc@0.41.0': + resolution: {integrity: sha512-49ZSpbZ1noozyPapE8SUOSm3IN0Ze4b5nkO+4+7fq6oEYQQJFhE0saj5k/Gg4oewVPdjn0L3ZFeWk2Vehjcw7A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] - '@nolyfill/array.prototype.tosorted@1.0.44': - resolution: {integrity: sha512-orF3SWnIhoinCPrMW7XwpoDBccRfF6tXKzcMKlG3AQQmVzRanOYBj7/s1yy6KAQPWker4H1Ih281/GT7y/QXSA==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-android-arm-eabi@1.56.0': + resolution: {integrity: sha512-IyfYPthZyiSKwAv/dLjeO18SaK8MxLI9Yss2JrRDyweQAkuL3LhEy7pwIwI7uA3KQc1Vdn20kdmj3q0oUIQL6A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] - '@nolyfill/es-iterator-helpers@1.0.21': - resolution: {integrity: sha512-i326KeE0nhW4STobcUhkxpXzZUddedCmfh7b/IyXR9kW0CFHiNNT80C3JSEy33mUlhZtk/ezX47nymcFxyBigg==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-android-arm64@1.56.0': + resolution: {integrity: sha512-Ga5zYrzH6vc/VFxhn6MmyUnYEfy9vRpwTIks99mY3j6Nz30yYpIkWryI0QKPCgvGUtDSXVLEaMum5nA+WrNOSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] - '@nolyfill/hasown@1.0.44': - resolution: {integrity: sha512-GA/21lkTr2PAQuT6jGnhLuBD5IFd/AEhBXJ/tf33+/bVxPxg+5ejKx9jGQGnyV/P0eSmdup5E+s8b2HL6lOrwQ==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-darwin-arm64@1.56.0': + resolution: {integrity: sha512-ogmbdJysnw/D4bDcpf1sPLpFThZ48lYp4aKYm10Z/6Nh1SON6NtnNhTNOlhEY296tDFItsZUz+2tgcSYqh8Eyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] - '@nolyfill/is-core-module@1.0.39': - resolution: {integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-darwin-x64@1.56.0': + resolution: {integrity: sha512-x8QE1h+RAtQ2g+3KPsP6Fk/tdz6zJQUv5c7fTrJxXV3GHOo+Ry5p/PsogU4U+iUZg0rj6hS+E4xi+mnwwlDCWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] - '@nolyfill/object.assign@1.0.44': - resolution: {integrity: sha512-cZoXq09YZXDgkxRMAP/TTb3kAsWm7p5OyBugWDe4fOfxf0XRI55mgDSkuyq41sV1qW1zVC5aSsKEh1hQo1KOvA==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-freebsd-x64@1.56.0': + resolution: {integrity: sha512-6G+WMZvwJpMvY7my+/SHEjb7BTk/PFbePqLpmVmUJRIsJMy/UlyYqjpuh0RCgYYkPLcnXm1rUM04kbTk8yS1Yg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] - '@nolyfill/object.entries@1.0.44': - resolution: {integrity: sha512-RCxO6EH9YbvxQWGYLKOd7MjNi7vKzPkXv1VDWNsy1C8BksQxXNPQrddlu3INi1O2fexk82WXpCCeaCtpU/y21w==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-arm-gnueabihf@1.56.0': + resolution: {integrity: sha512-YYHBsk/sl7fYwQOok+6W5lBPeUEvisznV/HZD2IfZmF3Bns6cPC3Z0vCtSEOaAWTjYWN3jVsdu55jMxKlsdlhg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] - '@nolyfill/object.fromentries@1.0.44': - resolution: {integrity: sha512-/LrsCtpLmByZ6GwP/NeXULSgMyNsVr5d6FlgQy1HZatAiBc8c+WZ1VmFkK19ZLXCNNXBedXDultrp0x4Nz+QQw==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-arm-musleabihf@1.56.0': + resolution: {integrity: sha512-+AZK8rOUr78y8WT6XkDb04IbMRqauNV+vgT6f8ZLOH8wnpQ9i7Nol0XLxAu+Cq7Sb+J9wC0j6Km5hG8rj47/yQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] - '@nolyfill/object.groupby@1.0.44': - resolution: {integrity: sha512-jCt/8pN+10mlbeg0ZESpVVaqn5qqpv6kpjM+GDfEP7cXGDSPlIjtvfYWRZK4k4Gftkhhgqkzvcrr8z1wuNO1TQ==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-arm64-gnu@1.56.0': + resolution: {integrity: sha512-urse2SnugwJRojUkGSSeH2LPMaje5Q50yQtvtL9HFckiyeqXzoFwOAZqD5TR29R2lq7UHidfFDM9EGcchcbb8A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] - '@nolyfill/object.values@1.0.44': - resolution: {integrity: sha512-bwIpVzFMudUC0ofnvdSDB/OyGUizcU+r32ZZ0QTMbN03gUttMtdCFDekuSYT0XGFgufTQyZ4ONBnAeb3DFCPGQ==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-arm64-musl@1.56.0': + resolution: {integrity: sha512-rkTZkBfJ4TYLjansjSzL6mgZOdN5IvUnSq3oNJSLwBcNvy3dlgQtpHPrRxrCEbbcp7oQ6If0tkNaqfOsphYZ9g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] - '@nolyfill/safe-buffer@1.0.44': - resolution: {integrity: sha512-SqlKXtlhNTDMeZKey9jnnuPhi8YTl1lJuEcY9zbm5i4Pqe79UJJ8IJ9oiD6DhgI8KjYc+HtLzpQJNRdNYqb/hw==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-ppc64-gnu@1.56.0': + resolution: {integrity: sha512-uqL1kMH3u69/e1CH2EJhP3CP28jw2ExLsku4o8RVAZ7fySo9zOyI2fy9pVlTAp4voBLVgzndXi3SgtdyCTa2aA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] - '@nolyfill/safe-regex-test@1.0.44': - resolution: {integrity: sha512-Q6veatd1NebtD8Sre6zjvO35QzG21IskMVOOEbePFcNO9noanNJgsqHeOCr0c5yZz6Z0DAizLg2gIZWokJSkXw==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-riscv64-gnu@1.56.0': + resolution: {integrity: sha512-j0CcMBOgV6KsRaBdsebIeiy7hCjEvq2KdEsiULf2LZqAq0v1M1lWjelhCV57LxsqaIGChXFuFJ0RiFrSRHPhSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] - '@nolyfill/shared@1.0.21': - resolution: {integrity: sha512-qDc/NoaFU23E0hhiDPeUrvWzTXIPE+RbvRQtRWSeHHNmCIgYI9HS1jKzNYNJxv4jvZ/1VmM3L6rNVxbj+LBMNA==} + '@oxlint/binding-linux-riscv64-musl@1.56.0': + resolution: {integrity: sha512-7VDOiL8cDG3DQ/CY3yKjbV1c4YPvc4vH8qW09Vv+5ukq3l/Kcyr6XGCd5NvxUmxqDb2vjMpM+eW/4JrEEsUetA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] - '@nolyfill/shared@1.0.44': - resolution: {integrity: sha512-NI1zxDh4LYL7PYlKKCwojjuc5CEZslywrOTKBNyodjmWjRiZ4AlCMs3Gp+zDoPQPNkYCSQp/luNojHmJWWfCbw==} + '@oxlint/binding-linux-s390x-gnu@1.56.0': + resolution: {integrity: sha512-JGRpX0M+ikD3WpwJ7vKcHKV6Kg0dT52BW2Eu2BupXotYeqGXBrbY+QPkAyKO6MNgKozyTNaRh3r7g+VWgyAQYQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] - '@nolyfill/string.prototype.includes@1.0.44': - resolution: {integrity: sha512-d1t7rnoAYyoap0X3a/gCnusCvxzK6v7uMFzW8k0mI2WtAK8HiKuzaQUwAriyVPh63GsvQCqvXx8Y5gtdh4LjSA==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-x64-gnu@1.56.0': + resolution: {integrity: sha512-dNaICPvtmuxFP/VbqdofrLqdS3bM/AKJN3LMJD52si44ea7Be1cBk6NpfIahaysG9Uo+L98QKddU9CD5L8UHnQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] - '@nolyfill/string.prototype.matchall@1.0.44': - resolution: {integrity: sha512-/lwVUaDPCeopUL6XPz2B2ZwaQeIbctP8YxNIyCxunxVKWhCAhii+w0ourNK7JedyGIcM+DaXZTeRlcbgEWaZig==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-linux-x64-musl@1.56.0': + resolution: {integrity: sha512-pF1vOtM+GuXmbklM1hV8WMsn6tCNPvkUzklj/Ej98JhlanbmA2RB1BILgOpwSuCTRTIYx2MXssmEyQQ90QF5aA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] - '@nolyfill/string.prototype.repeat@1.0.44': - resolution: {integrity: sha512-CvHQRuEi1t/jpAlodKuW32BMQ5FL/n2/AbYD7ppKZnz/4CxSwsML2302sTwm9MqNUK6O5P3vyO2B+uDweuvZdw==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-openharmony-arm64@1.56.0': + resolution: {integrity: sha512-bp8NQ4RE6fDIFLa4bdBiOA+TAvkNkg+rslR+AvvjlLTYXLy9/uKAYLQudaQouWihLD/hgkrXIKKzXi5IXOewwg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] - '@nolyfill/string.prototype.trimend@1.0.44': - resolution: {integrity: sha512-3dsKlf4Ma7o+uxLIg5OI1Tgwfet2pE8WTbPjEGWvOe6CSjMtK0skJnnSVHaEVX4N4mYU81To0qDeZOPqjaUotg==} - engines: {node: '>=12.4.0'} + '@oxlint/binding-win32-arm64-msvc@1.56.0': + resolution: {integrity: sha512-PxT4OJDfMOQBzo3OlzFb9gkoSD+n8qSBxyVq2wQSZIHFQYGEqIRTo9M0ZStvZm5fdhMqaVYpOnJvH2hUMEDk/g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] - '@ocavue/utils@1.4.0': - resolution: {integrity: sha512-hB6uTz58shfG/ZyrBkMjub2YyJ1ue0vE14zRLZWJl/zEcgMBFTX6nBBV6ncyRHK4qOIBwFNpXzZrjTFj1ofxRA==} + '@oxlint/binding-win32-ia32-msvc@1.56.0': + resolution: {integrity: sha512-PTRy6sIEPqy2x8PTP1baBNReN/BNEFmde0L+mYeHmjXE1Vlcc9+I5nsqENsB2yAm5wLkzPoTNCMY/7AnabT4/A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.56.0': + resolution: {integrity: sha512-ZHa0clocjLmIDr+1LwoWtxRcoYniAvERotvwKUYKhH41NVfl0Y4LNbyQkwMZzwDvKklKGvGZ5+DAG58/Ik47tQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] '@prosemirror-adapter/core@0.4.6': resolution: {integrity: sha512-qbqd4u9IyDXXolFFmX1tzE000IpF9JbCiiwuSvqIh7lT9ZqjeMcyDVR/vxyM4oVY1sVyQQQj+WxHMAIhj7egVg==} @@ -1907,9 +1956,6 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 - '@rtsao/scc@1.1.0': - resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@surma/rollup-plugin-off-main-thread@2.2.3': resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==} @@ -2008,9 +2054,6 @@ packages: '@tailwindcss/postcss@4.1.18': resolution: {integrity: sha512-Ce0GFnzAOuPyfV5SxjXGn0CubwGcuDB0zcdaPuCSzAa/2vII24JTkH+I6jcbXLb1ctjZMZZI6OjDaLPJQL1S0g==} - '@tybys/wasm-util@0.10.1': - resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -2035,9 +2078,6 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/katex@0.16.8': resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==} @@ -2086,65 +2126,6 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.54.0': - resolution: {integrity: sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.54.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/parser@8.54.0': - resolution: {integrity: sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/project-service@8.54.0': - resolution: {integrity: sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/scope-manager@8.54.0': - resolution: {integrity: sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/tsconfig-utils@8.54.0': - resolution: {integrity: sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/type-utils@8.54.0': - resolution: {integrity: sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/types@8.54.0': - resolution: {integrity: sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.54.0': - resolution: {integrity: sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/utils@8.54.0': - resolution: {integrity: sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - - '@typescript-eslint/visitor-keys@8.54.0': - resolution: {integrity: sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@uiw/codemirror-theme-eclipse@4.25.4': resolution: {integrity: sha512-02kVXT+Mo2BIeqg0s1R/aeXr5WuQDTBVAP5Q0MsDVmB9qmhSRRvyGrNaF4RdQHLAbuXlAyvkGwCxaxxbcA3SSA==} @@ -2158,109 +2139,6 @@ packages: '@codemirror/state': '>=6.0.0' '@codemirror/view': '>=6.0.0' - '@unrs/resolver-binding-android-arm-eabi@1.11.1': - resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} - cpu: [arm] - os: [android] - - '@unrs/resolver-binding-android-arm64@1.11.1': - resolution: {integrity: sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==} - cpu: [arm64] - os: [android] - - '@unrs/resolver-binding-darwin-arm64@1.11.1': - resolution: {integrity: sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==} - cpu: [arm64] - os: [darwin] - - '@unrs/resolver-binding-darwin-x64@1.11.1': - resolution: {integrity: sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==} - cpu: [x64] - os: [darwin] - - '@unrs/resolver-binding-freebsd-x64@1.11.1': - resolution: {integrity: sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==} - cpu: [x64] - os: [freebsd] - - '@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1': - resolution: {integrity: sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==} - cpu: [arm] - os: [linux] - - '@unrs/resolver-binding-linux-arm-musleabihf@1.11.1': - resolution: {integrity: sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==} - cpu: [arm] - os: [linux] - - '@unrs/resolver-binding-linux-arm64-gnu@1.11.1': - resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-arm64-musl@1.11.1': - resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': - resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': - resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': - resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==} - cpu: [riscv64] - os: [linux] - libc: [musl] - - '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': - resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-x64-gnu@1.11.1': - resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@unrs/resolver-binding-linux-x64-musl@1.11.1': - resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@unrs/resolver-binding-wasm32-wasi@1.11.1': - resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@unrs/resolver-binding-win32-arm64-msvc@1.11.1': - resolution: {integrity: sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==} - cpu: [arm64] - os: [win32] - - '@unrs/resolver-binding-win32-ia32-msvc@1.11.1': - resolution: {integrity: sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==} - cpu: [ia32] - os: [win32] - - '@unrs/resolver-binding-win32-x64-msvc@1.11.1': - resolution: {integrity: sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==} - cpu: [x64] - os: [win32] - '@vercel/analytics@2.0.1': resolution: {integrity: sha512-MTQG6V9qQrt1tsDeF+2Uoo5aPjqbVPys1xvnIftXSJYG2SrwXRHnqEvVoYID7BTruDz4lCd2Z7rM1BdkUehk2g==} peerDependencies: @@ -2376,11 +2254,6 @@ packages: peerDependencies: acorn: ^8.14.0 - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.16.0: resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} @@ -2418,23 +2291,16 @@ packages: resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - ansi-styles@6.2.3: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - aria-hidden@1.2.6: resolution: {integrity: sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==} engines: {node: '>=10'} - aria-query@5.3.2: - resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + array-buffer-byte-length@1.0.2: + resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} array-union@1.0.2: @@ -2449,8 +2315,13 @@ packages: resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} engines: {node: '>=0.10.0'} - ast-types-flow@0.0.8: - resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} + arraybuffer.prototype.slice@1.0.4: + resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} + engines: {node: '>= 0.4'} + + async-function@1.0.0: + resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} + engines: {node: '>= 0.4'} async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -2459,12 +2330,8 @@ packages: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} - axe-core@4.11.1: - resolution: {integrity: sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==} - engines: {node: '>=4'} - - axobject-query@4.1.0: - resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} babel-loader@8.4.1: @@ -2532,9 +2399,17 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} caniuse-lite@1.0.30001767: resolution: {integrity: sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ==} @@ -2542,10 +2417,6 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -2633,10 +2504,6 @@ packages: crelt@1.0.6: resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} @@ -2644,16 +2511,17 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - damerau-levenshtein@1.0.8: - resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} + data-view-buffer@1.0.2: + resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} + engines: {node: '>= 0.4'} - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + data-view-byte-length@1.0.2: + resolution: {integrity: sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==} + engines: {node: '>= 0.4'} + + data-view-byte-offset@1.0.1: + resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} + engines: {node: '>= 0.4'} debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} @@ -2667,13 +2535,18 @@ packages: decode-named-character-reference@1.3.0: resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + del@4.1.1: resolution: {integrity: sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==} engines: {node: '>=6'} @@ -2696,13 +2569,13 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - dompurify@3.3.1: resolution: {integrity: sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q==} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + ejs@3.1.10: resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} engines: {node: '>=0.10.0'} @@ -2714,9 +2587,6 @@ packages: emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - emojis-list@3.0.0: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} @@ -2733,9 +2603,33 @@ packages: resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} engines: {node: '>=18'} + es-abstract@1.24.1: + resolution: {integrity: sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + es-module-lexer@2.0.0: resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} + engines: {node: '>= 0.4'} + esbuild@0.27.2: resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} engines: {node: '>=18'} @@ -2745,134 +2639,14 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - eslint-config-next@16.2.1: - resolution: {integrity: sha512-qhabwjQZ1Mk53XzXvmogf8KQ0tG0CQXF0CZ56+2/lVhmObgmaqj7x5A1DSrWdZd3kwI7GTPGUjFne+krRxYmFg==} - peerDependencies: - eslint: '>=9.0.0' - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - - eslint-config-prettier@10.1.8: - resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-import-resolver-node@0.3.9: - resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - - eslint-import-resolver-typescript@3.10.1: - resolution: {integrity: sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - eslint-plugin-import-x: '*' - peerDependenciesMeta: - eslint-plugin-import: - optional: true - eslint-plugin-import-x: - optional: true - - eslint-module-utils@2.12.1: - resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - - eslint-plugin-import@2.32.0: - resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - - eslint-plugin-jsx-a11y@6.10.2: - resolution: {integrity: sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - - eslint-plugin-perfectionist@5.4.0: - resolution: {integrity: sha512-XxpUMpeVaSJF5rpF6NHmhj3xavHZrflKcRbDssAUWrHUU/+l3l7PPYnVJ6IOpR2KjQ1Blucaeb0cFL3LIBis0A==} - engines: {node: ^20.0.0 || >=22.0.0} - peerDependencies: - eslint: '>=8.45.0' - - eslint-plugin-react-hooks@7.0.1: - resolution: {integrity: sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==} - engines: {node: '>=18'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - - eslint-plugin-react@7.37.5: - resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.39.4: - resolution: {integrity: sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - esquery@1.7.0: - resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} - engines: {node: '>=0.10'} - esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -2908,10 +2682,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} - fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -2919,28 +2689,12 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.1.0: resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} fastq@1.20.1: resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} - fdir@6.5.0: - resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} - engines: {node: '>=12.0.0'} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} - filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -2956,16 +2710,9 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} - - flatted@3.3.3: - resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + for-each@0.3.5: + resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} + engines: {node: '>= 0.4'} fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} @@ -2979,6 +2726,20 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.8: + resolution: {integrity: sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + generator-function@2.0.1: + resolution: {integrity: sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==} + engines: {node: '>= 0.4'} + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -2987,6 +2748,10 @@ packages: resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==} engines: {node: '>=18'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} @@ -2994,6 +2759,14 @@ packages: get-own-enumerable-property-symbols@3.0.2: resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + get-symbol-description@1.1.0: + resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} + engines: {node: '>= 0.4'} + get-tsconfig@4.13.1: resolution: {integrity: sha512-EoY1N2xCn44xU6750Sx7OjOIT59FkmstNc3X6y5xpz7D5cBtZRe/3pSlTkDJgqsOk3WwZPkWfonhhUJfttQo3w==} @@ -3001,10 +2774,6 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} @@ -3012,13 +2781,9 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - - globals@16.4.0: - resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==} - engines: {node: '>=18'} + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} @@ -3028,18 +2793,39 @@ packages: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + has-bigints@1.1.0: + resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} + engines: {node: '>= 0.4'} + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - hermes-estree@0.25.1: - resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.2.0: + resolution: {integrity: sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==} + engines: {node: '>= 0.4'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} - hermes-parser@0.25.1: - resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} husky@9.1.7: resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} @@ -3053,18 +2839,6 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - ignore@7.0.5: - resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} - engines: {node: '>= 4'} - - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -3072,17 +2846,50 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + internal-slot@1.1.0: + resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} + engines: {node: '>= 0.4'} + is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} is-alphanumerical@2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + is-array-buffer@3.0.5: + resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} + engines: {node: '>= 0.4'} + is-arrayish@0.3.4: resolution: {integrity: sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==} - is-bun-module@2.0.0: - resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==} + is-async-function@2.1.1: + resolution: {integrity: sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==} + engines: {node: '>= 0.4'} + + is-bigint@1.1.0: + resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} + engines: {node: '>= 0.4'} + + is-boolean-object@1.2.2: + resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + is-data-view@1.0.2: + resolution: {integrity: sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==} + engines: {node: '>= 0.4'} + + is-date-object@1.1.0: + resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} + engines: {node: '>= 0.4'} is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} @@ -3091,10 +2898,18 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-finalizationregistry@1.1.1: + resolution: {integrity: sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==} + engines: {node: '>= 0.4'} + is-fullwidth-code-point@5.1.0: resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} engines: {node: '>=18'} + is-generator-function@1.1.2: + resolution: {integrity: sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==} + engines: {node: '>= 0.4'} + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -3102,9 +2917,21 @@ packages: is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.1.1: + resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} + engines: {node: '>= 0.4'} + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -3129,16 +2956,52 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} + is-regex@1.2.1: + resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} + engines: {node: '>= 0.4'} + is-regexp@1.0.0: resolution: {integrity: sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==} engines: {node: '>=0.10.0'} + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.4: + resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} + engines: {node: '>= 0.4'} + is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + is-string@1.1.1: + resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} + engines: {node: '>= 0.4'} + + is-symbol@1.1.1: + resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} + engines: {node: '>= 0.4'} + + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.1.1: + resolution: {integrity: sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==} + engines: {node: '>= 0.4'} + + is-weakset@2.0.4: + resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} + engines: {node: '>= 0.4'} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} jake@10.9.4: resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} @@ -3184,18 +3047,11 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} - hasBin: true - jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} hasBin: true - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -3208,13 +3064,6 @@ packages: json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -3227,32 +3076,14 @@ packages: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} engines: {node: '>=0.10.0'} - jsx-ast-utils@3.3.5: - resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} - engines: {node: '>=4.0'} - katex@0.16.28: resolution: {integrity: sha512-YHzO7721WbmAL6Ov1uzN/l5mY5WWWhJBSW+jq4tkfZfsxmo1hu6frS0EOswvjBUnWE6NtjEs48SFn5CQESRLZg==} hasBin: true - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - - language-subtag-registry@0.3.23: - resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} - - language-tags@1.0.9: - resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} - engines: {node: '>=0.10'} - leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - lightningcss-android-arm64@1.30.2: resolution: {integrity: sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==} engines: {node: '>= 12.0.0'} @@ -3348,19 +3179,12 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - lodash-es@4.17.23: resolution: {integrity: sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==} lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} @@ -3377,10 +3201,6 @@ packages: longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} - loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -3401,6 +3221,10 @@ packages: markdown-table@3.0.4: resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + mdast-util-definitions@6.0.0: resolution: {integrity: sha512-scTllyX6pnYNZH/AIp/0ePz6s4cZtARxImwoPJ7kS42n+MnVsI4XbnG6d4ibehRIldYMWM2LD7ImQblVhUejVQ==} @@ -3567,13 +3391,6 @@ packages: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -3591,18 +3408,6 @@ packages: engines: {node: ^18 || >=20} hasBin: true - napi-postinstall@0.3.4: - resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - hasBin: true - - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - - natural-orderby@5.0.0: - resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==} - engines: {node: '>=18'} - neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -3639,6 +3444,18 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.7: + resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} + engines: {node: '>= 0.4'} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -3646,29 +3463,36 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - orderedmap@2.1.1: resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==} + own-keys@1.0.1: + resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} + engines: {node: '>= 0.4'} + + oxfmt@0.41.0: + resolution: {integrity: sha512-sKLdJZdQ3bw6x9qKiT7+eID4MNEXlDHf5ZacfIircrq6Qwjk0L6t2/JQlZZrVHTXJawK3KaMuBoJnEJPcqCEdg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + oxlint@1.56.0: + resolution: {integrity: sha512-Q+5Mj5PVaH/R6/fhMMFzw4dT+KPB+kQW4kaL8FOIq7tfhlnEVp6+3lcWqFruuTNlUo9srZUW3qH7Id4pskeR6g==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=0.15.0' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - p-map@2.1.0: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} @@ -3677,10 +3501,6 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - parse-entities@4.0.2: resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} @@ -3695,10 +3515,6 @@ packages: path-is-inside@1.0.2: resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==} - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -3713,10 +3529,6 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} - engines: {node: '>=12'} - pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -3742,6 +3554,10 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} + possible-typed-array-names@1.1.0: + resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} + engines: {node: '>= 0.4'} + postcss@8.4.31: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} @@ -3750,77 +3566,10 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-plugin-tailwindcss@0.7.2: - resolution: {integrity: sha512-LkphyK3Fw+q2HdMOoiEHWf93fNtYJwfamoKPl7UwtjFQdei/iIBoX11G6j706FzN3ymX9mPVi97qIY8328vdnA==} - engines: {node: '>=20.19'} - peerDependencies: - '@ianvs/prettier-plugin-sort-imports': '*' - '@prettier/plugin-hermes': '*' - '@prettier/plugin-oxc': '*' - '@prettier/plugin-pug': '*' - '@shopify/prettier-plugin-liquid': '*' - '@trivago/prettier-plugin-sort-imports': '*' - '@zackad/prettier-plugin-twig': '*' - prettier: ^3.0 - prettier-plugin-astro: '*' - prettier-plugin-css-order: '*' - prettier-plugin-jsdoc: '*' - prettier-plugin-marko: '*' - prettier-plugin-multiline-arrays: '*' - prettier-plugin-organize-attributes: '*' - prettier-plugin-organize-imports: '*' - prettier-plugin-sort-imports: '*' - prettier-plugin-svelte: '*' - peerDependenciesMeta: - '@ianvs/prettier-plugin-sort-imports': - optional: true - '@prettier/plugin-hermes': - optional: true - '@prettier/plugin-oxc': - optional: true - '@prettier/plugin-pug': - optional: true - '@shopify/prettier-plugin-liquid': - optional: true - '@trivago/prettier-plugin-sort-imports': - optional: true - '@zackad/prettier-plugin-twig': - optional: true - prettier-plugin-astro: - optional: true - prettier-plugin-css-order: - optional: true - prettier-plugin-jsdoc: - optional: true - prettier-plugin-marko: - optional: true - prettier-plugin-multiline-arrays: - optional: true - prettier-plugin-organize-attributes: - optional: true - prettier-plugin-organize-imports: - optional: true - prettier-plugin-sort-imports: - optional: true - prettier-plugin-svelte: - optional: true - - prettier@3.8.1: - resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} - engines: {node: '>=14'} - hasBin: true - pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} - prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - prosemirror-changeset@2.3.1: resolution: {integrity: sha512-j0kORIBm8ayJNl3zQvD1TTPHJX3g042et6y/KQhZhnPrruO8exkTgG8X+NRpj7kIyMMEx74Xb3DyMIBtO0IKkQ==} @@ -3898,9 +3647,6 @@ packages: peerDependencies: react: ^19.2.4 - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-json-tree@0.20.0: resolution: {integrity: sha512-h+f9fUNAxzBx1rbrgUF7+zSWKGHDtt2VPYLErIuB0JyKGnWgFMM21ksqQyb3EXwXNnoMW2rdE5kuAaubgGOx2Q==} peerDependencies: @@ -3947,6 +3693,10 @@ packages: resolution: {integrity: sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==} engines: {node: '>=0.10.0'} + reflect.getprototypeof@1.0.10: + resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} + engines: {node: '>= 0.4'} + regenerate-unicode-properties@10.2.2: resolution: {integrity: sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==} engines: {node: '>=4'} @@ -3954,6 +3704,10 @@ packages: regenerate@1.4.2: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} + regexp.prototype.flags@1.5.4: + resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} + engines: {node: '>= 0.4'} + regexpu-core@6.4.0: resolution: {integrity: sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==} engines: {node: '>=4'} @@ -3990,10 +3744,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} @@ -4002,10 +3752,6 @@ packages: engines: {node: '>= 0.4'} hasBin: true - resolve@2.0.0-next.5: - resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} - hasBin: true - restore-cursor@5.1.0: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} @@ -4039,6 +3785,21 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + safe-array-concat@1.1.3: + resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-push-apply@1.0.0: + resolution: {integrity: sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==} + engines: {node: '>= 0.4'} + + safe-regex-test@1.1.0: + resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} + engines: {node: '>= 0.4'} + scheduler@0.27.0: resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} @@ -4065,17 +3826,37 @@ packages: serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + set-proto@1.0.0: + resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==} + engines: {node: '>= 0.4'} + sharp@0.34.5: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} + side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + engines: {node: '>= 0.4'} - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} @@ -4115,8 +3896,9 @@ packages: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead - stable-hash@0.0.5: - resolution: {integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==} + stop-iteration-iterator@1.1.0: + resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} + engines: {node: '>= 0.4'} string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} @@ -4130,6 +3912,22 @@ packages: resolution: {integrity: sha512-KpqHIdDL9KwYk22wEOg/VIqYbrnLeSApsKT/bSj6Ez7pn3CftUiLAv2Lccpq1ALcpLV9UX1Ppn92npZWu2w/aw==} engines: {node: '>=20'} + string.prototype.matchall@4.0.12: + resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==} + engines: {node: '>= 0.4'} + + string.prototype.trim@1.2.10: + resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.9: + resolution: {integrity: sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==} + engines: {node: '>= 0.4'} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} @@ -4141,18 +3939,10 @@ packages: resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} engines: {node: '>=12'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-comments@2.0.1: resolution: {integrity: sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==} engines: {node: '>=10'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - style-mod@4.1.3: resolution: {integrity: sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==} @@ -4223,9 +4013,9 @@ packages: engines: {node: '>=10'} hasBin: true - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} - engines: {node: '>=12.0.0'} + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + engines: {node: ^20.0.0 || >=22.0.0} to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} @@ -4237,15 +4027,6 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} - ts-api-utils@2.4.0: - resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==} - engines: {node: '>=18.12'} - peerDependencies: - typescript: '>=4.8.4' - - tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -4254,26 +4035,35 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - type-fest@0.16.0: resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==} engines: {node: '>=10'} - typescript-eslint@8.54.0: - resolution: {integrity: sha512-CKsJ+g53QpsNPqbzUsfKVgd3Lny4yKZ1pP4qN3jdMOg/sisIDLGyDMezycquXLE5JsEU0wp3dGNdzig0/fmSVQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + typed-array-buffer@1.0.3: + resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.3: + resolution: {integrity: sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.4: + resolution: {integrity: sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} + engines: {node: '>= 0.4'} typescript@6.0.2: resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} engines: {node: '>=14.17'} hasBin: true + unbox-primitive@1.1.0: + resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} + engines: {node: '>= 0.4'} + undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -4319,9 +4109,6 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - unrs-resolver@1.11.1: - resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} @@ -4399,14 +4186,21 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true + which-boxed-primitive@1.1.1: + resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} + engines: {node: '>= 0.4'} - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} + which-builtin-type@1.2.1: + resolution: {integrity: sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-typed-array@1.1.20: + resolution: {integrity: sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==} + engines: {node: '>= 0.4'} workbox-background-sync@6.6.0: resolution: {integrity: sha512-jkf4ZdgOJxC9u2vztxLuPT/UjlH7m/nWRQ/MgGL0v8BJHoZdVGJd18Kck+a0e55wGXdqyHO+4IQTk0685g4MUw==} @@ -4486,19 +4280,6 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - - zod-validation-error@4.0.2: - resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} - engines: {node: '>=18.0.0'} - peerDependencies: - zod: ^3.25.0 || ^4.0.0 - - zod@4.3.6: - resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} - zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -5426,22 +5207,11 @@ snapshots: '@docsearch/js@4.5.3': {} - '@emnapi/core@1.8.1': - dependencies: - '@emnapi/wasi-threads': 1.1.0 - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.8.1': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.1.0': - dependencies: - tslib: 2.8.1 - optional: true - '@esbuild/aix-ppc64@0.27.2': optional: true @@ -5520,52 +5290,6 @@ snapshots: '@esbuild/win32-x64@0.27.2': optional: true - '@eslint-community/eslint-utils@4.9.1(eslint@9.39.4(jiti@2.6.1))': - dependencies: - eslint: 9.39.4(jiti@2.6.1) - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.2': {} - - '@eslint/config-array@0.21.2': - dependencies: - '@eslint/object-schema': 2.1.7 - debug: 4.4.3 - minimatch: 3.1.5 - transitivePeerDependencies: - - supports-color - - '@eslint/config-helpers@0.4.2': - dependencies: - '@eslint/core': 0.17.0 - - '@eslint/core@0.17.0': - dependencies: - '@types/json-schema': 7.0.15 - - '@eslint/eslintrc@3.3.5': - dependencies: - ajv: 6.14.0 - debug: 4.4.3 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.1 - minimatch: 3.1.5 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@9.39.4': {} - - '@eslint/object-schema@2.1.7': {} - - '@eslint/plugin-kit@0.4.1': - dependencies: - '@eslint/core': 0.17.0 - levn: 0.4.1 - '@floating-ui/core@1.7.4': dependencies: '@floating-ui/utils': 0.2.10 @@ -5591,17 +5315,6 @@ snapshots: '@floating-ui/utils@0.2.10': {} - '@humanfs/core@0.19.1': {} - - '@humanfs/node@0.16.7': - dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.4.3 - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/retry@0.4.3': {} - '@img/colour@1.0.0': optional: true @@ -6092,19 +5805,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@napi-rs/wasm-runtime@0.2.12': - dependencies: - '@emnapi/core': 1.8.1 - '@emnapi/runtime': 1.8.1 - '@tybys/wasm-util': 0.10.1 - optional: true - '@next/env@16.2.1': {} - '@next/eslint-plugin-next@16.2.1': - dependencies: - fast-glob: 3.3.1 - '@next/swc-darwin-arm64@16.2.1': optional: true @@ -6141,83 +5843,121 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.20.1 - '@nolyfill/array-includes@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@ocavue/utils@1.4.0': {} - '@nolyfill/array.prototype.findlast@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-android-arm-eabi@0.41.0': + optional: true - '@nolyfill/array.prototype.findlastindex@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-android-arm64@0.41.0': + optional: true - '@nolyfill/array.prototype.flat@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-darwin-arm64@0.41.0': + optional: true - '@nolyfill/array.prototype.flatmap@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-darwin-x64@0.41.0': + optional: true - '@nolyfill/array.prototype.tosorted@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-freebsd-x64@0.41.0': + optional: true - '@nolyfill/es-iterator-helpers@1.0.21': - dependencies: - '@nolyfill/shared': 1.0.21 + '@oxfmt/binding-linux-arm-gnueabihf@0.41.0': + optional: true - '@nolyfill/hasown@1.0.44': {} + '@oxfmt/binding-linux-arm-musleabihf@0.41.0': + optional: true - '@nolyfill/is-core-module@1.0.39': {} + '@oxfmt/binding-linux-arm64-gnu@0.41.0': + optional: true - '@nolyfill/object.assign@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-linux-arm64-musl@0.41.0': + optional: true - '@nolyfill/object.entries@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-linux-ppc64-gnu@0.41.0': + optional: true - '@nolyfill/object.fromentries@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-linux-riscv64-gnu@0.41.0': + optional: true - '@nolyfill/object.groupby@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-linux-riscv64-musl@0.41.0': + optional: true - '@nolyfill/object.values@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-linux-s390x-gnu@0.41.0': + optional: true - '@nolyfill/safe-buffer@1.0.44': {} + '@oxfmt/binding-linux-x64-gnu@0.41.0': + optional: true - '@nolyfill/safe-regex-test@1.0.44': {} + '@oxfmt/binding-linux-x64-musl@0.41.0': + optional: true - '@nolyfill/shared@1.0.21': {} + '@oxfmt/binding-openharmony-arm64@0.41.0': + optional: true - '@nolyfill/shared@1.0.44': {} + '@oxfmt/binding-win32-arm64-msvc@0.41.0': + optional: true - '@nolyfill/string.prototype.includes@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-win32-ia32-msvc@0.41.0': + optional: true - '@nolyfill/string.prototype.matchall@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxfmt/binding-win32-x64-msvc@0.41.0': + optional: true - '@nolyfill/string.prototype.repeat@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxlint/binding-android-arm-eabi@1.56.0': + optional: true - '@nolyfill/string.prototype.trimend@1.0.44': - dependencies: - '@nolyfill/shared': 1.0.44 + '@oxlint/binding-android-arm64@1.56.0': + optional: true - '@ocavue/utils@1.4.0': {} + '@oxlint/binding-darwin-arm64@1.56.0': + optional: true + + '@oxlint/binding-darwin-x64@1.56.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.56.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.56.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.56.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.56.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.56.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.56.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.56.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.56.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.56.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.56.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.56.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.56.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.56.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.56.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.56.0': + optional: true '@prosemirror-adapter/core@0.4.6': dependencies: @@ -6589,14 +6329,12 @@ snapshots: picomatch: 2.3.1 rollup: 2.79.2 - '@rtsao/scc@1.1.0': {} - '@surma/rollup-plugin-off-main-thread@2.2.3': dependencies: ejs: 3.1.10 json5: 2.2.3 magic-string: 0.25.9 - string.prototype.matchall: '@nolyfill/string.prototype.matchall@1.0.44' + string.prototype.matchall: 4.0.12 '@swc/helpers@0.5.15': dependencies: @@ -6671,11 +6409,6 @@ snapshots: postcss: 8.5.6 tailwindcss: 4.1.18 - '@tybys/wasm-util@0.10.1': - dependencies: - tslib: 2.8.1 - optional: true - '@types/debug@4.1.12': dependencies: '@types/ms': 2.1.0 @@ -6705,8 +6438,6 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/json5@0.0.29': {} - '@types/katex@0.16.8': {} '@types/lodash-es@4.17.12': @@ -6755,97 +6486,6 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/scope-manager': 8.54.0 - '@typescript-eslint/type-utils': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/utils': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/visitor-keys': 8.54.0 - eslint: 9.39.4(jiti@2.6.1) - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.4.0(typescript@6.0.2) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2)': - dependencies: - '@typescript-eslint/scope-manager': 8.54.0 - '@typescript-eslint/types': 8.54.0 - '@typescript-eslint/typescript-estree': 8.54.0(typescript@6.0.2) - '@typescript-eslint/visitor-keys': 8.54.0 - debug: 4.4.3 - eslint: 9.39.4(jiti@2.6.1) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/project-service@8.54.0(typescript@6.0.2)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.54.0(typescript@6.0.2) - '@typescript-eslint/types': 8.54.0 - debug: 4.4.3 - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@8.54.0': - dependencies: - '@typescript-eslint/types': 8.54.0 - '@typescript-eslint/visitor-keys': 8.54.0 - - '@typescript-eslint/tsconfig-utils@8.54.0(typescript@6.0.2)': - dependencies: - typescript: 6.0.2 - - '@typescript-eslint/type-utils@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2)': - dependencies: - '@typescript-eslint/types': 8.54.0 - '@typescript-eslint/typescript-estree': 8.54.0(typescript@6.0.2) - '@typescript-eslint/utils': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - debug: 4.4.3 - eslint: 9.39.4(jiti@2.6.1) - ts-api-utils: 2.4.0(typescript@6.0.2) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@8.54.0': {} - - '@typescript-eslint/typescript-estree@8.54.0(typescript@6.0.2)': - dependencies: - '@typescript-eslint/project-service': 8.54.0(typescript@6.0.2) - '@typescript-eslint/tsconfig-utils': 8.54.0(typescript@6.0.2) - '@typescript-eslint/types': 8.54.0 - '@typescript-eslint/visitor-keys': 8.54.0 - debug: 4.4.3 - minimatch: 9.0.5 - semver: 7.7.3 - tinyglobby: 0.2.15 - ts-api-utils: 2.4.0(typescript@6.0.2) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2)': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.54.0 - '@typescript-eslint/types': 8.54.0 - '@typescript-eslint/typescript-estree': 8.54.0(typescript@6.0.2) - eslint: 9.39.4(jiti@2.6.1) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/visitor-keys@8.54.0': - dependencies: - '@typescript-eslint/types': 8.54.0 - eslint-visitor-keys: 4.2.1 - '@uiw/codemirror-theme-eclipse@4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.39.12)': dependencies: '@uiw/codemirror-themes': 4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.39.12) @@ -6868,65 +6508,6 @@ snapshots: '@codemirror/state': 6.5.4 '@codemirror/view': 6.39.12 - '@unrs/resolver-binding-android-arm-eabi@1.11.1': - optional: true - - '@unrs/resolver-binding-android-arm64@1.11.1': - optional: true - - '@unrs/resolver-binding-darwin-arm64@1.11.1': - optional: true - - '@unrs/resolver-binding-darwin-x64@1.11.1': - optional: true - - '@unrs/resolver-binding-freebsd-x64@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm-musleabihf@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-arm64-musl@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-x64-gnu@1.11.1': - optional: true - - '@unrs/resolver-binding-linux-x64-musl@1.11.1': - optional: true - - '@unrs/resolver-binding-wasm32-wasi@1.11.1': - dependencies: - '@napi-rs/wasm-runtime': 0.2.12 - optional: true - - '@unrs/resolver-binding-win32-arm64-msvc@1.11.1': - optional: true - - '@unrs/resolver-binding-win32-ia32-msvc@1.11.1': - optional: true - - '@unrs/resolver-binding-win32-x64-msvc@1.11.1': - optional: true - '@vercel/analytics@2.0.1(next@16.2.1(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react@19.2.4)(vue@3.5.27(typescript@6.0.2))': optionalDependencies: next: 16.2.1(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) @@ -7071,10 +6652,6 @@ snapshots: dependencies: acorn: 8.16.0 - acorn-jsx@5.3.2(acorn@8.16.0): - dependencies: - acorn: 8.16.0 - acorn@8.16.0: {} ajv-formats@2.1.1(ajv@8.17.1): @@ -7110,19 +6687,16 @@ snapshots: ansi-regex@6.2.2: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - ansi-styles@6.2.3: {} - argparse@2.0.1: {} - aria-hidden@1.2.6: dependencies: tslib: 2.8.1 - aria-query@5.3.2: {} + array-buffer-byte-length@1.0.2: + dependencies: + call-bound: 1.0.4 + is-array-buffer: 3.0.5 array-union@1.0.2: dependencies: @@ -7132,15 +6706,25 @@ snapshots: array-uniq@1.0.3: {} - ast-types-flow@0.0.8: {} + arraybuffer.prototype.slice@1.0.4: + dependencies: + array-buffer-byte-length: 1.0.2 + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.24.1 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + is-array-buffer: 3.0.5 + + async-function@1.0.0: {} async@3.2.6: {} at-least-node@1.0.0: {} - axe-core@4.11.1: {} - - axobject-query@4.1.0: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.1.0 babel-loader@8.4.1(@babel/core@7.29.0)(webpack@5.105.0): dependencies: @@ -7214,17 +6798,27 @@ snapshots: builtin-modules@3.3.0: {} - callsites@3.1.0: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + get-intrinsic: 1.3.0 + set-function-length: 1.2.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 caniuse-lite@1.0.30001767: {} ccount@2.0.1: {} - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} @@ -7301,21 +6895,27 @@ snapshots: crelt@1.0.6: {} - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - crypto-random-string@2.0.0: {} csstype@3.2.3: {} - damerau-levenshtein@1.0.8: {} + data-view-buffer@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + is-data-view: 1.0.2 - debug@3.2.7: + data-view-byte-length@1.0.2: dependencies: - ms: 2.1.3 + call-bound: 1.0.4 + es-errors: 1.3.0 + is-data-view: 1.0.2 + + data-view-byte-offset@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + is-data-view: 1.0.2 debug@4.4.3: dependencies: @@ -7325,10 +6925,20 @@ snapshots: dependencies: character-entities: 2.0.2 - deep-is@0.1.4: {} - deepmerge@4.3.1: {} + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + del@4.1.1: dependencies: '@types/glob': 7.2.0 @@ -7353,14 +6963,16 @@ snapshots: dependencies: path-type: 4.0.0 - doctrine@2.1.0: - dependencies: - esutils: 2.0.3 - dompurify@3.3.1: optionalDependencies: '@types/trusted-types': 2.0.7 + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + ejs@3.1.10: dependencies: jake: 10.9.4 @@ -7369,8 +6981,6 @@ snapshots: emoji-regex@10.6.0: {} - emoji-regex@9.2.2: {} - emojis-list@3.0.0: {} enhanced-resolve@5.19.0: @@ -7382,255 +6992,123 @@ snapshots: environment@1.1.0: {} - es-module-lexer@2.0.0: {} - - esbuild@0.27.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.27.2 - '@esbuild/android-arm': 0.27.2 - '@esbuild/android-arm64': 0.27.2 - '@esbuild/android-x64': 0.27.2 - '@esbuild/darwin-arm64': 0.27.2 - '@esbuild/darwin-x64': 0.27.2 - '@esbuild/freebsd-arm64': 0.27.2 - '@esbuild/freebsd-x64': 0.27.2 - '@esbuild/linux-arm': 0.27.2 - '@esbuild/linux-arm64': 0.27.2 - '@esbuild/linux-ia32': 0.27.2 - '@esbuild/linux-loong64': 0.27.2 - '@esbuild/linux-mips64el': 0.27.2 - '@esbuild/linux-ppc64': 0.27.2 - '@esbuild/linux-riscv64': 0.27.2 - '@esbuild/linux-s390x': 0.27.2 - '@esbuild/linux-x64': 0.27.2 - '@esbuild/netbsd-arm64': 0.27.2 - '@esbuild/netbsd-x64': 0.27.2 - '@esbuild/openbsd-arm64': 0.27.2 - '@esbuild/openbsd-x64': 0.27.2 - '@esbuild/openharmony-arm64': 0.27.2 - '@esbuild/sunos-x64': 0.27.2 - '@esbuild/win32-arm64': 0.27.2 - '@esbuild/win32-ia32': 0.27.2 - '@esbuild/win32-x64': 0.27.2 - - escalade@3.2.0: {} - - escape-string-regexp@4.0.0: {} - - escape-string-regexp@5.0.0: {} - - eslint-config-next@16.2.1(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2): - dependencies: - '@next/eslint-plugin-next': 16.2.1 - eslint: 9.39.4(jiti@2.6.1) - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-react: 7.37.5(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-react-hooks: 7.0.1(eslint@9.39.4(jiti@2.6.1)) - globals: 16.4.0 - typescript-eslint: 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - optionalDependencies: - typescript: 6.0.2 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-webpack - - eslint-plugin-import-x - - supports-color - - eslint-config-prettier@10.1.8(eslint@9.39.4(jiti@2.6.1)): - dependencies: - eslint: 9.39.4(jiti@2.6.1) - - eslint-import-resolver-node@0.3.9: - dependencies: - debug: 3.2.7 - is-core-module: '@nolyfill/is-core-module@1.0.39' - resolve: 1.22.11 - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4(jiti@2.6.1)): - dependencies: - '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.3 - eslint: 9.39.4(jiti@2.6.1) - get-tsconfig: 4.13.1 - is-bun-module: 2.0.0 - stable-hash: 0.0.5 - tinyglobby: 0.2.15 - unrs-resolver: 1.11.1 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1)) - transitivePeerDependencies: - - supports-color - - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1)): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - eslint: 9.39.4(jiti@2.6.1) - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4(jiti@2.6.1)) - transitivePeerDependencies: - - supports-color - - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1)): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: '@nolyfill/array-includes@1.0.44' - array.prototype.findlastindex: '@nolyfill/array.prototype.findlastindex@1.0.44' - array.prototype.flat: '@nolyfill/array.prototype.flat@1.0.44' - array.prototype.flatmap: '@nolyfill/array.prototype.flatmap@1.0.44' - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 9.39.4(jiti@2.6.1) - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4(jiti@2.6.1)) - hasown: '@nolyfill/hasown@1.0.44' - is-core-module: '@nolyfill/is-core-module@1.0.39' - is-glob: 4.0.3 - minimatch: 3.1.5 - object.fromentries: '@nolyfill/object.fromentries@1.0.44' - object.groupby: '@nolyfill/object.groupby@1.0.44' - object.values: '@nolyfill/object.values@1.0.44' - semver: 6.3.1 - string.prototype.trimend: '@nolyfill/string.prototype.trimend@1.0.44' - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4(jiti@2.6.1)): - dependencies: - aria-query: 5.3.2 - array-includes: '@nolyfill/array-includes@1.0.44' - array.prototype.flatmap: '@nolyfill/array.prototype.flatmap@1.0.44' - ast-types-flow: 0.0.8 - axe-core: 4.11.1 - axobject-query: 4.1.0 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 9.39.4(jiti@2.6.1) - hasown: '@nolyfill/hasown@1.0.44' - jsx-ast-utils: 3.3.5 - language-tags: 1.0.9 - minimatch: 3.1.5 - object.fromentries: '@nolyfill/object.fromentries@1.0.44' - safe-regex-test: '@nolyfill/safe-regex-test@1.0.44' - string.prototype.includes: '@nolyfill/string.prototype.includes@1.0.44' - - eslint-plugin-perfectionist@5.4.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2): - dependencies: - '@typescript-eslint/utils': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - eslint: 9.39.4(jiti@2.6.1) - natural-orderby: 5.0.0 - transitivePeerDependencies: - - supports-color - - typescript - - eslint-plugin-react-hooks@7.0.1(eslint@9.39.4(jiti@2.6.1)): - dependencies: - '@babel/core': 7.29.0 - '@babel/parser': 7.29.0 - eslint: 9.39.4(jiti@2.6.1) - hermes-parser: 0.25.1 - zod: 4.3.6 - zod-validation-error: 4.0.2(zod@4.3.6) - transitivePeerDependencies: - - supports-color - - eslint-plugin-react@7.37.5(eslint@9.39.4(jiti@2.6.1)): - dependencies: - array-includes: '@nolyfill/array-includes@1.0.44' - array.prototype.findlast: '@nolyfill/array.prototype.findlast@1.0.44' - array.prototype.flatmap: '@nolyfill/array.prototype.flatmap@1.0.44' - array.prototype.tosorted: '@nolyfill/array.prototype.tosorted@1.0.44' - doctrine: 2.1.0 - es-iterator-helpers: '@nolyfill/es-iterator-helpers@1.0.21' - eslint: 9.39.4(jiti@2.6.1) - estraverse: 5.3.0 - hasown: '@nolyfill/hasown@1.0.44' - jsx-ast-utils: 3.3.5 - minimatch: 3.1.5 - object.entries: '@nolyfill/object.entries@1.0.44' - object.fromentries: '@nolyfill/object.fromentries@1.0.44' - object.values: '@nolyfill/object.values@1.0.44' - prop-types: 15.8.1 - resolve: 2.0.0-next.5 - semver: 6.3.1 - string.prototype.matchall: '@nolyfill/string.prototype.matchall@1.0.44' - string.prototype.repeat: '@nolyfill/string.prototype.repeat@1.0.44' + es-abstract@1.24.1: + dependencies: + array-buffer-byte-length: 1.0.2 + arraybuffer.prototype.slice: 1.0.4 + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.4 + data-view-buffer: 1.0.2 + data-view-byte-length: 1.0.2 + data-view-byte-offset: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + es-set-tostringtag: 2.1.0 + es-to-primitive: 1.3.0 + function.prototype.name: 1.1.8 + get-intrinsic: 1.3.0 + get-proto: 1.0.1 + get-symbol-description: 1.1.0 + globalthis: 1.0.4 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + has-proto: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + internal-slot: 1.1.0 + is-array-buffer: 3.0.5 + is-callable: 1.2.7 + is-data-view: 1.0.2 + is-negative-zero: 2.0.3 + is-regex: 1.2.1 + is-set: 2.0.3 + is-shared-array-buffer: 1.0.4 + is-string: 1.1.1 + is-typed-array: 1.1.15 + is-weakref: 1.1.1 + math-intrinsics: 1.1.0 + object-inspect: 1.13.4 + object-keys: 1.1.1 + object.assign: 4.1.7 + own-keys: 1.0.1 + regexp.prototype.flags: 1.5.4 + safe-array-concat: 1.1.3 + safe-push-apply: 1.0.0 + safe-regex-test: 1.1.0 + set-proto: 1.0.0 + stop-iteration-iterator: 1.1.0 + string.prototype.trim: 1.2.10 + string.prototype.trimend: 1.0.9 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.3 + typed-array-byte-length: 1.0.3 + typed-array-byte-offset: 1.0.4 + typed-array-length: 1.0.7 + unbox-primitive: 1.1.0 + which-typed-array: 1.1.20 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} - eslint-scope@5.1.1: - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 + es-module-lexer@2.0.0: {} - eslint-scope@8.4.0: + es-object-atoms@1.1.1: dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} + es-errors: 1.3.0 - eslint-visitor-keys@4.2.1: {} + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 - eslint@9.39.4(jiti@2.6.1): + es-to-primitive@1.3.0: dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4(jiti@2.6.1)) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.2 - '@eslint/config-helpers': 0.4.2 - '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.5 - '@eslint/js': 9.39.4 - '@eslint/plugin-kit': 0.4.1 - '@humanfs/node': 0.16.7 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.8 - ajv: 6.14.0 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3 - escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.7.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.5 - natural-compare: 1.4.0 - optionator: 0.9.4 + is-callable: 1.2.7 + is-date-object: 1.1.0 + is-symbol: 1.1.1 + + esbuild@0.27.2: optionalDependencies: - jiti: 2.6.1 - transitivePeerDependencies: - - supports-color + '@esbuild/aix-ppc64': 0.27.2 + '@esbuild/android-arm': 0.27.2 + '@esbuild/android-arm64': 0.27.2 + '@esbuild/android-x64': 0.27.2 + '@esbuild/darwin-arm64': 0.27.2 + '@esbuild/darwin-x64': 0.27.2 + '@esbuild/freebsd-arm64': 0.27.2 + '@esbuild/freebsd-x64': 0.27.2 + '@esbuild/linux-arm': 0.27.2 + '@esbuild/linux-arm64': 0.27.2 + '@esbuild/linux-ia32': 0.27.2 + '@esbuild/linux-loong64': 0.27.2 + '@esbuild/linux-mips64el': 0.27.2 + '@esbuild/linux-ppc64': 0.27.2 + '@esbuild/linux-riscv64': 0.27.2 + '@esbuild/linux-s390x': 0.27.2 + '@esbuild/linux-x64': 0.27.2 + '@esbuild/netbsd-arm64': 0.27.2 + '@esbuild/netbsd-x64': 0.27.2 + '@esbuild/openbsd-arm64': 0.27.2 + '@esbuild/openbsd-x64': 0.27.2 + '@esbuild/openharmony-arm64': 0.27.2 + '@esbuild/sunos-x64': 0.27.2 + '@esbuild/win32-arm64': 0.27.2 + '@esbuild/win32-ia32': 0.27.2 + '@esbuild/win32-x64': 0.27.2 - espree@10.4.0: - dependencies: - acorn: 8.16.0 - acorn-jsx: 5.3.2(acorn@8.16.0) - eslint-visitor-keys: 4.2.1 + escalade@3.2.0: {} + + escape-string-regexp@5.0.0: {} - esquery@1.7.0: + eslint-scope@5.1.1: dependencies: - estraverse: 5.3.0 + esrecurse: 4.3.0 + estraverse: 4.3.0 esrecurse@4.3.0: dependencies: @@ -7654,14 +7132,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-glob@3.3.1: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -7672,22 +7142,12 @@ snapshots: fast-json-stable-stringify@2.1.0: {} - fast-levenshtein@2.0.6: {} - fast-uri@3.1.0: {} fastq@1.20.1: dependencies: reusify: 1.1.0 - fdir@6.5.0(picomatch@4.0.3): - optionalDependencies: - picomatch: 4.0.3 - - file-entry-cache@8.0.0: - dependencies: - flat-cache: 4.0.1 - filelist@1.0.4: dependencies: minimatch: 5.1.6 @@ -7707,17 +7167,9 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat-cache@4.0.1: + for-each@0.3.5: dependencies: - flatted: 3.3.3 - keyv: 4.5.4 - - flatted@3.3.3: {} + is-callable: 1.2.7 fs-extra@9.1.0: dependencies: @@ -7731,14 +7183,53 @@ snapshots: fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + + function.prototype.name@1.1.8: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + define-properties: 1.2.1 + functions-have-names: 1.2.3 + hasown: 2.0.2 + is-callable: 1.2.7 + + functions-have-names@1.2.3: {} + + generator-function@2.0.1: {} + gensync@1.0.0-beta.2: {} get-east-asian-width@1.4.0: {} + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + get-nonce@1.0.1: {} get-own-enumerable-property-symbols@3.0.2: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + + get-symbol-description@1.1.0: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + get-tsconfig@4.13.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -7747,10 +7238,6 @@ snapshots: dependencies: is-glob: 4.0.3 - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - glob-to-regexp@0.4.1: {} glob@7.2.3: @@ -7762,9 +7249,10 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 - globals@14.0.0: {} - - globals@16.4.0: {} + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.2.0 globby@11.1.0: dependencies: @@ -7783,30 +7271,37 @@ snapshots: pify: 2.3.0 pinkie-promise: 2.0.1 + gopd@1.2.0: {} + graceful-fs@4.2.11: {} + has-bigints@1.1.0: {} + has-flag@4.0.0: {} - hermes-estree@0.25.1: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 - hermes-parser@0.25.1: + has-proto@1.2.0: dependencies: - hermes-estree: 0.25.1 + dunder-proto: 1.0.1 - husky@9.1.7: {} + has-symbols@1.1.0: {} - idb@7.1.1: {} + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 - ignore@5.3.2: {} + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 - ignore@7.0.5: {} + husky@9.1.7: {} - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 + idb@7.1.1: {} - imurmurhash@0.1.4: {} + ignore@5.3.2: {} inflight@1.0.6: dependencies: @@ -7815,6 +7310,12 @@ snapshots: inherits@2.0.4: {} + internal-slot@1.1.0: + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.1.0 + is-alphabetical@2.0.1: {} is-alphanumerical@2.0.1: @@ -7822,28 +7323,85 @@ snapshots: is-alphabetical: 2.0.1 is-decimal: 2.0.1 + is-array-buffer@3.0.5: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + get-intrinsic: 1.3.0 + is-arrayish@0.3.4: {} - is-bun-module@2.0.0: + is-async-function@2.1.1: dependencies: - semver: 7.7.3 + async-function: 1.0.0 + call-bound: 1.0.4 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + + is-bigint@1.1.0: + dependencies: + has-bigints: 1.1.0 + + is-boolean-object@1.2.2: + dependencies: + call-bound: 1.0.4 + has-tostringtag: 1.0.2 + + is-callable@1.2.7: {} + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.2 + + is-data-view@1.0.2: + dependencies: + call-bound: 1.0.4 + get-intrinsic: 1.3.0 + is-typed-array: 1.1.15 + + is-date-object@1.1.0: + dependencies: + call-bound: 1.0.4 + has-tostringtag: 1.0.2 is-decimal@2.0.1: {} is-extglob@2.1.1: {} + is-finalizationregistry@1.1.1: + dependencies: + call-bound: 1.0.4 + is-fullwidth-code-point@5.1.0: dependencies: get-east-asian-width: 1.4.0 + is-generator-function@1.1.2: + dependencies: + call-bound: 1.0.4 + generator-function: 2.0.1 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 is-hexadecimal@2.0.1: {} + is-map@2.0.3: {} + is-module@1.0.0: {} + is-negative-zero@2.0.3: {} + + is-number-object@1.1.1: + dependencies: + call-bound: 1.0.4 + has-tostringtag: 1.0.2 + is-number@7.0.0: {} is-obj@1.0.1: {} @@ -7860,11 +7418,50 @@ snapshots: is-plain-obj@4.1.0: {} + is-regex@1.2.1: + dependencies: + call-bound: 1.0.4 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + is-regexp@1.0.0: {} + is-set@2.0.3: {} + + is-shared-array-buffer@1.0.4: + dependencies: + call-bound: 1.0.4 + is-stream@2.0.1: {} - isexe@2.0.0: {} + is-string@1.1.1: + dependencies: + call-bound: 1.0.4 + has-tostringtag: 1.0.2 + + is-symbol@1.1.1: + dependencies: + call-bound: 1.0.4 + has-symbols: 1.1.0 + safe-regex-test: 1.1.0 + + is-typed-array@1.1.15: + dependencies: + which-typed-array: 1.1.20 + + is-weakmap@2.0.2: {} + + is-weakref@1.1.1: + dependencies: + call-bound: 1.0.4 + + is-weakset@2.0.4: + dependencies: + call-bound: 1.0.4 + get-intrinsic: 1.3.0 + + isarray@2.0.5: {} jake@10.9.4: dependencies: @@ -7899,14 +7496,8 @@ snapshots: js-tokens@4.0.0: {} - js-yaml@4.1.1: - dependencies: - argparse: 2.0.1 - jsesc@3.1.0: {} - json-buffer@3.0.1: {} - json-parse-even-better-errors@2.3.1: {} json-schema-traverse@0.4.1: {} @@ -7915,12 +7506,6 @@ snapshots: json-schema@0.4.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} - - json5@1.0.2: - dependencies: - minimist: 1.2.8 - json5@2.2.3: {} jsonfile@6.2.0: @@ -7931,34 +7516,12 @@ snapshots: jsonpointer@5.0.1: {} - jsx-ast-utils@3.3.5: - dependencies: - array-includes: '@nolyfill/array-includes@1.0.44' - array.prototype.flat: '@nolyfill/array.prototype.flat@1.0.44' - object.assign: '@nolyfill/object.assign@1.0.44' - object.values: '@nolyfill/object.values@1.0.44' - katex@0.16.28: dependencies: commander: 8.3.0 - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - language-subtag-registry@0.3.23: {} - - language-tags@1.0.9: - dependencies: - language-subtag-registry: 0.3.23 - leven@3.1.0: {} - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - lightningcss-android-arm64@1.30.2: optional: true @@ -8039,16 +7602,10 @@ snapshots: dependencies: p-locate: 4.1.0 - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - lodash-es@4.17.23: {} lodash.debounce@4.0.8: {} - lodash.merge@4.6.2: {} - lodash.sortby@4.7.0: {} lodash.throttle@4.1.1: {} @@ -8065,10 +7622,6 @@ snapshots: longest-streak@3.1.0: {} - loose-envify@1.4.0: - dependencies: - js-tokens: 4.0.0 - lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -8089,6 +7642,8 @@ snapshots: markdown-table@3.0.4: {} + math-intrinsics@1.1.0: {} + mdast-util-definitions@6.0.0: dependencies: '@types/mdast': 4.0.4 @@ -8463,12 +8018,6 @@ snapshots: dependencies: brace-expansion: 2.0.2 - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.2 - - minimist@1.2.8: {} - ms@2.1.3: {} nano-spawn@2.0.0: {} @@ -8477,12 +8026,6 @@ snapshots: nanoid@5.1.6: {} - napi-postinstall@0.3.4: {} - - natural-compare@1.4.0: {} - - natural-orderby@5.0.0: {} - neo-async@2.6.2: {} next-pwa@5.6.0(@babel/core@7.29.0)(next@16.2.1(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(webpack@5.105.0): @@ -8531,6 +8074,19 @@ snapshots: object-assign@4.1.1: {} + object-inspect@1.13.4: {} + + object-keys@1.1.1: {} + + object.assign@4.1.7: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + has-symbols: 1.1.0 + object-keys: 1.1.1 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -8539,41 +8095,72 @@ snapshots: dependencies: mimic-function: 5.0.1 - optionator@0.9.4: + orderedmap@2.1.1: {} + + own-keys@1.0.1: dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 + get-intrinsic: 1.3.0 + object-keys: 1.1.1 + safe-push-apply: 1.0.0 - orderedmap@2.1.1: {} + oxfmt@0.41.0: + dependencies: + tinypool: 2.1.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.41.0 + '@oxfmt/binding-android-arm64': 0.41.0 + '@oxfmt/binding-darwin-arm64': 0.41.0 + '@oxfmt/binding-darwin-x64': 0.41.0 + '@oxfmt/binding-freebsd-x64': 0.41.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.41.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.41.0 + '@oxfmt/binding-linux-arm64-gnu': 0.41.0 + '@oxfmt/binding-linux-arm64-musl': 0.41.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.41.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.41.0 + '@oxfmt/binding-linux-riscv64-musl': 0.41.0 + '@oxfmt/binding-linux-s390x-gnu': 0.41.0 + '@oxfmt/binding-linux-x64-gnu': 0.41.0 + '@oxfmt/binding-linux-x64-musl': 0.41.0 + '@oxfmt/binding-openharmony-arm64': 0.41.0 + '@oxfmt/binding-win32-arm64-msvc': 0.41.0 + '@oxfmt/binding-win32-ia32-msvc': 0.41.0 + '@oxfmt/binding-win32-x64-msvc': 0.41.0 + + oxlint@1.56.0: + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.56.0 + '@oxlint/binding-android-arm64': 1.56.0 + '@oxlint/binding-darwin-arm64': 1.56.0 + '@oxlint/binding-darwin-x64': 1.56.0 + '@oxlint/binding-freebsd-x64': 1.56.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.56.0 + '@oxlint/binding-linux-arm-musleabihf': 1.56.0 + '@oxlint/binding-linux-arm64-gnu': 1.56.0 + '@oxlint/binding-linux-arm64-musl': 1.56.0 + '@oxlint/binding-linux-ppc64-gnu': 1.56.0 + '@oxlint/binding-linux-riscv64-gnu': 1.56.0 + '@oxlint/binding-linux-riscv64-musl': 1.56.0 + '@oxlint/binding-linux-s390x-gnu': 1.56.0 + '@oxlint/binding-linux-x64-gnu': 1.56.0 + '@oxlint/binding-linux-x64-musl': 1.56.0 + '@oxlint/binding-openharmony-arm64': 1.56.0 + '@oxlint/binding-win32-arm64-msvc': 1.56.0 + '@oxlint/binding-win32-ia32-msvc': 1.56.0 + '@oxlint/binding-win32-x64-msvc': 1.56.0 p-limit@2.3.0: dependencies: p-try: 2.2.0 - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - p-locate@4.1.0: dependencies: p-limit: 2.3.0 - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - p-map@2.1.0: {} p-try@2.2.0: {} - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - parse-entities@4.0.2: dependencies: '@types/unist': 2.0.11 @@ -8590,8 +8177,6 @@ snapshots: path-is-inside@1.0.2: {} - path-key@3.1.1: {} - path-parse@1.0.7: {} path-type@4.0.0: {} @@ -8600,8 +8185,6 @@ snapshots: picomatch@2.3.1: {} - picomatch@4.0.3: {} - pidtree@0.6.0: {} pify@2.3.0: {} @@ -8618,6 +8201,8 @@ snapshots: dependencies: find-up: 4.1.0 + possible-typed-array-names@1.1.0: {} + postcss@8.4.31: dependencies: nanoid: 3.3.11 @@ -8630,22 +8215,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prelude-ls@1.2.1: {} - - prettier-plugin-tailwindcss@0.7.2(prettier@3.8.1): - dependencies: - prettier: 3.8.1 - - prettier@3.8.1: {} - pretty-bytes@5.6.0: {} - prop-types@15.8.1: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - prosemirror-changeset@2.3.1: dependencies: prosemirror-transform: 1.11.0 @@ -8744,7 +8315,7 @@ snapshots: randombytes@2.1.0: dependencies: - safe-buffer: '@nolyfill/safe-buffer@1.0.44' + safe-buffer: 5.2.1 react-base16-styling@0.10.0: dependencies: @@ -8758,8 +8329,6 @@ snapshots: react: 19.2.4 scheduler: 0.27.0 - react-is@16.13.1: {} - react-json-tree@0.20.0(@types/react@19.2.14)(react@19.2.4): dependencies: '@types/lodash': 4.17.23 @@ -8801,12 +8370,32 @@ snapshots: react@19.2.4: {} + reflect.getprototypeof@1.0.10: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.24.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + get-intrinsic: 1.3.0 + get-proto: 1.0.1 + which-builtin-type: 1.2.1 + regenerate-unicode-properties@10.2.2: dependencies: regenerate: 1.4.2 regenerate@1.4.2: {} + regexp.prototype.flags@1.5.4: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-errors: 1.3.0 + get-proto: 1.0.1 + gopd: 1.2.0 + set-function-name: 2.0.2 + regexpu-core@6.4.0: dependencies: regenerate: 1.4.2 @@ -8883,19 +8472,11 @@ snapshots: require-from-string@2.0.2: {} - resolve-from@4.0.0: {} - resolve-pkg-maps@1.0.0: {} resolve@1.22.11: dependencies: - is-core-module: '@nolyfill/is-core-module@1.0.39' - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - - resolve@2.0.0-next.5: - dependencies: - is-core-module: '@nolyfill/is-core-module@1.0.39' + is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -8930,6 +8511,27 @@ snapshots: dependencies: queue-microtask: 1.2.3 + safe-array-concat@1.1.3: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + get-intrinsic: 1.3.0 + has-symbols: 1.1.0 + isarray: 2.0.5 + + safe-buffer@5.2.1: {} + + safe-push-apply@1.0.0: + dependencies: + es-errors: 1.3.0 + isarray: 2.0.5 + + safe-regex-test@1.1.0: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + is-regex: 1.2.1 + scheduler@0.27.0: {} schema-utils@2.7.1: @@ -8947,7 +8549,8 @@ snapshots: semver@6.3.1: {} - semver@7.7.3: {} + semver@7.7.3: + optional: true serialize-javascript@4.0.0: dependencies: @@ -8957,6 +8560,28 @@ snapshots: dependencies: randombytes: 2.1.0 + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.3.0 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + + set-function-name@2.0.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + + set-proto@1.0.0: + dependencies: + dunder-proto: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + sharp@0.34.5: dependencies: '@img/colour': 1.0.0 @@ -8989,11 +8614,33 @@ snapshots: '@img/sharp-win32-x64': 0.34.5 optional: true - shebang-command@2.0.0: + side-channel-list@1.0.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: dependencies: - shebang-regex: 3.0.0 + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 - shebang-regex@3.0.0: {} + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 signal-exit@4.1.0: {} @@ -9025,7 +8672,10 @@ snapshots: sourcemap-codec@1.4.8: {} - stable-hash@0.0.5: {} + stop-iteration-iterator@1.1.0: + dependencies: + es-errors: 1.3.0 + internal-slot: 1.1.0 string-argv@0.3.2: {} @@ -9040,6 +8690,45 @@ snapshots: get-east-asian-width: 1.4.0 strip-ansi: 7.1.2 + string.prototype.matchall@4.0.12: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + define-properties: 1.2.1 + es-abstract: 1.24.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + get-intrinsic: 1.3.0 + gopd: 1.2.0 + has-symbols: 1.1.0 + internal-slot: 1.1.0 + regexp.prototype.flags: 1.5.4 + set-function-name: 2.0.2 + side-channel: 1.1.0 + + string.prototype.trim@1.2.10: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + define-data-property: 1.1.4 + define-properties: 1.2.1 + es-abstract: 1.24.1 + es-object-atoms: 1.1.1 + has-property-descriptors: 1.0.2 + + string.prototype.trimend@1.0.9: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + + string.prototype.trimstart@1.0.8: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 @@ -9055,12 +8744,8 @@ snapshots: dependencies: ansi-regex: 6.2.2 - strip-bom@3.0.0: {} - strip-comments@2.0.1: {} - strip-json-comments@3.1.1: {} - style-mod@4.1.3: {} styled-jsx@5.1.6(@babel/core@7.29.0)(react@19.2.4): @@ -9113,10 +8798,7 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - tinyglobby@0.2.15: - dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + tinypool@2.1.0: {} to-regex-range@5.0.1: dependencies: @@ -9128,17 +8810,6 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.4.0(typescript@6.0.2): - dependencies: - typescript: 6.0.2 - - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - tslib@2.8.1: {} tsx@4.21.0: @@ -9148,25 +8819,50 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - type-check@0.4.0: + type-fest@0.16.0: {} + + typed-array-buffer@1.0.3: dependencies: - prelude-ls: 1.2.1 + call-bound: 1.0.4 + es-errors: 1.3.0 + is-typed-array: 1.1.15 - type-fest@0.16.0: {} + typed-array-byte-length@1.0.3: + dependencies: + call-bind: 1.0.8 + for-each: 0.3.5 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 - typescript-eslint@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2): + typed-array-byte-offset@1.0.4: dependencies: - '@typescript-eslint/eslint-plugin': 8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/parser': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/typescript-estree': 8.54.0(typescript@6.0.2) - '@typescript-eslint/utils': 8.54.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.2) - eslint: 9.39.4(jiti@2.6.1) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + for-each: 0.3.5 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 + reflect.getprototypeof: 1.0.10 + + typed-array-length@1.0.7: + dependencies: + call-bind: 1.0.8 + for-each: 0.3.5 + gopd: 1.2.0 + is-typed-array: 1.1.15 + possible-typed-array-names: 1.1.0 + reflect.getprototypeof: 1.0.10 typescript@6.0.2: {} + unbox-primitive@1.1.0: + dependencies: + call-bound: 1.0.4 + has-bigints: 1.1.0 + has-symbols: 1.1.0 + which-boxed-primitive: 1.1.1 + undici-types@7.16.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} @@ -9220,30 +8916,6 @@ snapshots: universalify@2.0.1: {} - unrs-resolver@1.11.1: - dependencies: - napi-postinstall: 0.3.4 - optionalDependencies: - '@unrs/resolver-binding-android-arm-eabi': 1.11.1 - '@unrs/resolver-binding-android-arm64': 1.11.1 - '@unrs/resolver-binding-darwin-arm64': 1.11.1 - '@unrs/resolver-binding-darwin-x64': 1.11.1 - '@unrs/resolver-binding-freebsd-x64': 1.11.1 - '@unrs/resolver-binding-linux-arm-gnueabihf': 1.11.1 - '@unrs/resolver-binding-linux-arm-musleabihf': 1.11.1 - '@unrs/resolver-binding-linux-arm64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-arm64-musl': 1.11.1 - '@unrs/resolver-binding-linux-ppc64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-riscv64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-riscv64-musl': 1.11.1 - '@unrs/resolver-binding-linux-s390x-gnu': 1.11.1 - '@unrs/resolver-binding-linux-x64-gnu': 1.11.1 - '@unrs/resolver-binding-linux-x64-musl': 1.11.1 - '@unrs/resolver-binding-wasm32-wasi': 1.11.1 - '@unrs/resolver-binding-win32-arm64-msvc': 1.11.1 - '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 - '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - upath@1.2.0: {} update-browserslist-db@1.2.3(browserslist@4.28.1): @@ -9345,11 +9017,46 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 - which@2.0.2: - dependencies: - isexe: 2.0.0 - - word-wrap@1.2.5: {} + which-boxed-primitive@1.1.1: + dependencies: + is-bigint: 1.1.0 + is-boolean-object: 1.2.2 + is-number-object: 1.1.1 + is-string: 1.1.1 + is-symbol: 1.1.1 + + which-builtin-type@1.2.1: + dependencies: + call-bound: 1.0.4 + function.prototype.name: 1.1.8 + has-tostringtag: 1.0.2 + is-async-function: 2.1.1 + is-date-object: 1.1.0 + is-finalizationregistry: 1.1.1 + is-generator-function: 1.1.2 + is-regex: 1.2.1 + is-weakref: 1.1.1 + isarray: 2.0.5 + which-boxed-primitive: 1.1.1 + which-collection: 1.0.2 + which-typed-array: 1.1.20 + + which-collection@1.0.2: + dependencies: + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.4 + + which-typed-array@1.1.20: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.4 + for-each: 0.3.5 + get-proto: 1.0.1 + gopd: 1.2.0 + has-tostringtag: 1.0.2 workbox-background-sync@6.6.0: dependencies: @@ -9495,12 +9202,4 @@ snapshots: yaml@2.8.2: {} - yocto-queue@0.1.0: {} - - zod-validation-error@4.0.2(zod@4.3.6): - dependencies: - zod: 4.3.6 - - zod@4.3.6: {} - zwitch@2.0.4: {} diff --git a/postcss.config.js b/postcss.config.js index 483f378..52b9b4b 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,5 @@ module.exports = { plugins: { - "@tailwindcss/postcss": {}, + '@tailwindcss/postcss': {}, }, -}; +} diff --git a/prettier.config.js b/prettier.config.js deleted file mode 100644 index d573118..0000000 --- a/prettier.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - plugins: ["prettier-plugin-tailwindcss"], -}; diff --git a/scripts/build-docs.ts b/scripts/build-docs.ts index 00ff174..3672bd2 100644 --- a/scripts/build-docs.ts +++ b/scripts/build-docs.ts @@ -1,46 +1,46 @@ -import { execSync } from "child_process"; -import { mkdirSync, existsSync } from "fs"; -import { join } from "path"; +import { execSync } from 'child_process' +import { mkdirSync, existsSync } from 'fs' +import { join } from 'path' -const __dirname = new URL(".", import.meta.url).pathname; +const __dirname = new URL('.', import.meta.url).pathname -const MILKDOWN_DIR = join(__dirname, "..", "milkdown"); -const API_DIR = join(__dirname, "..", "docs", "api"); +const MILKDOWN_DIR = join(__dirname, '..', 'milkdown') +const API_DIR = join(__dirname, '..', 'docs', 'api') async function main() { try { - console.log("Getting milkdown..."); - execSync("git submodule update --remote", { stdio: "inherit" }); + console.log('Getting milkdown...') + execSync('git submodule update --remote', { stdio: 'inherit' }) // Change to milkdown directory - process.chdir(MILKDOWN_DIR); + process.chdir(MILKDOWN_DIR) // Run pnpm install - console.log("Installing dependencies..."); - execSync("pnpm install", { stdio: "inherit" }); + console.log('Installing dependencies...') + execSync('pnpm install', { stdio: 'inherit' }) // Build TypeScript files - console.log("Building TypeScript files..."); - execSync("pnpm --filter=@milkdown/dev exec tsc", { stdio: "inherit" }); - execSync("pnpm --filter=@milkdown/docs build", { stdio: "inherit" }); + console.log('Building TypeScript files...') + execSync('pnpm --filter=@milkdown/dev exec tsc', { stdio: 'inherit' }) + execSync('pnpm --filter=@milkdown/docs build', { stdio: 'inherit' }) // Ensure api directory exists if (!existsSync(API_DIR)) { - mkdirSync(API_DIR, { recursive: true }); + mkdirSync(API_DIR, { recursive: true }) } // Copy files from milkdown/docs/lib to api directory - const sourceDir = join(MILKDOWN_DIR, "docs", "lib"); - console.log("Copying files..."); + const sourceDir = join(MILKDOWN_DIR, 'docs', 'lib') + console.log('Copying files...') // Copy all markdown files - execSync(`cp ${join(sourceDir, "*.md")} ${API_DIR}`, { stdio: "inherit" }); + execSync(`cp ${join(sourceDir, '*.md')} ${API_DIR}`, { stdio: 'inherit' }) - console.log("Done!"); + console.log('Done!') } catch (error) { - console.error("Error:", error); - process.exit(1); + console.error('Error:', error) + process.exit(1) } } -main(); +main() diff --git a/src/components/doc-editor/Button.tsx b/src/components/doc-editor/Button.tsx index 33a51c9..a4e282a 100644 --- a/src/components/doc-editor/Button.tsx +++ b/src/components/doc-editor/Button.tsx @@ -1,5 +1,5 @@ -import clsx from "clsx"; -import { FC } from "react"; +import clsx from 'clsx' +import { FC } from 'react' export const Button: FC<{ primary?: boolean; icon?: string; text: string }> = ({ primary, @@ -7,11 +7,11 @@ export const Button: FC<{ primary?: boolean; icon?: string; text: string }> = ({ text, }) => { const className = clsx( - "flex h-12 items-center justify-center rounded-3xl shadow-md hover:shadow-lg pl-4 pr-6", + 'flex h-12 items-center justify-center rounded-3xl shadow-md hover:shadow-lg pl-4 pr-6', primary - ? "text-gray-50 bg-nord10 hover:bg-nord9" - : "bg-gray-200 hover:bg-gray-100 dark:bg-nord3 dark:hover:bg-nord1", - ); + ? 'text-gray-50 bg-nord10 hover:bg-nord9' + : 'bg-gray-200 hover:bg-gray-100 dark:bg-nord3 dark:hover:bg-nord1' + ) return ( - ); -}; + ) +} diff --git a/src/components/doc-editor/iframePlugin.tsx b/src/components/doc-editor/iframePlugin.tsx index 6b1975e..8ac0fa9 100644 --- a/src/components/doc-editor/iframePlugin.tsx +++ b/src/components/doc-editor/iframePlugin.tsx @@ -1,71 +1,71 @@ -import { MilkdownPlugin } from "@milkdown/kit/ctx"; -import { Node } from "@milkdown/kit/prose/model"; -import { $node } from "@milkdown/kit/utils"; -import { $remark } from "@milkdown/kit/utils"; -import directive from "remark-directive"; +import { MilkdownPlugin } from '@milkdown/kit/ctx' +import { Node } from '@milkdown/kit/prose/model' +import { $node } from '@milkdown/kit/utils' +import { $remark } from '@milkdown/kit/utils' +import directive from 'remark-directive' -const remarkPluginId = "Iframe"; +const remarkPluginId = 'Iframe' -const remarkDirective = $remark(remarkPluginId, () => directive); -const iframeNode = $node("iframe", () => ({ - group: "block", +const remarkDirective = $remark(remarkPluginId, () => directive) +const iframeNode = $node('iframe', () => ({ + group: 'block', atom: true, isolating: true, - marks: "", + marks: '', attrs: { src: { default: null }, }, parseDOM: [ { - tag: "iframe.iframe-plugin", + tag: 'iframe.iframe-plugin', getAttrs: (dom) => ({ - src: (dom as HTMLElement).getAttribute("src"), + src: (dom as HTMLElement).getAttribute('src'), }), }, ], toDOM: (node: Node) => [ - "div", - { class: "iframe-plugin-container" }, + 'div', + { class: 'iframe-plugin-container' }, [ - "a", - { href: node.attrs.src, contenteditable: false, target: "_blank" }, + 'a', + { href: node.attrs.src, contenteditable: false, target: '_blank' }, [ - "span", + 'span', { - class: "material-symbols-outlined", + class: 'material-symbols-outlined', }, - "open_in_new", + 'open_in_new', ], - "Open in Stackblitz", + 'Open in Stackblitz', ], [ - "iframe", + 'iframe', { contenteditable: false, - class: "iframe-plugin", + class: 'iframe-plugin', src: `${node.attrs.src}?embed=1&view=preview&ctl=1`, }, 0, ], ], parseMarkdown: { - match: (node) => node.type === "leafDirective" && node.name === "iframe", + match: (node) => node.type === 'leafDirective' && node.name === 'iframe', runner: (state, node, type) => { - state.addNode(type, { src: (node.attributes as { src: string }).src }); + state.addNode(type, { src: (node.attributes as { src: string }).src }) }, }, toMarkdown: { - match: (node) => node.type.name === "iframe", + match: (node) => node.type.name === 'iframe', runner: (state, node) => { - state.addNode("leafDirective", undefined, undefined, { - name: "iframe", + state.addNode('leafDirective', undefined, undefined, { + name: 'iframe', attributes: { src: node.attrs.src }, - }); + }) }, }, -})); +})) export const iframePlugin: MilkdownPlugin[] = [ remarkDirective, iframeNode, -].flat(); +].flat() diff --git a/src/components/doc-editor/index.tsx b/src/components/doc-editor/index.tsx index ff72686..2d9b9c0 100644 --- a/src/components/doc-editor/index.tsx +++ b/src/components/doc-editor/index.tsx @@ -1,29 +1,29 @@ -import { Crepe } from "@milkdown/crepe"; -import { editorViewCtx, editorViewOptionsCtx } from "@milkdown/kit/core"; -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; -import { outline } from "@milkdown/kit/utils"; -import { eclipse } from "@uiw/codemirror-theme-eclipse"; -import { FC, useEffect, useRef, useState } from "react"; +import { Crepe } from '@milkdown/crepe' +import { editorViewCtx, editorViewOptionsCtx } from '@milkdown/kit/core' +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' +import { outline } from '@milkdown/kit/utils' +import { eclipse } from '@uiw/codemirror-theme-eclipse' +import { FC, useEffect, useRef, useState } from 'react' -import Outline from "@/components/outline"; -import { useDarkMode } from "@/providers"; +import Outline from '@/components/outline' +import { useDarkMode } from '@/providers' -import { useToast } from "../toast"; -import { Button } from "./Button"; -import { iframePlugin } from "./iframePlugin"; +import { useToast } from '../toast' +import { Button } from './Button' +import { iframePlugin } from './iframePlugin' const Doc: FC<{ content: string; url: string }> = ({ content, url }) => { const [outlines, setOutlines] = useState< { text: string; level: number; id: string }[] - >([]); - const darkMode = useDarkMode(); - const divRef = useRef(null); - const toast = useToast(); - const loading = useRef(false); + >([]) + const darkMode = useDarkMode() + const divRef = useRef(null) + const toast = useToast() + const loading = useRef(false) useEffect(() => { - if (!divRef.current || loading.current) return; - loading.current = true; + if (!divRef.current || loading.current) return + loading.current = true const crepe = new Crepe({ root: divRef.current, defaultValue: content, @@ -37,43 +37,43 @@ const Doc: FC<{ content: string; url: string }> = ({ content, url }) => { }, [Crepe.Feature.LinkTooltip]: { onCopyLink: () => { - toast("Link copied", "success"); + toast('Link copied', 'success') }, }, }, - }); - const editor = crepe.editor; + }) + const editor = crepe.editor editor .config((ctx) => { ctx.set(editorViewOptionsCtx, { attributes: { - class: "w-full max-w-full box-border p-4", - spellcheck: "false", + class: 'w-full max-w-full box-border p-4', + spellcheck: 'false', }, - }); + }) ctx .get(listenerCtx) .mounted((ctx) => { - setOutlines(outline()(ctx)); + setOutlines(outline()(ctx)) }) .markdownUpdated((ctx) => { - const view = ctx.get(editorViewCtx); - if (view.state?.doc) setOutlines(outline()(ctx)); - }); + const view = ctx.get(editorViewCtx) + if (view.state?.doc) setOutlines(outline()(ctx)) + }) }) .use(iframePlugin) - .use(listener); + .use(listener) crepe.create().then(() => { - loading.current = false; - }); + loading.current = false + }) return () => { - if (loading.current) return; - crepe.destroy(); - }; - }, [content, darkMode, toast]); + if (loading.current) return + crepe.destroy() + } + }, [content, darkMode, toast]) return ( <> @@ -85,7 +85,7 @@ const Doc: FC<{ content: string; url: string }> = ({ content, url }) => {
- ); -}; + ) +} -export default Doc; +export default Doc diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 437d83c..7a2fa2d 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -1,16 +1,16 @@ -import clsx from "clsx"; -import Image from "next/image"; -import Link from "next/link"; -import { FC } from "react"; +import clsx from 'clsx' +import Image from 'next/image' +import Link from 'next/link' +import { FC } from 'react' -import { Discord, Github, Twitter } from "@/components/svg-icon"; +import { Discord, Github, Twitter } from '@/components/svg-icon' -import vercelBanner from "./vercel-banner.svg"; +import vercelBanner from './vercel-banner.svg' type LinkGroupsProps = { - title: string; - items: Array<{ text: string; link: string }>; -}; + title: string + items: Array<{ text: string; link: string }> +} const LinkGroups: FC = ({ title, items }) => { return ( @@ -20,61 +20,61 @@ const LinkGroups: FC = ({ title, items }) => { ))}
- ); -}; + ) +} const linksGroup = { - title: "Links", + title: 'Links', items: [ { - text: "Prosemirror", - link: "https://prosemirror.net/", + text: 'Prosemirror', + link: 'https://prosemirror.net/', }, { - text: "Remark", - link: "https://remark.js.org/", + text: 'Remark', + link: 'https://remark.js.org/', }, { - text: "Markdown", - link: "https://en.wikipedia.org/wiki/Markdown", + text: 'Markdown', + link: 'https://en.wikipedia.org/wiki/Markdown', }, ], -}; +} const moreGroup = { - title: "More", + title: 'More', items: [ { - text: "License", - link: "https://github.com/Milkdown/milkdown/blob/main/LICENSE", + text: 'License', + link: 'https://github.com/Milkdown/milkdown/blob/main/LICENSE', }, { - text: "Contributors", - link: "https://github.com/Milkdown/milkdown/graphs/contributors", + text: 'Contributors', + link: 'https://github.com/Milkdown/milkdown/graphs/contributors', }, { - text: "Code of Conduct", - link: "https://github.com/Milkdown/milkdown/blob/main/CODE_OF_CONDUCT.md", + text: 'Code of Conduct', + link: 'https://github.com/Milkdown/milkdown/blob/main/CODE_OF_CONDUCT.md', }, ], -}; +} const Footer: FC = () => { - const root = "/"; + const root = '/' return (
@@ -134,10 +134,10 @@ const Footer: FC = () => {
MIT Licensed | Copyright © 2021-present Mirone ♡ Meo @@ -146,7 +146,7 @@ const Footer: FC = () => {
- ); -}; + ) +} -export default Footer; +export default Footer diff --git a/src/components/header/desktop/Dropdown.tsx b/src/components/header/desktop/Dropdown.tsx index cc1499d..7667e00 100644 --- a/src/components/header/desktop/Dropdown.tsx +++ b/src/components/header/desktop/Dropdown.tsx @@ -1,45 +1,45 @@ -import clsx from "clsx"; -import Link from "next/link"; -import { useRouter } from "next/router"; -import { FC } from "react"; +import clsx from 'clsx' +import Link from 'next/link' +import { useRouter } from 'next/router' +import { FC } from 'react' -import { DocConfigItem } from "@/routes"; -import { toTitle } from "@/utils/title"; +import { DocConfigItem } from '@/routes' +import { toTitle } from '@/utils/title' -type DropdownProps = DocConfigItem & {}; +type DropdownProps = DocConfigItem & {} const DropdownItem: FC<{ scope: string; item: string }> = ({ scope, item }) => { - const router = useRouter(); - const location = router.asPath; - const url = `/docs/${scope}/${item}`; - const pathname = location.split("#")[0]; - const active = pathname === url; + const router = useRouter() + const location = router.asPath + const url = `/docs/${scope}/${item}` + const pathname = location.split('#')[0] + const active = pathname === url return (
  • {toTitle(item)}
  • - ); -}; + ) +} export const Dropdown: FC = ({ scope, items }) => { return (
      @@ -48,5 +48,5 @@ export const Dropdown: FC = ({ scope, items }) => { ))}
    - ); -}; + ) +} diff --git a/src/components/header/desktop/DropdownWithLabel.tsx b/src/components/header/desktop/DropdownWithLabel.tsx index d6c90e8..458d9aa 100644 --- a/src/components/header/desktop/DropdownWithLabel.tsx +++ b/src/components/header/desktop/DropdownWithLabel.tsx @@ -1,44 +1,44 @@ -import clsx from "clsx"; -import Link from "next/link"; -import { useRouter } from "next/router"; -import { FC } from "react"; +import clsx from 'clsx' +import Link from 'next/link' +import { useRouter } from 'next/router' +import { FC } from 'react' -import { APIConfigItem } from "@/routes"; -import { toTitle } from "@/utils/title"; +import { APIConfigItem } from '@/routes' +import { toTitle } from '@/utils/title' type DropdownWithLabelProps = { - scope: string; - items: APIConfigItem[]; -}; + scope: string + items: APIConfigItem[] +} const LabeledItem: FC<{ scope: string; item: string; label: string }> = ({ scope, item, label, }) => { - const router = useRouter(); - const location = router.asPath; - const url = `/docs/${scope}/${item}`; - const pathname = location.split("#")[0]; - const active = pathname === url; + const router = useRouter() + const location = router.asPath + const url = `/docs/${scope}/${item}` + const pathname = location.split('#')[0] + const active = pathname === url const text = item.toLowerCase().startsWith(`${label.toLowerCase()}-`) ? item.slice(label.length + 1) - : item; + : item return (
  • {toTitle(text)}
  • - ); -}; + ) +} const LabeledItemList: FC = ({ label, @@ -56,8 +56,8 @@ const LabeledItemList: FC = ({ ))} - ); -}; + ) +} export const DropdownWithLabel: FC = ({ items, @@ -66,15 +66,15 @@ export const DropdownWithLabel: FC = ({ return (
    {items.map((item) => ( ))}
    - ); -}; + ) +} diff --git a/src/components/header/desktop/TextButton.tsx b/src/components/header/desktop/TextButton.tsx index 648c07c..82ea03e 100644 --- a/src/components/header/desktop/TextButton.tsx +++ b/src/components/header/desktop/TextButton.tsx @@ -1,14 +1,14 @@ -import { offset } from "@floating-ui/dom"; +import { offset } from '@floating-ui/dom' import { safePolygon, useFloating, useHover, useInteractions, -} from "@floating-ui/react"; -import clsx from "clsx"; -import Link from "next/link"; -import { useRouter } from "next/router"; -import { FC, ReactNode, useState } from "react"; +} from '@floating-ui/react' +import clsx from 'clsx' +import Link from 'next/link' +import { useRouter } from 'next/router' +import { FC, ReactNode, useState } from 'react' const Dropdown: FC = () => { return ( @@ -20,56 +20,56 @@ const Dropdown: FC = () => { > - ); -}; + ) +} const className = clsx( - "flex items-center justify-center", - "rounded-sm px-2 py-1.5", - "text-nord-neutral dark:text-nord-neutral-dark", - "fill-nord-neutral dark:fill-nord-neutral-dark", - "transition hover:bg-nord-outline/80 dark:hover:bg-nord-outline-dark/80", -); + 'flex items-center justify-center', + 'rounded-sm px-2 py-1.5', + 'text-nord-neutral dark:text-nord-neutral-dark', + 'fill-nord-neutral dark:fill-nord-neutral-dark', + 'transition hover:bg-nord-outline/80 dark:hover:bg-nord-outline-dark/80' +) type TextLinkButtonProps = { - text: string; - link: string; -}; + text: string + link: string +} export const TextLinkButton: FC = ({ link, text }) => { - const router = useRouter(); - const scope = router.route.slice(1); - const active = scope === text.toLowerCase(); + const router = useRouter() + const scope = router.route.slice(1) + const active = scope === text.toLowerCase() return ( {text} - ); -}; + ) +} type TextButtonProps = { - text: string; - children: ReactNode; -}; + text: string + children: ReactNode +} export const TextButton: FC = ({ text, children }) => { - const [isOpen, setIsOpen] = useState(false); + const [isOpen, setIsOpen] = useState(false) const { refs, floatingStyles, context } = useFloating({ open: isOpen, onOpenChange: setIsOpen, middleware: [offset(10)], - }); - const router = useRouter(); - const scope = router.query.scope; - const active = scope === text.toLowerCase(); + }) + const router = useRouter() + const scope = router.query.scope + const active = scope === text.toLowerCase() const hover = useHover(context, { handleClose: safePolygon(), - }); - const { getReferenceProps, getFloatingProps } = useInteractions([hover]); + }) + const { getReferenceProps, getFloatingProps } = useInteractions([hover]) return ( <> - ); -}; + ) +} type LinkButtonProps = { - text: string; - link: string; -}; + text: string + link: string +} export const LinkButton: FC = ({ text, link }) => { - const router = useRouter(); - const path = router.asPath; + const router = useRouter() + const path = router.asPath return ( {text} - ); -}; + ) +} diff --git a/src/components/header/mobile/atom.ts b/src/components/header/mobile/atom.ts index 9fc8243..1ece0ef 100644 --- a/src/components/header/mobile/atom.ts +++ b/src/components/header/mobile/atom.ts @@ -1,4 +1,4 @@ -import { atom } from "jotai"; +import { atom } from 'jotai' -export const mobileSidebarOpen = atom(false); -export const mobileSidebarScope = atom(""); +export const mobileSidebarOpen = atom(false) +export const mobileSidebarScope = atom('') diff --git a/src/components/header/mobile/index.tsx b/src/components/header/mobile/index.tsx index 5b3612b..c526861 100644 --- a/src/components/header/mobile/index.tsx +++ b/src/components/header/mobile/index.tsx @@ -1,18 +1,18 @@ -import clsx from "clsx"; -import { useAtom, useAtomValue } from "jotai"; -import { FC } from "react"; -import { createPortal } from "react-dom"; +import clsx from 'clsx' +import { useAtom, useAtomValue } from 'jotai' +import { FC } from 'react' +import { createPortal } from 'react-dom' -import { apiConfigByCategory, docConfig, scopeTitleMap } from "@/routes"; -import { toTitle } from "@/utils/title"; +import { apiConfigByCategory, docConfig, scopeTitleMap } from '@/routes' +import { toTitle } from '@/utils/title' -import { SystemButtonGroup } from "../shared/SystemButtonGroup"; -import { mobileSidebarOpen, mobileSidebarScope } from "./atom"; -import { LinkButton, NavButton } from "./NavButton"; -import { useSidebar } from "./useSidebar"; +import { SystemButtonGroup } from '../shared/SystemButtonGroup' +import { mobileSidebarOpen, mobileSidebarScope } from './atom' +import { LinkButton, NavButton } from './NavButton' +import { useSidebar } from './useSidebar' const ScopeList: FC = () => { - const scope = useAtomValue(mobileSidebarScope); + const scope = useAtomValue(mobileSidebarScope) if (!scope) { return ( @@ -24,10 +24,10 @@ const ScopeList: FC = () => { - ); + ) } - if (scope === "api") { + if (scope === 'api') { return ( <> {apiConfigByCategory.map((category) => ( @@ -37,28 +37,28 @@ const ScopeList: FC = () => {
      {category.items.map((item) => { - const { label } = category; + const { label } = category const text = item .toLowerCase() .startsWith(`${label.toLowerCase()}-`) ? item.slice(label.length + 1) - : item; + : item return ( - ); + ) })}
    ))} - ); + ) } - const config = docConfig.find((cfg) => cfg.scope === scope); + const config = docConfig.find((cfg) => cfg.scope === scope) return ( <> @@ -70,37 +70,37 @@ const ScopeList: FC = () => { /> ))} - ); -}; + ) +} export const MobileNav: FC = () => { - const [scope, setScope] = useAtom(mobileSidebarScope); - const [open, setOpen] = useAtom(mobileSidebarOpen); + const [scope, setScope] = useAtom(mobileSidebarScope) + const [open, setOpen] = useAtom(mobileSidebarOpen) - const { buttonRef, sidebarRef } = useSidebar(); + const { buttonRef, sidebarRef } = useSidebar() const title = - typeof scope === "string" ? scopeTitleMap[scope] || "Menu" : "Menu"; + typeof scope === 'string' ? scopeTitleMap[scope] || 'Menu' : 'Menu' const renderSidebarElement = () => { return ( - ); - }; + ) + } return (
    @@ -136,9 +136,9 @@ export const MobileNav: FC = () => { >
    Menu
    - {typeof window !== "undefined" + {typeof window !== 'undefined' ? createPortal(renderSidebarElement(), document.body) : renderSidebarElement()}
    - ); -}; + ) +} diff --git a/src/components/header/mobile/useSidebar.ts b/src/components/header/mobile/useSidebar.ts index f435a99..a882fc2 100644 --- a/src/components/header/mobile/useSidebar.ts +++ b/src/components/header/mobile/useSidebar.ts @@ -1,54 +1,54 @@ -import { useAtom, useSetAtom } from "jotai"; -import { useAtomCallback } from "jotai/utils"; -import { useRouter } from "next/router"; -import { useCallback, useEffect, useRef } from "react"; +import { useAtom, useSetAtom } from 'jotai' +import { useAtomCallback } from 'jotai/utils' +import { useRouter } from 'next/router' +import { useCallback, useEffect, useRef } from 'react' -import { mobileSidebarOpen, mobileSidebarScope } from "./atom"; +import { mobileSidebarOpen, mobileSidebarScope } from './atom' export function useSidebar() { - const [open, setOpen] = useAtom(mobileSidebarOpen); - const setScope = useSetAtom(mobileSidebarScope); - const buttonRef = useRef(null); - const sidebarRef = useRef(null); - const router = useRouter(); - const location = router.asPath; - const scope = router.query.scope; + const [open, setOpen] = useAtom(mobileSidebarOpen) + const setScope = useSetAtom(mobileSidebarScope) + const buttonRef = useRef(null) + const sidebarRef = useRef(null) + const router = useRouter() + const location = router.asPath + const scope = router.query.scope const closeCallback = useAtomCallback( useCallback((get, set, event: Event) => { - const target = event.target as HTMLElement; - const open = get(mobileSidebarOpen); + const target = event.target as HTMLElement + const open = get(mobileSidebarOpen) if (open) { if ( sidebarRef.current?.contains(target) || buttonRef.current?.contains(target) ) { - return; + return } - event.preventDefault(); - set(mobileSidebarOpen, false); + event.preventDefault() + set(mobileSidebarOpen, false) } - return; - }, []), - ); + return + }, []) + ) useEffect(() => { - setOpen(false); - }, [setOpen, location]); + setOpen(false) + }, [setOpen, location]) useEffect(() => { - window.addEventListener("click", closeCallback, { capture: true }); + window.addEventListener('click', closeCallback, { capture: true }) return () => { - window.removeEventListener("click", closeCallback); - }; - }, [closeCallback]); + window.removeEventListener('click', closeCallback) + } + }, [closeCallback]) useEffect(() => { - document.body.classList.toggle("overflow-y-hidden", open); + document.body.classList.toggle('overflow-y-hidden', open) if (!open) { - setScope(typeof scope === "string" ? scope : ""); + setScope(typeof scope === 'string' ? scope : '') } - }, [open, scope, setScope]); + }, [open, scope, setScope]) - return { buttonRef, sidebarRef }; + return { buttonRef, sidebarRef } } diff --git a/src/components/header/shared/SystemButtonGroup.tsx b/src/components/header/shared/SystemButtonGroup.tsx index 02d45e8..1d99004 100644 --- a/src/components/header/shared/SystemButtonGroup.tsx +++ b/src/components/header/shared/SystemButtonGroup.tsx @@ -1,9 +1,9 @@ -import docsearch from "@docsearch/js"; -import clsx from "clsx"; -import { FC, ReactNode, useEffect, useRef } from "react"; +import docsearch from '@docsearch/js' +import clsx from 'clsx' +import { FC, ReactNode, useEffect, useRef } from 'react' -import { Github } from "@/components/svg-icon"; -import { useDocSearch, useSetDarkMode } from "@/providers"; +import { Github } from '@/components/svg-icon' +import { useDocSearch, useSetDarkMode } from '@/providers' const SystemButtonItem: FC<{ children: ReactNode; onClick?: () => void }> = ({ children, @@ -13,33 +13,33 @@ const SystemButtonItem: FC<{ children: ReactNode; onClick?: () => void }> = ({
    {children}
    - ); -}; + ) +} export const SystemButtonGroup = () => { - const setDarkMode = useSetDarkMode(); - const container = useRef(null); - const docSearchConfig = useDocSearch(); + const setDarkMode = useSetDarkMode() + const container = useRef(null) + const docSearchConfig = useDocSearch() useEffect(() => { - if (docsearch && typeof docsearch === "function" && container.current) { + if (docsearch && typeof docsearch === 'function' && container.current) { docsearch({ ...docSearchConfig, container: container.current, - }); + }) } - }, [docSearchConfig]); + }, [docSearchConfig]) return (
    @@ -59,5 +59,5 @@ export const SystemButtonGroup = () => {
    dark_mode
    - ); -}; + ) +} diff --git a/src/components/home-editor/index.tsx b/src/components/home-editor/index.tsx index f6368e4..63e2e78 100644 --- a/src/components/home-editor/index.tsx +++ b/src/components/home-editor/index.tsx @@ -1,16 +1,16 @@ -import { Crepe } from "@milkdown/crepe"; -import { FC, useLayoutEffect, useRef } from "react"; +import { Crepe } from '@milkdown/crepe' +import { FC, useLayoutEffect, useRef } from 'react' -import { useToast } from "../toast"; +import { useToast } from '../toast' const HomeEditor: FC<{ value: string }> = ({ value }) => { - const divRef = useRef(null); - const loading = useRef(false); - const toast = useToast(); + const divRef = useRef(null) + const loading = useRef(false) + const toast = useToast() useLayoutEffect(() => { - if (!divRef.current) return; - loading.current = true; + if (!divRef.current) return + loading.current = true const crepe = new Crepe({ root: divRef.current, defaultValue: value, @@ -22,26 +22,26 @@ const HomeEditor: FC<{ value: string }> = ({ value }) => { featureConfigs: { [Crepe.Feature.LinkTooltip]: { onCopyLink: () => { - toast("Link copied", "success"); + toast('Link copied', 'success') }, }, }, - }); + }) crepe.create().then(() => { - loading.current = false; - }); + loading.current = false + }) return () => { - crepe.destroy(); - }; - }, [toast, value]); + crepe.destroy() + } + }, [toast, value]) return (
    - ); -}; + ) +} -export default HomeEditor; +export default HomeEditor diff --git a/src/components/home/Button.tsx b/src/components/home/Button.tsx index c51e2c3..d35bd7e 100644 --- a/src/components/home/Button.tsx +++ b/src/components/home/Button.tsx @@ -1,5 +1,5 @@ -import clsx from "clsx"; -import { FC } from "react"; +import clsx from 'clsx' +import { FC } from 'react' export const Button: FC<{ primary?: boolean; icon?: string; text: string }> = ({ primary, @@ -7,10 +7,10 @@ export const Button: FC<{ primary?: boolean; icon?: string; text: string }> = ({ text, }) => { const className = clsx( - "w-full flex font-semibold text-base items-center justify-center rounded-full transition-all", - "px-10 py-3 sm:px-12 sm:py-4", - primary ? "button-primary main-button" : "button-default main-button", - ); + 'w-full flex font-semibold text-base items-center justify-center rounded-full transition-all', + 'px-10 py-3 sm:px-12 sm:py-4', + primary ? 'button-primary main-button' : 'button-default main-button' + ) return ( - ); -}; + ) +} diff --git a/src/components/home/InfoCard.tsx b/src/components/home/InfoCard.tsx index 5284037..2e35a40 100644 --- a/src/components/home/InfoCard.tsx +++ b/src/components/home/InfoCard.tsx @@ -1,21 +1,21 @@ -import clsx from "clsx"; -import { FC } from "react"; +import clsx from 'clsx' +import { FC } from 'react' export const InfoCard: FC<{ - title: string; - desc: string; - emoji: string; + title: string + desc: string + emoji: string }> = ({ emoji, title, desc }) => { return (
    {emoji}
    {title}

    {desc}

    - ); -}; + ) +} diff --git a/src/components/liquid/index.tsx b/src/components/liquid/index.tsx index 6b4de57..f0270a1 100644 --- a/src/components/liquid/index.tsx +++ b/src/components/liquid/index.tsx @@ -1,19 +1,19 @@ -import clsx from "clsx"; -import { FC, ReactNode } from "react"; +import clsx from 'clsx' +import { FC, ReactNode } from 'react' -import styles from "./style.module.css"; +import styles from './style.module.css' export const Liquid: FC<{ children: ReactNode }> = ({ children }) => { return (
    -
    +
    = ({ children }) => {
    {children}
    - ); -}; + ) +} diff --git a/src/components/loading/index.tsx b/src/components/loading/index.tsx index c2ebc5a..a01cf69 100644 --- a/src/components/loading/index.tsx +++ b/src/components/loading/index.tsx @@ -1,9 +1,9 @@ -import HashLoader from "react-spinners/HashLoader"; +import HashLoader from 'react-spinners/HashLoader' export default function Loading() { return (
    - ); + ) } diff --git a/src/components/outline/index.tsx b/src/components/outline/index.tsx index fed76eb..81ab765 100644 --- a/src/components/outline/index.tsx +++ b/src/components/outline/index.tsx @@ -1,48 +1,48 @@ -import type { FC, ReactNode } from "react"; +import type { FC, ReactNode } from 'react' -import clsx from "clsx"; -import Link from "next/link"; -import { useRouter } from "next/router"; -import { useEffect, useState } from "react"; +import clsx from 'clsx' +import Link from 'next/link' +import { useRouter } from 'next/router' +import { useEffect, useState } from 'react' -import { useLinkClass } from "@/hooks"; +import { useLinkClass } from '@/hooks' -type OutlineItem = { text: string; level: number; id: string }; +type OutlineItem = { text: string; level: number; id: string } const NestedDiv: FC<{ level: number; children: ReactNode }> = ({ level, children, }) => { - if (level === 0) return <>{children}; + if (level === 0) return <>{children} return ( -
    1 && "pl-4")}> +
    1 && 'pl-4')}> {children}
    - ); -}; + ) +} function Outline(props: { items: OutlineItem[] }) { - const { items } = props; - const router = useRouter(); - const [hash, setHash] = useState(""); - const linkClass = useLinkClass(); + const { items } = props + const router = useRouter() + const [hash, setHash] = useState('') + const linkClass = useLinkClass() useEffect(() => { const onHashChange = () => { - const url = window.location.hash; - const [_, hash = ""] = url.split("#"); - setHash(hash); - }; + const url = window.location.hash + const [_, hash = ''] = url.split('#') + setHash(hash) + } - onHashChange(); + onHashChange() - window.addEventListener("hashchange", onHashChange); + window.addEventListener('hashchange', onHashChange) return () => { - window.removeEventListener("hashchange", onHashChange); - }; - }, [router]); + window.removeEventListener('hashchange', onHashChange) + } + }, [router]) return (
      @@ -53,23 +53,23 @@ function Outline(props: { items: OutlineItem[] }) { {items .filter((item) => item.level <= 2) .map((item) => { - const url = `#${item.id}`; + const url = `#${item.id}` return (
      {item.text}
      - ); + ) })}
    - ); + ) } -export default Outline; +export default Outline diff --git a/src/components/playground/ControlPanel.tsx b/src/components/playground/ControlPanel.tsx index 1fcfb81..9c7bc86 100644 --- a/src/components/playground/ControlPanel.tsx +++ b/src/components/playground/ControlPanel.tsx @@ -1,37 +1,37 @@ -import type { FC } from "react"; +import type { FC } from 'react' -import clsx from "clsx"; -import { useAtomValue } from "jotai"; +import clsx from 'clsx' +import { useAtomValue } from 'jotai' -import { crepeAPI } from "@/components/playground/atom"; -import { useLinkClass } from "@/hooks"; +import { crepeAPI } from '@/components/playground/atom' +import { useLinkClass } from '@/hooks' -import type { CodemirrorProps } from "./codemirror"; +import type { CodemirrorProps } from './codemirror' -import pkgJson from "../../../package.json"; -import { Codemirror } from "./codemirror"; +import pkgJson from '../../../package.json' +import { Codemirror } from './codemirror' interface ControlPanelProps extends CodemirrorProps { - hide: boolean; - setHide: (hide: boolean) => void; + hide: boolean + setHide: (hide: boolean) => void } const ControlPanel: FC = ({ hide, onChange, setHide }) => { - const linkClass = useLinkClass(); - const { onShare } = useAtomValue(crepeAPI); + const linkClass = useLinkClass() + const { onShare } = useAtomValue(crepeAPI) if (hide) { return (
    - ); + ) } return ( @@ -61,8 +61,8 @@ const ControlPanel: FC = ({ hide, onChange, setHide }) => { onClick={() => setHide(true)} className={clsx( linkClass(false), - "flex h-8 w-8 items-center justify-center rounded-full", - "hover:bg-nord6/70 dark:hover:bg-nord3/70", + 'flex h-8 w-8 items-center justify-center rounded-full', + 'hover:bg-nord6/70 dark:hover:bg-nord3/70' )} > @@ -72,7 +72,7 @@ const ControlPanel: FC = ({ hide, onChange, setHide }) => {
    Milkdown Playground - v{pkgJson.dependencies["@milkdown/kit"]} + v{pkgJson.dependencies['@milkdown/kit']}
    @@ -81,8 +81,8 @@ const ControlPanel: FC = ({ hide, onChange, setHide }) => { onClick={() => onShare()} className={clsx( linkClass(false), - "flex h-8 w-8 items-center justify-center rounded-full", - "hover:bg-nord6/70 dark:hover:bg-nord3/70", + 'flex h-8 w-8 items-center justify-center rounded-full', + 'hover:bg-nord6/70 dark:hover:bg-nord3/70' )} > share @@ -91,7 +91,7 @@ const ControlPanel: FC = ({ hide, onChange, setHide }) => {
    - ); -}; + ) +} -export default ControlPanel; +export default ControlPanel diff --git a/src/components/playground/Crepe.tsx b/src/components/playground/Crepe.tsx index 827ce07..f2e9685 100644 --- a/src/components/playground/Crepe.tsx +++ b/src/components/playground/Crepe.tsx @@ -1,37 +1,37 @@ -import { Crepe } from "@milkdown/crepe"; -import { editorViewCtx, parserCtx } from "@milkdown/kit/core"; -import { listener, listenerCtx } from "@milkdown/kit/plugin/listener"; -import { Slice } from "@milkdown/kit/prose/model"; -import { Selection } from "@milkdown/kit/prose/state"; -import { getMarkdown } from "@milkdown/kit/utils"; -import { eclipse } from "@uiw/codemirror-theme-eclipse"; -import { useAtomValue, useSetAtom } from "jotai"; -import throttle from "lodash.throttle"; -import { FC, MutableRefObject, useLayoutEffect, useRef } from "react"; +import { Crepe } from '@milkdown/crepe' +import { editorViewCtx, parserCtx } from '@milkdown/kit/core' +import { listener, listenerCtx } from '@milkdown/kit/plugin/listener' +import { Slice } from '@milkdown/kit/prose/model' +import { Selection } from '@milkdown/kit/prose/state' +import { getMarkdown } from '@milkdown/kit/utils' +import { eclipse } from '@uiw/codemirror-theme-eclipse' +import { useAtomValue, useSetAtom } from 'jotai' +import throttle from 'lodash.throttle' +import { FC, MutableRefObject, useLayoutEffect, useRef } from 'react' -import { useToast } from "@/components/toast"; -import { useDarkMode } from "@/providers"; -import { encode } from "@/utils/share"; +import { useToast } from '@/components/toast' +import { useDarkMode } from '@/providers' +import { encode } from '@/utils/share' -import { crepeAPI, markdown } from "./atom"; +import { crepeAPI, markdown } from './atom' interface MilkdownProps { - onChange: (markdown: string) => void; + onChange: (markdown: string) => void } const CrepeEditor: FC = ({ onChange }) => { - const crepeRef = useRef(null); - const darkMode = useDarkMode(); - const divRef = useRef(null); - const loading = useRef(false); - const toast = useToast(); - const content = useAtomValue(markdown); - const setCrepeAPI = useSetAtom(crepeAPI); + const crepeRef = useRef(null) + const darkMode = useDarkMode() + const divRef = useRef(null) + const loading = useRef(false) + const toast = useToast() + const content = useAtomValue(markdown) + const setCrepeAPI = useSetAtom(crepeAPI) useLayoutEffect(() => { - if (!divRef.current || loading.current) return; + if (!divRef.current || loading.current) return - loading.current = true; + loading.current = true const crepe = new Crepe({ root: divRef.current, defaultValue: content, @@ -41,78 +41,78 @@ const CrepeEditor: FC = ({ onChange }) => { }, [Crepe.Feature.LinkTooltip]: { onCopyLink: () => { - toast("Link copied", "success"); + toast('Link copied', 'success') }, }, }, - }); + }) crepe.editor .config((ctx) => { ctx.get(listenerCtx).markdownUpdated( throttle((_, markdown) => { - onChange(markdown); - }, 200), - ); + onChange(markdown) + }, 200) + ) }) - .use(listener); + .use(listener) crepe.create().then(() => { - (crepeRef as MutableRefObject).current = crepe; - loading.current = false; - }); + ;(crepeRef as MutableRefObject).current = crepe + loading.current = false + }) setCrepeAPI({ loaded: true, onShare: () => { - const content = crepe.editor.action(getMarkdown()); - const base64 = encode(content); + const content = crepe.editor.action(getMarkdown()) + const base64 = encode(content) - const url = new URL(location.href); - url.searchParams.set("text", base64); + const url = new URL(location.href) + url.searchParams.set('text', base64) navigator.clipboard.writeText(url.toString()).then(() => { - toast("Share link copied.", "success"); - }); - window.history.pushState({}, "", url.toString()); + toast('Share link copied.', 'success') + }) + window.history.pushState({}, '', url.toString()) }, update: (markdown: string) => { - const crepe = crepeRef.current; - if (!crepe) return; - if (crepe.getMarkdown() === markdown) return; + const crepe = crepeRef.current + if (!crepe) return + if (crepe.getMarkdown() === markdown) return crepe.editor.action((ctx) => { - const view = ctx.get(editorViewCtx); - const parser = ctx.get(parserCtx); - const doc = parser(markdown); - if (!doc) return; - const state = view.state; - const selection = state.selection; - const { from } = selection; - let tr = state.tr; + const view = ctx.get(editorViewCtx) + const parser = ctx.get(parserCtx) + const doc = parser(markdown) + if (!doc) return + const state = view.state + const selection = state.selection + const { from } = selection + let tr = state.tr tr = tr.replace( 0, state.doc.content.size, - new Slice(doc.content, 0, 0), - ); - const docSize = doc.content.size; - const safeFrom = Math.min(from, docSize - 2); - tr = tr.setSelection(Selection.near(tr.doc.resolve(safeFrom))); - view.dispatch(tr); - }); + new Slice(doc.content, 0, 0) + ) + const docSize = doc.content.size + const safeFrom = Math.min(from, docSize - 2) + tr = tr.setSelection(Selection.near(tr.doc.resolve(safeFrom))) + view.dispatch(tr) + }) }, - }); + }) return () => { - if (loading.current) return; - crepe.destroy(); + if (loading.current) return + crepe.destroy() setCrepeAPI({ loaded: false, onShare: () => {}, update: () => {}, - }); - }; - }, [content, darkMode, onChange, setCrepeAPI, toast]); + }) + } + }, [content, darkMode, onChange, setCrepeAPI, toast]) - return
    ; -}; + return
    +} -export default CrepeEditor; +export default CrepeEditor diff --git a/src/components/playground/atom.ts b/src/components/playground/atom.ts index d456ddc..d4cb45d 100644 --- a/src/components/playground/atom.ts +++ b/src/components/playground/atom.ts @@ -1,24 +1,24 @@ -import { atom } from "jotai"; +import { atom } from 'jotai' -export const markdown = atom(""); +export const markdown = atom('') export const crepeAPI = atom<{ - loaded: boolean; - onShare: () => void; - update: (markdown: string) => void; + loaded: boolean + onShare: () => void + update: (markdown: string) => void }>({ loaded: false, onShare: () => {}, update: () => {}, -}); +}) export const cmAPI = atom<{ - loaded: boolean; - update: (markdown: string) => void; + loaded: boolean + update: (markdown: string) => void }>({ loaded: false, update: () => {}, -}); +}) -export type FocusType = "crepe" | "cm" | null; -export const focus = atom(null); +export type FocusType = 'crepe' | 'cm' | null +export const focus = atom(null) diff --git a/src/components/playground/codemirror/index.tsx b/src/components/playground/codemirror/index.tsx index 088e89a..f06c5a4 100644 --- a/src/components/playground/codemirror/index.tsx +++ b/src/components/playground/codemirror/index.tsx @@ -1,23 +1,23 @@ -import { useAtomValue, useSetAtom } from "jotai"; -import { FC, useLayoutEffect, useRef } from "react"; +import { useAtomValue, useSetAtom } from 'jotai' +import { FC, useLayoutEffect, useRef } from 'react' -import { useDarkMode } from "@/providers"; +import { useDarkMode } from '@/providers' -import { cmAPI, markdown, focus } from "../atom"; -import { createCodeMirrorState, createCodeMirrorView } from "./setup"; +import { cmAPI, markdown, focus } from '../atom' +import { createCodeMirrorState, createCodeMirrorView } from './setup' export interface CodemirrorProps { - onChange: (getString: () => string) => void; + onChange: (getString: () => string) => void } export const Codemirror: FC = ({ onChange }) => { - const divRef = useRef(null); - const dark = useDarkMode(); - const content = useAtomValue(markdown); - const setCmAPI = useSetAtom(cmAPI); - const setFocus = useSetAtom(focus); + const divRef = useRef(null) + const dark = useDarkMode() + const content = useAtomValue(markdown) + const setCmAPI = useSetAtom(cmAPI) + const setFocus = useSetAtom(focus) useLayoutEffect(() => { - if (!divRef.current) return; + if (!divRef.current) return const editor = createCodeMirrorView({ root: divRef.current, @@ -25,7 +25,7 @@ export const Codemirror: FC = ({ onChange }) => { setFocus, content, dark, - }); + }) setCmAPI({ loaded: true, update: (markdown: string) => { @@ -34,24 +34,24 @@ export const Codemirror: FC = ({ onChange }) => { setFocus, dark, content: markdown, - }); - editor.setState(state); + }) + editor.setState(state) }, - }); + }) return () => { - editor.destroy(); + editor.destroy() setCmAPI({ loaded: false, update: () => {}, - }); - }; - }, [onChange, content, dark, setCmAPI, setFocus]); + }) + } + }, [onChange, content, dark, setCmAPI, setFocus]) return (
    - ); -}; + ) +} diff --git a/src/components/playground/codemirror/setup.ts b/src/components/playground/codemirror/setup.ts index e0e4290..241b9e7 100644 --- a/src/components/playground/codemirror/setup.ts +++ b/src/components/playground/codemirror/setup.ts @@ -1,22 +1,22 @@ -import type { Extension } from "@codemirror/state"; +import type { Extension } from '@codemirror/state' import { autocompletion, closeBrackets, closeBracketsKeymap, completionKeymap, -} from "@codemirror/autocomplete"; -import { defaultKeymap, history, historyKeymap } from "@codemirror/commands"; -import { markdown } from "@codemirror/lang-markdown"; +} from '@codemirror/autocomplete' +import { defaultKeymap, history, historyKeymap } from '@codemirror/commands' +import { markdown } from '@codemirror/lang-markdown' import { bracketMatching, defaultHighlightStyle, indentOnInput, syntaxHighlighting, -} from "@codemirror/language"; -import { lintKeymap } from "@codemirror/lint"; -import { highlightSelectionMatches, searchKeymap } from "@codemirror/search"; -import { EditorState } from "@codemirror/state"; +} from '@codemirror/language' +import { lintKeymap } from '@codemirror/lint' +import { highlightSelectionMatches, searchKeymap } from '@codemirror/search' +import { EditorState } from '@codemirror/state' import { EditorView, ViewUpdate, @@ -27,12 +27,12 @@ import { highlightSpecialChars, keymap, rectangularSelection, -} from "@codemirror/view"; -import { eclipse } from "@uiw/codemirror-theme-eclipse"; -import { nord } from "@uiw/codemirror-theme-nord"; -import debounce from "lodash.debounce"; +} from '@codemirror/view' +import { eclipse } from '@uiw/codemirror-theme-eclipse' +import { nord } from '@uiw/codemirror-theme-nord' +import debounce from 'lodash.debounce' -import { FocusType } from "@/components/playground/atom"; +import { FocusType } from '@/components/playground/atom' const basicSetup: Extension = [ highlightActiveLineGutter(), @@ -57,13 +57,13 @@ const basicSetup: Extension = [ ...completionKeymap, ...lintKeymap, ]), -]; +] interface StateOptions { - dark: boolean; - setFocus: (focus: FocusType) => void; - onChange: (getString: () => string) => void; - content: string; + dark: boolean + setFocus: (focus: FocusType) => void + onChange: (getString: () => string) => void + content: string } export const createCodeMirrorState = ({ @@ -80,31 +80,31 @@ export const createCodeMirrorState = ({ markdown(), EditorView.updateListener.of((viewUpdate) => { if (viewUpdate.focusChanged) - setFocus(viewUpdate.view.hasFocus ? "cm" : null); + setFocus(viewUpdate.view.hasFocus ? 'cm' : null) - onCodeMirrorUpdate(onChange, viewUpdate); + onCodeMirrorUpdate(onChange, viewUpdate) }), ], - }); -}; + }) +} const onCodeMirrorUpdate = debounce( (onChange: (getString: () => string) => void, viewUpdate: ViewUpdate) => { if (!viewUpdate.view.hasFocus) { - return; + return } - const getString = () => viewUpdate.state.doc.toString(); - onChange(getString); + const getString = () => viewUpdate.state.doc.toString() + onChange(getString) }, - 200, -); + 200 +) interface ViewOptions extends StateOptions { - root: HTMLElement; + root: HTMLElement } export const createCodeMirrorView = ({ root, ...options }: ViewOptions) => { return new EditorView({ state: createCodeMirrorState(options), parent: root, - }); -}; + }) +} diff --git a/src/components/playground/index.tsx b/src/components/playground/index.tsx index 344d977..9f628d3 100644 --- a/src/components/playground/index.tsx +++ b/src/components/playground/index.tsx @@ -1,83 +1,83 @@ -import clsx from "clsx"; -import { useAtomCallback } from "jotai/utils"; -import dynamic from "next/dynamic"; -import { useRouter, useSearchParams } from "next/navigation"; -import { FC, useCallback, useState } from "react"; +import clsx from 'clsx' +import { useAtomCallback } from 'jotai/utils' +import dynamic from 'next/dynamic' +import { useRouter, useSearchParams } from 'next/navigation' +import { FC, useCallback, useState } from 'react' -import Loading from "@/components/loading"; +import Loading from '@/components/loading' -import { cmAPI, crepeAPI, focus } from "./atom"; +import { cmAPI, crepeAPI, focus } from './atom' -const PlaygroundMilkdown = dynamic(() => import("./Crepe"), { +const PlaygroundMilkdown = dynamic(() => import('./Crepe'), { ssr: false, loading: () => , -}); +}) -const ControlPanel = dynamic(() => import("./ControlPanel"), { +const ControlPanel = dynamic(() => import('./ControlPanel'), { ssr: false, loading: () => , -}); +}) export const Dual: FC = () => { - const queryString = useSearchParams(); - const [expand, setExpand] = useState(false); + const queryString = useSearchParams() + const [expand, setExpand] = useState(false) - const router = useRouter(); + const router = useRouter() - const hasExpand = queryString.get("expand") === "true"; + const hasExpand = queryString.get('expand') === 'true' if (hasExpand !== expand) { - setExpand(hasExpand); + setExpand(hasExpand) } const onMilkdownChange = useAtomCallback( useCallback((get, _set, markdown: string) => { - const cmAPIValue = get(cmAPI); - const lock = get(focus) === "cm"; - if (lock) return; + const cmAPIValue = get(cmAPI) + const lock = get(focus) === 'cm' + if (lock) return - cmAPIValue.update(markdown); - }, []), - ); + cmAPIValue.update(markdown) + }, []) + ) const onCodemirrorChange = useAtomCallback( useCallback((get, _set, getCode: () => string) => { - const value = getCode(); - const crepeAPIValue = get(crepeAPI); - crepeAPIValue.update(value); - }, []), - ); + const value = getCode() + const crepeAPIValue = get(crepeAPI) + crepeAPIValue.update(value) + }, []) + ) return ( <>
    { - setExpand(value); + setExpand(value) if (value) { - router.push("/playground?expand=true"); + router.push('/playground?expand=true') } else { - router.push("/playground"); + router.push('/playground') } }} onChange={onCodemirrorChange} />
    - ); -}; + ) +} diff --git a/src/components/pwa-updater/index.tsx b/src/components/pwa-updater/index.tsx index d6103b3..bc91b6e 100644 --- a/src/components/pwa-updater/index.tsx +++ b/src/components/pwa-updater/index.tsx @@ -1,45 +1,45 @@ -import type { Workbox } from "workbox-window"; +import type { Workbox } from 'workbox-window' -import { useEffect } from "react"; +import { useEffect } from 'react' -import { useToast } from "@/components/toast"; +import { useToast } from '@/components/toast' declare global { interface Window { - workbox: Workbox; + workbox: Workbox } } export default function PwaUpdater() { - const toast = useToast(); + const toast = useToast() useEffect(() => { - if (process.env.NODE_ENV === "development") return; + if (process.env.NODE_ENV === 'development') return const hasWorkbox = - typeof window !== "undefined" && - "serviceWorker" in navigator && - window.workbox !== undefined; + typeof window !== 'undefined' && + 'serviceWorker' in navigator && + window.workbox !== undefined - if (!hasWorkbox) return; + if (!hasWorkbox) return - const wb = window.workbox; + const wb = window.workbox const promptNewVersionAvailable = () => { // `event.wasWaitingBeforeRegister` will be false if this is the first time the updated service worker is waiting. // When `event.wasWaitingBeforeRegister` is true, a previously updated service worker is still waiting. // You may want to customize the UI prompt accordingly. - toast("New version available, reload to update", "info", () => { - wb.addEventListener("controlling", () => { - window.location.reload(); - }); + toast('New version available, reload to update', 'info', () => { + wb.addEventListener('controlling', () => { + window.location.reload() + }) // Send a message to the waiting service worker, instructing it to activate. - wb.messageSkipWaiting(); - }); - }; + wb.messageSkipWaiting() + }) + } - wb.addEventListener("waiting", promptNewVersionAvailable); + wb.addEventListener('waiting', promptNewVersionAvailable) - wb.register(); - }, [toast]); + wb.register() + }, [toast]) - return <>; + return <> } diff --git a/src/components/svg-icon/index.tsx b/src/components/svg-icon/index.tsx index 7fe1b64..3243d40 100644 --- a/src/components/svg-icon/index.tsx +++ b/src/components/svg-icon/index.tsx @@ -12,7 +12,7 @@ export const Discord = () => ( -); +) export const Github = () => ( ( Github -); +) export const Twitter = () => ( ( -); +) diff --git a/src/components/toast/index.tsx b/src/components/toast/index.tsx index e7c9b59..f2baab3 100644 --- a/src/components/toast/index.tsx +++ b/src/components/toast/index.tsx @@ -1,69 +1,69 @@ -import type { FC, ReactNode } from "react"; +import type { FC, ReactNode } from 'react' -import * as Toast from "@radix-ui/react-toast"; -import clsx from "clsx"; +import * as Toast from '@radix-ui/react-toast' +import clsx from 'clsx' import { createContext, useCallback, useContext, useMemo, useState, -} from "react"; +} from 'react' -import { useLinkClass } from "@/hooks"; +import { useLinkClass } from '@/hooks' -type ToastType = "success" | "fail" | "warning" | "info"; +type ToastType = 'success' | 'fail' | 'warning' | 'info' -type Show = (desc: string, type: ToastType, onConfirm?: () => void) => void; -export const setShowCtx = createContext(() => {}); +type Show = (desc: string, type: ToastType, onConfirm?: () => void) => void +export const setShowCtx = createContext(() => {}) export const useToast = () => { - return useContext(setShowCtx); -}; + return useContext(setShowCtx) +} export const ToastProvider: FC<{ children: ReactNode }> = ({ children }) => { - const [open, setOpen] = useState(false); - const [desc, setDesc] = useState(""); + const [open, setOpen] = useState(false) + const [desc, setDesc] = useState('') const [onConfirm, setOnConfirm] = useState void)>( - undefined, - ); - const [type, setType] = useState("success"); - const linkClassName = useLinkClass(); + undefined + ) + const [type, setType] = useState('success') + const linkClassName = useLinkClass() const show: Show = useCallback((desc, type, onConfirm) => { - setDesc(desc); - setType(type); - setOpen(true); - setOnConfirm(() => onConfirm); - }, []); + setDesc(desc) + setType(type) + setOpen(true) + setOnConfirm(() => onConfirm) + }, []) const icon = useMemo(() => { switch (type) { - case "warning": - return "report_problem"; - case "fail": - return "error_outline"; - case "info": - return "new_releases"; - case "success": + case 'warning': + return 'report_problem' + case 'fail': + return 'error_outline' + case 'info': + return 'new_releases' + case 'success': default: - return "check_circle_outline"; + return 'check_circle_outline' } - }, [type]); + }, [type]) const iconColor = useMemo(() => { switch (type) { - case "warning": - return "text-nord13"; - case "fail": - return "text-nord11"; - case "info": - return "text-nord15"; - case "success": + case 'warning': + return 'text-nord13' + case 'fail': + return 'text-nord11' + case 'info': + return 'text-nord15' + case 'success': default: - return "text-nord14"; + return 'text-nord14' } - }, [type]); + }, [type]) return ( @@ -71,7 +71,7 @@ export const ToastProvider: FC<{ children: ReactNode }> = ({ children }) => { {children} - + {icon} {desc} @@ -79,7 +79,7 @@ export const ToastProvider: FC<{ children: ReactNode }> = ({ children }) => {
    {onConfirm && ( = ({ children }) => { )} @@ -99,5 +99,5 @@ export const ToastProvider: FC<{ children: ReactNode }> = ({ children }) => { - ); -}; + ) +} diff --git a/src/global.d.ts b/src/global.d.ts index 159722a..9c59bd8 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1,2 +1,2 @@ -declare module "*.css"; -declare module "@docsearch/css"; +declare module '*.css' +declare module '@docsearch/css' diff --git a/src/hooks/index.ts b/src/hooks/index.ts index d81b0a3..542cf9c 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -1 +1 @@ -export * from "./useLinkClass"; +export * from './useLinkClass' diff --git a/src/hooks/useLinkClass.ts b/src/hooks/useLinkClass.ts index 8525b5a..8a008b7 100644 --- a/src/hooks/useLinkClass.ts +++ b/src/hooks/useLinkClass.ts @@ -1,16 +1,16 @@ -import { clsx } from "clsx"; -import { useCallback } from "react"; +import { clsx } from 'clsx' +import { useCallback } from 'react' export const useLinkClass = () => { return useCallback((isActive: boolean, bg = true) => { return clsx( bg && (isActive - ? "bg-nord8 dark:bg-nord9" - : "hover:bg-gray-300 dark:hover:bg-gray-700"), + ? 'bg-nord8 dark:bg-nord9' + : 'hover:bg-gray-300 dark:hover:bg-gray-700'), isActive - ? "fill-gray-900 text-gray-900 dark:fill-gray-50 dark:text-gray-50" - : "fill-gray-600 text-gray-600 hover:fill-gray-900 hover:text-gray-900 dark:fill-gray-200 dark:text-gray-200 dark:hover:fill-gray-50 dark:hover:text-gray-50", - ); - }, []); -}; + ? 'fill-gray-900 text-gray-900 dark:fill-gray-50 dark:text-gray-50' + : 'fill-gray-600 text-gray-600 hover:fill-gray-900 hover:text-gray-900 dark:fill-gray-200 dark:text-gray-200 dark:hover:fill-gray-50 dark:hover:text-gray-50' + ) + }, []) +} diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 480d388..c15c5b7 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,33 +1,32 @@ -import "@docsearch/css"; -import "@milkdown/crepe/theme/common/style.css"; +import '@docsearch/css' +import '@milkdown/crepe/theme/common/style.css' +import type { AppProps } from 'next/app' -import type { AppProps } from "next/app"; +import { Analytics } from '@vercel/analytics/react' +import clsx from 'clsx' +import NextApp, { AppContext, AppInitialProps } from 'next/app' +import Head from 'next/head' +import { useRouter } from 'next/router' -import { Analytics } from "@vercel/analytics/react"; -import clsx from "clsx"; -import NextApp, { AppContext, AppInitialProps } from "next/app"; -import Head from "next/head"; -import { useRouter } from "next/router"; - -import Footer from "@/components/footer"; -import { Header } from "@/components/header"; -import PwaUpdater from "@/components/pwa-updater"; -import { DocSearchProvider, LayoutProvider } from "@/providers"; -import "@/styles/crepe.css"; -import "@/styles/docsearch.css"; -import "@/styles/globals.css"; -import "@/styles/liquid.css"; -import "@/styles/playground.css"; -import "@/styles/prosemirror.css"; -import "@/styles/toast.css"; -import { DocSearch } from "@/utils/types"; +import Footer from '@/components/footer' +import { Header } from '@/components/header' +import PwaUpdater from '@/components/pwa-updater' +import { DocSearchProvider, LayoutProvider } from '@/providers' +import '@/styles/crepe.css' +import '@/styles/docsearch.css' +import '@/styles/globals.css' +import '@/styles/liquid.css' +import '@/styles/playground.css' +import '@/styles/prosemirror.css' +import '@/styles/toast.css' +import { DocSearch } from '@/utils/types' export default function App({ Component, pageProps: { docSearch, ...componentProps }, }: AppPropsWithInitialProps) { - const router = useRouter(); - const pathname = router.pathname; + const router = useRouter() + const pathname = router.pathname return ( <> @@ -41,8 +40,8 @@ export default function App({
    @@ -53,23 +52,23 @@ export default function App({ - ); + ) } App.getInitialProps = async ( - appContext: AppContext, + appContext: AppContext ): Promise> => { - const props = await NextApp.getInitialProps(appContext); + const props = await NextApp.getInitialProps(appContext) return { ...props, pageProps: { ...props.pageProps, docSearch: { - appId: process.env.DOCSEARCH_APP_ID || "", - apiKey: process.env.DOCSEARCH_API_KEY || "", - indexName: process.env.DOCSEARCH_INDEX_NAME || "", + appId: process.env.DOCSEARCH_APP_ID || '', + apiKey: process.env.DOCSEARCH_API_KEY || '', + indexName: process.env.DOCSEARCH_INDEX_NAME || '', }, }, - }; -}; + } +} -type AppPropsWithInitialProps = AppProps<{ docSearch: DocSearch }>; +type AppPropsWithInitialProps = AppProps<{ docSearch: DocSearch }> diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 9f00168..502dcf1 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,4 +1,4 @@ -import { Head, Html, Main, NextScript } from "next/document"; +import { Head, Html, Main, NextScript } from 'next/document' export default function Document() { return ( @@ -69,5 +69,5 @@ export default function Document() { - ); + ) } diff --git a/src/pages/api/docs.ts b/src/pages/api/docs.ts index ec91856..7ea208d 100644 --- a/src/pages/api/docs.ts +++ b/src/pages/api/docs.ts @@ -1,9 +1,9 @@ -import { readFile } from "node:fs/promises"; -import { join } from "node:path"; +import { readFile } from 'node:fs/promises' +import { join } from 'node:path' -const docsDir = join(process.cwd(), "docs"); +const docsDir = join(process.cwd(), 'docs') export function getDocById(id: string, scope: string) { - const path = join(docsDir, scope, `${id}.md`); - return readFile(path, "utf-8"); + const path = join(docsDir, scope, `${id}.md`) + return readFile(path, 'utf-8') } diff --git a/src/pages/api/playground.ts b/src/pages/api/playground.ts index 11cb1a3..d20153c 100644 --- a/src/pages/api/playground.ts +++ b/src/pages/api/playground.ts @@ -1,9 +1,9 @@ -import { readFile } from "node:fs/promises"; -import { join } from "node:path"; +import { readFile } from 'node:fs/promises' +import { join } from 'node:path' -const docsDir = join(process.cwd(), "docs"); +const docsDir = join(process.cwd(), 'docs') export function getPlaygroundTemplate() { - const path = join(docsDir, "playground", "template.md"); - return readFile(path, "utf-8"); + const path = join(docsDir, 'playground', 'template.md') + return readFile(path, 'utf-8') } diff --git a/src/pages/blog/[id].tsx b/src/pages/blog/[id].tsx index c88e7be..3a8d9e5 100644 --- a/src/pages/blog/[id].tsx +++ b/src/pages/blog/[id].tsx @@ -1,52 +1,52 @@ -import { MilkdownProvider } from "@milkdown/react"; -import { ProsemirrorAdapterProvider } from "@prosemirror-adapter/react"; -import Head from "next/head"; -import { useRouter } from "next/router"; +import { MilkdownProvider } from '@milkdown/react' +import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/react' +import Head from 'next/head' +import { useRouter } from 'next/router' -import Doc from "@/components/doc-editor"; -import { getDocById } from "@/pages/api/docs"; -import { blogConfig } from "@/routes/blog-config"; -import { toTitle } from "@/utils/title"; +import Doc from '@/components/doc-editor' +import { getDocById } from '@/pages/api/docs' +import { blogConfig } from '@/routes/blog-config' +import { toTitle } from '@/utils/title' type Params = { params: { - id: string; - }; -}; + id: string + } +} export async function getStaticProps({ params }: Params) { - const { id } = params; - const content = await getDocById(id, "blogs"); + const { id } = params + const content = await getDocById(id, 'blogs') return { props: { content, }, - }; + } } export async function getStaticPaths() { const paths = blogConfig.map( ({ id }): Params => ({ params: { id }, - }), - ); + }) + ) return { paths, fallback: false, - }; + } } function getEditUrl(id: string) { - return `https://github.com/Milkdown/website/edit/main/docs/blogs/${id}.md`; + return `https://github.com/Milkdown/website/edit/main/docs/blogs/${id}.md` } export default function Blog({ content }: { content: string }) { - const router = useRouter(); - const { id } = router.query; - const url = getEditUrl(id as string); - const originalTitle = toTitle(id as string); - const title = `${originalTitle} | Milkdown`; - const ogUrl = `https://milkdown.dev/${router.asPath}`; + const router = useRouter() + const { id } = router.query + const url = getEditUrl(id as string) + const originalTitle = toTitle(id as string) + const title = `${originalTitle} | Milkdown` + const ogUrl = `https://milkdown.dev/${router.asPath}` return ( <> @@ -56,7 +56,7 @@ export default function Blog({ content }: { content: string }) {
    @@ -67,5 +67,5 @@ export default function Blog({ content }: { content: string }) {
    - ); + ) } diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx index 51eb931..43c28a1 100644 --- a/src/pages/blog/index.tsx +++ b/src/pages/blog/index.tsx @@ -1,13 +1,13 @@ -import Head from "next/head"; -import Link from "next/link"; +import Head from 'next/head' +import Link from 'next/link' -import { blogConfig } from "@/routes/blog-config"; -import { toTitle } from "@/utils/title"; +import { blogConfig } from '@/routes/blog-config' +import { toTitle } from '@/utils/title' export async function getStaticProps() { return { props: {}, // will be passed to the page component as props - }; + } } export default function Blogs() { @@ -34,7 +34,7 @@ export default function Blogs() {
    {date} | - {author.join(", ")} + {author.join(', ')}

    {desc}

    @@ -42,5 +42,5 @@ export default function Blogs() {
    - ); + ) } diff --git a/src/pages/docs/[scope]/[id].tsx b/src/pages/docs/[scope]/[id].tsx index 7b2da52..3315020 100644 --- a/src/pages/docs/[scope]/[id].tsx +++ b/src/pages/docs/[scope]/[id].tsx @@ -1,29 +1,29 @@ -import type { FC } from "react"; +import type { FC } from 'react' -import { ProsemirrorAdapterProvider } from "@prosemirror-adapter/react"; -import Head from "next/head"; -import { useRouter } from "next/router"; +import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/react' +import Head from 'next/head' +import { useRouter } from 'next/router' -import Doc from "@/components/doc-editor"; -import { getDocById } from "@/pages/api/docs"; -import { docConfig } from "@/routes"; -import { toTitle } from "@/utils/title"; +import Doc from '@/components/doc-editor' +import { getDocById } from '@/pages/api/docs' +import { docConfig } from '@/routes' +import { toTitle } from '@/utils/title' type Params = { params: { - id: string; - scope: string; - }; -}; + id: string + scope: string + } +} export async function getStaticProps({ params }: Params) { - const { id, scope } = params; - const content = await getDocById(id, scope); + const { id, scope } = params + const content = await getDocById(id, scope) return { props: { content, }, - }; + } } export async function getStaticPaths() { @@ -34,28 +34,28 @@ export async function getStaticPaths() { id, scope, }, - }), - ), - ); + }) + ) + ) return { paths, fallback: false, - }; + } } function getEditUrl(id: string, scope: string) { - const dir = docConfig.find((item) => item.scope === scope)?.dir ?? scope; + const dir = docConfig.find((item) => item.scope === scope)?.dir ?? scope - return `https://github.com/Milkdown/website/edit/main/docs/${dir}/${id}.md`; + return `https://github.com/Milkdown/website/edit/main/docs/${dir}/${id}.md` } const DocRenderer: FC<{ content: string }> = ({ content }) => { - const router = useRouter(); - const { id, scope } = router.query; - const url = getEditUrl(id as string, scope as string); - const originalTitle = toTitle(id as string); - const title = `${originalTitle} | Milkdown`; - const ogUrl = `https://milkdown.dev/${router.asPath}`; + const router = useRouter() + const { id, scope } = router.query + const url = getEditUrl(id as string, scope as string) + const originalTitle = toTitle(id as string) + const title = `${originalTitle} | Milkdown` + const ogUrl = `https://milkdown.dev/${router.asPath}` return ( <> @@ -65,7 +65,7 @@ const DocRenderer: FC<{ content: string }> = ({ content }) => {
    @@ -74,7 +74,7 @@ const DocRenderer: FC<{ content: string }> = ({ content }) => {
    - ); -}; + ) +} -export default DocRenderer; +export default DocRenderer diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 8f28793..340001c 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,15 +1,15 @@ -import clsx from "clsx"; -import dynamic from "next/dynamic"; -import Head from "next/head"; -import Link from "next/link"; +import clsx from 'clsx' +import dynamic from 'next/dynamic' +import Head from 'next/head' +import Link from 'next/link' -import { Button } from "@/components/home/Button"; -import { InfoCard } from "@/components/home/InfoCard"; -import { Liquid } from "@/components/liquid"; -import Loading from "@/components/loading"; +import { Button } from '@/components/home/Button' +import { InfoCard } from '@/components/home/InfoCard' +import { Liquid } from '@/components/liquid' +import Loading from '@/components/loading' -const gettingStarted = "/docs/guide/getting-started"; -const playground = "/playground"; +const gettingStarted = '/docs/guide/getting-started' +const playground = '/playground' const doc = ` # Like this one @@ -27,41 +27,41 @@ const doc = ` > まだ準備も出来ていないのに Try it out by typing in here, or visiting the [online playground](/playground). -`; +` export async function getStaticProps() { return { props: {}, // will be passed to the page component as props - }; + } } -const HomeEditor = dynamic(() => import("@/components/home-editor"), { +const HomeEditor = dynamic(() => import('@/components/home-editor'), { ssr: false, loading: () => , -}); +}) const InfoCardData = [ { - emoji: "🔩", - title: "Plugin Driven", - desc: "Everything in Milkdown are plugins. Extend your editor with different types of plugins: syntax, theme, UI, etc.", + emoji: '🔩', + title: 'Plugin Driven', + desc: 'Everything in Milkdown are plugins. Extend your editor with different types of plugins: syntax, theme, UI, etc.', }, { - emoji: "🤝", - title: "Collaborative", - desc: "With the support of Y.js, Milkdown can be used in real-time collaborative editing which can support multiple users editing on the same documentation.", + emoji: '🤝', + title: 'Collaborative', + desc: 'With the support of Y.js, Milkdown can be used in real-time collaborative editing which can support multiple users editing on the same documentation.', }, { - emoji: "🤯", - title: "Headless", - desc: "Milkdown is headless and comes without any CSS. You can easily customize the editor to fit the style of your application.", + emoji: '🤯', + title: 'Headless', + desc: 'Milkdown is headless and comes without any CSS. You can easily customize the editor to fit the style of your application.', }, { - emoji: "💡", - title: "Reliable", - desc: "Milkdown is built on top of some great libraries, such as ProseMirror, Y.js, and Remark, which means you can use their community and eco system to get help.", + emoji: '💡', + title: 'Reliable', + desc: 'Milkdown is built on top of some great libraries, such as ProseMirror, Y.js, and Remark, which means you can use their community and eco system to get help.', }, -]; +] export default function Home() { return ( @@ -74,27 +74,27 @@ export default function Home() {

    Milkdown

    A plugin driven framework to build WYSIWYG Markdown editor.

    @@ -123,5 +123,5 @@ export default function Home() {
    - ); + ) } diff --git a/src/pages/playground.tsx b/src/pages/playground.tsx index 39f03bc..4c99164 100644 --- a/src/pages/playground.tsx +++ b/src/pages/playground.tsx @@ -1,40 +1,40 @@ -import { useHydrateAtoms } from "jotai/utils"; -import Head from "next/head"; -import { useRouter } from "next/router"; -import { ReactElement } from "react"; +import { useHydrateAtoms } from 'jotai/utils' +import Head from 'next/head' +import { useRouter } from 'next/router' +import { ReactElement } from 'react' -import { Dual } from "@/components/playground"; -import { markdown } from "@/components/playground/atom"; -import { getPlaygroundTemplate } from "@/pages/api/playground"; -import { decode } from "@/utils/share"; +import { Dual } from '@/components/playground' +import { markdown } from '@/components/playground/atom' +import { getPlaygroundTemplate } from '@/pages/api/playground' +import { decode } from '@/utils/share' export async function getStaticProps() { - const template = await getPlaygroundTemplate(); + const template = await getPlaygroundTemplate() return { props: { template, }, - }; + } } const HydrateAtoms = ({ children, template, }: { - children: ReactElement; - template: string; + children: ReactElement + template: string }) => { - const router = useRouter(); - const path = router.asPath; - const [_, search = ""] = path.split("?"); - const searchParams = new URLSearchParams(search); - const text = searchParams.get("text"); - const value = text ? decode(text) : template; + const router = useRouter() + const path = router.asPath + const [_, search = ''] = path.split('?') + const searchParams = new URLSearchParams(search) + const text = searchParams.get('text') + const value = text ? decode(text) : template - useHydrateAtoms([[markdown, value]]); + useHydrateAtoms([[markdown, value]]) - return children; -}; + return children +} export default function Playground({ template }: { template: string }) { return ( @@ -48,5 +48,5 @@ export default function Playground({ template }: { template: string }) {
    - ); + ) } diff --git a/src/pages/sitemap.xml.ts b/src/pages/sitemap.xml.ts index ec4f117..2246a56 100644 --- a/src/pages/sitemap.xml.ts +++ b/src/pages/sitemap.xml.ts @@ -1,14 +1,14 @@ -import { NextApiResponse } from "next"; +import { NextApiResponse } from 'next' -import { docConfig } from "@/routes"; -import { blogConfig } from "@/routes/blog-config"; +import { docConfig } from '@/routes' +import { blogConfig } from '@/routes/blog-config' -const EXTERNAL_DATA_URL = "https://milkdown.dev/docs"; +const EXTERNAL_DATA_URL = 'https://milkdown.dev/docs' function generateSiteMap() { const docList = docConfig.flatMap(({ items, scope }) => - items.map((item) => ({ id: item, scope: scope })), - ); - const blogList = blogConfig.map(({ id }) => ({ id, scope: "blog" })); + items.map((item) => ({ id: item, scope: scope })) + ) + const blogList = blogConfig.map(({ id }) => ({ id, scope: 'blog' })) return ` ${[...docList, ...blogList] @@ -17,11 +17,11 @@ function generateSiteMap() { ${EXTERNAL_DATA_URL}/${scope}/${id} - `; + ` }) - .join("")} + .join('')} - `; + ` } function SiteMap() { @@ -29,16 +29,16 @@ function SiteMap() { } export async function getServerSideProps({ res }: { res: NextApiResponse }) { - const sitemap = generateSiteMap(); + const sitemap = generateSiteMap() - res.setHeader("Content-Type", "text/xml"); + res.setHeader('Content-Type', 'text/xml') // we send the XML to the browser - res.write(sitemap); - res.end(); + res.write(sitemap) + res.end() return { props: {}, - }; + } } -export default SiteMap; +export default SiteMap diff --git a/src/providers/DarkModeProvider.tsx b/src/providers/DarkModeProvider.tsx index 6a169a9..16ab1fd 100644 --- a/src/providers/DarkModeProvider.tsx +++ b/src/providers/DarkModeProvider.tsx @@ -1,64 +1,64 @@ -import type { FC, ReactNode } from "react"; +import type { FC, ReactNode } from 'react' -import { createContext, useContext, useEffect, useState } from "react"; +import { createContext, useContext, useEffect, useState } from 'react' -import type { SetState } from "@/utils/types"; +import type { SetState } from '@/utils/types' -const STORAGE_KEY = "darkMode"; +const STORAGE_KEY = 'darkMode' -export const darkModeCtx = createContext(false); -export const setDarkModeCtx = createContext>(() => undefined); +export const darkModeCtx = createContext(false) +export const setDarkModeCtx = createContext>(() => undefined) export const useDarkMode = () => { - return useContext(darkModeCtx); -}; + return useContext(darkModeCtx) +} export const useSetDarkMode = () => { - return useContext(setDarkModeCtx); -}; + return useContext(setDarkModeCtx) +} export const DarkModeProvider: FC<{ children: ReactNode }> = ({ children }) => { const [darkMode, setDarkMode] = useState(() => { - if (typeof window === "undefined") return false; + if (typeof window === 'undefined') return false - const stored = localStorage.getItem(STORAGE_KEY); + const stored = localStorage.getItem(STORAGE_KEY) if (stored) { - return stored === "true"; + return stored === 'true' } - return window.matchMedia("(prefers-color-scheme: dark)").matches; - }); + return window.matchMedia('(prefers-color-scheme: dark)').matches + }) useEffect(() => { - localStorage.setItem(STORAGE_KEY, String(darkMode)); - }, [darkMode]); + localStorage.setItem(STORAGE_KEY, String(darkMode)) + }, [darkMode]) useEffect(() => { - const stored = localStorage.getItem(STORAGE_KEY); - if (stored) return; + const stored = localStorage.getItem(STORAGE_KEY) + if (stored) return - const media = window.matchMedia("(prefers-color-scheme: dark)"); + const media = window.matchMedia('(prefers-color-scheme: dark)') const listener = (event: MediaQueryListEvent) => { - const newColorScheme = !!event.matches; + const newColorScheme = !!event.matches - setDarkMode(newColorScheme); - }; + setDarkMode(newColorScheme) + } - media.addEventListener("change", listener); + media.addEventListener('change', listener) return () => { - media.removeEventListener("change", listener); - }; - }, []); + media.removeEventListener('change', listener) + } + }, []) useEffect(() => { // For Algolia DocSearch document.documentElement.setAttribute( - "data-theme", - darkMode ? "dark" : "light", - ); + 'data-theme', + darkMode ? 'dark' : 'light' + ) // For TailwindCSS - document.documentElement.classList.toggle("dark", darkMode); - }, [darkMode]); + document.documentElement.classList.toggle('dark', darkMode) + }, [darkMode]) return ( @@ -66,5 +66,5 @@ export const DarkModeProvider: FC<{ children: ReactNode }> = ({ children }) => { {children} - ); -}; + ) +} diff --git a/src/providers/DocSearchProvider.tsx b/src/providers/DocSearchProvider.tsx index 4782f01..e1353a8 100644 --- a/src/providers/DocSearchProvider.tsx +++ b/src/providers/DocSearchProvider.tsx @@ -1,20 +1,20 @@ -import { createContext, FC, ReactNode, useContext } from "react"; +import { createContext, FC, ReactNode, useContext } from 'react' -import { DocSearch } from "@/utils/types"; +import { DocSearch } from '@/utils/types' const docSearchCtx = createContext({ - appId: "", - apiKey: "", - indexName: "", -}); + appId: '', + apiKey: '', + indexName: '', +}) -export const useDocSearch = () => useContext(docSearchCtx); +export const useDocSearch = () => useContext(docSearchCtx) export const DocSearchProvider: FC<{ - children: ReactNode; - docSearch: DocSearch; + children: ReactNode + docSearch: DocSearch }> = ({ children, docSearch }) => { return ( {children} - ); -}; + ) +} diff --git a/src/providers/SidePanelStateProvider.tsx b/src/providers/SidePanelStateProvider.tsx index 8012cc0..0d1d6ba 100644 --- a/src/providers/SidePanelStateProvider.tsx +++ b/src/providers/SidePanelStateProvider.tsx @@ -1,127 +1,127 @@ -import type { Dispatch, FC, ReactNode, Reducer } from "react"; +import type { Dispatch, FC, ReactNode, Reducer } from 'react' -import { createContext, useCallback, useContext, useReducer } from "react"; +import { createContext, useCallback, useContext, useReducer } from 'react' -export type SidePanelMode = "desktop" | "mobile"; +export type SidePanelMode = 'desktop' | 'mobile' -export const ROOT = "$ROOT$"; +export const ROOT = '$ROOT$' export type SidePanelAction = - | { type: "Hide" } - | { type: "ShowRoot" } - | { type: "ShowSection"; id: string; mode: SidePanelMode }; + | { type: 'Hide' } + | { type: 'ShowRoot' } + | { type: 'ShowSection'; id: string; mode: SidePanelMode } export type SidePanelState = { - visible: boolean; - mode: SidePanelMode; - activeId: typeof ROOT | string; -}; + visible: boolean + mode: SidePanelMode + activeId: typeof ROOT | string +} const sidePanelDataReducer: Reducer = ( state, - action, + action ) => { switch (action.type) { - case "ShowRoot": { + case 'ShowRoot': { return { visible: true, - mode: "mobile", + mode: 'mobile', activeId: ROOT, - }; + } } - case "ShowSection": { + case 'ShowSection': { return { visible: true, mode: action.mode, activeId: action.id, - }; + } } - case "Hide": + case 'Hide': default: { return { ...state, visible: false, - }; + } } } -}; +} const defaultState: SidePanelState = { visible: false, mode: - typeof window !== "undefined" && window.innerWidth < 768 - ? "mobile" - : "desktop", + typeof window !== 'undefined' && window.innerWidth < 768 + ? 'mobile' + : 'desktop', activeId: ROOT, -}; +} -const sidePanelStateCtx = createContext(defaultState); +const sidePanelStateCtx = createContext(defaultState) const sidePanelDispatcherCtx = createContext>( - () => undefined, -); + () => undefined +) export const useSidePanelState = () => { - return useContext(sidePanelStateCtx); -}; + return useContext(sidePanelStateCtx) +} export const useSidePanelDispatcher = () => { - return useContext(sidePanelDispatcherCtx); -}; + return useContext(sidePanelDispatcherCtx) +} export const useSidePanelVisible = () => { - return useSidePanelState().visible; -}; + return useSidePanelState().visible +} -let sidePanelControl: number; +let sidePanelControl: number export const useShowRootSidePanel = () => { - const dispatch = useSidePanelDispatcher(); + const dispatch = useSidePanelDispatcher() return useCallback(() => { - window.clearTimeout(sidePanelControl); - dispatch({ type: "ShowRoot" }); - }, [dispatch]); -}; + window.clearTimeout(sidePanelControl) + dispatch({ type: 'ShowRoot' }) + }, [dispatch]) +} export const useShowSectionSidePanel = () => { - const dispatch = useSidePanelDispatcher(); + const dispatch = useSidePanelDispatcher() return useCallback( (id: string, mode: SidePanelMode) => { - window.clearTimeout(sidePanelControl); + window.clearTimeout(sidePanelControl) dispatch({ - type: "ShowSection", + type: 'ShowSection', id, mode, - }); + }) }, - [dispatch], - ); -}; + [dispatch] + ) +} export const useHoldSidePanel = () => { return useCallback(() => { - window.clearTimeout(sidePanelControl); - }, []); -}; + window.clearTimeout(sidePanelControl) + }, []) +} export const useHideSidePanel = () => { - const dispatch = useSidePanelDispatcher(); + const dispatch = useSidePanelDispatcher() return useCallback( (delay: number) => { sidePanelControl = window.setTimeout( - () => dispatch({ type: "Hide" }), - delay, - ); + () => dispatch({ type: 'Hide' }), + delay + ) }, - [dispatch], - ); -}; + [dispatch] + ) +} export const SidePanelStateProvider: FC<{ children: ReactNode }> = ({ children, }) => { - const [state, dispatch] = useReducer(sidePanelDataReducer, defaultState); + const [state, dispatch] = useReducer(sidePanelDataReducer, defaultState) return ( @@ -129,5 +129,5 @@ export const SidePanelStateProvider: FC<{ children: ReactNode }> = ({ {children} - ); -}; + ) +} diff --git a/src/providers/index.tsx b/src/providers/index.tsx index 9cfab3d..77f621a 100644 --- a/src/providers/index.tsx +++ b/src/providers/index.tsx @@ -1,15 +1,15 @@ -import { ToastProvider } from "@/components/toast"; -import { compose } from "@/utils/compose"; +import { ToastProvider } from '@/components/toast' +import { compose } from '@/utils/compose' -import { DarkModeProvider } from "./DarkModeProvider"; -import { SidePanelStateProvider } from "./SidePanelStateProvider"; +import { DarkModeProvider } from './DarkModeProvider' +import { SidePanelStateProvider } from './SidePanelStateProvider' export const LayoutProvider = compose( DarkModeProvider, SidePanelStateProvider, - ToastProvider, -); + ToastProvider +) -export * from "./DarkModeProvider"; -export * from "./SidePanelStateProvider"; -export * from "./DocSearchProvider"; +export * from './DarkModeProvider' +export * from './SidePanelStateProvider' +export * from './DocSearchProvider' diff --git a/src/routes/blog-config.ts b/src/routes/blog-config.ts index 7ab2079..0d61f1f 100644 --- a/src/routes/blog-config.ts +++ b/src/routes/blog-config.ts @@ -1,43 +1,43 @@ -import { formatDate } from "@/utils/date"; +import { formatDate } from '@/utils/date' export type BlogConfigItem = { - id: string; + id: string - author: string[]; + author: string[] - desc: string; + desc: string - date: string; -}; + date: string +} const getDate = (year: number, month: number, day: number) => { - return formatDate(new Date(Date.UTC(year, month - 1, day))); -}; + return formatDate(new Date(Date.UTC(year, month - 1, day))) +} /// Put the latest blogs on the top please. export const blogConfig: BlogConfigItem[] = [ { - id: "understanding-headless-slash-plugin", - author: ["Mirone"], - desc: "Why we built slash plugin as a headless plugin?", + id: 'understanding-headless-slash-plugin', + author: ['Mirone'], + desc: 'Why we built slash plugin as a headless plugin?', date: getDate(2023, 4, 25), }, { - id: "announcing-telemetry-inspector", - author: ["Mirone"], - desc: "Get editor inner information and status during runtime.", + id: 'announcing-telemetry-inspector', + author: ['Mirone'], + desc: 'Get editor inner information and status during runtime.', date: getDate(2023, 4, 9), }, { - id: "build-your-own-milkdown-copilot", - author: ["Mirone"], - desc: "Use AI to power your writing experience. What if you can build your own copilot?", + id: 'build-your-own-milkdown-copilot', + author: ['Mirone'], + desc: 'Use AI to power your writing experience. What if you can build your own copilot?', date: getDate(2023, 3, 30), }, { - id: "introducing-milkdown@7", - author: ["Mirone"], + id: 'introducing-milkdown@7', + author: ['Mirone'], desc: "A brand new version of milkdown is coming. Let's take a look at what's new.", date: getDate(2023, 2, 22), }, -]; +] diff --git a/src/routes/doc-config.ts b/src/routes/doc-config.ts index 4c4be66..1d1c7d2 100644 --- a/src/routes/doc-config.ts +++ b/src/routes/doc-config.ts @@ -1,126 +1,126 @@ export type DocConfigItem = { - scope: string; - dir?: string; - items: string[]; -}; + scope: string + dir?: string + items: string[] +} export type APIConfigItem = { - label: string; - items: string[]; -}; + label: string + items: string[] +} export const scopeTitleMap: Record = { - guide: "Guide", - recipes: "Recipes", - plugin: "Plugin", - api: "API", -}; -Object.freeze(scopeTitleMap); + guide: 'Guide', + recipes: 'Recipes', + plugin: 'Plugin', + api: 'API', +} +Object.freeze(scopeTitleMap) export const guideConfig: DocConfigItem = { - scope: "guide", + scope: 'guide', items: [ - "why-milkdown", - "getting-started", - "architecture-overview", - "using-crepe", - "styling", - "code-highlighting", - "interacting-with-editor", - "commands", - "keyboard-shortcuts", - "macros", - "using-milkdown-kit", - "collaborative-editing", - "prosemirror-api", - "faq", + 'why-milkdown', + 'getting-started', + 'architecture-overview', + 'using-crepe', + 'styling', + 'code-highlighting', + 'interacting-with-editor', + 'commands', + 'keyboard-shortcuts', + 'macros', + 'using-milkdown-kit', + 'collaborative-editing', + 'prosemirror-api', + 'faq', ], -}; +} export const recipesConfig: DocConfigItem = { - scope: "recipes", + scope: 'recipes', items: [ - "react", - "vue", - "svelte", - "solidjs", - "nextjs", - "nuxtjs", - "angular", - "vue2", + 'react', + 'vue', + 'svelte', + 'solidjs', + 'nextjs', + 'nuxtjs', + 'angular', + 'vue2', ], -}; +} export const pluginConfig: DocConfigItem = { - scope: "plugin", + scope: 'plugin', items: [ - "using-plugins", - "plugins-101", - "composable-plugins", - "example-iframe-plugin", - "example-marker-plugin", - "example-tooltip-plugin", - "example-slash-plugin", - "example-block-plugin", - "using-components", + 'using-plugins', + 'plugins-101', + 'composable-plugins', + 'example-iframe-plugin', + 'example-marker-plugin', + 'example-tooltip-plugin', + 'example-slash-plugin', + 'example-block-plugin', + 'using-components', ], -}; +} export const apiConfigByCategory: APIConfigItem[] = [ { - label: "Component", + label: 'Component', items: [ - "component-code-block", - "component-image-block", - "component-image-inline", - "component-link-tooltip", - "component-list-item-block", - "component-table-block", + 'component-code-block', + 'component-image-block', + 'component-image-inline', + 'component-link-tooltip', + 'component-list-item-block', + 'component-table-block', ], }, { - label: "Preset", - items: ["preset-commonmark", "preset-gfm"], + label: 'Preset', + items: ['preset-commonmark', 'preset-gfm'], }, { - label: "Plugin", + label: 'Plugin', items: [ - "plugin-listener", - "plugin-history", - "plugin-emoji", - "plugin-highlight", - "plugin-cursor", - "plugin-tooltip", - "plugin-slash", - "plugin-block", - "plugin-indent", - "plugin-trailing", - "plugin-upload", - "plugin-clipboard", - "plugin-collab", + 'plugin-listener', + 'plugin-history', + 'plugin-emoji', + 'plugin-highlight', + 'plugin-cursor', + 'plugin-tooltip', + 'plugin-slash', + 'plugin-block', + 'plugin-indent', + 'plugin-trailing', + 'plugin-upload', + 'plugin-clipboard', + 'plugin-collab', ], }, { - label: "Editor", - items: ["crepe"], + label: 'Editor', + items: ['crepe'], }, { - label: "Framework", - items: ["core", "ctx", "utils", "transformer"], + label: 'Framework', + items: ['core', 'ctx', 'utils', 'transformer'], }, -]; +] export const apiConfig: DocConfigItem = { - scope: "api", - dir: "api-src", + scope: 'api', + dir: 'api-src', items: apiConfigByCategory.flatMap((x) => x.items), -}; +} export const docConfig: DocConfigItem[] = [ guideConfig, recipesConfig, pluginConfig, apiConfig, -]; +] -Object.freeze(apiConfigByCategory); -Object.freeze(guideConfig); -Object.freeze(recipesConfig); -Object.freeze(pluginConfig); -Object.freeze(apiConfig); -Object.freeze(docConfig); +Object.freeze(apiConfigByCategory) +Object.freeze(guideConfig) +Object.freeze(recipesConfig) +Object.freeze(pluginConfig) +Object.freeze(apiConfig) +Object.freeze(docConfig) diff --git a/src/routes/index.ts b/src/routes/index.ts index a00fc1f..36f07c3 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -1 +1 @@ -export * from "./doc-config"; +export * from './doc-config' diff --git a/src/styles/crepe.css b/src/styles/crepe.css index e75ec41..9fb29b1 100644 --- a/src/styles/crepe.css +++ b/src/styles/crepe.css @@ -62,10 +62,10 @@ div:not(.expanded) .crepe > .milkdown > .ProseMirror { --crepe-color-selected: #e1e2e8; --crepe-color-inline-area: #d8dae0; - --crepe-font-title: Rubik, Cambria, "Times New Roman", Times, serif; + --crepe-font-title: Rubik, Cambria, 'Times New Roman', Times, serif; --crepe-font-default: Inter, Arial, Helvetica, sans-serif; --crepe-font-code: - "JetBrains Mono", Menlo, Monaco, "Courier New", Courier, monospace; + 'JetBrains Mono', Menlo, Monaco, 'Courier New', Courier, monospace; --crepe-shadow-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.3); @@ -92,10 +92,10 @@ div:not(.expanded) .crepe > .milkdown > .ProseMirror { --crepe-color-selected: #32353a; --crepe-color-inline-area: #111418; - --crepe-font-title: Rubik, Cambria, "Times New Roman", Times, serif; + --crepe-font-title: Rubik, Cambria, 'Times New Roman', Times, serif; --crepe-font-default: Inter, Arial, Helvetica, sans-serif; --crepe-font-code: - "JetBrains Mono", Menlo, Monaco, "Courier New", Courier, monospace; + 'JetBrains Mono', Menlo, Monaco, 'Courier New', Courier, monospace; --crepe-shadow-1: 0px 1px 2px 0px rgba(255, 255, 255, 0.3), diff --git a/src/styles/docsearch.css b/src/styles/docsearch.css index aa3c08a..8097c9f 100644 --- a/src/styles/docsearch.css +++ b/src/styles/docsearch.css @@ -51,6 +51,6 @@ .DocSearch-Form { @apply outline-nord9 mb-1 shadow-none outline outline-2; } -.DocSearch-Hit[aria-selected="true"] a { +.DocSearch-Hit[aria-selected='true'] a { @apply bg-nord9; } diff --git a/src/styles/globals.css b/src/styles/globals.css index d493c6b..b9151bc 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -1,4 +1,4 @@ -@import "tailwindcss"; +@import 'tailwindcss'; @config "../../tailwind.config.js"; @@ -16,7 +16,7 @@ body { @apply bg-[#fdfcff] text-gray-900 dark:bg-[#1b1c1d] dark:text-gray-50; } -div[data-milkdown-root="true"] { +div[data-milkdown-root='true'] { @apply h-full; } diff --git a/src/styles/playground.css b/src/styles/playground.css index 774e96e..951a84b 100644 --- a/src/styles/playground.css +++ b/src/styles/playground.css @@ -9,7 +9,7 @@ @apply overscroll-auto; } - div[data-show="false"] { + div[data-show='false'] { @apply hidden; } } diff --git a/src/styles/prosemirror.css b/src/styles/prosemirror.css index 8059643..f56aab2 100644 --- a/src/styles/prosemirror.css +++ b/src/styles/prosemirror.css @@ -10,7 +10,7 @@ } .ProseMirror { - span[data-type="html"] { + span[data-type='html'] { @apply text-nord9 dark:text-nord10 relative mx-1 rounded bg-gray-200 px-1 py-1 font-sans dark:bg-gray-900; } diff --git a/src/styles/toast.css b/src/styles/toast.css index 7b34509..f554d14 100644 --- a/src/styles/toast.css +++ b/src/styles/toast.css @@ -12,20 +12,20 @@ @apply flex items-center justify-center gap-2; } -.toast-root[data-state="open"] { +.toast-root[data-state='open'] { animation: slideIn 150ms cubic-bezier(0.16, 1, 0.3, 1); } -.toast-root[data-state="closed"] { +.toast-root[data-state='closed'] { animation: hide 100ms ease-in; } -.toast-root[data-swipe="move"] { +.toast-root[data-swipe='move'] { transform: translateX(var(--radix-toast-swipe-move-x)); } -.toast-root[data-swipe="cancel"] { +.toast-root[data-swipe='cancel'] { transform: translateX(0); transition: transform 200ms ease-out; } -.toast-root[data-swipe="end"] { +.toast-root[data-swipe='end'] { animation: swipeOut 100ms ease-out; } diff --git a/src/utils/compose.tsx b/src/utils/compose.tsx index be12151..4950b6d 100644 --- a/src/utils/compose.tsx +++ b/src/utils/compose.tsx @@ -1,5 +1,5 @@ /* Copyright 2021, Milkdown by Mirone. */ -import type { ComponentType, FC, ReactNode } from "react"; +import type { ComponentType, FC, ReactNode } from 'react' export const compose = ( ...providers: ComponentType<{ children: ReactNode }>[] @@ -9,8 +9,8 @@ export const compose = ( {children} - ); - Component.displayName = Prev.displayName; + ) + Component.displayName = Prev.displayName - return Component; - }); + return Component + }) diff --git a/src/utils/date.ts b/src/utils/date.ts index bbd1658..fefeb9b 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -1,7 +1,7 @@ export const formatDate = (date: Date) => { - return date.toLocaleDateString("en-us", { - month: "long", - day: "numeric", - year: "numeric", - }); -}; + return date.toLocaleDateString('en-us', { + month: 'long', + day: 'numeric', + year: 'numeric', + }) +} diff --git a/src/utils/share.ts b/src/utils/share.ts index 87b0e9d..6c8e339 100644 --- a/src/utils/share.ts +++ b/src/utils/share.ts @@ -1,22 +1,22 @@ -import { compressToBase64, decompressFromBase64 } from "lz-string"; +import { compressToBase64, decompressFromBase64 } from 'lz-string' -declare module "lz-string" { - export function compressToBase64(input: string): string; - export function decompressFromBase64(input: string): string; +declare module 'lz-string' { + export function compressToBase64(input: string): string + export function decompressFromBase64(input: string): string - export function compressToUTF16(input: string): string; - export function decompressFromUTF16(compressed: string): string; + export function compressToUTF16(input: string): string + export function decompressFromUTF16(compressed: string): string - export function compressToUint8Array(uncompressed: string): Uint8Array; - export function decompressFromUint8Array(compressed: Uint8Array): string; + export function compressToUint8Array(uncompressed: string): Uint8Array + export function decompressFromUint8Array(compressed: Uint8Array): string - export function compressToEncodedURIComponent(input: string): string; - export function decompressFromEncodedURIComponent(compressed: string): string; + export function compressToEncodedURIComponent(input: string): string + export function decompressFromEncodedURIComponent(compressed: string): string - export function compress(input: string): string; - export function decompress(compressed: string): string; + export function compress(input: string): string + export function decompress(compressed: string): string } -export const encode = compressToBase64; +export const encode = compressToBase64 -export const decode = decompressFromBase64; +export const decode = decompressFromBase64 diff --git a/src/utils/title.ts b/src/utils/title.ts index a989a23..69316aa 100644 --- a/src/utils/title.ts +++ b/src/utils/title.ts @@ -1,28 +1,28 @@ const isAbbreviation = (str: string) => { - return ["api", "faq", "gfm"].includes(str.toLowerCase()); -}; + return ['api', 'faq', 'gfm'].includes(str.toLowerCase()) +} const isConjunction = (str: string) => { - return ["and", "or", "with", "for"].includes(str.toLowerCase()); -}; + return ['and', 'or', 'with', 'for'].includes(str.toLowerCase()) +} const isExample = (str: string) => { - if (str.toLowerCase() === "example") { - return true; + if (str.toLowerCase() === 'example') { + return true } - return false; -}; + return false +} export const toTitle = (id: string) => id - .split("-") + .split('-') .map((str) => isAbbreviation(str) ? str.toUpperCase() : isConjunction(str) ? str.toLowerCase() : isExample(str) - ? "Ex." - : str.charAt(0).toUpperCase() + str.slice(1), + ? 'Ex.' + : str.charAt(0).toUpperCase() + str.slice(1) ) - .join(" "); + .join(' ') diff --git a/src/utils/types.ts b/src/utils/types.ts index 60e809b..e961d24 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -1,10 +1,10 @@ /* Copyright 2021, Milkdown by Mirone. */ -import type { Dispatch, SetStateAction } from "react"; +import type { Dispatch, SetStateAction } from 'react' -export type SetState = Dispatch>; +export type SetState = Dispatch> export type DocSearch = { - appId: string; - apiKey: string; - indexName: string; -}; + appId: string + apiKey: string + indexName: string +} diff --git a/tailwind.config.js b/tailwind.config.js index 54e74e8..cf7ce5e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,44 +1,44 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./src/**/*.{js,ts,jsx,tsx,css}"], - darkMode: "class", + content: ['./src/**/*.{js,ts,jsx,tsx,css}'], + darkMode: 'class', theme: { extend: { fontFamily: { sans: '"Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', }, colors: { - "nord-neutral": { - DEFAULT: "#494E59", - dark: "#EFF1F5", + 'nord-neutral': { + DEFAULT: '#494E59', + dark: '#EFF1F5', }, - "nord-neutral-deep": { - DEFAULT: "#2E3440", - dark: "#ECEFF4", + 'nord-neutral-deep': { + DEFAULT: '#2E3440', + dark: '#ECEFF4', }, - "nord-dim": { - DEFAULT: "#ABAEB3", - dark: "#F7F9FB", + 'nord-dim': { + DEFAULT: '#ABAEB3', + dark: '#F7F9FB', }, - "nord-solid": { - DEFAULT: "#636C7D", - dark: "#D8DEE9", + 'nord-solid': { + DEFAULT: '#636C7D', + dark: '#D8DEE9', }, - "nord-primary": "#5E81AC", - "nord-secondary": "#CFDBE7", - "nord-secondary-deep": "#81A1C1", - "nord-secondary-dim": "#F0F4F8", - "nord-outline": { - DEFAULT: "#D8DEE9", - dark: "#434C5E", + 'nord-primary': '#5E81AC', + 'nord-secondary': '#CFDBE7', + 'nord-secondary-deep': '#81A1C1', + 'nord-secondary-dim': '#F0F4F8', + 'nord-outline': { + DEFAULT: '#D8DEE9', + dark: '#434C5E', }, - "nord-background": { - DEFAULT: "#ECEFF4", - dark: "#2E3440", + 'nord-background': { + DEFAULT: '#ECEFF4', + dark: '#2E3440', }, - "nord-foreground": { - DEFAULT: "#FFFFFF", - dark: "#252932", + 'nord-foreground': { + DEFAULT: '#FFFFFF', + dark: '#252932', }, }, }, @@ -46,5 +46,5 @@ module.exports = { future: { hoverOnlyWhenSupported: true, }, - plugins: [require("tailwind-nord")], -}; + plugins: [require('tailwind-nord')], +}