@devvit/ui-renderer 0.10.5-next-2023-09-06-8b359a74e.0 → 0.10.5-next-2023-09-06-f08269920.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.
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../library/src/blocks/templates/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEpF,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,OAAO,OAAO,CAAC;AAE3D,wBAAgB,QAAQ,CACtB,SAAS,EAAE,SAAS,EACpB,WAAW,CAAC,EAAE,OAAO,GACpB,MAAM,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAW5C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC,cAAc,CAAC,GAAG,YAAY,CAMxF;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,GAAG,MAAM,CAM7E;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,EAAE,IAAI,WAAW,CAEtF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAYxD;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG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,8 +37,13 @@ export function resolveIcon(name) {
37
37
  const fill = name.match(/-fill$/) !== null;
38
38
  // clean up icon name
39
39
  const iconName = name.replace(/^icon-/, '').replace(/-(fill|outline)$/, '');
40
+ // Some icons are not properly named (powerup-color-outline, powerup-fill-color).
41
+ // As a result we can't apply our normal search into the object keys so fallback to using the name as-is
42
+ // and try to look in both the outline and fill slots in case the faceplace generator did something odd.
43
+ // It seems like it falls back to filling the outline slot, but better safe than sorry.
44
+ const group = faceplateIcons[iconName] ?? faceplateIcons[name];
40
45
  // eslint-disable-next-line @reddit/i18n-shreddit/no-unwrapped-strings
41
- const icon = faceplateIcons[iconName][fill ? 'fill' : 'outline'];
46
+ const icon = group[fill ? 'fill' : 'outline'] ?? group[fill ? 'outline' : 'fill'];
42
47
  if (icon) {
43
48
  return html `${unsafeHTML(icon)}`;
44
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/ui-renderer",
3
- "version": "0.10.5-next-2023-09-06-8b359a74e.0",
3
+ "version": "0.10.5-next-2023-09-06-f08269920.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "types": "./index.d.ts",
50
50
  "dependencies": {
51
- "@devvit/protos": "0.10.5-next-2023-09-06-8b359a74e.0",
52
- "@devvit/runtime-lite": "0.10.5-next-2023-09-06-8b359a74e.0",
53
- "@devvit/runtimes": "0.10.5-next-2023-09-06-8b359a74e.0",
51
+ "@devvit/protos": "0.10.5-next-2023-09-06-f08269920.0",
52
+ "@devvit/runtime-lite": "0.10.5-next-2023-09-06-f08269920.0",
53
+ "@devvit/runtimes": "0.10.5-next-2023-09-06-f08269920.0",
54
54
  "@lottiefiles/lottie-player": "1.7.1",
55
55
  "p-queue": "7.3.4",
56
56
  "rxjs": "7.5.7"
@@ -77,7 +77,7 @@
77
77
  "devDependencies": {
78
78
  "@devvit/eslint-config": "0.10.4",
79
79
  "@devvit/repo-tools": "0.10.4",
80
- "@devvit/tsconfig": "0.10.5-next-2023-09-06-8b359a74e.0",
80
+ "@devvit/tsconfig": "0.10.5-next-2023-09-06-f08269920.0",
81
81
  "@lit/localize": "0.11.4",
82
82
  "@open-wc/testing-helpers": "2.3.0",
83
83
  "@reddit/baseplate": "0.14.0",
@@ -102,5 +102,5 @@
102
102
  "directory": "dist"
103
103
  },
104
104
  "source": "./src/index.ts",
105
- "gitHead": "4f7bb545cc940437df7f549aedc4322d2a1c59de"
105
+ "gitHead": "08785407929df2fb1fd501dcfa5c187438ff536c"
106
106
  }