@mblinkov/whats-missing 20.0.48 → 20.0.50

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/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- // src/index.ts
2
- export { default as Game } from "./Game";
3
- export { themes } from "./themes";
4
- export type { Theme } from "./themes";
package/src/themes.ts DELETED
@@ -1,96 +0,0 @@
1
- // src/themes.ts
2
-
3
- export type Theme = "animals" | "food" | "toys";
4
- export type ImageItem = { src: string; name: string };
5
-
6
- // ✅ базовый путь строится от текущего домена (чтобы работало и на prod.speakid.ru, и на test.speakid.ru)
7
- const baseURL = window.origin + "/cloud/speakid/games/whatsmissing/";
8
-
9
- // helper
10
- const makeList = (items: [string, string][], folder: string): ImageItem[] =>
11
- items.map(([file, name]) => ({
12
- src: `${baseURL}${folder}/${name.replace(/\s/g, "%20")}.png`,
13
- name,
14
- }));
15
-
16
- // === FOOD ===
17
- const foodItems: [string, string][] = [
18
- ["apple", "apple"],
19
- ["banana", "banana"],
20
- ["bread", "bread"],
21
- ["burger", "burger"],
22
- ["cake", "cake"],
23
- ["carrot", "carrot"],
24
- ["cheese", "cheese"],
25
- ["chicken", "chicken"],
26
- ["chocolate", "chocolate"],
27
- ["corn", "corn"],
28
- ["donut", "donut"],
29
- ["fish", "fish"],
30
- ["fries", "fries"],
31
- ["grapes", "grapes"],
32
- ["ice_cream", "ice cream"],
33
- ["milk", "milk"],
34
- ["orange", "orange"],
35
- ["pear", "pear"],
36
- ["pizza", "pizza"],
37
- ["rice", "rice"],
38
- ["sandwich", "sandwich"],
39
- ["soup", "soup"],
40
- ["strawberry", "strawberry"],
41
- ["tomato", "tomato"],
42
- ["watermelon", "watermelon"],
43
- ];
44
-
45
- // === ANIMALS ===
46
- const animalItems: [string, string][] = [
47
- ["bear", "bear"],
48
- ["cat", "cat"],
49
- ["crocodile", "crocodile"],
50
- ["dolphin", "dolphin"],
51
- ["elephant", "elephant"],
52
- ["fox", "fox"],
53
- ["giraffe", "giraffe"],
54
- ["horse", "horse"],
55
- ["kangaroo", "kangaroo"],
56
- ["lion", "lion"],
57
- ["monkey", "monkey"],
58
- ["owl", "owl"],
59
- ["panda", "panda"],
60
- ["penguin", "penguin"],
61
- ["squirrel", "squirrel"],
62
- ["tiger", "tiger"],
63
- ["tortoise", "tortoise"],
64
- ["wolf", "wolf"],
65
- ["zebra", "zebra"],
66
- ];
67
-
68
- // === TOYS ===
69
- const toyItems: [string, string][] = [
70
- ["ball", "ball"],
71
- ["balloon", "balloon"],
72
- ["blocks", "blocks"],
73
- ["car", "car"],
74
- ["doll", "doll"],
75
- ["drum", "drum"],
76
- ["guitar", "guitar"],
77
- ["jump_rope", "jump rope"],
78
- ["kite", "kite"],
79
- ["paints", "paints"],
80
- ["plane", "plane"],
81
- ["puzzle", "puzzle"],
82
- ["rocket", "rocket"],
83
- ["scooter", "scooter"],
84
- ["skateboard", "skateboard"],
85
- ["slide", "slide"],
86
- ["teddy_bear", "teddy bear"],
87
- ["yo-yo", "yo-yo"],
88
- ["crayons", "crayons"],
89
- ];
90
-
91
- // === EXPORT ===
92
- export const themes: Record<Theme, ImageItem[]> = {
93
- food: makeList(foodItems, "food"),
94
- animals: makeList(animalItems, "animals"),
95
- toys: makeList(toyItems, "toys"),
96
- };
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "lib": ["ES2020", "DOM"],
5
- "module": "ESNext",
6
- "moduleResolution": "Node",
7
- "jsx": "react-jsx",
8
- "strict": true,
9
- "skipLibCheck": true,
10
- "declaration": true,
11
- "outDir": "dist",
12
- "esModuleInterop": true,
13
- "resolveJsonModule": true,
14
- "allowSyntheticDefaultImports": true,
15
- "baseUrl": "./src"
16
- },
17
- "include": ["src/**/*"],
18
- "exclude": ["node_modules", "dist", "public", "src/main.tsx", "src/App.tsx"]
19
- }
package/vite.config.ts DELETED
@@ -1,34 +0,0 @@
1
- import { defineConfig } from "vite";
2
- import react from "@vitejs/plugin-react";
3
-
4
- export default defineConfig({
5
- plugins: [react()],
6
- server: {
7
- // ✅ Прокси только для локальных тестов
8
- proxy: {
9
- "/cloud": {
10
- target: "https://speakid.ru",
11
- changeOrigin: true,
12
- secure: false,
13
- },
14
- },
15
- },
16
- build: {
17
- lib: {
18
- entry: "src/index.ts",
19
- name: "WhatsMissing",
20
- formats: ["es", "cjs"], // ✅ поддержка Webpack
21
- fileName: (format) => `whats-missing.${format}.js`,
22
- },
23
- rollupOptions: {
24
- // 🔥 добавлено "react/jsx-runtime"
25
- external: ["react", "react-dom", "react/jsx-runtime"],
26
- output: {
27
- globals: {
28
- react: "React",
29
- "react-dom": "ReactDOM",
30
- },
31
- },
32
- },
33
- },
34
- });