@anywayseo/tools 3.1.1 → 4.0.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.
Files changed (44) hide show
  1. package/dist/components/base/grid/index.d.ts +3 -4
  2. package/dist/components/base/grid/utils.d.ts +2 -2
  3. package/dist/components/bonus-card/content/index.d.ts +2 -1
  4. package/dist/components/bonus-card/index.d.ts +5 -1
  5. package/dist/components/bonus-card/title/index.d.ts +3 -1
  6. package/dist/components/bonus-card-grid/index.d.ts +9 -0
  7. package/dist/components/feature-card-grid/index.d.ts +9 -0
  8. package/dist/components/game-card/index.d.ts +2 -2
  9. package/dist/components/game-card-grid/index.d.ts +12 -0
  10. package/dist/components/index.cjs +5 -3
  11. package/dist/components/index.d.ts +4 -2
  12. package/dist/components/index.mjs +16 -14
  13. package/dist/components/strapi-component/external-image/index.d.ts +7 -0
  14. package/dist/components/strapi-component/index.d.ts +9 -0
  15. package/dist/components/strapi-component/rich-text/index.d.ts +6 -0
  16. package/dist/components/strapi-component/utils.d.ts +3 -0
  17. package/dist/components/strapi-content-renderer/index.d.ts +8 -0
  18. package/dist/components/strapi-content-renderer/utils.d.ts +2 -0
  19. package/dist/{index-eta4hdHD.js → index-BmkMQFW1.js} +192 -39
  20. package/dist/{index-Cte2-g6s.js → index-Bw7vqsyw.js} +15 -0
  21. package/dist/{index-25M8hPOF.mjs → index-DLy2LYCD.mjs} +15 -0
  22. package/dist/{index-Cin-9-As.mjs → index-DbwY2gVh.mjs} +203 -50
  23. package/dist/index-DzEvPZny.mjs +87 -0
  24. package/dist/index-NsIHOkeN.js +86 -0
  25. package/dist/index.cjs +9 -7
  26. package/dist/index.mjs +23 -21
  27. package/dist/types/components/common/index.d.ts +2 -1
  28. package/dist/types/components/external-image/index.d.ts +14 -0
  29. package/dist/types/components/game-card/index.d.ts +1 -0
  30. package/dist/types/components/grid/index.d.ts +3 -0
  31. package/dist/types/components/index.d.ts +3 -0
  32. package/dist/types/components/strapi-component/index.d.ts +5 -0
  33. package/dist/utils/index.cjs +4 -4
  34. package/dist/utils/index.d.ts +1 -2
  35. package/dist/utils/index.mjs +7 -7
  36. package/dist/utils/sorting/index.d.ts +2 -0
  37. package/package.json +2 -1
  38. package/dist/components/base/grid/types.d.ts +0 -3
  39. package/dist/components/features/index.d.ts +0 -7
  40. package/dist/components/rich-text-renderer/index.d.ts +0 -6
  41. package/dist/index-CHnNtadm.mjs +0 -294
  42. package/dist/index-D2JqGE4u.js +0 -293
  43. package/dist/utils/api/index.d.ts +0 -1
  44. package/dist/utils/gatsby/index.d.ts +0 -3
