summaryrefslogtreecommitdiffhomepage
path: root/727.2919567394fbd9d07a87.js.map
blob: 71099ebd5bf44f192b38bb0278c9da889e0757a0 (plain)
1
{"version":3,"file":"727.2919567394fbd9d07a87.js","mappings":"oUAWIA,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAA1B,IAKO,EAAe,KAAW,WAAiB,gBAAiBM,E,qHCnBnE,SAASC,EAAoBC,GAC3B,OAAOA,EAAKC,QACd,CAKA,SAASC,EAAiBC,GACxB,I,IAAQC,EAAoED,EAApEC,KAAMC,EAA8DF,EAA9DE,YAAaC,EAAiDH,EAAjDG,SAAQ,EAAyCH,EAAvCI,cAAAA,OAAa,IAAG,EAAAR,EAAkB,EACN,G,GAA/BS,EAAAA,EAAAA,UAA6B,IAApBF,EAASG,Q,EAAa,E,k5BAA1DC,EAAS,KAAEC,EAAY,KAE9B,OACE,iBAAKC,UAAWC,IAAQ,CACtBC,EAAAA,gBACoB,IAApBR,EAASG,QAAgBK,EAAAA,cACzBJ,GAAaI,EAAAA,oBACZC,KAAK,KAAK,WACX,gBAAIC,QAAS,kBAAML,GAAcD,EAAU,EAAC,WAC1C,SAACO,EAAA,EAAI,CAACL,UAAWE,EAAAA,MAAcV,KAAK,eACnC,IAAI,IAAEA,EAAK,KAAC,0BAAI,IAAEE,EAASG,OAAO,kBAErC,iBAAKG,UAAWE,EAAAA,eAAsB,WACpC,gCACGT,IAEFC,EAASG,OAAS,GAEjB,wBACGH,EAASY,KAAI,SAAClB,EAAMmB,GAAC,OACpB,wBACGZ,EAAcP,IADRmB,EAEJ,OAIP,uBAAG,qBAIf,CAEA,IAAMC,GACJ,SAACC,EAAA,EAAI,CAACC,UAAQ,EAACC,KAAK,sDAAqD,SAAC,UA+J5E,EA1JA,SAAiB,GAAoB,IAAhBC,EAAY,EA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EAAWS,WACrB9B,aACE,wBACE,wBAAI,yEAGRE,cAAe,SAAA6B,GAAK,OAClB,iCACE,0BAAI,SAAK,0BAAOA,EAAM,GAAGI,QAAa,mBACtC,wBACGJ,EAAMlB,KAAI,SAAClB,EAAMqC,GAAC,OACjB,wBAAarC,EAAKC,UAAToC,EAAuB,QAGnC,KAIP,SAACnC,EAAe,CACdE,KAAK,4BACLE,SAAUqB,EAAeQ,WACzB9B,aACE,wBACE,wBAAI,mEAGRE,cAAe,SAAA6B,GAAK,OAClB,iCACE,0BAAI,cAAU,4BAAM,IAAMA,EAAM,GAAGK,OAAW,mBAC9C,wBACGL,EAAMlB,KAAI,SAAClB,EAAMqC,GAAC,OACjB,wBAAarC,EAAKC,UAAToC,EAAuB,QAGnC,MAKb,C,2DC3MIK,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,udAAwd,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,uDAAuD,MAAQ,GAAG,SAAW,yLAAyL,eAAiB,CAAC,iaAAia,WAAa,MAEluCH,EAAwBI,OAAS,CAChC,gBAAmB,uBACnB,cAAiB,uBACjB,eAAkB,uBAClB,kBAAqB,uBACrB,MAAS,wBAEV,K","sources":["webpack:///./src/Keyboard/Warnings/styles.module.css?70c5","webpack:///./src/Keyboard/Warnings/Warnings.js","webpack:///./src/Keyboard/Warnings/styles.module.css"],"sourcesContent":["\n      import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./styles.module.css\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n      options.insert = insertFn.bind(null, \"head\");\n    \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./styles.module.css\";\n       export default content && content.locals ? content.locals : undefined;\n","import compact from 'lodash/compact'\nimport { useState } from 'react'\nimport Icon from '../../Common/Icon'\n\nimport Link from '../../Common/Link'\nimport styles from './styles.module.css'\n\nfunction DefaultWarningItem (item) {\n  return item.location\n}\n\nconst layoutWikiUrl = 'https://github.com/nickcoutsos/keymap-editor/wiki/Defining-keyboard-layouts'\nconst zmkUpdateNotes = 'https://zmk.dev/blog/2023/04/06/zephyr-3-2#keymap-changes'\n\nfunction WarningCategory (props) {\n  const { name, explanation, warnings, renderWarning = DefaultWarningItem } = props\n  const [collapsed, setCollapsed] = useState(warnings.length === 0)\n\n  return (\n    <div className={compact([\n      styles.warningCategory,\n      warnings.length === 0 && styles.emptyCategory,\n      collapsed && styles.collapsedCategory\n    ]).join(' ')}>\n      <h3 onClick={() => setCollapsed(!collapsed)}>\n        <Icon className={styles.caret} name=\"caret-down\" />\n        {' '} {name} <em>({warnings.length} issues)</em>\n      </h3>\n      <div className={styles.warningDetails}>\n        <blockquote>\n          {explanation}\n        </blockquote>\n        {warnings.length > 0\n          ? (\n          <ul>\n            {warnings.map((item, i) => (\n              <li key={i}>\n                {renderWarning(item)}\n              </li>\n            ))}\n          </ul>\n            )\n          : <p>No problems</p>}\n      </div>\n    </div>\n  )\n}\n\nconst issue = (\n  <Link external href=\"https://github.com/nickcoutsos/keymap-editor/issues\">\n    issue\n  </Link>\n)\n\nfunction Warnings ({ sanityChecks }) {\n  const { nodeNames, nodeLabels, nodeReferences, deprecations, layoutMissingPositions } = sanityChecks\n\n  return (\n    <div style={{ maxWidth: '700px', margin: '0 auto', paddingBottom: '60px' }}>\n      <h2>Warnings</h2>\n\n      {deprecations.resetBindings.length > 0 && (\n        <WarningCategory\n          name=\"Deprecated/removed behavior\"\n          warnings={deprecations.resetBindings}\n          explanation={(\n            <>\n              <p>\n                <em>\n                  The <code>&reset</code> behavior has been removed from ZMK in\n                  the 3.2 Zephyr upgrade. If your keyboard is bulding from that\n                  version of ZMK, make sure to use the <code>&sys_reset</code> behavior instead.\n                </em>\n              </p>\n              <p>\n                For more information see <Link external href={zmkUpdateNotes}>ZMK - Zephyr 3.2 Update - Keymap Changes</Link>.\n              </p>\n            </>\n          )}\n        />\n      )}\n\n      <WarningCategory\n        name=\"Layout row/col positions\"\n        warnings={layoutMissingPositions}\n        explanation={(\n          <>\n            <p>\n              <em>\n                Your keyboard's layout metadata should include a <code>row</code>\n                and <code>col</code> property for each key in order to generate a\n                readable keymap <code>bindings</code> array.\n              </em>\n            </p>\n            <p>\n              For more information see <Link external href={layoutWikiUrl}>\n                Keymap Editor Wiki\n              </Link>.\n            </p>\n          </>\n        )}\n        renderWarning={() => {}}\n      />\n\n      <WarningCategory\n        name=\"Duplicate node names\"\n        warnings={nodeNames.duplicates}\n        explanation={(\n          <p>\n            <em>Node names must within the same section must be unique.</em>\n          </p>\n        )}\n        renderWarning={items => (\n          <>\n            <h4>Name <code>{items[0].name}</code> re-used in:</h4>\n            <ul>\n              {items.map((item, j) => (\n                <li key={j}>{item.location}</li>\n              ))}\n            </ul>\n          </>\n        )}\n      />\n\n      <WarningCategory\n        name=\"Re-definitions\"\n        warnings={nodeNames.redefined}\n        explanation={(\n          <p>\n            <em>Node names cannot use existing ZMK identifiers.</em>\n          </p>\n        )}\n      />\n\n      <WarningCategory\n        name=\"Macro Passwords\"\n        warnings={nodeNames.passwordMacros}\n        explanation={(\n          <>\n            <p>\n              <em>\n                Using keyboard macros to enter passwords is a security risk and\n                is strongly discouraged.\n              </em>\n            </p>\n            <p>\n              Recording passwords in your keyboard means that anyone with\n              physical access to your keyboard would have access to credentials\n              stored within it, whether they know to look for it or not. Also\n              note that through this application you are recording keyboard\n              configuration in a Git repository and storing credentials in a\n              code repository is not considered a safe practice (even if the\n              repository is private).\n            </p>\n            <p>\n              Any macros listed here have names which seem to suggest that they\n              are used for password entry. If that is the case I would encourage\n              you to remove them and change the associated password(s) if\n              needed. If this is a mistake feel free to create an {issue} to\n              help me avoid false alarms in the future!\n            </p>\n          </>\n        )}\n      />\n\n      <WarningCategory\n        name=\"Duplicate labels\"\n        warnings={nodeLabels.duplicates}\n        explanation={(\n          <p>\n            <em>Label property values must be unique throughout the entire keymap.</em>\n          </p>\n        )}\n        renderWarning={items => (\n          <>\n            <h4>Name <code>{items[0].label}</code> re-used in:</h4>\n            <ul>\n              {items.map((item, j) => (\n                <li key={j}>{item.location}</li>\n              ))}\n            </ul>\n          </>\n        )}\n      />\n\n      <WarningCategory\n        name=\"Duplicate node references\"\n        warnings={nodeReferences.duplicates}\n        explanation={(\n          <p>\n            <em>Node references must be unique throughout the entire keymap.</em>\n          </p>\n        )}\n        renderWarning={items => (\n          <>\n            <h4>Reference <code>&amp;{items[0].ref}</code> re-used in:</h4>\n            <ul>\n              {items.map((item, j) => (\n                <li key={j}>{item.location}</li>\n              ))}\n            </ul>\n          </>\n        )}\n      />\n    </div>\n  )\n}\n\nexport default Warnings\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"._Et43RIDBS31WGTsJW6Q {\\n  margin: 20px 0 35px;\\n}\\n._Et43RIDBS31WGTsJW6Q h3 {\\n  cursor: pointer;\\n}\\n._Et43RIDBS31WGTsJW6Q h3:hover {\\n  color: royalblue;\\n}\\n\\n.UD9L8GtxRyZNCl6a5dsA {\\n  color: var(--key-color-base);\\n  opacity: 0.7;\\n}\\n\\n.sah4Bu1xq72L7DDemOzU {\\n  padding-left: 16px;\\n}\\n\\n.pSk7y6zU9J8U_IybbhZB .rhqw3NH8NqvbeV0idmJz {\\n  transform: rotate(-90deg);\\n  transition: 100ms;\\n}\\n\\n.pSk7y6zU9J8U_IybbhZB .sah4Bu1xq72L7DDemOzU {\\n  display: none;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/Keyboard/Warnings/styles.module.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,mBAAmB;AACrB;AACA;EACE,eAAe;AACjB;AACA;EACE,gBAAgB;AAClB;;AAEA;EACE,4BAA4B;EAC5B,YAAY;AACd;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,yBAAyB;EACzB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf\",\"sourcesContent\":[\".warningCategory {\\n  margin: 20px 0 35px;\\n}\\n.warningCategory h3 {\\n  cursor: pointer;\\n}\\n.warningCategory h3:hover {\\n  color: royalblue;\\n}\\n\\n.emptyCategory {\\n  color: var(--key-color-base);\\n  opacity: 0.7;\\n}\\n\\n.warningDetails {\\n  padding-left: 16px;\\n}\\n\\n.collapsedCategory .caret {\\n  transform: rotate(-90deg);\\n  transition: 100ms;\\n}\\n\\n.collapsedCategory .warningDetails {\\n  display: none;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"warningCategory\": \"_Et43RIDBS31WGTsJW6Q\",\n\t\"emptyCategory\": \"UD9L8GtxRyZNCl6a5dsA\",\n\t\"warningDetails\": \"sah4Bu1xq72L7DDemOzU\",\n\t\"collapsedCategory\": \"pSk7y6zU9J8U_IybbhZB\",\n\t\"caret\": \"rhqw3NH8NqvbeV0idmJz\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","DefaultWarningItem","item","location","WarningCategory","props","name","explanation","warnings","renderWarning","useState","length","collapsed","setCollapsed","className","compact","styles","join","onClick","Icon","map","i","issue","Link","external","href","sanityChecks","nodeNames","nodeLabels","nodeReferences","deprecations","layoutMissingPositions","style","maxWidth","margin","paddingBottom","resetBindings","duplicates","items","j","redefined","passwordMacros","label","ref","___CSS_LOADER_EXPORT___","push","module","id","locals"],"sourceRoot":""}