@devvit/ui-renderer 0.10.4-next-2023-08-17-91c768268.0 → 0.10.4-next-2023-08-18-678784ceb.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":"color.d.ts","sourceRoot":"","sources":["../../../library/src/blocks/templates/color.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAiB,GAAG,EAAE,MAAM,WAAW,CAAC;AAO/C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAkBxF;AAqDD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA4BvD"}
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../library/src/blocks/templates/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAiB,GAAG,EAAE,MAAM,WAAW,CAAC;AAQ/C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAkBxF;AAqDD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA4BvD"}
@@ -1,5 +1,5 @@
1
- import designSystem from '@reddit/faceplate-ui/design-system/system.json';
2
1
  import { isHTMLElement, ref } from './util.js';
2
+ import { semanticColors } from '../../semanticColors.js';
3
3
  const colorCache = {
4
4
  default: '',
5
5
  transparent: 'rgba(0, 0, 0, 0)',
@@ -51,7 +51,7 @@ function applyAsCssColor(el, propertyName, color) {
51
51
  */
52
52
  function applyAsColorPrimitive(el, propertyName, color) {
53
53
  const colorLower = color.toLowerCase();
54
- const colors = designSystem.color.live.global;
54
+ const colors = semanticColors;
55
55
  const colorPrimitive = colors[colorLower];
56
56
  if (colorPrimitive) {
57
57
  el.style.setProperty(propertyName, colorPrimitive);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/ui-renderer",
3
- "version": "0.10.4-next-2023-08-17-91c768268.0",
3
+ "version": "0.10.4-next-2023-08-18-678784ceb.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,11 +10,12 @@
10
10
  "main": "./index.js",
11
11
  "scripts": {
12
12
  "build": "yarn library:build",
13
- "clean": "rm -rf .turbo coverage dist",
13
+ "clean": "rm -rf .turbo coverage dist library/src/semanticColors.ts",
14
14
  "clobber": "yarn clean && rm -rf node_modules",
15
15
  "dev": "yarn library:dev",
16
- "library:build": "yarn library:build:typescript && yarn library:build:styles",
16
+ "library:build": "yarn library:build:semantic-colors && yarn library:build:typescript && yarn library:build:styles",
17
17
  "library:build:custom-styles": "cd library && postcss custom-styles.css -o ../dist/custom-styles.css",
18
+ "library:build:semantic-colors": "node scripts/make-semantic-colors.js",
18
19
  "library:build:styles": "cd library && postcss styles.css -o tailwind-build.css && yarn library:build:styles-dist && yarn library:build:custom-styles",
19
20
  "library:build:styles-dist": "node scripts/make-styles.js",
20
21
  "library:build:typescript": "tsc -p library",
@@ -47,9 +48,9 @@
47
48
  },
48
49
  "types": "./index.d.ts",
49
50
  "dependencies": {
50
- "@devvit/protos": "0.10.4-next-2023-08-17-91c768268.0",
51
- "@devvit/runtime-lite": "0.10.4-next-2023-08-17-91c768268.0",
52
- "@devvit/runtimes": "0.10.4-next-2023-08-17-91c768268.0",
51
+ "@devvit/protos": "0.10.4-next-2023-08-18-678784ceb.0",
52
+ "@devvit/runtime-lite": "0.10.4-next-2023-08-18-678784ceb.0",
53
+ "@devvit/runtimes": "0.10.4-next-2023-08-18-678784ceb.0",
53
54
  "@lottiefiles/lottie-player": "1.7.1",
54
55
  "p-queue": "7.3.4",
55
56
  "rxjs": "7.5.7"
@@ -76,7 +77,7 @@
76
77
  "devDependencies": {
77
78
  "@devvit/eslint-config": "0.10.3",
78
79
  "@devvit/repo-tools": "0.10.3",
79
- "@devvit/tsconfig": "0.10.4-next-2023-08-17-91c768268.0",
80
+ "@devvit/tsconfig": "0.10.4-next-2023-08-18-678784ceb.0",
80
81
  "@lit/localize": "0.11.4",
81
82
  "@open-wc/testing-helpers": "2.3.0",
82
83
  "@reddit/baseplate": "0.14.0",
@@ -101,5 +102,5 @@
101
102
  "directory": "dist"
102
103
  },
103
104
  "source": "./src/index.ts",
104
- "gitHead": "f1df127009ee90b650256dcd254a4246409df1f2"
105
+ "gitHead": "6f8cfd484b37c6a02efcaebf21ffed4e5c5e2812"
105
106
  }
@@ -0,0 +1,188 @@
1
+ export declare const semanticColors: {
2
+ transparent: string;
3
+ black: string;
4
+ white: string;
5
+ "coolgray-950": string;
6
+ "coolgray-900": string;
7
+ "coolgray-850": string;
8
+ "coolgray-800": string;
9
+ "coolgray-750": string;
10
+ "coolgray-700": string;
11
+ "coolgray-650": string;
12
+ "coolgray-600": string;
13
+ "coolgray-550": string;
14
+ "coolgray-525": string;
15
+ "coolgray-500": string;
16
+ "coolgray-450": string;
17
+ "coolgray-400": string;
18
+ "coolgray-350": string;
19
+ "coolgray-300": string;
20
+ "coolgray-250": string;
21
+ "coolgray-200": string;
22
+ "coolgray-150": string;
23
+ "coolgray-100": string;
24
+ "coolgray-50": string;
25
+ "puregray-950": string;
26
+ "puregray-900": string;
27
+ "puregray-850": string;
28
+ "puregray-800": string;
29
+ "puregray-750": string;
30
+ "puregray-700": string;
31
+ "puregray-650": string;
32
+ "puregray-600": string;
33
+ "puregray-550": string;
34
+ "puregray-500": string;
35
+ "puregray-450": string;
36
+ "puregray-400": string;
37
+ "puregray-350": string;
38
+ "puregray-300": string;
39
+ "puregray-250": string;
40
+ "puregray-200": string;
41
+ "puregray-150": string;
42
+ "puregray-100": string;
43
+ "puregray-50": string;
44
+ "orangered-950": string;
45
+ "orangered-900": string;
46
+ "orangered-800": string;
47
+ "orangered-700": string;
48
+ "orangered-600": string;
49
+ "orangered-500": string;
50
+ "orangered-400": string;
51
+ "orangered-300": string;
52
+ "orangered-200": string;
53
+ "orangered-100": string;
54
+ "orangered-50": string;
55
+ "red-950": string;
56
+ "red-900": string;
57
+ "red-800": string;
58
+ "red-700": string;
59
+ "red-600": string;
60
+ "red-500": string;
61
+ "red-400": string;
62
+ "red-300": string;
63
+ "red-200": string;
64
+ "red-100": string;
65
+ "red-50": string;
66
+ "sakurapink-950": string;
67
+ "sakurapink-900": string;
68
+ "sakurapink-800": string;
69
+ "sakurapink-700": string;
70
+ "sakurapink-600": string;
71
+ "sakurapink-500": string;
72
+ "sakurapink-400": string;
73
+ "sakurapink-300": string;
74
+ "sakurapink-200": string;
75
+ "sakurapink-100": string;
76
+ "sakurapink-50": string;
77
+ "berrypurple-950": string;
78
+ "berrypurple-900": string;
79
+ "berrypurple-800": string;
80
+ "berrypurple-700": string;
81
+ "berrypurple-600": string;
82
+ "berrypurple-500": string;
83
+ "berrypurple-400": string;
84
+ "berrypurple-300": string;
85
+ "berrypurple-200": string;
86
+ "berrypurple-100": string;
87
+ "berrypurple-50": string;
88
+ "periwinkle-950": string;
89
+ "periwinkle-900": string;
90
+ "periwinkle-800": string;
91
+ "periwinkle-700": string;
92
+ "periwinkle-600": string;
93
+ "periwinkle-500": string;
94
+ "periwinkle-400": string;
95
+ "periwinkle-300": string;
96
+ "periwinkle-200": string;
97
+ "periwinkle-100": string;
98
+ "periwinkle-50": string;
99
+ "alienblue-950": string;
100
+ "alienblue-900": string;
101
+ "alienblue-800": string;
102
+ "alienblue-700": string;
103
+ "alienblue-600": string;
104
+ "alienblue-500": string;
105
+ "alienblue-400": string;
106
+ "alienblue-300": string;
107
+ "alienblue-200": string;
108
+ "alienblue-100": string;
109
+ "alienblue-50": string;
110
+ "lightblue-950": string;
111
+ "lightblue-900": string;
112
+ "lightblue-800": string;
113
+ "lightblue-700": string;
114
+ "lightblue-600": string;
115
+ "lightblue-500": string;
116
+ "lightblue-400": string;
117
+ "lightblue-300": string;
118
+ "lightblue-200": string;
119
+ "lightblue-100": string;
120
+ "lightblue-50": string;
121
+ "mintgreen-950": string;
122
+ "mintgreen-900": string;
123
+ "mintgreen-800": string;
124
+ "mintgreen-700": string;
125
+ "mintgreen-600": string;
126
+ "mintgreen-500": string;
127
+ "mintgreen-400": string;
128
+ "mintgreen-300": string;
129
+ "mintgreen-200": string;
130
+ "mintgreen-100": string;
131
+ "mintgreen-50": string;
132
+ "kiwigreen-950": string;
133
+ "kiwigreen-900": string;
134
+ "kiwigreen-800": string;
135
+ "kiwigreen-700": string;
136
+ "kiwigreen-600": string;
137
+ "kiwigreen-500": string;
138
+ "kiwigreen-400": string;
139
+ "kiwigreen-300": string;
140
+ "kiwigreen-200": string;
141
+ "kiwigreen-100": string;
142
+ "kiwigreen-50": string;
143
+ "lime-950": string;
144
+ "lime-900": string;
145
+ "lime-800": string;
146
+ "lime-700": string;
147
+ "lime-600": string;
148
+ "lime-500": string;
149
+ "lime-400": string;
150
+ "lime-300": string;
151
+ "lime-200": string;
152
+ "lime-100": string;
153
+ "lime-50": string;
154
+ "yellow-950": string;
155
+ "yellow-900": string;
156
+ "yellow-800": string;
157
+ "yellow-700": string;
158
+ "yellow-600": string;
159
+ "yellow-500": string;
160
+ "yellow-400": string;
161
+ "yellow-300": string;
162
+ "yellow-200": string;
163
+ "yellow-100": string;
164
+ "yellow-50": string;
165
+ "yelloworange-950": string;
166
+ "yelloworange-900": string;
167
+ "yelloworange-800": string;
168
+ "yelloworange-700": string;
169
+ "yelloworange-600": string;
170
+ "yelloworange-500": string;
171
+ "yelloworange-400": string;
172
+ "yelloworange-300": string;
173
+ "yelloworange-200": string;
174
+ "yelloworange-100": string;
175
+ "yelloworange-50": string;
176
+ "poopbrown-950": string;
177
+ "poopbrown-900": string;
178
+ "poopbrown-800": string;
179
+ "poopbrown-700": string;
180
+ "poopbrown-600": string;
181
+ "poopbrown-500": string;
182
+ "poopbrown-400": string;
183
+ "poopbrown-300": string;
184
+ "poopbrown-200": string;
185
+ "poopbrown-100": string;
186
+ "poopbrown-50": string;
187
+ };
188
+ //# sourceMappingURL=semanticColors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semanticColors.d.ts","sourceRoot":"","sources":["../library/src/semanticColors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0L1B,CAAC"}
@@ -0,0 +1,187 @@
1
+ export const semanticColors = {
2
+ "transparent": "transparent",
3
+ "black": "#000000",
4
+ "white": "#ffffff",
5
+ "coolgray-950": "#04090A",
6
+ "coolgray-900": "#0B1416",
7
+ "coolgray-850": "#0F1A1C",
8
+ "coolgray-800": "#131F23",
9
+ "coolgray-750": "#1A282D",
10
+ "coolgray-700": "#223237",
11
+ "coolgray-650": "#2A3C42",
12
+ "coolgray-600": "#33464C",
13
+ "coolgray-550": "#4B6066",
14
+ "coolgray-525": "#576F76",
15
+ "coolgray-500": "#667A80",
16
+ "coolgray-450": "#82959B",
17
+ "coolgray-400": "#A0B0B5",
18
+ "coolgray-350": "#B8C5C9",
19
+ "coolgray-300": "#D2DADD",
20
+ "coolgray-250": "#DAE0E3",
21
+ "coolgray-200": "#E2E7E9",
22
+ "coolgray-150": "#EAEDEF",
23
+ "coolgray-100": "#F2F4F5",
24
+ "coolgray-50": "#F9FAFA",
25
+ "puregray-950": "#080808",
26
+ "puregray-900": "#131313",
27
+ "puregray-850": "#181818",
28
+ "puregray-800": "#1E1E1E",
29
+ "puregray-750": "#272727",
30
+ "puregray-700": "#303030",
31
+ "puregray-650": "#393939",
32
+ "puregray-600": "#434343",
33
+ "puregray-550": "#5C5C5C",
34
+ "puregray-500": "#767676",
35
+ "puregray-450": "#919191",
36
+ "puregray-400": "#ACACAC",
37
+ "puregray-350": "#C3C3C3",
38
+ "puregray-300": "#D6D6D6",
39
+ "puregray-250": "#DDDDDD",
40
+ "puregray-200": "#E4E4E4",
41
+ "puregray-150": "#EBEBEB",
42
+ "puregray-100": "#F2F2F2",
43
+ "puregray-50": "#F8F8F8",
44
+ "orangered-950": "#190600",
45
+ "orangered-900": "#340E00",
46
+ "orangered-800": "#4F1500",
47
+ "orangered-700": "#721F00",
48
+ "orangered-600": "#962900",
49
+ "orangered-500": "#D93A00",
50
+ "orangered-400": "#FE7C53",
51
+ "orangered-300": "#FFBEA6",
52
+ "orangered-200": "#FFD5C6",
53
+ "orangered-100": "#FFEDE5",
54
+ "orangered-50": "#FFF6F3",
55
+ "red-950": "#1C0004",
56
+ "red-900": "#3A0008",
57
+ "red-800": "#58000C",
58
+ "red-700": "#7E0011",
59
+ "red-600": "#A50016",
60
+ "red-500": "#EB001F",
61
+ "red-400": "#FF6E80",
62
+ "red-300": "#FFADB8",
63
+ "red-200": "#FFCCD2",
64
+ "red-100": "#FFEAED",
65
+ "red-50": "#FFF6F7",
66
+ "sakurapink-950": "#1A0011",
67
+ "sakurapink-900": "#360024",
68
+ "sakurapink-800": "#530037",
69
+ "sakurapink-700": "#770051",
70
+ "sakurapink-600": "#9B006A",
71
+ "sakurapink-500": "#E00096",
72
+ "sakurapink-400": "#FF55BD",
73
+ "sakurapink-300": "#FFA5E3",
74
+ "sakurapink-200": "#FFC5EC",
75
+ "sakurapink-100": "#FFE5F9",
76
+ "sakurapink-50": "#FFF3FB",
77
+ "berrypurple-950": "#16001F",
78
+ "berrypurple-900": "#2E0041",
79
+ "berrypurple-800": "#470062",
80
+ "berrypurple-700": "#66008C",
81
+ "berrypurple-600": "#8700B5",
82
+ "berrypurple-500": "#BC0EFF",
83
+ "berrypurple-400": "#D55EFF",
84
+ "berrypurple-300": "#EEA7FF",
85
+ "berrypurple-200": "#F2C8FF",
86
+ "berrypurple-100": "#FBE6FF",
87
+ "berrypurple-50": "#FCF4FF",
88
+ "periwinkle-950": "#0D0B1F",
89
+ "periwinkle-900": "#1A1741",
90
+ "periwinkle-800": "#272262",
91
+ "periwinkle-700": "#372F8C",
92
+ "periwinkle-600": "#453BB5",
93
+ "periwinkle-500": "#6A5CFF",
94
+ "periwinkle-400": "#988EFF",
95
+ "periwinkle-300": "#C3BDFF",
96
+ "periwinkle-200": "#D8D4FF",
97
+ "periwinkle-100": "#ECEAFF",
98
+ "periwinkle-50": "#F7F6FF",
99
+ "alienblue-950": "#000C1D",
100
+ "alienblue-900": "#00183D",
101
+ "alienblue-800": "#00255D",
102
+ "alienblue-700": "#003584",
103
+ "alienblue-600": "#0045AC",
104
+ "alienblue-500": "#1870F4",
105
+ "alienblue-400": "#629FFF",
106
+ "alienblue-300": "#A7CCFF",
107
+ "alienblue-200": "#C6DCFF",
108
+ "alienblue-100": "#E4EFFF",
109
+ "alienblue-50": "#F3F7FF",
110
+ "lightblue-950": "#000D12",
111
+ "lightblue-900": "#001C26",
112
+ "lightblue-800": "#002A3A",
113
+ "lightblue-700": "#003F56",
114
+ "lightblue-600": "#005472",
115
+ "lightblue-500": "#007FAE",
116
+ "lightblue-400": "#47B0DB",
117
+ "lightblue-300": "#95DCFB",
118
+ "lightblue-200": "#B6E9FF",
119
+ "lightblue-100": "#D9F6FF",
120
+ "lightblue-50": "#ECFAFF",
121
+ "mintgreen-950": "#00100E",
122
+ "mintgreen-900": "#001E1B",
123
+ "mintgreen-800": "#002E28",
124
+ "mintgreen-700": "#00443C",
125
+ "mintgreen-600": "#005A4F",
126
+ "mintgreen-500": "#008675",
127
+ "mintgreen-400": "#45B9AB",
128
+ "mintgreen-300": "#96E1D8",
129
+ "mintgreen-200": "#B7ECE5",
130
+ "mintgreen-100": "#DAF7F4",
131
+ "mintgreen-50": "#ECFBF9",
132
+ "kiwigreen-950": "#021000",
133
+ "kiwigreen-900": "#032200",
134
+ "kiwigreen-800": "#053200",
135
+ "kiwigreen-700": "#084A00",
136
+ "kiwigreen-600": "#0A6000",
137
+ "kiwigreen-500": "#0E8A00",
138
+ "kiwigreen-400": "#55BD46",
139
+ "kiwigreen-300": "#A3E398",
140
+ "kiwigreen-200": "#BFEEB8",
141
+ "kiwigreen-100": "#DFF8DB",
142
+ "kiwigreen-50": "#EEFCED",
143
+ "lime-950": "#0C0E00",
144
+ "lime-900": "#1A1F00",
145
+ "lime-800": "#282F00",
146
+ "lime-700": "#3A4501",
147
+ "lime-600": "#4D5A01",
148
+ "lime-500": "#6B7E01",
149
+ "lime-400": "#A1B33B",
150
+ "lime-300": "#CFDB83",
151
+ "lime-200": "#DFE8A6",
152
+ "lime-100": "#EFF4CC",
153
+ "lime-50": "#F7FAE5",
154
+ "yellow-950": "#100D01",
155
+ "yellow-900": "#251E02",
156
+ "yellow-800": "#382D03",
157
+ "yellow-700": "#504104",
158
+ "yellow-600": "#665505",
159
+ "yellow-500": "#8F7407",
160
+ "yellow-400": "#DBAF00",
161
+ "yellow-300": "#FADB61",
162
+ "yellow-200": "#FFE88F",
163
+ "yellow-100": "#FFF2BD",
164
+ "yellow-50": "#FFFAE5",
165
+ "yelloworange-950": "#150C00",
166
+ "yelloworange-900": "#2C1A00",
167
+ "yelloworange-800": "#432700",
168
+ "yelloworange-700": "#623A00",
169
+ "yelloworange-600": "#814C00",
170
+ "yelloworange-500": "#B06400",
171
+ "yelloworange-400": "#FF9C1A",
172
+ "yelloworange-300": "#FFCD7C",
173
+ "yelloworange-200": "#FFDDA8",
174
+ "yelloworange-100": "#FFF0D3",
175
+ "yelloworange-50": "#FFF7EA",
176
+ "poopbrown-950": "#110B04",
177
+ "poopbrown-900": "#29190A",
178
+ "poopbrown-800": "#3B2510",
179
+ "poopbrown-700": "#54371A",
180
+ "poopbrown-600": "#6E4924",
181
+ "poopbrown-500": "#9A6D3F",
182
+ "poopbrown-400": "#CAA075",
183
+ "poopbrown-300": "#EECCAA",
184
+ "poopbrown-200": "#F6DDC3",
185
+ "poopbrown-100": "#FEEEDD",
186
+ "poopbrown-50": "#FEF7EE"
187
+ };