diff --git a/action.yml b/action.yml index 76263b48a..e04cf83dd 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,7 @@ author: "platane" runs: using: docker - image: docker://platane/snk@sha256:dcb351bdad223f2a2161fa5d6e3c9102e6ebe9fbde99a10fa3bf443d69f61a0f + image: docker://platane/snk@sha256:bd0f7538482216785abbee29da431738f5ea9aff9fc3a4b8df37708a808f0968 inputs: github_user_name: diff --git a/package.json b/package.json index 1da74ccae..563e43f53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "snk", "description": "Generates a snake game from a github user contributions grid", - "version": "2.2.0", + "version": "2.2.1", "private": true, "repository": "github:platane/snk", "devDependencies": { diff --git a/svg-only/dist/317.index.js b/svg-only/dist/317.index.js index 9b415230e..2f94d6db8 100644 --- a/svg-only/dist/317.index.js +++ b/svg-only/dist/317.index.js @@ -689,14 +689,14 @@ const generateContributionSnake = async (userName, outputs) => { /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "V0": () => (/* binding */ isInside), +/* harmony export */ "Dy": () => (/* binding */ setColorEmpty), /* harmony export */ "HJ": () => (/* binding */ isInsideLarge), -/* harmony export */ "VJ": () => (/* binding */ copyGrid), /* harmony export */ "Lq": () => (/* binding */ getColor), -/* harmony export */ "xb": () => (/* binding */ isEmpty), +/* harmony export */ "V0": () => (/* binding */ isInside), +/* harmony export */ "VJ": () => (/* binding */ copyGrid), +/* harmony export */ "u1": () => (/* binding */ createEmptyGrid), /* harmony export */ "vk": () => (/* binding */ setColor), -/* harmony export */ "Dy": () => (/* binding */ setColorEmpty), -/* harmony export */ "u1": () => (/* binding */ createEmptyGrid) +/* harmony export */ "xb": () => (/* binding */ isEmpty) /* harmony export */ }); /* unused harmony exports isGridEmpty, gridEquals */ const isInside = (grid, x, y) => x >= 0 && y >= 0 && x < grid.width && y < grid.height; @@ -733,13 +733,13 @@ const createEmptyGrid = (width, height) => ({ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "If": () => (/* binding */ getHeadX), /* harmony export */ "IP": () => (/* binding */ getHeadY), +/* harmony export */ "If": () => (/* binding */ getHeadX), /* harmony export */ "JJ": () => (/* binding */ getSnakeLength), +/* harmony export */ "Ks": () => (/* binding */ snakeToCells), /* harmony export */ "kE": () => (/* binding */ snakeEquals), /* harmony export */ "kv": () => (/* binding */ nextSnake), /* harmony export */ "nJ": () => (/* binding */ snakeWillSelfCollide), -/* harmony export */ "Ks": () => (/* binding */ snakeToCells), /* harmony export */ "xG": () => (/* binding */ createSnakeFromCells) /* harmony export */ }); /* unused harmony export copySnake */ diff --git a/svg-only/dist/index.js b/svg-only/dist/index.js index 01b06d177..6dae8b572 100644 --- a/svg-only/dist/index.js +++ b/svg-only/dist/index.js @@ -2991,7 +2991,7 @@ var external_path_ = __nccwpck_require__(1017); // EXTERNAL MODULE: ../../node_modules/@actions/core/lib/core.js var core = __nccwpck_require__(7117); ;// CONCATENATED MODULE: ./palettes.ts -const palettes = { +const basePalettes = { "github-light": { colorDotBorder: "#1b1f230a", colorDots: ["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"], @@ -3006,10 +3006,8 @@ const palettes = { }, }; // aliases -palettes["github"] = { - ...palettes["github-light"], - dark: { ...palettes["github-dark"] }, -}; +const palettes = { ...basePalettes }; +palettes["github"] = palettes["github-light"]; palettes["default"] = palettes["github"]; ;// CONCATENATED MODULE: ./outputsOptions.ts @@ -3039,6 +3037,7 @@ const parseEntry = (entry) => { sizeCell: 16, sizeDot: 12, ...palettes["default"], + dark: palettes["default"].dark && { ...palettes["default"].dark }, }; const animationOptions = { step: 1, frameDuration: 100 }; { @@ -3048,6 +3047,13 @@ const parseEntry = (entry) => { drawOptions.dark = palette.dark && { ...palette.dark }; } } + { + const dark_palette = palettes[sp.get("dark_palette")]; + if (dark_palette) { + const clone = { ...dark_palette, dark: undefined }; + drawOptions.dark = clone; + } + } if (sp.has("color_snake")) drawOptions.colorSnake = sp.get("color_snake"); if (sp.has("color_dots")) { @@ -3061,6 +3067,8 @@ const parseEntry = (entry) => { if (sp.has("dark_color_dots")) { const colors = sp.get("dark_color_dots").split(/[,;]/); drawOptions.dark = { + colorDotBorder: drawOptions.colorDotBorder, + colorSnake: drawOptions.colorSnake, ...drawOptions.dark, colorDots: colors, colorEmpty: colors[0],