@synchra24/app-ui 0.0.0-stage → 0.1.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.
@@ -0,0 +1,21 @@
1
+ # Font assets
2
+
3
+ Internal Synchra24 distribution. Preserve the font files' original metadata and
4
+ licensing notices when redistributing this library outside the project.
5
+
6
+ - Web body: Google Sans Text (400, 500, 700), the same family configured in
7
+ `app/layout.tsx` and `app/globals.css`.
8
+ - Web headings: Golos Text (500, 600, 700), from the same Google Fonts stylesheet
9
+ as the cabinet. The source stylesheet is retained in `assets/web-fonts.css`;
10
+ each WOFF2 filename identifies its pinned fonts.gstatic.com asset.
11
+ - Mobile body: GoogleSans Regular/Medium/Bold from
12
+ `mobile_frontend/src/assets/fonts/`.
13
+ - Mobile Typography: Google Sans Regular for every variant, Bold/Medium for
14
+ the matching flags. Only the explicit `title` flag uses Manrope ExtraBold,
15
+ exactly as native Typography; headings are not globally switched to Manrope.
16
+
17
+ Native WOFF2 subsets are generated with `web-front-end/scripts/prepare-service-ui-fonts.py`
18
+ in the Synchra24 source workspace (the preparation tool reads the native font originals).
19
+ All library font faces use private family names to avoid replacing cabinet fonts.
20
+ No font request is made to Google Fonts by a running service. Ordinary builds
21
+ use checked-in assets and do not need network access or Python font tooling.
package/README.md CHANGED
@@ -1,3 +1,108 @@
1
- # Temporary Holding Version
1
+ # Synchra App UI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **`@synchra24/app-ui`** — библиотека Web Components для встроенных сервисов
4
+ Synchra24 и самостоятельных веб-приложений. Общий API, отдельные оформление и
5
+ поведение для веб-кабинета и мобильного приложения. Светлая и тёмная темы,
6
+ система островов, формы, поиск, вкладки, состояния и нативный редактор текста.
7
+ Всего 26 компонентов, включая Screen, Well, Space, CircleButton, выбор даты/времени и Slider.
8
+
9
+ [Открыть Storybook](https://synchra24.github.io/app-ui/) · [Исходники на GitHub](https://github.com/synchra24/app-ui)
10
+
11
+ Storybook обновляется автоматически после успешной проверки изменений в `main`.
12
+
13
+ ## Посмотреть локально
14
+
15
+ ```bash
16
+ git clone https://github.com/synchra24/app-ui.git
17
+ cd app-ui
18
+ npm ci
19
+ npm run storybook
20
+ ```
21
+
22
+ Откройте **http://127.0.0.1:6006**. В верхней панели выбираются платформа и тема;
23
+ в каталоге — компоненты, состояния и полноценная форма. Controls меняют параметры,
24
+ документация содержит примеры подключения и API. Storybook привязан к локальному
25
+ компьютеру и не требует облачного сервиса или ключей.
26
+
27
+ ```bash
28
+ npm run build # ESM, browser bundle и TypeScript
29
+ npm run typecheck
30
+ npm test # проверка пакета и документации
31
+ npm run storybook:build # статическая документация в storybook-static/
32
+ npm pack # архив для npm, без публикации
33
+ ```
34
+
35
+ ## Подключить
36
+
37
+ ```js
38
+ import {defineComponents, connect} from '@synchra24/app-ui';
39
+ defineComponents();
40
+ const dispose = connect(document.getElementById('service'), {sdk: synchra});
41
+ // При удалении сервиса:
42
+ dispose();
43
+ ```
44
+
45
+ ```html
46
+ <s24-island heading="Готовность смены" description="Проверьте параметры">
47
+ <s24-stack>
48
+ <s24-input label="Комментарий" name="comment"></s24-input>
49
+ <s24-button variant="primary">Сохранить</s24-button>
50
+ </s24-stack>
51
+ </s24-island>
52
+ ```
53
+
54
+ В редакторе Synchra24 библиотека уже включена в движок. Повторно вызывать
55
+ `defineComponents()` и `connect()` не нужно. В отдельном проекте установите пакет:
56
+
57
+ ```bash
58
+ npm install @synchra24/app-ui
59
+ ```
60
+
61
+ [Пакет на npm](https://www.npmjs.com/package/@synchra24/app-ui).
62
+ Для установки подготовленного архива вместо реестра:
63
+ `npm install ./synchra24-app-ui-0.1.0.tgz`.
64
+
65
+ Без SDK можно передать тему и платформу явно:
66
+
67
+ ```js
68
+ connect(root, {runtime:'mobile', theme:{active:'dark', current:{}}});
69
+ ```
70
+
71
+ Для обычного script есть `dist/synchra-app-ui.js` с объектом `SynchraAppUI`.
72
+ `@synchra24/app-ui/auto` регистрирует элементы при импорте. Для React 19 и
73
+ TypeScript: `import type {} from '@synchra24/app-ui/react'`.
74
+
75
+ ## Документация
76
+
77
+ - [Полный контракт компонентов и событий](docs/API.md)
78
+ - [Использование AI-агентом](docs/AI-AGENT.md)
79
+ - [Сборка, проверка и подготовка релиза](docs/DEVELOPMENT.md)
80
+ - [Происхождение стилей и шрифтов](FONT-SOURCES.md)
81
+ - [Метаданные Web Components](custom-elements.json)
82
+
83
+ Внутри Storybook есть отдельные руководства по подключению, платформам, формам
84
+ и нативному вводу. Его можно собрать статически и разместить вместе с GitHub-проектом.
85
+
86
+ Библиотека отвечает за интерфейс. Сохранение данных, права на записи и бизнес-правила
87
+ остаются в сервисе. В Storybook мобильный ввод использует резервный веб-редактор;
88
+ настоящий нативный TextField доступен внутри приложения с поддержкой редактора.
89
+
90
+ Шрифты встроены, запросов к CDN нет. В изолированном окне разрешите `font-src data:`.
91
+ Текущие наборы шрифтов покрывают латиницу и кириллицу для языков Synchra24.
92
+
93
+ ## Совместимость
94
+
95
+ Для разработки нужен Node.js 22.12+. Компоненты рассчитаны на современные Chrome,
96
+ Safari/WebKit и Android WebView с Custom Elements, ElementInternals, dialog и
97
+ Popover API. React — необязательный потребитель, зависимости от него у UI Kit нет.
98
+ Опубликованный код сервиса автоматически не переписывается при подключении библиотеки.
99
+
100
+ ### Native reference examples
101
+
102
+ Storybook → Каталог → Нативные примеры contains a task form and application
103
+ settings, using the same controls rather than a phone mockup. Platform/theme/window
104
+ controls switch between the actual platform contracts. Основы → Typography and
105
+ Google Icons document all text roles and the native Material Symbols catalog.
106
+ See docs/API.md for exact mobile metrics and the host's layout scaling contract.
107
+
108
+ Mobile selects use the app selection sheet when `nativeSelect: 1` is available: search, wheel and Apply. Dismissal keeps the value. Web, Storybook and older hosts retain the searchable browser picker. See [API](docs/API.md#native-selection-sheet) for limits.