{
  "version": 3,
  "sources": ["../../src/store/actions.js"],
  "sourcesContent": ["/** @typedef {import('@wordpress/keycodes').WPKeycodeModifier} WPKeycodeModifier */\n\n/**\n * @typedef {'command'|'view'|'edit'|'workflow'|'action'} WPCommandCategory\n */\n\n/**\n * Command categories allowed via registerCommand.\n * The 'workflow' category is reserved for internal use\n * and cannot be registered through this API.\n *\n * @type {Set<WPCommandCategory>}\n */\nconst REGISTERABLE_CATEGORIES = new Set( [\n\t'command',\n\t'view',\n\t'edit',\n\t'action',\n] );\n\n/**\n * Configuration of a registered keyboard shortcut.\n *\n * @typedef {Object} WPCommandConfig\n *\n * @property {string}             name        Command name.\n * @property {string}             label       Command label.\n * @property {string=}            searchLabel Command search label.\n * @property {string=}            context     Command context.\n * @property {WPCommandCategory=} category    Command category.\n * @property {React.JSX.Element}  icon        Command icon.\n * @property {Function}           callback    Command callback.\n * @property {boolean}            disabled    Whether to disable the command.\n * @property {string[]=}          keywords    Command keywords for search matching.\n */\n\n/**\n * @typedef {(search: string) => WPCommandConfig[]} WPCommandLoaderHook hoo\n */\n\n/**\n * Command loader config.\n *\n * @typedef {Object} WPCommandLoaderConfig\n *\n * @property {string}              name     Command loader name.\n * @property {string=}             context  Command loader context.\n * @property {WPCommandCategory=}  category Command loader category.\n * @property {WPCommandLoaderHook} hook     Command loader hook.\n * @property {boolean}             disabled Whether to disable the command loader.\n */\n\n/**\n * Returns an action object used to register a new command.\n *\n * @param {WPCommandConfig} config Command config.\n *\n * @return {Object} action.\n */\nexport function registerCommand( config ) {\n\tlet { category } = config;\n\n\t// Defaults to 'action' if no category is provided or if the category is invalid. Future versions will emit a warning.\n\tif ( ! category || ! REGISTERABLE_CATEGORIES.has( category ) ) {\n\t\tcategory = 'action';\n\t}\n\n\treturn {\n\t\ttype: 'REGISTER_COMMAND',\n\t\t...config,\n\t\tcategory,\n\t};\n}\n\n/**\n * Returns an action object used to unregister a command.\n *\n * @param {string} name Command name.\n *\n * @return {Object} action.\n */\nexport function unregisterCommand( name ) {\n\treturn {\n\t\ttype: 'UNREGISTER_COMMAND',\n\t\tname,\n\t};\n}\n\n/**\n * Register command loader.\n *\n * @param {WPCommandLoaderConfig} config Command loader config.\n *\n * @return {Object} action.\n */\nexport function registerCommandLoader( config ) {\n\tlet { category } = config;\n\n\t// Defaults to 'action' if no category is provided or if the category is invalid. Future versions will emit a warning.\n\tif ( ! category || ! REGISTERABLE_CATEGORIES.has( category ) ) {\n\t\tcategory = 'action';\n\t}\n\n\treturn {\n\t\ttype: 'REGISTER_COMMAND_LOADER',\n\t\t...config,\n\t\tcategory,\n\t};\n}\n\n/**\n * Unregister command loader hook.\n *\n * @param {string} name Command loader name.\n *\n * @return {Object} action.\n */\nexport function unregisterCommandLoader( name ) {\n\treturn {\n\t\ttype: 'UNREGISTER_COMMAND_LOADER',\n\t\tname,\n\t};\n}\n\n/**\n * Opens the command palette.\n *\n * @return {Object} action.\n */\nexport function open() {\n\treturn {\n\t\ttype: 'OPEN',\n\t};\n}\n\n/**\n * Closes the command palette.\n *\n * @return {Object} action.\n */\nexport function close() {\n\treturn {\n\t\ttype: 'CLOSE',\n\t};\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA,IAAM,0BAA0B,oBAAI,IAAK;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;AAyCK,SAAS,gBAAiB,QAAS;AACzC,MAAI,EAAE,SAAS,IAAI;AAGnB,MAAK,CAAE,YAAY,CAAE,wBAAwB,IAAK,QAAS,GAAI;AAC9D,eAAW;AAAA,EACZ;AAEA,SAAO;AAAA,IACN,MAAM;AAAA,IACN,GAAG;AAAA,IACH;AAAA,EACD;AACD;AASO,SAAS,kBAAmB,MAAO;AACzC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AASO,SAAS,sBAAuB,QAAS;AAC/C,MAAI,EAAE,SAAS,IAAI;AAGnB,MAAK,CAAE,YAAY,CAAE,wBAAwB,IAAK,QAAS,GAAI;AAC9D,eAAW;AAAA,EACZ;AAEA,SAAO;AAAA,IACN,MAAM;AAAA,IACN,GAAG;AAAA,IACH;AAAA,EACD;AACD;AASO,SAAS,wBAAyB,MAAO;AAC/C,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAOO,SAAS,OAAO;AACtB,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAOO,SAAS,QAAQ;AACvB,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;",
  "names": []
}
