@live-change/frontend-base 0.9.198 → 0.9.200

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 (2) hide show
  1. package/README.md +82 -0
  2. package/package.json +18 -18
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ ---
2
+ title: @live-change/frontend-base
3
+ ---
4
+
5
+ ## @live-change/frontend-base
6
+
7
+ `@live-change/frontend-base` to **wspólna baza dla aplikacji frontendowych** Live Change:
8
+
9
+ - standardowa konfiguracja Vite, Tailwind, PrimeVue
10
+ - entrypointy klienta i serwera
11
+ - komponenty bazowe (`ViewRoot`, `Page`, `UpdateBanner`, `ComponentDialog`)
12
+ - helpery czasu, odpowiedzi SSR, lokalizacji
13
+
14
+ Pakiet jest używany m.in. przez:
15
+
16
+ - `@live-change/frontend-template`
17
+ - aplikacje jak `family-tree`, `speed-dating` (przez swoje własne `front/src` + config)
18
+
19
+ ### Struktura pakietu
20
+
21
+ Najważniejsze pliki:
22
+
23
+ - `index.js` – eksporty głównych komponentów i helperów
24
+ - `client-entry.js` – entrypoint SPA/klienta SSR
25
+ - `server-entry.js` – entrypoint SSR
26
+ - `main.js` – wspólna logika tworzenia aplikacji Vue
27
+ - `ViewRoot.vue`, `Page.vue`, `UpdateBanner.vue`, `ComponentDialog.vue`
28
+ - `locales/*.json` – podstawowe tłumaczenia
29
+ - `time.js`, `response.js`, `host.js`, `lezer.js` – helpery
30
+
31
+ ### Komponent `ViewRoot`
32
+
33
+ `ViewRoot` jest kontenerem layoutu aplikacji:
34
+
35
+ ```vue
36
+ <template>
37
+ <view-root>
38
+ <template #navbar>
39
+ <NavBar />
40
+ <UpdateBanner />
41
+ </template>
42
+ </view-root>
43
+ </template>
44
+
45
+ <script setup>
46
+ import { ViewRoot, UpdateBanner } from '@live-change/frontend-base'
47
+ import NavBar from './components/NavBar.vue'
48
+ </script>
49
+ ```
50
+
51
+ W projektach:
52
+
53
+ - `speed-dating/front/src/App.vue` – `ViewRoot` + nawigacja, baner identyfikacji użytkownika, `UpdateBanner`
54
+ - `family-tree/front/src/App.vue` – `ViewRoot` z nagłówkiem i banerem aktualizacji
55
+
56
+ ### `UpdateBanner`
57
+
58
+ `UpdateBanner` informuje użytkownika o nowej wersji frontendu (wykrywany mismatch wersji z `vue3-ssr`):
59
+
60
+ - integruje się z metadanymi wersji z Live Change
61
+ - pokazuje nienachalny komunikat o konieczności odświeżenia
62
+
63
+ ### Entry client/server
64
+
65
+ `client-entry.js` i `server-entry.js` implementują spójny sposób tworzenia aplikacji:
66
+
67
+ - rejestracja globalnych komponentów
68
+ - integracja z `@live-change/vue3-ssr` i DAO
69
+ - konfiguracja routera i i18n
70
+
71
+ W typowym projekcie bazującym na `frontend-template` nie musisz ich ruszać – dostajesz gotowy SSR/SPA flow.
72
+
73
+ ### Czas i helpery
74
+
75
+ - `currentTime` z `time.js` – reaktywny czas używany m.in. z `useTimeSynchronization` (`vue3-ssr`)
76
+ - `response.js` – helper do odpowiedzi SSR
77
+ - `host.js` – helper do adresu hosta w środowiskach SSR
78
+
79
+ ### Integracja z i18n i tematami
80
+
81
+ `frontend-base` dostarcza bazowe tłumaczenia (np. komunikaty ogólne, layout), które następnie są scalane z tłumaczeniami modułów w plikach `front/src/config.js` w projektach (`deepmerge` z `baseLocales` i innymi).
82
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-base",
3
- "version": "0.9.198",
3
+ "version": "0.9.200",
4
4
  "scripts": {
5
5
  "memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --templatePath ../../base-frontend/index.html",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -35,21 +35,21 @@
35
35
  "@lezer/rust": "=1.0.1",
36
36
  "@lezer/sass": "=1.0.3",
37
37
  "@lezer/xml": "=1.0.2",
38
- "@live-change/cli": "^0.9.198",
39
- "@live-change/dao": "^0.9.198",
40
- "@live-change/dao-message": "^0.9.198",
41
- "@live-change/dao-sockjs": "^0.9.198",
42
- "@live-change/dao-vue3": "^0.9.198",
43
- "@live-change/dao-websocket": "^0.9.198",
44
- "@live-change/email-service": "^0.9.198",
45
- "@live-change/password-authentication-service": "^0.9.198",
46
- "@live-change/secret-code-service": "^0.9.198",
47
- "@live-change/secret-link-service": "^0.9.198",
48
- "@live-change/security-frontend": "^0.9.198",
49
- "@live-change/session-service": "^0.9.198",
50
- "@live-change/user-service": "^0.9.198",
51
- "@live-change/vue3-components": "^0.9.198",
52
- "@live-change/vue3-ssr": "^0.9.198",
38
+ "@live-change/cli": "^0.9.200",
39
+ "@live-change/dao": "^0.9.200",
40
+ "@live-change/dao-message": "^0.9.200",
41
+ "@live-change/dao-sockjs": "^0.9.200",
42
+ "@live-change/dao-vue3": "^0.9.200",
43
+ "@live-change/dao-websocket": "^0.9.200",
44
+ "@live-change/email-service": "^0.9.200",
45
+ "@live-change/password-authentication-service": "^0.9.200",
46
+ "@live-change/secret-code-service": "^0.9.200",
47
+ "@live-change/secret-link-service": "^0.9.200",
48
+ "@live-change/security-frontend": "^0.9.200",
49
+ "@live-change/session-service": "^0.9.200",
50
+ "@live-change/user-service": "^0.9.200",
51
+ "@live-change/vue3-components": "^0.9.200",
52
+ "@live-change/vue3-ssr": "^0.9.200",
53
53
  "@primevue/themes": "^4.3.3",
54
54
  "@tailwindcss/node": "4.1.0",
55
55
  "@tailwindcss/oxide": "4.1.0",
@@ -107,7 +107,7 @@
107
107
  "vue3-scroll-border": "0.1.7"
108
108
  },
109
109
  "devDependencies": {
110
- "@live-change/codeceptjs-helper": "^0.9.198",
110
+ "@live-change/codeceptjs-helper": "^0.9.200",
111
111
  "codeceptjs": "^3.7.6",
112
112
  "generate-password": "1.7.1",
113
113
  "playwright": "1.49.1",
@@ -122,5 +122,5 @@
122
122
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
123
123
  "license": "BSD-3-Clause",
124
124
  "description": "",
125
- "gitHead": "7e485dcbaa2af7fb17052a40238210dc8bdf0c09"
125
+ "gitHead": "a509834e600a546297faa7d1534b6f52e66d2e66"
126
126
  }