@@ -1,293 +0,0 @@
1
- "use strict";
2
- const tinycolor = require("@ctrl/tinycolor");
3
- const typeDefs = `
4
- # === BASE DEFINITIONS ===
5
- type Image {
6
- localFile: File @link(from: "localFile")
7
- alternativeText: String
8
- }
9
-
10
- type Seo {
11
- metaTitle: String
12
- metaDescription: String
13
- }
14
-
15
- type Author {
16
- name: String
17
- role: String
18
- bio: String
19
- avatar: Image
20
- }
21
-
22
- # === STRAPI DEFINITIONS ===
23
- type StrapiSite implements Node {
24
- id: ID!
25
- name: String
26
- lang: String
27
- currency: String
28
- theme: String
29
- primaryColor: String
30
- logo: Image
31
- seo: Seo
32
- }
33
-
34
- type StrapiPage implements Node {
35
- id: ID!
36
- title: String
37
- slug: String
38
- seo: Seo
39
- author: Author
40
- content: [ContentComponent]
41
- createdAt: Date @dateformat
42
- updatedAt: Date @dateformat
43
- }
44
-
45
- # === STRAPI NAVIGATION DEFINITIONS ===
46
- type StrapiNavigation implements Node {
47
- id: ID!
48
- items: [NavigationGroup!]
49
- }
50
-
51
- type NavigationGroup {
52
- name: String!
53
- slug: String!
54
- items: [NavigationItem!]
55
- }
56
-
57
- type NavigationItem {
58
- type: String!
59
- title: String!
60
- slug: String!
61
- path: String!
62
- menuAttached: Boolean!
63
- items: [NavigationItem!]
64
- }
65
-
66
- # === COMPONENT DEFINITIONS ===
67
- union ContentComponent =
68
- STRAPI__COMPONENT_CONTENT_FAQ
69
- | STRAPI__COMPONENT_CONTENT_FEATURES
70
- | STRAPI__COMPONENT_CONTENT_GAME_DEMO
71
- | STRAPI__COMPONENT_CONTENT_GAME_INFO
72
- | STRAPI__COMPONENT_CONTENT_HOW_TO
73
- | STRAPI__COMPONENT_CONTENT_LIST
74
- | STRAPI__COMPONENT_CONTENT_MEDIA
75
- | STRAPI__COMPONENT_CONTENT_PROS_CONS
76
- | STRAPI__COMPONENT_CONTENT_RICH_TEXT
77
- | STRAPI__COMPONENT_CONTENT_TABLE
78
- | STRAPI__COMPONENT_CONTENT_TIP
79
-
80
- type STRAPI__COMPONENT_CONTENT_FAQ {
81
- items: [FaqItem!]
82
- }
83
-
84
- type FaqItem {
85
- question: String
86
- answer: String
87
- }
88
-
89
- type STRAPI__COMPONENT_CONTENT_FEATURES {
90
- items: [ListItem!]
91
- }
92
-
93
- type STRAPI__COMPONENT_CONTENT_PROS_CONS {
94
- pros: [ListItem!]
95
- cons: [ListItem!]
96
- }
97
-
98
- type ListItem {
99
- title: String
100
- description: String
101
- }
102
-
103
- type STRAPI__COMPONENT_CONTENT_GAME_DEMO {
104
- name: String
105
- src: String
106
- previewImage: Image
107
- }
108
-
109
- type STRAPI__COMPONENT_CONTENT_GAME_INFO {
110
- general: GAME_GENERAL
111
- features: GAME_FEATURES
112
- }
113
-
114
- type GAME_GENERAL {
115
- NAME: String
116
- DEVELOPER: String
117
- RELEASE_DATE: Date @dateformat
118
- THEME: String
119
- TYPE: String
120
- VOLATILITY: String
121
- RTP: String
122
- PAY_LINES: String
123
- ROWS_WITH_PINS: String
124
- REELS_NUMBER: String
125
- MIN_BET: String
126
- MAX_BET: String
127
- MAX_WIN: String
128
- COMPATIBILITY: String
129
- }
130
-
131
- type GAME_FEATURES {
132
- HAS_DEMO: Boolean
133
- HAS_AUTOPLAY: Boolean
134
- HAS_FREE_SPINS: Boolean
135
- HAS_FAST_SPIN: Boolean
136
- HAS_BONUS_PURCHASE: Boolean
137
- HAS_COLLECTION_SYMBOLS: Boolean
138
- HAS_PROGRESSIVE_JACKPOT: Boolean
139
- BONUS_FEATURES: String
140
- FUNCTIONS: String
141
- LANGUAGES: String
142
- }
143
-
144
- type STRAPI__COMPONENT_CONTENT_HOW_TO {
145
- steps: [HowToStep!]
146
- }
147
-
148
- type HowToStep {
149
- title: String!
150
- description: String
151
- thumbnail: Image
152
- }
153
-
154
- type STRAPI__COMPONENT_CONTENT_TIP {
155
- tip: String
156
- author: Author
157
- }
158
-
159
- type STRAPI__COMPONENT_CONTENT_RICH_TEXT {
160
- content: RichTextContent
161
- }
162
-
163
- type RichTextContent {
164
- data: RichTextData
165
- }
166
-
167
- type RichTextData {
168
- content: String
169
- }
170
-
171
- type STRAPI__COMPONENT_CONTENT_LIST {
172
- bullet: String
173
- content: JsonValue
174
- }
175
-
176
- type STRAPI__COMPONENT_CONTENT_MEDIA {
177
- file: Image
178
- }
179
-
180
- type STRAPI__COMPONENT_CONTENT_TABLE {
181
- columnNumber: Int
182
- striped: Boolean
183
- bordered: Boolean
184
- scrollable: Boolean
185
- content: JsonValue
186
- caption: String
187
- }
188
-
189
- type JsonValue {
190
- strapi_json_value: JSON
191
- }
192
- `;
193
- function isValidSource(value) {
194
- if (!value) {
195
- return false;
196
- }
197
- const validSources = ["local", "remote"];
198
- return validSources.includes(value);
199
- }
200
- function getValidSource(source) {
201
- console.info("Selected source mode is:", source);
202
- if (isValidSource(source)) {
203
- return source;
204
- }
205
- console.warn('Invalid or missing GATSBY_SITE_SOURCE. Defaulting to "local".');
206
- return "local";
207
- }
208
- const DUMMY_PAGE_TYPE = "DUMMY";
209
- function isValidPath(value) {
210
- return typeof value === "string" && (value === "" || value.startsWith("/"));
211
- }
212
- function isValidType(value) {
213
- return typeof value === "string" && value !== DUMMY_PAGE_TYPE;
214
- }
215
- function transformNavItems(items, parentPath = "") {
216
- if (!items || !items.length) {
217
- return [];
218
- }
219
- const transformed = [];
220
- items.forEach((item) => {
221
- var _a;
222
- if (item && item.title && isValidType(item.type) && isValidPath(item.path)) {
223
- let path = `${parentPath}${item.path}`;
224
- let children = [];
225
- if ((_a = item.items) == null ? void 0 : _a.length) {
226
- path = "";
227
- children = transformNavItems(item.items, path);
228
- }
229
- transformed.push({ label: item.title, path, children });
230
- }
231
- });
232
- return transformed;
233
- }
234
- function transformSiteNavigation(strapiNavigation) {
235
- if (!strapiNavigation) {
236
- return null;
237
- }
238
- const navGroups = strapiNavigation.items;
239
- const headerNav = navGroups == null ? void 0 : navGroups.find((item) => (item == null ? void 0 : item.slug) === "header-navigation");
240
- const footerNav = navGroups == null ? void 0 : navGroups.find((item) => (item == null ? void 0 : item.slug) === "footer-navigation");
241
- return {
242
- header: transformNavItems(headerNav == null ? void 0 : headerNav.items),
243
- footer: transformNavItems(footerNav == null ? void 0 : footerNav.items)
244
- };
245
- }
246
- const DEFAULT_THEME = "system";
247
- const DEFAULT_COLOR = "#333333";
248
- const DefaultColorShadeMap = {
249
- 50: 52,
250
- 100: 40,
251
- 200: 30,
252
- 300: 20,
253
- 400: 10,
254
- 600: 10,
255
- 700: 20,
256
- 800: 30,
257
- 900: 40
258
- };
259
- function extractTheme(value, defaultTheme = DEFAULT_THEME) {
260
- let theme = defaultTheme;
261
- if (value) {
262
- const themes = ["dark", "light", "system"];
263
- const probablyTheme = value;
264
- if (themes.includes(probablyTheme)) {
265
- theme = probablyTheme;
266
- }
267
- }
268
- return theme;
269
- }
270
- function generateColorPalette(value, defaultColor = DEFAULT_COLOR, colorShadeMap = DefaultColorShadeMap) {
271
- let baseColor = defaultColor;
272
- if (value && typeof value === "string") {
273
- baseColor = value;
274
- }
275
- const color = new tinycolor.TinyColor(baseColor);
276
- return {
277
- 50: color.lighten(colorShadeMap[50]).toHexString(),
278
- 100: color.lighten(colorShadeMap[100]).toHexString(),
279
- 200: color.lighten(colorShadeMap[200]).toHexString(),
280
- 300: color.lighten(colorShadeMap[300]).toHexString(),
281
- 400: color.lighten(colorShadeMap[400]).toHexString(),
282
- 500: color.toHexString(),
283
- 600: color.darken(colorShadeMap[600]).toHexString(),
284
- 700: color.darken(colorShadeMap[700]).toHexString(),
285
- 800: color.darken(colorShadeMap[800]).toHexString(),
286
- 900: color.darken(colorShadeMap[900]).toHexString()
287
- };
288
- }
289
- exports.extractTheme = extractTheme;
290
- exports.generateColorPalette = generateColorPalette;
291
- exports.getValidSource = getValidSource;
292
- exports.transformSiteNavigation = transformSiteNavigation;
293
- exports.typeDefs = typeDefs;
@@ -1 +0,0 @@
1
- export declare const typeDefs = "\n # === BASE DEFINITIONS ===\n type Image {\n localFile: File @link(from: \"localFile\")\n alternativeText: String\n }\n\n type Seo {\n metaTitle: String\n metaDescription: String\n }\n \n type Author {\n name: String\n role: String\n bio: String\n avatar: Image\n }\n\n # === STRAPI DEFINITIONS ===\n type StrapiSite implements Node {\n id: ID!\n name: String\n lang: String\n currency: String\n theme: String\n primaryColor: String\n logo: Image \n seo: Seo\n }\n\n type StrapiPage implements Node {\n id: ID!\n title: String\n slug: String\n seo: Seo\n author: Author\n content: [ContentComponent]\n createdAt: Date @dateformat\n updatedAt: Date @dateformat\n }\n\n # === STRAPI NAVIGATION DEFINITIONS ===\n type StrapiNavigation implements Node {\n id: ID!\n items: [NavigationGroup!]\n }\n\n type NavigationGroup {\n name: String!\n slug: String!\n items: [NavigationItem!]\n }\n\n type NavigationItem {\n type: String!\n title: String!\n slug: String!\n path: String!\n menuAttached: Boolean!\n items: [NavigationItem!]\n }\n\n # === COMPONENT DEFINITIONS ===\n union ContentComponent =\n STRAPI__COMPONENT_CONTENT_FAQ\n | STRAPI__COMPONENT_CONTENT_FEATURES\n | STRAPI__COMPONENT_CONTENT_GAME_DEMO\n | STRAPI__COMPONENT_CONTENT_GAME_INFO\n | STRAPI__COMPONENT_CONTENT_HOW_TO\n | STRAPI__COMPONENT_CONTENT_LIST\n | STRAPI__COMPONENT_CONTENT_MEDIA\n | STRAPI__COMPONENT_CONTENT_PROS_CONS\n | STRAPI__COMPONENT_CONTENT_RICH_TEXT\n | STRAPI__COMPONENT_CONTENT_TABLE\n | STRAPI__COMPONENT_CONTENT_TIP\n \n type STRAPI__COMPONENT_CONTENT_FAQ {\n items: [FaqItem!]\n }\n\n type FaqItem {\n question: String\n answer: String\n }\n\n type STRAPI__COMPONENT_CONTENT_FEATURES {\n items: [ListItem!]\n }\n\n type STRAPI__COMPONENT_CONTENT_PROS_CONS {\n pros: [ListItem!]\n cons: [ListItem!]\n }\n\n type ListItem {\n title: String\n description: String\n }\n\n type STRAPI__COMPONENT_CONTENT_GAME_DEMO {\n name: String\n src: String\n previewImage: Image\n }\n\n type STRAPI__COMPONENT_CONTENT_GAME_INFO {\n general: GAME_GENERAL\n features: GAME_FEATURES\n }\n\n type GAME_GENERAL {\n NAME: String\n DEVELOPER: String\n RELEASE_DATE: Date @dateformat\n THEME: String\n TYPE: String\n VOLATILITY: String\n RTP: String\n PAY_LINES: String\n ROWS_WITH_PINS: String\n REELS_NUMBER: String\n MIN_BET: String\n MAX_BET: String\n MAX_WIN: String\n COMPATIBILITY: String\n }\n\n type GAME_FEATURES {\n HAS_DEMO: Boolean\n HAS_AUTOPLAY: Boolean\n HAS_FREE_SPINS: Boolean\n HAS_FAST_SPIN: Boolean\n HAS_BONUS_PURCHASE: Boolean\n HAS_COLLECTION_SYMBOLS: Boolean\n HAS_PROGRESSIVE_JACKPOT: Boolean\n BONUS_FEATURES: String\n FUNCTIONS: String\n LANGUAGES: String\n }\n\n type STRAPI__COMPONENT_CONTENT_HOW_TO {\n steps: [HowToStep!]\n }\n\n type HowToStep {\n title: String!\n description: String\n thumbnail: Image\n }\n\n type STRAPI__COMPONENT_CONTENT_TIP {\n tip: String\n author: Author\n }\n\n type STRAPI__COMPONENT_CONTENT_RICH_TEXT {\n content: RichTextContent\n }\n\n type RichTextContent {\n data: RichTextData\n }\n\n type RichTextData {\n content: String\n }\n \n type STRAPI__COMPONENT_CONTENT_LIST {\n bullet: String\n content: JsonValue\n }\n\n type STRAPI__COMPONENT_CONTENT_MEDIA {\n file: Image\n }\n\n type STRAPI__COMPONENT_CONTENT_TABLE {\n columnNumber: Int\n striped: Boolean\n bordered: Boolean\n scrollable: Boolean\n content: JsonValue\n caption: String\n }\n\n type JsonValue {\n strapi_json_value: JSON\n }\n ";
@@ -1,3 +0,0 @@
1
- type Source = 'local' | 'remote';
2
- export declare function getValidSource(source?: string): Source;
3
- export {};