@spectrum-charts/utils 1.18.2 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.spectrumChartsUtils=t():e.spectrumChartsUtils=t()}(this,(()=>(()=>{"use strict";var e={938:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(783),t)},783:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(622),t)},622:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCase=t.combineNames=void 0,t.combineNames=(e,t)=>[e,t&&e?t.charAt(0).toUpperCase()+t.slice(1):t].filter(Boolean).join(""),t.toCamelCase=function(e){const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+\d*|\b)|[A-Z]?[a-z]+\d*|[A-Z]|\d+/g);return t?t.map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())).join(""):e}}},t={};return function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,r),i.exports}(938)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.spectrumChartsUtils=t():e.spectrumChartsUtils=t()}(this,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{combineNames:()=>o,toCamelCase:()=>r});const o=(e,t)=>[e,t&&e?t.charAt(0).toUpperCase()+t.slice(1):t].filter(Boolean).join("");function r(e){const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+\d*|\b)|[A-Z]?[a-z]+\d*|[A-Z]|\d+/g);return t?t.map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())).join(""):e}return t})()));
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- /*! @spectrum-charts/utils@v1.18.2 */
1
+ /*! @spectrum-charts/utils@v1.19.0 */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAA6B,oBAAID,IAEjCD,EAA0B,oBAAIC,GAC/B,CATD,CASGK,MAAM,IACT,mhBCEA,sgBCAA,8GCMa,EAAAC,aAAe,CAACC,EAA2BC,IAG/C,CAACD,EADNC,GAAaD,EAAaC,EAAUC,OAAO,GAAGC,cAAgBF,EAAUG,MAAM,GAAKH,GAC7CI,OAAOC,SAASC,KAAK,IAQ/D,uBAA4BC,GAC1B,MAAMC,EAAQD,EAAIE,MAAM,6DACxB,OAAID,EACKA,EACJE,KAAI,CAACC,EAAMC,IACA,IAANA,EAAgBD,EAAKE,cAClBF,EAAKV,OAAO,GAAGC,cAAgBS,EAAKR,MAAM,GAAGU,gBAErDP,KAAK,IAEHC,CACT,ICvCIO,EAA2B,CAAC,SAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaxB,QAGrB,IAAIC,EAASoB,EAAyBE,GAAY,CAGjDvB,QAAS,CAAC,GAOX,OAHA0B,EAAoBH,GAAUI,KAAK1B,EAAOD,QAASC,EAAQA,EAAOD,QAASsB,GAGpErB,EAAOD,OACf,CCnB0BsB,CAAoB,MLO9C","sources":["webpack://spectrumChartsUtils/webpack/universalModuleDefinition","webpack://spectrumChartsUtils/./index.ts","webpack://spectrumChartsUtils/./src/index.ts","webpack://spectrumChartsUtils/./src/utils.ts","webpack://spectrumChartsUtils/webpack/bootstrap","webpack://spectrumChartsUtils/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"spectrumChartsUtils\"] = factory();\n\telse\n\t\troot[\"spectrumChartsUtils\"] = factory();\n})(this, () => {\nreturn ","/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './src';\n","/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport * from './utils';\n","/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Combines a parent name and a child name into a single string\n * @param parentName - The parent name\n * @param childName - The child name\n * @returns The combined name\n */\nexport const combineNames = (parentName: string | null, childName: string | null): string => {\n const formattedChildName =\n childName && parentName ? childName.charAt(0).toUpperCase() + childName.slice(1) : childName;\n return [parentName, formattedChildName].filter(Boolean).join('');\n};\n\n/**\n * Converts a string to camel case\n * @param str - The string to convert\n * @returns The camel case string\n */\nexport function toCamelCase(str: string) {\n const words = str.match(/[A-Z]{2,}(?=[A-Z][a-z]+\\d*|\\b)|[A-Z]?[a-z]+\\d*|[A-Z]|\\d+/g);\n if (words) {\n return words\n .map((word, i) => {\n if (i === 0) return word.toLowerCase();\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n return str;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(938);\n"],"names":["root","factory","exports","module","define","amd","this","combineNames","parentName","childName","charAt","toUpperCase","slice","filter","Boolean","join","str","words","match","map","word","i","toLowerCase","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAA6B,oBAAID,IAEjCD,EAA0B,oBAAIC,GAC/B,CATD,CASGK,MAAM,IACT,mBCTA,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,6DCavD,MAAMC,EAAe,CAACC,EAA2BC,IAG/C,CAACD,EADNC,GAAaD,EAAaC,EAAUC,OAAO,GAAGC,cAAgBF,EAAUG,MAAM,GAAKH,GAC7CI,OAAOC,SAASC,KAAK,IAQxD,SAASC,EAAYC,GAC1B,MAAMC,EAAQD,EAAIE,MAAM,6DACxB,OAAID,EACKA,EACJE,KAAI,CAACC,EAAMC,IACA,IAANA,EAAgBD,EAAKE,cAClBF,EAAKX,OAAO,GAAGC,cAAgBU,EAAKT,MAAM,GAAGW,gBAErDR,KAAK,IAEHE,CACT,WL9BA","sources":["webpack://spectrumChartsUtils/webpack/universalModuleDefinition","webpack://spectrumChartsUtils/webpack/bootstrap","webpack://spectrumChartsUtils/webpack/runtime/define property getters","webpack://spectrumChartsUtils/webpack/runtime/hasOwnProperty shorthand","webpack://spectrumChartsUtils/webpack/runtime/make namespace object","webpack://spectrumChartsUtils/./src/utils.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"spectrumChartsUtils\"] = factory();\n\telse\n\t\troot[\"spectrumChartsUtils\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Combines a parent name and a child name into a single string\n * @param parentName - The parent name\n * @param childName - The child name\n * @returns The combined name\n */\nexport const combineNames = (parentName: string | null, childName: string | null): string => {\n const formattedChildName =\n childName && parentName ? childName.charAt(0).toUpperCase() + childName.slice(1) : childName;\n return [parentName, formattedChildName].filter(Boolean).join('');\n};\n\n/**\n * Converts a string to camel case\n * @param str - The string to convert\n * @returns The camel case string\n */\nexport function toCamelCase(str: string) {\n const words = str.match(/[A-Z]{2,}(?=[A-Z][a-z]+\\d*|\\b)|[A-Z]?[a-z]+\\d*|[A-Z]|\\d+/g);\n if (words) {\n return words\n .map((word, i) => {\n if (i === 0) return word.toLowerCase();\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n return str;\n}\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","combineNames","parentName","childName","charAt","toUpperCase","slice","filter","Boolean","join","toCamelCase","str","words","match","map","word","i","toLowerCase"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
- "name": "@spectrum-charts/utils",
3
- "version": "1.18.2",
4
- "description": "Utilities used in spectrum charts",
5
- "browser": "dist/index.js",
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
8
- "types": "dist/@types/index.d.ts",
9
- "files": [
10
- "dist"
11
- ],
12
- "author": "marshallpete",
13
- "license": "Apache-2.0",
14
- "scripts": {
15
- "build": "webpack --config ./webpack.config.js",
16
- "clean": "rm -rf dist",
17
- "pack-test": "yarn clean && yarn build && cross-env NODE_ENV=development npm pack",
18
- "pack": "cross-env NODE_ENV=production npm pack",
19
- "publish-package": "npm publish --access public"
20
- },
21
- "devDependencies": {
22
- "ts-loader": "^9.4.2",
23
- "typescript": "^5.4.5",
24
- "webpack": "^5.75.0",
25
- "webpack-cli": "^5.0.1"
26
- }
2
+ "name": "@spectrum-charts/utils",
3
+ "version": "1.19.0",
4
+ "description": "Utilities used in spectrum charts",
5
+ "browser": "dist/index.js",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/@types/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "author": "marshallpete",
13
+ "license": "Apache-2.0",
14
+ "scripts": {
15
+ "build": "webpack --config ./webpack.config.js",
16
+ "clean": "rm -rf dist",
17
+ "pack-test": "yarn clean && yarn build && cross-env NODE_ENV=development npm pack",
18
+ "pack": "cross-env NODE_ENV=production npm pack",
19
+ "publish-package": "npm publish --access public"
20
+ },
21
+ "devDependencies": {
22
+ "ts-loader": "^9.4.2",
23
+ "typescript": "^5.4.5",
24
+ "webpack": "^5.75.0",
25
+ "webpack-cli": "^5.0.1"
26
+ }
27
27
  }