Compare commits

..

1 Commits

Author SHA1 Message Date
Jan-Philipp Benecke
17cc5189a8 Refactor undo/redo to be a controller instead 2025-10-01 12:31:39 +02:00
29 changed files with 348 additions and 576 deletions

View File

@@ -183,6 +183,7 @@ module.exports.babelOptions = ({
include: /\/node_modules\//,
exclude: [
"element-internals-polyfill",
"@shoelace-style",
"@?lit(?:-labs|-element|-html)?",
].map((p) => new RegExp(`/node_modules/${p}/`)),
},

View File

@@ -34,7 +34,7 @@
"@codemirror/legacy-modes": "6.5.1",
"@codemirror/search": "6.5.11",
"@codemirror/state": "6.5.2",
"@codemirror/view": "6.38.4",
"@codemirror/view": "6.38.3",
"@date-fns/tz": "1.4.1",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.18.0",
@@ -158,7 +158,7 @@
"@octokit/plugin-retry": "8.0.1",
"@octokit/rest": "22.0.0",
"@rsdoctor/rspack-plugin": "1.3.1",
"@rspack/core": "1.5.8",
"@rspack/core": "1.5.7",
"@rspack/dev-server": "1.1.4",
"@types/babel__plugin-transform-runtime": "7.9.5",
"@types/chromecast-caf-receiver": "6.0.22",
@@ -203,7 +203,7 @@
"husky": "9.1.7",
"jsdom": "27.0.0",
"jszip": "3.10.1",
"lint-staged": "16.2.3",
"lint-staged": "16.2.1",
"lit-analyzer": "2.0.3",
"lodash.merge": "4.6.2",
"lodash.template": "4.5.0",

View File

@@ -0,0 +1,141 @@
import type {
ReactiveController,
ReactiveControllerHost,
} from "@lit/reactive-element/reactive-controller";
const UNDO_REDO_STACK_LIMIT = 75;
/**
* Configuration options for the UndoRedoController.
*
* @template ConfigType The type of configuration to manage.
*/
export interface UndoRedoControllerConfig<ConfigType> {
stackLimit?: number;
currentConfig: () => ConfigType;
apply: (config: ConfigType) => void;
}
/**
* A controller to manage undo and redo operations for a given configuration type.
*
* @template ConfigType The type of configuration to manage.
*/
export class UndoRedoController<ConfigType> implements ReactiveController {
private _host: ReactiveControllerHost;
private _undoStack: ConfigType[] = [];
private _redoStack: ConfigType[] = [];
private readonly _stackLimit: number = UNDO_REDO_STACK_LIMIT;
private readonly _apply: (config: ConfigType) => void = () => {
throw new Error("No apply function provided");
};
private readonly _currentConfig: () => ConfigType = () => {
throw new Error("No currentConfig function provided");
};
constructor(
host: ReactiveControllerHost,
options: UndoRedoControllerConfig<ConfigType>
) {
if (options.stackLimit !== undefined) {
this._stackLimit = options.stackLimit;
}
this._apply = options.apply;
this._currentConfig = options.currentConfig;
this._host = host;
host.addController(this);
}
hostConnected() {
window.addEventListener("undo-change", this._onUndoChange);
}
hostDisconnected() {
window.removeEventListener("undo-change", this._onUndoChange);
}
private _onUndoChange = (ev: Event) => {
ev.stopPropagation();
this.undo();
this._host.requestUpdate();
};
/**
* Indicates whether there are actions available to undo.
*
* @returns `true` if there are actions to undo, `false` otherwise.
*/
public get canUndo(): boolean {
return this._undoStack.length > 0;
}
/**
* Indicates whether there are actions available to redo.
*
* @returns `true` if there are actions to redo, `false` otherwise.
*/
public get canRedo(): boolean {
return this._redoStack.length > 0;
}
/**
* Commits the current configuration to the undo stack and clears the redo stack.
*
* @param config The current configuration to commit.
*/
public commit(config: ConfigType) {
if (this._undoStack.length >= this._stackLimit) {
this._undoStack.shift();
}
this._undoStack.push({ ...config });
this._redoStack = [];
}
/**
* Undoes the last action and applies the previous configuration
* while saving the current configuration to the redo stack.
*/
public undo() {
if (this._undoStack.length === 0) {
return;
}
this._redoStack.push({ ...this._currentConfig() });
const config = this._undoStack.pop()!;
this._apply(config);
this._host.requestUpdate();
}
/**
* Redoes the last undone action and reapplies the configuration
* while saving the current configuration to the undo stack.
*/
public redo() {
if (this._redoStack.length === 0) {
return;
}
this._undoStack.push({ ...this._currentConfig() });
const config = this._redoStack.pop()!;
this._apply(config);
this._host.requestUpdate();
}
/**
* Resets the undo and redo stacks, clearing all history.
*/
public reset() {
this._undoStack = [];
this._redoStack = [];
}
}
declare global {
interface HASSDomEvents {
"undo-change": undefined;
}
}

View File

@@ -42,8 +42,8 @@ export class HaBottomSheet extends LitElement {
static styles = css`
wa-drawer {
--wa-color-surface-raised: var(
--ha-bottom-sheet-surface-background,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
--ha-dialog-surface-background,
var(--mdc-theme-surface, #fff)
);
--spacing: 0;
--size: auto;
@@ -51,14 +51,8 @@ export class HaBottomSheet extends LitElement {
--hide-duration: ${BOTTOM_SHEET_ANIMATION_DURATION_MS}ms;
}
wa-drawer::part(dialog) {
border-top-left-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
);
border-top-right-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
);
border-top-left-radius: var(--ha-border-radius-lg);
border-top-right-radius: var(--ha-border-radius-lg);
max-height: 90vh;
padding-bottom: var(--safe-area-inset-bottom);
padding-left: var(--safe-area-inset-left);

View File

@@ -139,9 +139,7 @@ export class HaDialog extends DialogBase {
@media all and (max-width: 450px), all and (max-height: 500px) {
.mdc-dialog .mdc-dialog__surface {
min-height: 100vh;
min-height: 100svh;
max-height: 100vh;
max-height: 100svh;
padding-top: var(--safe-area-inset-top);
padding-bottom: var(--safe-area-inset-bottom);
padding-left: var(--safe-area-inset-left);

View File

@@ -1,5 +1,6 @@
import { css, html, LitElement } from "lit";
import { customElement, query, state } from "lit/decorators";
import { styleMap } from "lit/directives/style-map";
import { fireEvent } from "../common/dom/fire_event";
import { BOTTOM_SHEET_ANIMATION_DURATION_MS } from "./ha-bottom-sheet";
@@ -36,14 +37,13 @@ export class HaResizableBottomSheet extends LitElement {
return html`<dialog
open
@transitionend=${this._handleTransitionEnd}
style=${`
--height: ${this._dialogViewportHeight}vh;
--height: ${this._dialogViewportHeight}dvh;
--max-height: ${this._dialogMaxViewpointHeight}vh;
--max-height: ${this._dialogMaxViewpointHeight}dvh;
--min-height: ${this._dialogMinViewpointHeight}vh;
--min-height: ${this._dialogMinViewpointHeight}dvh;
`}
style=${styleMap({
height: this._dialogViewportHeight
? `${this._dialogViewportHeight}vh`
: "auto",
maxHeight: `${this._dialogMaxViewpointHeight}vh`,
minHeight: `${this._dialogMinViewpointHeight}vh`,
})}
>
<div class="handle-wrapper">
<div
@@ -213,14 +213,12 @@ export class HaResizableBottomSheet extends LitElement {
cursor: grabbing;
}
dialog {
height: var(--height, auto);
max-height: var(--max-height, 70vh);
max-height: var(--max-height, 70dvh);
min-height: var(--min-height, 30vh);
min-height: var(--min-height, 30dvh);
height: auto;
max-height: 70vh;
min-height: 30vh;
background-color: var(
--ha-bottom-sheet-surface-background,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
--ha-dialog-surface-background,
var(--mdc-theme-surface, #fff)
);
display: flex;
flex-direction: column;
@@ -241,12 +239,12 @@ export class HaResizableBottomSheet extends LitElement {
inset-inline-start: 0;
box-shadow: 0px -8px 16px rgba(0, 0, 0, 0.2);
border-top-left-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
--ha-dialog-border-radius,
var(--ha-border-radius-2xl)
);
border-top-right-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
--ha-dialog-border-radius,
var(--ha-border-radius-2xl)
);
transform: translateY(100%);
transition: transform ${BOTTOM_SHEET_ANIMATION_DURATION_MS}ms ease;
@@ -256,6 +254,7 @@ export class HaResizableBottomSheet extends LitElement {
border-bottom-width: 0;
border-style: var(--ha-bottom-sheet-border-style);
border-color: var(--ha-bottom-sheet-border-color);
margin-bottom: var(--safe-area-inset-bottom);
margin-left: var(--safe-area-inset-left);
margin-right: var(--safe-area-inset-right);
}

View File

@@ -5,8 +5,8 @@ import { restoreScroll } from "../common/decorators/restore-scroll";
import { goBack } from "../common/navigate";
import "../components/ha-icon-button-arrow-prev";
import "../components/ha-menu-button";
import { haStyleScrollbar } from "../resources/styles";
import type { HomeAssistant } from "../types";
import { haStyleScrollbar } from "../resources/styles";
@customElement("hass-subpage")
class HassSubpage extends LitElement {
@@ -154,15 +154,9 @@ class HassSubpage extends LitElement {
1px - var(--header-height, 0px) - var(
--safe-area-inset-top,
0px
) - var(
--hass-subpage-bottom-inset,
var(--safe-area-inset-bottom, 0px)
)
);
margin-bottom: var(
--hass-subpage-bottom-inset,
var(--safe-area-inset-bottom)
) - var(--safe-area-inset-bottom, 0px)
);
margin-bottom: var(--safe-area-inset-bottom);
margin-right: var(--safe-area-inset-right);
overflow-y: auto;
overflow: auto;

View File

@@ -12,11 +12,11 @@ export const KeyboardShortcutMixin = <T extends Constructor<LitElement>>(
class extends superClass {
private _keydownEvent = (event: KeyboardEvent) => {
const supportedShortcuts = this.supportedShortcuts();
const key = event.shiftKey ? event.key.toUpperCase() : event.key;
if (
(event.ctrlKey || event.metaKey) &&
!event.shiftKey &&
!event.altKey &&
key in supportedShortcuts
event.key in supportedShortcuts
) {
// Only capture the event if the user is not focused on an input
if (!canOverrideAlphanumericInput(event.composedPath())) {
@@ -27,14 +27,14 @@ export const KeyboardShortcutMixin = <T extends Constructor<LitElement>>(
return;
}
event.preventDefault();
supportedShortcuts[key]();
supportedShortcuts[event.key]();
return;
}
const supportedSingleKeyShortcuts = this.supportedSingleKeyShortcuts();
if (key in supportedSingleKeyShortcuts) {
if (event.key in supportedSingleKeyShortcuts) {
event.preventDefault();
supportedSingleKeyShortcuts[key]();
supportedSingleKeyShortcuts[event.key]();
}
};

View File

@@ -1,60 +0,0 @@
import type { LitElement } from "lit";
import type { Constructor } from "../types";
export const UndoRedoMixin = <T extends Constructor<LitElement>, ConfigType>(
superClass: T
) => {
class UndoRedoClass extends superClass {
private _undoStack: ConfigType[] = [];
private _redoStack: ConfigType[] = [];
protected _undoStackLimit = 75;
protected pushToUndo(config: ConfigType) {
if (this._undoStack.length >= this._undoStackLimit) {
this._undoStack.shift();
}
this._undoStack.push({ ...config });
this._redoStack = [];
}
public undo() {
const currentConfig = this.currentConfig;
if (this._undoStack.length === 0 || !currentConfig) {
return;
}
this._redoStack.push({ ...currentConfig });
const config = this._undoStack.pop()!;
this.applyUndoRedo(config);
}
public redo() {
const currentConfig = this.currentConfig;
if (this._redoStack.length === 0 || !currentConfig) {
return;
}
this._undoStack.push({ ...currentConfig });
const config = this._redoStack.pop()!;
this.applyUndoRedo(config);
}
public get canUndo(): boolean {
return this._undoStack.length > 0;
}
public get canRedo(): boolean {
return this._redoStack.length > 0;
}
protected get currentConfig(): ConfigType | undefined {
return undefined;
}
protected applyUndoRedo(_: ConfigType) {
throw new Error("applyUndoRedo not implemented");
}
}
return UndoRedoClass;
};

View File

@@ -74,10 +74,8 @@ import { showMoreInfoDialog } from "../../../dialogs/more-info/show-ha-more-info
import "../../../layouts/hass-subpage";
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
import { PreventUnsavedMixin } from "../../../mixins/prevent-unsaved-mixin";
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
import { haStyle } from "../../../resources/styles";
import type { Entries, HomeAssistant, Route } from "../../../types";
import { isMac } from "../../../util/is_mac";
import { showToast } from "../../../util/toast";
import { showAssignCategoryDialog } from "../category/show-dialog-assign-category";
import "../ha-config-section";
@@ -89,6 +87,8 @@ import {
import "./blueprint-automation-editor";
import "./manual-automation-editor";
import type { HaManualAutomationEditor } from "./manual-automation-editor";
import { UndoRedoController } from "../../../common/controllers/undo-redo-controller";
import { isMac } from "../../../util/is_mac";
declare global {
interface HTMLElementTagNameMap {
@@ -111,12 +111,9 @@ declare global {
}
}
const baseEditorMixins = PreventUnsavedMixin(KeyboardShortcutMixin(LitElement));
export class HaAutomationEditor extends UndoRedoMixin<
typeof baseEditorMixins,
AutomationConfig
>(baseEditorMixins) {
export class HaAutomationEditor extends PreventUnsavedMixin(
KeyboardShortcutMixin(LitElement)
) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public automationId: string | null = null;
@@ -183,6 +180,11 @@ export class HaAutomationEditor extends UndoRedoMixin<
value: PromiseLike<EntityRegistryEntry> | EntityRegistryEntry
) => void;
private _undoRedoController = new UndoRedoController<AutomationConfig>(this, {
apply: (config) => this._applyUndoRedo(config),
currentConfig: () => this._config!,
});
protected willUpdate(changedProps) {
super.willUpdate(changedProps);
@@ -235,8 +237,8 @@ export class HaAutomationEditor extends UndoRedoMixin<
slot="toolbar-icon"
.label=${this.hass.localize("ui.common.undo")}
.path=${mdiUndo}
@click=${this.undo}
.disabled=${!this.canUndo}
@click=${this._undo}
.disabled=${!this._undoRedoController.canUndo}
id="button-undo"
>
</ha-icon-button>
@@ -253,24 +255,17 @@ export class HaAutomationEditor extends UndoRedoMixin<
slot="toolbar-icon"
.label=${this.hass.localize("ui.common.redo")}
.path=${mdiRedo}
@click=${this.redo}
.disabled=${!this.canRedo}
@click=${this._redo}
.disabled=${!this._undoRedoController.canRedo}
id="button-redo"
>
</ha-icon-button>
<ha-tooltip placement="bottom" for="button-redo">
${this.hass.localize("ui.common.redo")}
<span class="shortcut">
(
${isMac
? html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Shift</span>
<span>+</span>
<span>Z</span>`
: html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Y</span>`})
(<span>${shortcutIcon}</span>
<span>+</span>
<span>Y</span>)
</span>
</ha-tooltip>`
: nothing}
@@ -298,16 +293,16 @@ export class HaAutomationEditor extends UndoRedoMixin<
${this._mode === "gui" && this.narrow
? html`<ha-list-item
graphic="icon"
@click=${this.undo}
.disabled=${!this.canUndo}
@click=${this._undo}
.disabled=${!this._undoRedoController.canUndo}
>
${this.hass.localize("ui.common.undo")}
<ha-svg-icon slot="graphic" .path=${mdiUndo}></ha-svg-icon>
</ha-list-item>
<ha-list-item
graphic="icon"
@click=${this.redo}
.disabled=${!this.canRedo}
@click=${this._redo}
.disabled=${!this._undoRedoController.canRedo}
>
${this.hass.localize("ui.common.redo")}
<ha-svg-icon slot="graphic" .path=${mdiRedo}></ha-svg-icon>
@@ -518,7 +513,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
@value-changed=${this._valueChanged}
@save-automation=${this._handleSaveAutomation}
@editor-save=${this._handleSaveAutomation}
@undo-paste=${this.undo}
>
<div class="alert-wrapper" slot="alerts">
${this._errors || stateObj?.state === UNAVAILABLE
@@ -791,7 +785,7 @@ export class HaAutomationEditor extends UndoRedoMixin<
ev.stopPropagation();
if (this._config) {
this.pushToUndo(this._config);
this._undoRedoController.commit(this._config);
}
this._config = ev.detail.value;
@@ -1202,9 +1196,8 @@ export class HaAutomationEditor extends UndoRedoMixin<
x: () => this._cutSelectedRow(),
Delete: () => this._deleteSelectedRow(),
Backspace: () => this._deleteSelectedRow(),
z: () => this.undo(),
Z: () => this.redo(),
y: () => this.redo(),
z: () => this._undo(),
y: () => this._redo(),
};
}
@@ -1238,16 +1231,20 @@ export class HaAutomationEditor extends UndoRedoMixin<
this._manualEditor?.deleteSelectedRow();
}
protected get currentConfig() {
return this._config;
}
protected applyUndoRedo(config: AutomationConfig) {
protected _applyUndoRedo(config: AutomationConfig) {
this._manualEditor?.triggerCloseSidebar();
this._config = config;
this._dirty = true;
}
private _undo() {
this._undoRedoController.undo();
}
private _redo() {
this._undoRedoController.redo();
}
static get styles(): CSSResultGroup {
return [
haStyle,
@@ -1257,7 +1254,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
--ha-automation-editor-width,
1540px
);
--hass-subpage-bottom-inset: 0px;
}
ha-fade-in {
display: flex;

View File

@@ -292,7 +292,9 @@ export default class HaAutomationSidebar extends LitElement {
:host {
z-index: 6;
outline: none;
height: calc(100% - var(--safe-area-inset-top, 0px));
height: calc(
100% - var(--safe-area-inset-top) - var(--safe-area-inset-bottom)
);
--ha-card-border-radius: var(
--ha-dialog-border-radius,
var(--ha-border-radius-2xl)
@@ -302,6 +304,7 @@ export default class HaAutomationSidebar extends LitElement {
--ha-bottom-sheet-border-style: solid;
--ha-bottom-sheet-border-color: var(--primary-color);
margin-top: var(--safe-area-inset-top);
margin-bottom: var(--safe-area-inset-bottom);
}
@media all and (max-width: 870px) {

View File

@@ -616,7 +616,7 @@ export class HaManualAutomationEditor extends LitElement {
action: {
text: this.hass.localize("ui.common.undo"),
action: () => {
fireEvent(this, "undo-paste");
fireEvent(this, "undo-change");
this._pastedConfig = undefined;
},
@@ -742,6 +742,5 @@ declare global {
"open-sidebar": SidebarConfig;
"request-close-sidebar": undefined;
"close-sidebar": undefined;
"undo-paste": undefined;
}
}

View File

@@ -145,19 +145,24 @@ export const manualEditorStyles = css`
.content {
padding-top: 24px;
padding-bottom: max(var(--safe-area-inset-bottom), 32px);
padding-bottom: 72px;
transition: padding-bottom 180ms ease-in-out;
}
.content.has-bottom-sheet {
padding-bottom: calc(90vh - max(var(--safe-area-inset-bottom), 32px));
padding-bottom: calc(90vh - 72px);
}
ha-automation-sidebar {
position: fixed;
top: calc(var(--header-height) + 16px);
height: calc(-81px + 100vh - var(--safe-area-inset-top, 0px));
height: calc(-81px + 100dvh - var(--safe-area-inset-top, 0px));
height: calc(
-81px +
100dvh - var(--safe-area-inset-top, 0px) - var(
--safe-area-inset-bottom,
0px
)
);
width: var(--sidebar-width);
display: block;
}

View File

@@ -65,10 +65,8 @@ import "../../../layouts/hass-subpage";
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
import { PreventUnsavedMixin } from "../../../mixins/prevent-unsaved-mixin";
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
import { haStyle } from "../../../resources/styles";
import type { Entries, HomeAssistant, Route } from "../../../types";
import { isMac } from "../../../util/is_mac";
import { showToast } from "../../../util/toast";
import { showAutomationModeDialog } from "../automation/automation-mode-dialog/show-dialog-automation-mode";
import type { EntityRegistryUpdate } from "../automation/automation-save-dialog/show-dialog-automation-save";
@@ -77,15 +75,12 @@ import { showAssignCategoryDialog } from "../category/show-dialog-assign-categor
import "./blueprint-script-editor";
import "./manual-script-editor";
import type { HaManualScriptEditor } from "./manual-script-editor";
import { UndoRedoController } from "../../../common/controllers/undo-redo-controller";
import { isMac } from "../../../util/is_mac";
const baseEditorMixins = SubscribeMixin(
export class HaScriptEditor extends SubscribeMixin(
PreventUnsavedMixin(KeyboardShortcutMixin(LitElement))
);
export class HaScriptEditor extends UndoRedoMixin<
typeof baseEditorMixins,
ScriptConfig
>(baseEditorMixins) {
) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public scriptId: string | null = null;
@@ -141,6 +136,11 @@ export class HaScriptEditor extends UndoRedoMixin<
value: PromiseLike<EntityRegistryEntry> | EntityRegistryEntry
) => void;
private _undoRedoController = new UndoRedoController<ScriptConfig>(this, {
apply: (config) => this._applyUndoRedo(config),
currentConfig: () => this._config!,
});
protected willUpdate(changedProps) {
super.willUpdate(changedProps);
@@ -188,8 +188,8 @@ export class HaScriptEditor extends UndoRedoMixin<
slot="toolbar-icon"
.label=${this.hass.localize("ui.common.undo")}
.path=${mdiUndo}
@click=${this.undo}
.disabled=${!this.canUndo}
@click=${this._undo}
.disabled=${!this._undoRedoController.canUndo}
id="button-undo"
>
</ha-icon-button>
@@ -205,24 +205,17 @@ export class HaScriptEditor extends UndoRedoMixin<
slot="toolbar-icon"
.label=${this.hass.localize("ui.common.redo")}
.path=${mdiRedo}
@click=${this.redo}
.disabled=${!this.canRedo}
@click=${this._redo}
.disabled=${!this._undoRedoController.canRedo}
id="button-redo"
>
</ha-icon-button>
<ha-tooltip placement="bottom" for="button-redo">
${this.hass.localize("ui.common.redo")}
<span class="shortcut"
>(
${isMac
? html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Shift</span>
<span>+</span>
<span>Z</span>`
: html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Y</span>`})
<span class="shortcut">
(<span>${shortcutIcon}</span>
<span>+</span>
<span>Y</span>)
</span>
</ha-tooltip>`
: nothing}
@@ -249,16 +242,16 @@ export class HaScriptEditor extends UndoRedoMixin<
${this._mode === "gui" && this.narrow
? html`<ha-list-item
graphic="icon"
@click=${this.undo}
.disabled=${!this.canUndo}
@click=${this._undo}
.disabled=${!this._undoRedoController.canUndo}
>
${this.hass.localize("ui.common.undo")}
<ha-svg-icon slot="graphic" .path=${mdiUndo}></ha-svg-icon>
</ha-list-item>
<ha-list-item
graphic="icon"
@click=${this.redo}
.disabled=${!this.canRedo}
@click=${this._redo}
.disabled=${!this._undoRedoController.canRedo}
>
${this.hass.localize("ui.common.redo")}
<ha-svg-icon slot="graphic" .path=${mdiRedo}></ha-svg-icon>
@@ -463,7 +456,6 @@ export class HaScriptEditor extends UndoRedoMixin<
@value-changed=${this._valueChanged}
@editor-save=${this._handleSaveScript}
@save-script=${this._handleSaveScript}
@undo-paste=${this.undo}
>
<div class="alert-wrapper" slot="alerts">
${this._errors || stateObj?.state === UNAVAILABLE
@@ -679,7 +671,7 @@ export class HaScriptEditor extends UndoRedoMixin<
private _valueChanged(ev) {
if (this._config) {
this.pushToUndo(this._config);
this._undoRedoController.commit(this._config);
}
this._config = ev.detail.value;
@@ -776,7 +768,7 @@ export class HaScriptEditor extends UndoRedoMixin<
}
if (this._config) {
this.pushToUndo(this._config);
this._undoRedoController.commit(this._config);
}
this._manualEditor?.addFields();
@@ -1110,9 +1102,8 @@ export class HaScriptEditor extends UndoRedoMixin<
x: () => this._cutSelectedRow(),
Delete: () => this._deleteSelectedRow(),
Backspace: () => this._deleteSelectedRow(),
z: () => this.undo(),
Z: () => this.redo(),
y: () => this.redo(),
z: () => this._undo(),
y: () => this._redo(),
};
}
@@ -1146,16 +1137,20 @@ export class HaScriptEditor extends UndoRedoMixin<
this._manualEditor?.deleteSelectedRow();
}
protected get currentConfig() {
return this._config;
}
protected applyUndoRedo(config: ScriptConfig) {
protected _applyUndoRedo(config: ScriptConfig) {
this._manualEditor?.triggerCloseSidebar();
this._config = config;
this._dirty = true;
}
private _undo() {
this._undoRedoController.undo();
}
private _redo() {
this._undoRedoController.redo();
}
static get styles(): CSSResultGroup {
return [
haStyle,
@@ -1165,7 +1160,6 @@ export class HaScriptEditor extends UndoRedoMixin<
--ha-automation-editor-width,
1540px
);
--hass-subpage-bottom-inset: 0px;
}
.yaml-mode {
height: 100%;

View File

@@ -491,7 +491,7 @@ export class HaManualScriptEditor extends LitElement {
action: {
text: this.hass.localize("ui.common.undo"),
action: () => {
fireEvent(this, "undo-paste");
fireEvent(this, "undo-change");
this._pastedConfig = undefined;
},

View File

@@ -204,16 +204,7 @@ export class HuiEnergyDevicesGraphCard
const computedStyle = getComputedStyle(this);
const exclude = this._config?.hide_compound_stats
? energyData.prefs.device_consumption
.map((d) => d.included_in_stat)
.filter(Boolean)
: [];
energyData.prefs.device_consumption.forEach((device, id) => {
if (exclude.includes(device.stat_consumption)) {
return;
}
const value =
device.stat_consumption in data
? calculateStatisticSumGrowth(data[device.stat_consumption]) || 0

View File

@@ -176,7 +176,6 @@ export interface EnergyDevicesGraphCardConfig extends EnergyCardBaseConfig {
type: "energy-devices-graph";
title?: string;
max_devices?: number;
hide_compound_stats?: boolean;
}
export interface EnergyDevicesDetailGraphCardConfig
@@ -283,7 +282,7 @@ export interface GlanceConfigEntity extends ConfigEntity {
image?: string;
show_state?: boolean;
state_color?: boolean;
format?: TimestampRenderingFormat;
format: TimestampRenderingFormat;
}
export interface GlanceCardConfig extends LovelaceCardConfig {

View File

@@ -1,4 +1,4 @@
import { mdiClose, mdiDrag, mdiPencil } from "@mdi/js";
import { mdiDrag } from "@mdi/js";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { repeat } from "lit/directives/repeat";
@@ -12,7 +12,6 @@ import "../../../components/ha-icon-button";
import "../../../components/ha-sortable";
import type { HomeAssistant } from "../../../types";
import type { EntityConfig } from "../entity-rows/types";
import { computeRTL } from "../../../common/util/compute_rtl";
@customElement("hui-entity-editor")
export class HuiEntityEditor extends LitElement {
@@ -25,8 +24,6 @@ export class HuiEntityEditor extends LitElement {
@property() public label?: string;
@property({ attribute: "can-edit", type: Boolean }) public canEdit?;
private _entityKeys = new WeakMap<EntityConfig, string>();
private _getKey(action: EntityConfig) {
@@ -37,70 +34,6 @@ export class HuiEntityEditor extends LitElement {
return this._entityKeys.get(action)!;
}
private _renderItem(item: EntityConfig, index: number) {
const stateObj = this.hass!.states[item.entity];
const entityName =
stateObj && this.hass!.formatEntityName(stateObj, "entity");
const deviceName =
stateObj && this.hass!.formatEntityName(stateObj, "device");
const areaName = stateObj && this.hass!.formatEntityName(stateObj, "area");
const isRTL = computeRTL(this.hass!);
const primary = item.name || entityName || deviceName || item.entity;
const secondary = [areaName, entityName ? deviceName : undefined]
.filter(Boolean)
.join(isRTL ? " ◂ " : " ▸ ");
return html`
<ha-md-list-item class="item">
<ha-svg-icon class="handle" .path=${mdiDrag} slot="start"></ha-svg-icon>
<div slot="headline" class="label">${primary}</div>
${secondary
? html`<div slot="supporting-text" class="description">
${secondary}
</div>`
: nothing}
<ha-icon-button
slot="end"
.item=${item}
.index=${index}
.label=${this.hass!.localize("ui.common.edit")}
.path=${mdiPencil}
@click=${this._editItem}
></ha-icon-button>
<ha-icon-button
slot="end"
.index=${index}
.label=${this.hass!.localize("ui.common.delete")}
.path=${mdiClose}
@click=${this._deleteItem}
></ha-icon-button>
</ha-md-list-item>
`;
}
private _editItem(ev) {
const index = (ev.currentTarget as any).index;
fireEvent(this, "edit-detail-element", {
subElementConfig: {
index,
type: "row",
elementConfig: this.entities![index],
},
});
}
private _deleteItem(ev) {
const index = ev.target.index;
const newConfigEntities = this.entities!.slice(0, index).concat(
this.entities!.slice(index + 1)
);
fireEvent(this, "entities-changed", { entities: newConfigEntities });
}
protected render() {
if (!this.entities) {
return nothing;
@@ -114,48 +47,29 @@ export class HuiEntityEditor extends LitElement {
this.hass!.localize("ui.panel.lovelace.editor.card.config.required") +
")"}
</h3>
${this.canEdit
? html`
<div class="items-container">
<ha-sortable
handle-selector=".handle"
draggable-selector=".item"
@item-moved=${this._entityMoved}
>
<ha-md-list>
${this.entities.map((item, index) =>
this._renderItem(item, index)
)}
</ha-md-list>
</ha-sortable>
</div>
`
: html` <ha-sortable
handle-selector=".handle"
@item-moved=${this._entityMoved}
>
<div class="entities">
${repeat(
this.entities,
(entityConf) => this._getKey(entityConf),
(entityConf, index) => html`
<div class="entity" data-entity-id=${entityConf.entity}>
<div class="handle">
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
</div>
<ha-entity-picker
.hass=${this.hass}
.value=${entityConf.entity}
.index=${index}
.entityFilter=${this.entityFilter}
@value-changed=${this._valueChanged}
allow-custom-entity
></ha-entity-picker>
</div>
`
)}
</div>
</ha-sortable>`}
<ha-sortable handle-selector=".handle" @item-moved=${this._entityMoved}>
<div class="entities">
${repeat(
this.entities,
(entityConf) => this._getKey(entityConf),
(entityConf, index) => html`
<div class="entity" data-entity-id=${entityConf.entity}>
<div class="handle">
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
</div>
<ha-entity-picker
.hass=${this.hass}
.value=${entityConf.entity}
.index=${index}
.entityFilter=${this.entityFilter}
@value-changed=${this._valueChanged}
allow-custom-entity
></ha-entity-picker>
</div>
`
)}
</div>
</ha-sortable>
<ha-entity-picker
class="add-entity"
.hass=${this.hass}
@@ -234,35 +148,6 @@ export class HuiEntityEditor extends LitElement {
.entity ha-entity-picker {
flex-grow: 1;
}
ha-md-list {
gap: 8px;
}
ha-md-list-item {
border: 1px solid var(--divider-color);
border-radius: 8px;
--ha-md-list-item-gap: 0;
--md-list-item-top-space: 0;
--md-list-item-bottom-space: 0;
--md-list-item-leading-space: 12px;
--md-list-item-trailing-space: 4px;
--md-list-item-two-line-container-height: 48px;
--md-list-item-one-line-container-height: 48px;
}
.handle {
cursor: move;
padding: 8px;
margin-inline-start: -8px;
}
label {
margin-bottom: 8px;
display: block;
}
ha-md-list-item .label,
ha-md-list-item .description {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
`;
}

View File

@@ -31,8 +31,6 @@ export class HuiGenericEntityRowEditor
{
@property({ attribute: false }) public hass?: HomeAssistant;
@property({ attribute: false }) public schema?;
@state() private _config?: EntitiesCardEntityConfig;
public setConfig(config: EntitiesCardEntityConfig): void {
@@ -89,8 +87,7 @@ export class HuiGenericEntityRowEditor
return nothing;
}
const schema =
this.schema || this._schema(this._config.entity, this.hass.localize);
const schema = this._schema(this._config.entity, this.hass.localize);
return html`
<ha-form

View File

@@ -13,9 +13,6 @@ import {
} from "superstruct";
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/ha-form/ha-form";
import "../hui-sub-element-editor";
import type { EditDetailElementEvent, SubElementEditorConfig } from "../types";
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
import type { SchemaUnion } from "../../../../components/ha-form/types";
import type { HomeAssistant } from "../../../../types";
import type { ConfigEntity, GlanceCardConfig } from "../../cards/types";
@@ -24,7 +21,6 @@ import type { LovelaceCardEditor } from "../../types";
import { processEditorEntities } from "../process-editor-entities";
import { baseLovelaceCardConfig } from "../structs/base-card-struct";
import { entitiesConfigStruct } from "../structs/entities-struct";
import type { EntityConfig } from "../../entity-rows/types";
const cardConfigStruct = assign(
baseLovelaceCardConfig,
@@ -40,49 +36,6 @@ const cardConfigStruct = assign(
})
);
const SUB_SCHEMA = [
{ name: "entity", selector: { entity: {} }, required: true },
{
type: "grid",
name: "",
schema: [
{ name: "name", selector: { text: {} } },
{
name: "icon",
selector: {
icon: {},
},
context: {
icon_entity: "entity",
},
},
{ name: "show_last_changed", selector: { boolean: {} } },
{ name: "show_state", selector: { boolean: {} }, default: true },
],
},
{
name: "tap_action",
selector: {
ui_action: {
default_action: "more-info",
},
},
},
{
name: "",
type: "optional_actions",
flatten: true,
schema: (["hold_action", "double_tap_action"] as const).map((action) => ({
name: action,
selector: {
ui_action: {
default_action: "none" as const,
},
},
})),
},
] as const;
const SCHEMA = [
{ name: "title", selector: { text: {} } },
{
@@ -115,8 +68,6 @@ export class HuiGlanceCardEditor
@state() private _config?: GlanceCardConfig;
@state() private _subElementEditorConfig?: SubElementEditorConfig;
@state() private _configEntities?: ConfigEntity[];
public setConfig(config: GlanceCardConfig): void {
@@ -130,19 +81,6 @@ export class HuiGlanceCardEditor
return nothing;
}
if (this._subElementEditorConfig) {
return html`
<hui-sub-element-editor
.hass=${this.hass}
.config=${this._subElementEditorConfig}
.schema=${SUB_SCHEMA}
@go-back=${this._goBack}
@config-changed=${this._handleSubEntityChanged}
>
</hui-sub-element-editor>
`;
}
const data = {
show_name: true,
show_icon: true,
@@ -160,42 +98,12 @@ export class HuiGlanceCardEditor
></ha-form>
<hui-entity-editor
.hass=${this.hass}
can-edit
.entities=${this._configEntities}
@entities-changed=${this._entitiesChanged}
@edit-detail-element=${this._editDetailElement}
></hui-entity-editor>
`;
}
private _goBack(): void {
this._subElementEditorConfig = undefined;
}
private _editDetailElement(ev: HASSDomEvent<EditDetailElementEvent>): void {
this._subElementEditorConfig = ev.detail.subElementConfig;
}
private _handleSubEntityChanged(ev: CustomEvent): void {
ev.stopPropagation();
const index = this._subElementEditorConfig!.index!;
const newEntities = this._configEntities!.concat();
const newConfig = ev.detail.config as EntityConfig;
this._subElementEditorConfig = {
...this._subElementEditorConfig!,
elementConfig: newConfig,
};
newEntities[index] = newConfig;
let config = this._config!;
config = { ...config, entities: newEntities };
this._config = config;
this._configEntities = processEditorEntities(config.entities);
fireEvent(this, "config-changed", { config });
}
private _valueChanged(ev: CustomEvent): void {
const config = ev.detail.value;
fireEvent(this, "config-changed", { config });

View File

@@ -18,9 +18,6 @@ import type { SchemaUnion } from "../../../../components/ha-form/types";
import type { HomeAssistant } from "../../../../types";
import type { HistoryGraphCardConfig } from "../../cards/types";
import "../../components/hui-entity-editor";
import "../hui-sub-element-editor";
import type { EditDetailElementEvent, SubElementEditorConfig } from "../types";
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
import type { EntityConfig } from "../../entity-rows/types";
import type { LovelaceCardEditor } from "../../types";
import { processEditorEntities } from "../process-editor-entities";
@@ -43,11 +40,6 @@ const cardConfigStruct = assign(
})
);
const SUB_SCHEMA = [
{ name: "entity", selector: { entity: {} }, required: true },
{ name: "name", selector: { text: {} } },
] as const;
@customElement("hui-history-graph-card-editor")
export class HuiHistoryGraphCardEditor
extends LitElement
@@ -57,8 +49,6 @@ export class HuiHistoryGraphCardEditor
@state() private _config?: HistoryGraphCardConfig;
@state() private _subElementEditorConfig?: SubElementEditorConfig;
@state() private _configEntities?: EntityConfig[];
public setConfig(config: HistoryGraphCardConfig): void {
@@ -120,19 +110,6 @@ export class HuiHistoryGraphCardEditor
return nothing;
}
if (this._subElementEditorConfig) {
return html`
<hui-sub-element-editor
.hass=${this.hass}
.config=${this._subElementEditorConfig}
.schema=${SUB_SCHEMA}
@go-back=${this._goBack}
@config-changed=${this._handleSubEntityChanged}
>
</hui-sub-element-editor>
`;
}
const schema = this._schema(
this._config!.min_y_axis !== undefined ||
this._config!.max_y_axis !== undefined
@@ -149,41 +126,11 @@ export class HuiHistoryGraphCardEditor
<hui-entity-editor
.hass=${this.hass}
.entities=${this._configEntities}
can-edit
@entities-changed=${this._entitiesChanged}
@edit-detail-element=${this._editDetailElement}
></hui-entity-editor>
`;
}
private _goBack(): void {
this._subElementEditorConfig = undefined;
}
private _editDetailElement(ev: HASSDomEvent<EditDetailElementEvent>): void {
this._subElementEditorConfig = ev.detail.subElementConfig;
}
private _handleSubEntityChanged(ev: CustomEvent): void {
ev.stopPropagation();
const index = this._subElementEditorConfig!.index!;
const newEntities = this._configEntities!.concat();
const newConfig = ev.detail.config as EntityConfig;
this._subElementEditorConfig = {
...this._subElementEditorConfig!,
elementConfig: newConfig,
};
newEntities[index] = newConfig;
let config = this._config!;
config = { ...config, entities: newEntities };
this._config = config;
this._configEntities = processEditorEntities(config.entities);
fireEvent(this, "config-changed", { config });
}
private _valueChanged(ev: CustomEvent): void {
fireEvent(this, "config-changed", { config: ev.detail.value });
}

View File

@@ -57,8 +57,6 @@ export abstract class HuiElementEditor<
@property({ attribute: false }) public context?: C;
@property({ attribute: false }) public schema?;
@state() private _config?: T;
@state() private _configElement?: LovelaceGenericElementEditor;
@@ -314,9 +312,6 @@ export abstract class HuiElementEditor<
if (this._configElement && changedProperties.has("context")) {
this._configElement.context = this.context;
}
if (this._configElement && changedProperties.has("schema")) {
this._configElement.schema = this.schema;
}
}
private _handleUIConfigChanged(ev: UIConfigChangedEvent<T>) {
@@ -404,7 +399,6 @@ export abstract class HuiElementEditor<
configElement.lovelace = this.lovelace;
}
configElement.context = this.context;
configElement.schema = this.schema;
configElement.addEventListener("config-changed", (ev) =>
this._handleUIConfigChanged(ev as UIConfigChangedEvent<T>)
);

View File

@@ -27,8 +27,6 @@ export class HuiSubElementEditor extends LitElement {
@property({ attribute: false }) public config!: SubElementEditorConfig;
@property({ attribute: false }) public schema?;
@state() private _guiModeAvailable = true;
@state() private _guiMode = true;
@@ -91,7 +89,6 @@ export class HuiSubElementEditor extends LitElement {
.hass=${this.hass}
.value=${this.config.elementConfig}
.context=${this.config.context}
.schema=${this.schema}
@config-changed=${this._handleConfigChanged}
@GUImode-changed=${this._handleGUIModeChanged}
></hui-row-element-editor>

View File

@@ -18,8 +18,6 @@ export const entitiesConfigStruct = union([
hold_action: optional(actionConfigStruct),
double_tap_action: optional(actionConfigStruct),
confirmation: optional(actionConfigStructConfirmation),
show_last_changed: optional(boolean()),
show_state: optional(boolean()),
}),
string(),
]);

View File

@@ -169,7 +169,6 @@ export interface LovelaceGenericElementEditor<C = any> extends HTMLElement {
hass?: HomeAssistant;
lovelace?: LovelaceConfig;
context?: C;
schema?: any;
setConfig(config: any): void;
focusYamlEditor?: () => void;
}

View File

@@ -328,13 +328,9 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) {
</span>
${this.narrow
? nothing
: isBrowser
? this.hass.localize(
"ui.components.media-browser.web-browser"
)
: stateObj
? computeStateName(stateObj)
: this.entityId}
: stateObj
? computeStateName(stateObj)
: this.entityId}
<ha-svg-icon
slot="end"
.path=${mdiChevronDown}

View File

@@ -157,10 +157,8 @@ export const haStyleDialog = css`
ha-dialog {
--mdc-dialog-min-width: 100vw;
--mdc-dialog-max-width: 100vw;
--mdc-dialog-min-height: 100vh;
--mdc-dialog-min-height: 100svh;
--mdc-dialog-max-height: 100vh;
--mdc-dialog-max-height: 100svh;
--mdc-dialog-min-height: 100%;
--mdc-dialog-max-height: 100%;
--vertical-align-dialog: flex-end;
--ha-dialog-border-radius: 0;
}

View File

@@ -7720,7 +7720,6 @@
"show_icon": "Show icon",
"show_name": "Show name",
"show_state": "Show state",
"show_last_changed": "Show last changed",
"tap_action": "Tap behavior",
"interactions": "Interactions",
"title": "Title",

120
yarn.lock
View File

@@ -1284,15 +1284,15 @@ __metadata:
languageName: node
linkType: hard
"@codemirror/view@npm:6.38.4, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.23.0, @codemirror/view@npm:^6.27.0":
version: 6.38.4
resolution: "@codemirror/view@npm:6.38.4"
"@codemirror/view@npm:6.38.3, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.23.0, @codemirror/view@npm:^6.27.0":
version: 6.38.3
resolution: "@codemirror/view@npm:6.38.3"
dependencies:
"@codemirror/state": "npm:^6.5.0"
crelt: "npm:^1.0.6"
style-mod: "npm:^4.1.0"
w3c-keyname: "npm:^2.2.4"
checksum: 10/86b3894e9e7c2113aabb1db8684d0520378339c194fa56a688fc26cd7d40336bb9df1f5f19f68309d95f14b80ecf0b70c0ffe5e43f2ec11c4bab18f2d5ee4494
checksum: 10/2df41450399cbac0eaf06dba822418dd6926e48344b9255902248075ef040c957dfe97fe842a755e284a2fd4a66dc17b9638385f46ad74e926baac2e797335a2
languageName: node
linkType: hard
@@ -4014,92 +4014,92 @@ __metadata:
languageName: node
linkType: hard
"@rspack/binding-darwin-arm64@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-darwin-arm64@npm:1.5.8"
"@rspack/binding-darwin-arm64@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-darwin-arm64@npm:1.5.7"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@rspack/binding-darwin-x64@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-darwin-x64@npm:1.5.8"
"@rspack/binding-darwin-x64@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-darwin-x64@npm:1.5.7"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@rspack/binding-linux-arm64-gnu@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-linux-arm64-gnu@npm:1.5.8"
"@rspack/binding-linux-arm64-gnu@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-linux-arm64-gnu@npm:1.5.7"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@rspack/binding-linux-arm64-musl@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-linux-arm64-musl@npm:1.5.8"
"@rspack/binding-linux-arm64-musl@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-linux-arm64-musl@npm:1.5.7"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@rspack/binding-linux-x64-gnu@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-linux-x64-gnu@npm:1.5.8"
"@rspack/binding-linux-x64-gnu@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-linux-x64-gnu@npm:1.5.7"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@rspack/binding-linux-x64-musl@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-linux-x64-musl@npm:1.5.8"
"@rspack/binding-linux-x64-musl@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-linux-x64-musl@npm:1.5.7"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@rspack/binding-wasm32-wasi@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-wasm32-wasi@npm:1.5.8"
"@rspack/binding-wasm32-wasi@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-wasm32-wasi@npm:1.5.7"
dependencies:
"@napi-rs/wasm-runtime": "npm:^1.0.5"
conditions: cpu=wasm32
languageName: node
linkType: hard
"@rspack/binding-win32-arm64-msvc@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-win32-arm64-msvc@npm:1.5.8"
"@rspack/binding-win32-arm64-msvc@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-win32-arm64-msvc@npm:1.5.7"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@rspack/binding-win32-ia32-msvc@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-win32-ia32-msvc@npm:1.5.8"
"@rspack/binding-win32-ia32-msvc@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-win32-ia32-msvc@npm:1.5.7"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@rspack/binding-win32-x64-msvc@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding-win32-x64-msvc@npm:1.5.8"
"@rspack/binding-win32-x64-msvc@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding-win32-x64-msvc@npm:1.5.7"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@rspack/binding@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/binding@npm:1.5.8"
"@rspack/binding@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/binding@npm:1.5.7"
dependencies:
"@rspack/binding-darwin-arm64": "npm:1.5.8"
"@rspack/binding-darwin-x64": "npm:1.5.8"
"@rspack/binding-linux-arm64-gnu": "npm:1.5.8"
"@rspack/binding-linux-arm64-musl": "npm:1.5.8"
"@rspack/binding-linux-x64-gnu": "npm:1.5.8"
"@rspack/binding-linux-x64-musl": "npm:1.5.8"
"@rspack/binding-wasm32-wasi": "npm:1.5.8"
"@rspack/binding-win32-arm64-msvc": "npm:1.5.8"
"@rspack/binding-win32-ia32-msvc": "npm:1.5.8"
"@rspack/binding-win32-x64-msvc": "npm:1.5.8"
"@rspack/binding-darwin-arm64": "npm:1.5.7"
"@rspack/binding-darwin-x64": "npm:1.5.7"
"@rspack/binding-linux-arm64-gnu": "npm:1.5.7"
"@rspack/binding-linux-arm64-musl": "npm:1.5.7"
"@rspack/binding-linux-x64-gnu": "npm:1.5.7"
"@rspack/binding-linux-x64-musl": "npm:1.5.7"
"@rspack/binding-wasm32-wasi": "npm:1.5.7"
"@rspack/binding-win32-arm64-msvc": "npm:1.5.7"
"@rspack/binding-win32-ia32-msvc": "npm:1.5.7"
"@rspack/binding-win32-x64-msvc": "npm:1.5.7"
dependenciesMeta:
"@rspack/binding-darwin-arm64":
optional: true
@@ -4121,23 +4121,23 @@ __metadata:
optional: true
"@rspack/binding-win32-x64-msvc":
optional: true
checksum: 10/8185f3d77f71f210f182799fd41edead264aa8819c354aa13744635869734722b056a958fd94f770c05cab2a501cb8f0c217626098f9b4ec82afed3c6c3b53f4
checksum: 10/38e104f67f5c7299d1452b85728675525684685e4b13f8a9091b46b53de3decf5caabf73d0408ad5167d3b2800ab4068aa5fc83275cfa259bc1814aede1a3684
languageName: node
linkType: hard
"@rspack/core@npm:1.5.8":
version: 1.5.8
resolution: "@rspack/core@npm:1.5.8"
"@rspack/core@npm:1.5.7":
version: 1.5.7
resolution: "@rspack/core@npm:1.5.7"
dependencies:
"@module-federation/runtime-tools": "npm:0.18.0"
"@rspack/binding": "npm:1.5.8"
"@rspack/binding": "npm:1.5.7"
"@rspack/lite-tapable": "npm:1.0.1"
peerDependencies:
"@swc/helpers": ">=0.5.1"
peerDependenciesMeta:
"@swc/helpers":
optional: true
checksum: 10/269e691dbb83430179b89d9f10e115c5fb97cf54eb13c49ae6f6070468f3fcbee17ebe0968d8ab82dfdb7b5474e339f3fd9c945d5d20eb89333b53d8c1ad32cc
checksum: 10/a8a95e18f1f0c5f40f2727b3180f06175e26252a6a31d4fe7dafd8b08f0648beca2457ec7d4c1698ce1f061dacabf734bece843e1dea0fd165acc2048eab29ac
languageName: node
linkType: hard
@@ -9187,7 +9187,7 @@ __metadata:
"@codemirror/legacy-modes": "npm:6.5.1"
"@codemirror/search": "npm:6.5.11"
"@codemirror/state": "npm:6.5.2"
"@codemirror/view": "npm:6.38.4"
"@codemirror/view": "npm:6.38.3"
"@date-fns/tz": "npm:1.4.1"
"@egjs/hammerjs": "npm:2.0.17"
"@formatjs/intl-datetimeformat": "npm:6.18.0"
@@ -9243,7 +9243,7 @@ __metadata:
"@octokit/rest": "npm:22.0.0"
"@replit/codemirror-indentation-markers": "npm:6.5.3"
"@rsdoctor/rspack-plugin": "npm:1.3.1"
"@rspack/core": "npm:1.5.8"
"@rspack/core": "npm:1.5.7"
"@rspack/dev-server": "npm:1.1.4"
"@swc/helpers": "npm:0.5.17"
"@thomasloven/round-slider": "npm:0.6.0"
@@ -9322,7 +9322,7 @@ __metadata:
leaflet: "npm:1.9.4"
leaflet-draw: "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch"
leaflet.markercluster: "npm:1.5.3"
lint-staged: "npm:16.2.3"
lint-staged: "npm:16.2.1"
lit: "npm:3.3.1"
lit-analyzer: "npm:2.0.3"
lit-html: "npm:3.3.1"
@@ -10657,9 +10657,9 @@ __metadata:
languageName: node
linkType: hard
"lint-staged@npm:16.2.3":
version: 16.2.3
resolution: "lint-staged@npm:16.2.3"
"lint-staged@npm:16.2.1":
version: 16.2.1
resolution: "lint-staged@npm:16.2.1"
dependencies:
commander: "npm:^14.0.1"
listr2: "npm:^9.0.4"
@@ -10670,7 +10670,7 @@ __metadata:
yaml: "npm:^2.8.1"
bin:
lint-staged: bin/lint-staged.js
checksum: 10/7c83cb478aa8004eecc8c91d633abe2865ffc037957ae9ee2669e49b76b76fe3512ba431277efc29cec7a38641e7d8a62f3378a41b624c88bde6fbef5524e2cb
checksum: 10/b604de3ca27a067e45c5f0e0780ca46f5617e9f6ac3895297dee087d62742bbcd9f9e910300c15c599e1f06900666469b73e036e3fe3153ccedef314ce791dd5
languageName: node
linkType: hard