From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../client/inspector/fonts/actions/font-editor.js | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 devtools/client/inspector/fonts/actions/font-editor.js (limited to 'devtools/client/inspector/fonts/actions/font-editor.js') diff --git a/devtools/client/inspector/fonts/actions/font-editor.js b/devtools/client/inspector/fonts/actions/font-editor.js new file mode 100644 index 0000000000..0542604d7b --- /dev/null +++ b/devtools/client/inspector/fonts/actions/font-editor.js @@ -0,0 +1,70 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +const { + APPLY_FONT_VARIATION_INSTANCE, + RESET_EDITOR, + SET_FONT_EDITOR_DISABLED, + UPDATE_AXIS_VALUE, + UPDATE_EDITOR_STATE, + UPDATE_PROPERTY_VALUE, + UPDATE_WARNING_MESSAGE, +} = require("resource://devtools/client/inspector/fonts/actions/index.js"); + +module.exports = { + resetFontEditor() { + return { + type: RESET_EDITOR, + }; + }, + + setEditorDisabled(disabled = false) { + return { + type: SET_FONT_EDITOR_DISABLED, + disabled, + }; + }, + + applyInstance(name, values) { + return { + type: APPLY_FONT_VARIATION_INSTANCE, + name, + values, + }; + }, + + updateAxis(axis, value) { + return { + type: UPDATE_AXIS_VALUE, + axis, + value, + }; + }, + + updateFontEditor(fonts, properties = {}, id = "") { + return { + type: UPDATE_EDITOR_STATE, + fonts, + properties, + id, + }; + }, + + updateFontProperty(property, value) { + return { + type: UPDATE_PROPERTY_VALUE, + property, + value, + }; + }, + + updateWarningMessage(warning) { + return { + type: UPDATE_WARNING_MESSAGE, + warning, + }; + }, +}; -- cgit v1.2.3