@selfhelp/shared 1.2.1 → 1.2.3
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/CHANGELOG.md +59 -0
- package/README.md +19 -254
- package/dist/index.d.mts +43 -7
- package/dist/index.d.ts +43 -7
- package/dist/manifest-C8sBTLJb.d.mts +251 -0
- package/dist/manifest-C8sBTLJb.d.ts +251 -0
- package/dist/plugin-sdk/index.d.mts +3 -242
- package/dist/plugin-sdk/index.d.ts +3 -242
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.d.ts +2 -2
- package/dist/{styles.registry-C3bux91U.d.mts → styles.registry-BDdxuQDR.d.mts} +20 -0
- package/dist/{styles.registry-Cr961HQ0.d.ts → styles.registry-BDk47JKd.d.ts} +20 -0
- package/dist/testing/index.d.mts +133 -0
- package/dist/testing/index.d.ts +133 -0
- package/dist/testing/index.js +335 -0
- package/dist/testing/index.mjs +298 -0
- package/package.json +12 -3
- package/src/assets/__tests__/resolveAssetUrl.test.ts +61 -0
- package/src/cms-classes/__tests__/classify.test.ts +63 -0
- package/src/condition/__tests__/evaluate.test.ts +54 -0
- package/src/interpolation/__tests__/replaceCalcedValues.test.ts +41 -0
- package/src/plugin-sdk/manifest.ts +10 -0
- package/src/registry/__tests__/registry.test.ts +135 -0
- package/src/testing/__tests__/testing-kit.test.ts +228 -0
- package/src/testing/index.ts +483 -0
- package/src/types/api/forms.ts +42 -4
- package/src/types/styles/auth.ts +20 -0
- package/src/utils/__tests__/transformPageData.test.ts +69 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,65 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
|
|
|
9
9
|
|
|
10
10
|
This project follows semantic versioning.
|
|
11
11
|
|
|
12
|
+
## [1.2.3] - 2026-06-04
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Registration-lifecycle CMS label fields on the auth styles so the
|
|
17
|
+
previously hardcoded frontend UI text becomes admin-managed. All are
|
|
18
|
+
optional `IContentField<string>` (additive, no consumer break):
|
|
19
|
+
`IRegisterStyle` gains `label_code`, `code_placeholder`,
|
|
20
|
+
`label_go_home`, `label_go_to_login`; `ILoginStyle` gains
|
|
21
|
+
`label_register`; `IValidateStyle` gains the activation status text
|
|
22
|
+
`loading_title`, `loading_text`, `error_title`, `error_heading`,
|
|
23
|
+
`error_text`, `success_title`, and `redirect_text` (use `{seconds}`
|
|
24
|
+
as the countdown placeholder). Defaults + en-GB/de-CH translations are
|
|
25
|
+
seeded backend-side by `Version20260604111011`.
|
|
26
|
+
- Blocking Vitest coverage gate (ecosystem testing strategy, Slice 10).
|
|
27
|
+
Added `@vitest/coverage-istanbul`, a `vitest.config.ts` with a coverage
|
|
28
|
+
threshold (>= 60% lines/functions/statements/branches) scoped to the
|
|
29
|
+
framework-free runtime-helper bundle (interpolation, condition,
|
|
30
|
+
asset-URL, CMS-class classifier, page transform), and a `test:coverage`
|
|
31
|
+
script. `shared-tests.yml` now runs `npm run test:coverage`, so a
|
|
32
|
+
coverage regression on those shared contracts fails CI (currently ~97%
|
|
33
|
+
lines). Implements canonical Testing Rule 20 (warning -> blocking). The
|
|
34
|
+
istanbul provider is used instead of v8 because v8 double-counts files on
|
|
35
|
+
Windows (phantom 0% entries) and would fail the gate locally.
|
|
36
|
+
- New public subpath export `@selfhelp/shared/testing` — the plugin
|
|
37
|
+
certification kit (`CERTIFICATION_KIT_VERSION` `1.0.0`).
|
|
38
|
+
`definePluginCertification(config).run(manifest)` now performs the real
|
|
39
|
+
**static manifest certification** and returns a typed
|
|
40
|
+
`IPluginCertificationReport`: ordered checks `manifest-valid`,
|
|
41
|
+
`capabilities-vs-trust-level`, `compatibility-shape`,
|
|
42
|
+
`lookup-ownership`, `db-naming` (also exported individually as
|
|
43
|
+
`checkManifestValid`, `checkCapabilitiesVsTrustLevel`,
|
|
44
|
+
`checkCompatibilityShape`, `checkLookupOwnership`, `checkDbNaming`, and
|
|
45
|
+
`runCertificationChecks`). Built on the existing plugin SDK
|
|
46
|
+
(`IPluginManifest` + semver helpers) so manifest typing/range parsing is
|
|
47
|
+
not re-implemented. Runtime install/lifecycle remains the backend host
|
|
48
|
+
certification's responsibility — the kit gates the manifest before
|
|
49
|
+
publishing; the host gates the actual install. Also ships the
|
|
50
|
+
fully-working in-memory `mockMercureHub` (Mercure recorder, no polling)
|
|
51
|
+
and `seedFromLockFile`.
|
|
52
|
+
- `IPluginManifestDataAccess` now mirrors the manifest schema's
|
|
53
|
+
`ownedTables` and `ownedDataTablePrefix` fields (previously only
|
|
54
|
+
`read`/`write`/`delete` were typed), so the `db-naming` certification
|
|
55
|
+
check is fully typed against the real manifest.
|
|
56
|
+
- Vitest unit tests for the runtime helpers (`replaceCalcedValues`,
|
|
57
|
+
`evaluateCondition`/`buildConditionContext`, `resolveAssetUrl`/
|
|
58
|
+
`resolveAssetSources`, `classifyClass`/`classifyClassString`,
|
|
59
|
+
`transformPageData`/`transformPagesData`) and the testing kit.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- `scripts/check-schema-parity.mjs` now also checks API response
|
|
64
|
+
contracts (`config/schemas/api/v1`: response envelope, auth login,
|
|
65
|
+
form submit) against the shared TS types, not only the plugin SDK
|
|
66
|
+
schemas. The form-submit data shape is flagged as a tracked
|
|
67
|
+
`knownDrift` warning pending cross-repo reconciliation
|
|
68
|
+
(`submitted_at` / `user_authenticated` are in the backend schema but
|
|
69
|
+
not in `IFormSubmitData`).
|
|
70
|
+
|
|
12
71
|
## [1.2.1] - 2026-05-28
|
|
13
72
|
|
|
14
73
|
### Fixed
|
package/README.md
CHANGED
|
@@ -5,288 +5,53 @@ SPDX-License-Identifier: MPL-2.0
|
|
|
5
5
|
|
|
6
6
|
# @selfhelp/shared
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
It provides the common contracts, registries, theme tokens, and small runtime helpers
|
|
10
|
-
that keep the web frontend and mobile app aligned.
|
|
8
|
+
The shared TypeScript foundation for the SelfHelp ecosystem. It is the single source of truth that keeps the web frontend (`sh-selfhelp_frontend`) and mobile app (`sh-selfhelp_mobile`) aligned on:
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
- API request and response contracts
|
|
16
|
-
- shared theme tokens and Tailwind preset values
|
|
10
|
+
- CMS page and style types
|
|
11
|
+
- API request/response contracts
|
|
12
|
+
- shared theme tokens and a Tailwind preset
|
|
17
13
|
- condition and interpolation helpers that mirror backend behavior
|
|
18
14
|
- CMS class allow-listing and asset URL utilities
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- `sh-selfhelp_frontend`
|
|
23
|
-
- `sh-selfhelp_mobile`
|
|
24
|
-
|
|
25
|
-
## Why this library exists
|
|
26
|
-
|
|
27
|
-
Without a shared package, the web and mobile apps would each need to duplicate
|
|
28
|
-
critical domain knowledge such as page schemas, auth payloads, style definitions,
|
|
29
|
-
and runtime formatting rules. That tends to drift over time.
|
|
30
|
-
|
|
31
|
-
`@selfhelp/shared` keeps those definitions in one place so both apps can:
|
|
32
|
-
|
|
33
|
-
- compile against the same TypeScript interfaces
|
|
34
|
-
- render CMS content with the same structural assumptions
|
|
35
|
-
- use the same naming and registry model for styles
|
|
36
|
-
- share stable helper logic for interpolation, conditions, spacing, and assets
|
|
37
|
-
|
|
38
|
-
## What is in this library
|
|
39
|
-
|
|
40
|
-
### Core exports
|
|
41
|
-
|
|
42
|
-
The root package export re-exports the main public API:
|
|
43
|
-
|
|
44
|
-
- `types`: page content, style contracts, auth models, API DTOs, shared Mantine-like scalar types
|
|
45
|
-
- `registry`: the typed `STYLE_REGISTRY`
|
|
46
|
-
- `api`: CMS endpoint constants
|
|
47
|
-
- `theme`: token tables used across clients
|
|
48
|
-
- `interpolation`: text replacement helpers
|
|
49
|
-
- `condition`: JSON-Logic condition evaluation
|
|
50
|
-
- `cms-classes`: allow-listing, remapping, and classification helpers
|
|
51
|
-
- `assets`: asset URL normalization helpers
|
|
52
|
-
- `utils`: shared parsing and page transformation helpers
|
|
53
|
-
|
|
54
|
-
### Folder guide
|
|
55
|
-
|
|
56
|
-
| Folder | Purpose |
|
|
57
|
-
| --- | --- |
|
|
58
|
-
| `src/types/styles` | Per-style interfaces such as layout, typography, interactive, form, auth, and media styles. |
|
|
59
|
-
| `src/types/pages` | CMS page structures like `IPageContent`, `IPageItem`, and section field models. |
|
|
60
|
-
| `src/types/auth` | User/auth payloads such as `IUserDataResponse`, `IJwtPayload`, and permission constants. |
|
|
61
|
-
| `src/types/api` | Request/response DTOs and envelope types for auth, pages, forms, and language endpoints. |
|
|
62
|
-
| `src/types/mantine` | Shared semantic size, radius, spacing, and color-related type definitions. |
|
|
63
|
-
| `src/registry` | Typed style registry mapping `style_name` to schema metadata. |
|
|
64
|
-
| `src/api` | Frontend-facing `/cms-api/v1/*` endpoint catalog. |
|
|
65
|
-
| `src/theme` | Theme token tables and Tailwind preset exports used by both apps. |
|
|
66
|
-
| `src/interpolation` | `replaceCalcedValues()` placeholder replacement logic for CMS text. |
|
|
67
|
-
| `src/condition` | Condition evaluator that mirrors backend condition handling. |
|
|
68
|
-
| `src/cms-classes` | Tailwind class allow-list, remap table, and class classification logic. |
|
|
69
|
-
| `src/assets` | `resolveAssetUrl()` helper for absolute and relative asset paths. |
|
|
70
|
-
| `src/utils` | Shared helpers such as spacing parsing and page-data transformation. |
|
|
71
|
-
|
|
72
|
-
## Main capabilities
|
|
73
|
-
|
|
74
|
-
### Typed style registry
|
|
75
|
-
|
|
76
|
-
The library centralizes style definitions used by CMS-driven rendering. This makes
|
|
77
|
-
style handling explicit and compile-time checked instead of scattered across apps.
|
|
78
|
-
|
|
79
|
-
```ts
|
|
80
|
-
import { STYLE_REGISTRY } from '@selfhelp/shared/registry';
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Shared page and API contracts
|
|
84
|
-
|
|
85
|
-
All consumers can use the same TypeScript definitions for pages, forms, auth, and
|
|
86
|
-
language payloads.
|
|
87
|
-
|
|
88
|
-
```ts
|
|
89
|
-
import type { IPageContent, IUserDataResponse } from '@selfhelp/shared';
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Shared theme surface
|
|
93
|
-
|
|
94
|
-
The package exposes a common theme layer so web and mobile can stay visually aligned.
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
import { THEME_TOKENS } from '@selfhelp/shared/theme';
|
|
98
|
-
import tailwindPreset from '@selfhelp/shared/tailwind';
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Runtime helpers
|
|
102
|
-
|
|
103
|
-
The package includes a few focused runtime helpers that mirror backend behavior and
|
|
104
|
-
reduce duplicated edge-case handling in clients.
|
|
105
|
-
|
|
106
|
-
```ts
|
|
107
|
-
import {
|
|
108
|
-
evaluateCondition,
|
|
109
|
-
replaceCalcedValues,
|
|
110
|
-
resolveAssetUrl,
|
|
111
|
-
parseSpacing,
|
|
112
|
-
} from '@selfhelp/shared';
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Installation
|
|
116
|
-
|
|
117
|
-
Install from npm:
|
|
16
|
+
## Install
|
|
118
17
|
|
|
119
18
|
```bash
|
|
120
19
|
npm install @selfhelp/shared
|
|
121
20
|
```
|
|
122
21
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
npm install @selfhelp/shared@1.0.0
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
For local development with sibling repositories, you can still use a file dependency:
|
|
22
|
+
For local development against sibling repositories you can use a file dependency:
|
|
130
23
|
|
|
131
24
|
```json
|
|
132
|
-
{
|
|
133
|
-
"dependencies": {
|
|
134
|
-
"@selfhelp/shared": "file:../sh-selfhelp_shared"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
25
|
+
{ "dependencies": { "@selfhelp/shared": "file:../sh-selfhelp_shared" } }
|
|
137
26
|
```
|
|
138
27
|
|
|
139
|
-
##
|
|
140
|
-
|
|
141
|
-
### Import from the root package
|
|
28
|
+
## Quick usage
|
|
142
29
|
|
|
143
30
|
```ts
|
|
144
|
-
import {
|
|
145
|
-
|
|
146
|
-
PERMISSIONS,
|
|
147
|
-
replaceCalcedValues,
|
|
148
|
-
resolveAssetUrl,
|
|
149
|
-
transformPageData,
|
|
150
|
-
} from '@selfhelp/shared';
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Import typed registries or theme subpaths
|
|
31
|
+
import { ENDPOINTS, replaceCalcedValues, resolveAssetUrl } from '@selfhelp/shared';
|
|
32
|
+
import type { IPageContent, IUserDataResponse } from '@selfhelp/shared';
|
|
154
33
|
|
|
155
|
-
```ts
|
|
156
34
|
import { STYLE_REGISTRY } from '@selfhelp/shared/registry';
|
|
157
35
|
import { THEME_TOKENS } from '@selfhelp/shared/theme';
|
|
158
36
|
import tailwindPreset from '@selfhelp/shared/tailwind';
|
|
159
37
|
```
|
|
160
38
|
|
|
161
|
-
|
|
39
|
+
The package exposes a root export plus the `registry`, `theme`, `tailwind`, `plugin-sdk`, and `testing` subpaths.
|
|
162
40
|
|
|
163
|
-
|
|
164
|
-
specifiers that resolve through the host's runtime-shim BFF route.
|
|
165
|
-
Read the contract from `@selfhelp/shared/plugin-sdk` instead of
|
|
166
|
-
duplicating the list in plugin `vite.config.ts` files or in the host
|
|
167
|
-
`runtime-globals.ts`:
|
|
168
|
-
|
|
169
|
-
```ts
|
|
170
|
-
import {
|
|
171
|
-
PLUGIN_RUNTIME_SHIM_SPECIFIERS,
|
|
172
|
-
PLUGIN_RUNTIME_IMPORT_MAP,
|
|
173
|
-
buildPluginRuntimeShimPath,
|
|
174
|
-
} from '@selfhelp/shared/plugin-sdk';
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
The contract is what guarantees `react`, `@mantine/core`,
|
|
178
|
-
`@tanstack/react-query`, and `@selfhelp/shared` (plus their
|
|
179
|
-
documented subpaths) stay single-instance across the host shell and
|
|
180
|
-
every loaded plugin.
|
|
181
|
-
|
|
182
|
-
### Build the package locally
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
cd sh-selfhelp_shared
|
|
186
|
-
npm install
|
|
187
|
-
npm run build
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Publish and release
|
|
191
|
-
|
|
192
|
-
Before the first publish:
|
|
41
|
+
## Build
|
|
193
42
|
|
|
194
43
|
```bash
|
|
195
|
-
cd sh-selfhelp_shared
|
|
196
44
|
npm install
|
|
197
|
-
npm login
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Publish a new version:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
npm version patch
|
|
204
|
-
npm publish
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
For the first stable release, publish `1.0.0`:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
npm version 1.0.0
|
|
211
|
-
npm publish
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Useful checks before publishing:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
npm run typecheck
|
|
218
45
|
npm run build
|
|
219
|
-
npm pack --dry-run
|
|
220
46
|
```
|
|
221
47
|
|
|
222
|
-
|
|
48
|
+
## Documentation
|
|
223
49
|
|
|
224
|
-
|
|
225
|
-
- The package is configured for public npm publication through `publishConfig.access`.
|
|
226
|
-
- Release notes for the stable launch live in [CHANGELOG.md](CHANGELOG.md).
|
|
50
|
+
Full documentation lives in [docs/](docs/README.md):
|
|
227
51
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
At this point the package provides:
|
|
233
|
-
|
|
234
|
-
- a stable shared type surface for page content, styles, auth, and API models
|
|
235
|
-
- a typed style registry for CMS-rendered components
|
|
236
|
-
- reusable theme token exports and Tailwind preset support
|
|
237
|
-
- shared helpers for interpolation, conditions, class mapping, assets, and spacing
|
|
238
|
-
- a publishable npm package that can be reused outside the local monorepo workflow
|
|
239
|
-
|
|
240
|
-
See [CHANGELOG.md](CHANGELOG.md) for the `1.0.0` release notes.
|
|
241
|
-
|
|
242
|
-
## Extending the library
|
|
243
|
-
|
|
244
|
-
### Adding a new style
|
|
245
|
-
|
|
246
|
-
1. Add the per-style interface in `src/types/styles/<group>.ts`.
|
|
247
|
-
2. Add the style entry to `src/registry/styles.registry.ts`.
|
|
248
|
-
3. Re-export the new public surface from `src/index.ts` if needed.
|
|
249
|
-
4. Run `npm run build`.
|
|
250
|
-
5. Update both consumers so the new style has a real implementation.
|
|
251
|
-
|
|
252
|
-
The registry is intentionally strict: TypeScript should help catch missing wiring
|
|
253
|
-
when a new style is introduced.
|
|
254
|
-
|
|
255
|
-
## Versioning policy
|
|
256
|
-
|
|
257
|
-
This package follows semantic versioning:
|
|
258
|
-
|
|
259
|
-
- `major`: breaking type or runtime changes
|
|
260
|
-
- `minor`: backward-compatible new exports, styles, helpers, or fields
|
|
261
|
-
- `patch`: fixes, clarifications, or non-breaking internal improvements
|
|
262
|
-
|
|
263
|
-
## License
|
|
264
|
-
|
|
265
|
-
Licensed under the [Mozilla Public License 2.0](LICENSE). Copyright (c) 2026
|
|
266
|
-
Humdek, University of Bern.
|
|
267
|
-
|
|
268
|
-
### SPDX headers
|
|
269
|
-
|
|
270
|
-
Every TS/JS source file should carry a two-line SPDX header:
|
|
271
|
-
|
|
272
|
-
```ts
|
|
273
|
-
/*
|
|
274
|
-
* SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
275
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
276
|
-
*/
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
The header text lives in [header.txt](header.txt). Header insertion, verification,
|
|
280
|
-
and removal are automated with
|
|
281
|
-
[`license-check-and-add`](https://www.npmjs.com/package/license-check-and-add)
|
|
282
|
-
using [license-check-and-add-config.json](license-check-and-add-config.json).
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
npm install
|
|
286
|
-
npm run headers:add
|
|
287
|
-
npm run headers:check
|
|
288
|
-
npm run headers:remove
|
|
289
|
-
```
|
|
52
|
+
- Public exports, types, and contracts: [docs/reference/exports.md](docs/reference/exports.md)
|
|
53
|
+
- Release and versioning: [docs/developer/release-and-versioning.md](docs/developer/release-and-versioning.md)
|
|
54
|
+
- Testing and the coverage gate: [docs/developer/testing.md](docs/developer/testing.md)
|
|
55
|
+
- Extending the package: [docs/developer/extending.md](docs/developer/extending.md)
|
|
290
56
|
|
|
291
|
-
|
|
292
|
-
are skipped automatically.
|
|
57
|
+
Release notes are in [CHANGELOG.md](CHANGELOG.md). Licensed under [MPL-2.0](LICENSE).
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, f as IContentField } from './styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, h as IAccordionItemStyle, i as IAccordionStyle, j as IActionIconStyle, k as IAlertStyle, l as IAspectRatioStyle, m as IAudioStyle, n as IAvatarStyle, o as IBackgroundImageStyle, p as IBadgeStyle, q as IBaseStyle, r as IBlockquoteStyle, s as IBoxStyle, t as IButtonStyle, u as ICardSegmentStyle, v as ICardStyle, w as ICarouselStyle, x as ICenterStyle, y as ICheckboxStyle, z as IChipStyle, A as ICodeStyle, C as IColorInputStyle, D as IColorPickerStyle, E as IComboboxStyle, F as IContainerStyle, G as IDatePickerStyle, H as IDividerStyle, J as IEntryListStyle, K as IEntryRecordDeleteStyle, L as IEntryRecordStyle, M as IFieldsetStyle, N as IFigureStyle, O as IFileInputStyle, P as IFlexStyle, Q as IFormLogStyle, R as IFormRecordStyle, U as IFormStyle, V as IGridColumnStyle, W as IGridStyle, X as IGroupStyle, Y as IHighlightStyle, Z as IHtmlTagStyle, $ as IImageStyle, a0 as IIndicatorStyle, a1 as IInputStyle, a2 as IKbdStyle, a3 as ILinkStyle, a4 as IListItemStyle, a5 as IListStyle, a6 as ILoginStyle, a7 as ILoopStyle, a8 as INotificationStyle, a9 as INumberInputStyle, aa as IPaperStyle, a as IPluginStyleRegistryEntry, ab as IProfileStyle, ac as IProgressRootStyle, ad as IProgressSectionStyle, ae as IProgressStyle, af as IRadioStyle, ag as IRangeSliderStyle, ah as IRatingStyle, ai as IRegisterStyle, aj as IResetPasswordStyle, ak as IRichTextEditorStyle, al as IScrollAreaStyle, am as ISegmentedControlStyle, an as ISelectStyle, ao as ISimpleGridStyle, ap as ISliderStyle, aq as ISpaceStyle, ar as ISpoilerStyle, as as IStackStyle, I as IStyleRegistryEntry, at as IStyleWithSpacing, au as ISwitchStyle, av as ITabStyle, aw as ITabsStyle, ax as ITextInputStyle, ay as ITextStyle, az as ITextareaStyle, aA as IThemeIconStyle, aB as ITimelineStyle, aC as ITitleStyle, aD as ITwoFactorAuthStyle, aE as ITypographyStyle, aF as IUnknownStyle, aG as IValidateStyle, aH as IVideoStyle, S as STYLE_REGISTRY, aI as TMantineAccordionChevronPosition, aJ as TMantineAccordionDisableChevronRotation, aK as TMantineAccordionLoop, aL as TMantineAccordionMultiple, aM as TMantineBorder, aN as TMantineCardShadow, aO as TMantineCheckboxLabelPosition, aP as TMantineCols, aQ as TMantineDividerVariant, aR as TMantineGap, aS as TMantineGridOffset, aT as TMantineGridOrder, aU as TMantineHeight, aV as TMantineIconSize, aW as TMantineImageFit, aX as TMantineLineClamp, aY as TMantineListCenter, aZ as TMantineListStyleType, a_ as TMantineListType, a$ as TMantineListWithPadding, b0 as TMantinePaperShadow, b1 as TMantineProgressTransition, b2 as TMantineScrollAreaSize, b3 as TMantineScrollAreaType, b4 as TMantineTextAlign, b5 as TMantineTextDecoration, b6 as TMantineTextFontStyle, b7 as TMantineTextFontWeight, b8 as TMantineTextInherit, b9 as TMantineTextInputVariant, ba as TMantineTextSpan, bb as TMantineTextTransform, bc as TMantineTextTruncate, bd as TMantineTextVariant, be as TMantineTextareaAutosize, bf as TMantineTextareaResize, bg as TMantineTextareaVariant, bh as TMantineTimelineAlign, bi as TMantineTitleLineClamp, bj as TMantineTitleTextWrap, bk as TMantineTranslatable, bl as TMantineUseInputWrapper, bm as TMantineWidth, bn as TStyle, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from './styles.registry-
|
|
1
|
+
import { T as TStyleName, f as IContentField } from './styles.registry-BDdxuQDR.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, h as IAccordionItemStyle, i as IAccordionStyle, j as IActionIconStyle, k as IAlertStyle, l as IAspectRatioStyle, m as IAudioStyle, n as IAvatarStyle, o as IBackgroundImageStyle, p as IBadgeStyle, q as IBaseStyle, r as IBlockquoteStyle, s as IBoxStyle, t as IButtonStyle, u as ICardSegmentStyle, v as ICardStyle, w as ICarouselStyle, x as ICenterStyle, y as ICheckboxStyle, z as IChipStyle, A as ICodeStyle, C as IColorInputStyle, D as IColorPickerStyle, E as IComboboxStyle, F as IContainerStyle, G as IDatePickerStyle, H as IDividerStyle, J as IEntryListStyle, K as IEntryRecordDeleteStyle, L as IEntryRecordStyle, M as IFieldsetStyle, N as IFigureStyle, O as IFileInputStyle, P as IFlexStyle, Q as IFormLogStyle, R as IFormRecordStyle, U as IFormStyle, V as IGridColumnStyle, W as IGridStyle, X as IGroupStyle, Y as IHighlightStyle, Z as IHtmlTagStyle, $ as IImageStyle, a0 as IIndicatorStyle, a1 as IInputStyle, a2 as IKbdStyle, a3 as ILinkStyle, a4 as IListItemStyle, a5 as IListStyle, a6 as ILoginStyle, a7 as ILoopStyle, a8 as INotificationStyle, a9 as INumberInputStyle, aa as IPaperStyle, a as IPluginStyleRegistryEntry, ab as IProfileStyle, ac as IProgressRootStyle, ad as IProgressSectionStyle, ae as IProgressStyle, af as IRadioStyle, ag as IRangeSliderStyle, ah as IRatingStyle, ai as IRegisterStyle, aj as IResetPasswordStyle, ak as IRichTextEditorStyle, al as IScrollAreaStyle, am as ISegmentedControlStyle, an as ISelectStyle, ao as ISimpleGridStyle, ap as ISliderStyle, aq as ISpaceStyle, ar as ISpoilerStyle, as as IStackStyle, I as IStyleRegistryEntry, at as IStyleWithSpacing, au as ISwitchStyle, av as ITabStyle, aw as ITabsStyle, ax as ITextInputStyle, ay as ITextStyle, az as ITextareaStyle, aA as IThemeIconStyle, aB as ITimelineStyle, aC as ITitleStyle, aD as ITwoFactorAuthStyle, aE as ITypographyStyle, aF as IUnknownStyle, aG as IValidateStyle, aH as IVideoStyle, S as STYLE_REGISTRY, aI as TMantineAccordionChevronPosition, aJ as TMantineAccordionDisableChevronRotation, aK as TMantineAccordionLoop, aL as TMantineAccordionMultiple, aM as TMantineBorder, aN as TMantineCardShadow, aO as TMantineCheckboxLabelPosition, aP as TMantineCols, aQ as TMantineDividerVariant, aR as TMantineGap, aS as TMantineGridOffset, aT as TMantineGridOrder, aU as TMantineHeight, aV as TMantineIconSize, aW as TMantineImageFit, aX as TMantineLineClamp, aY as TMantineListCenter, aZ as TMantineListStyleType, a_ as TMantineListType, a$ as TMantineListWithPadding, b0 as TMantinePaperShadow, b1 as TMantineProgressTransition, b2 as TMantineScrollAreaSize, b3 as TMantineScrollAreaType, b4 as TMantineTextAlign, b5 as TMantineTextDecoration, b6 as TMantineTextFontStyle, b7 as TMantineTextFontWeight, b8 as TMantineTextInherit, b9 as TMantineTextInputVariant, ba as TMantineTextSpan, bb as TMantineTextTransform, bc as TMantineTextTruncate, bd as TMantineTextVariant, be as TMantineTextareaAutosize, bf as TMantineTextareaResize, bg as TMantineTextareaVariant, bh as TMantineTimelineAlign, bi as TMantineTitleLineClamp, bj as TMantineTitleTextWrap, bk as TMantineTranslatable, bl as TMantineUseInputWrapper, bm as TMantineWidth, bn as TStyle, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from './styles.registry-BDdxuQDR.mjs';
|
|
3
3
|
export { s as TMantineAccordionVariant, v as TMantineActionIconLoading, d as TMantineAlign, w as TMantineAllowNextClicks, x as TMantineAllowStepClick, y as TMantineAspectRatio, z as TMantineAutoContrast, o as TMantineAvatarVariant, n as TMantineBadgeVariant, A as TMantineBlock, B as TMantineCenterInline, C as TMantineChecked, D as TMantineChipChecked, E as TMantineChipMultiple, p as TMantineChipVariant, F as TMantineClampBehavior, G as TMantineCodeBlock, i as TMantineColor, H as TMantineColorFormat, I as TMantineColorInputSwatches, J as TMantineColorPickerSwatches, K as TMantineColorPickerSwatchesPerRow, L as TMantineCompact, M as TMantineContainerFluid, e as TMantineDirection, N as TMantineDisabled, k as TMantineFieldsetVariant, O as TMantineFileAccept, P as TMantineFileInputMultiple, Q as TMantineFluid, R as TMantineFullWidth, S as TMantineGridGrow, U as TMantineGridOverflow, g as TMantineGridSpan, V as TMantineGroupGrow, W as TMantineGroupWrap, X as TMantineGrow, Y as TMantineHighlight, q as TMantineIndicatorPosition, Z as TMantineInline, _ as TMantineIsLink, c as TMantineJustify, $ as TMantineKbdSize, a0 as TMantineLoading, a1 as TMantineMultiple, a2 as TMantineNotificationWithCloseButton, a3 as TMantineNumberInputDecimalScale, a4 as TMantineOpenInNewTab, h as TMantineOrientation, a5 as TMantineProcessing, T as TMantineRadius, a6 as TMantineRangeSliderMarks, a7 as TMantineRatingCount, a8 as TMantineRatingFractions, a9 as TMantineRatingReadonly, aa as TMantineReadonly, a as TMantineSize, ab as TMantineSpaceHorizontal, b as TMantineSpacing, l as TMantineSpoilerMaxHeight, ac as TMantineSwatches, ad as TMantineTabDisabled, t as TMantineTabsVariant, r as TMantineThemeIconVariant, u as TMantineTimelineLineVariant, j as TMantineTitleOrder, ae as TMantineUseMantineStyle, m as TMantineVariant, af as TMantineWithCloseButton, ag as TMantineWithIcon, f as TMantineWrap } from './common-B96dASgu.mjs';
|
|
4
4
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePluginId, isKnownStyleName, isRegisteredStyleName } from './registry/index.mjs';
|
|
5
5
|
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, colorToHex, radiusToPx, sizeToFontPx, spacingToPx } from './theme/index.mjs';
|
|
@@ -284,15 +284,51 @@ interface IFormDeleteRequest {
|
|
|
284
284
|
page_id?: number;
|
|
285
285
|
section_id: number;
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Legacy/aspirational form-result fields.
|
|
289
|
+
*
|
|
290
|
+
* @deprecated The current backend `form_submitted` / `form_updated` responses
|
|
291
|
+
* do NOT include these. `FormController` returns only the structured fields on
|
|
292
|
+
* {@link IFormSubmitData} / {@link IFormUpdateData}, and both JSON schemas
|
|
293
|
+
* declare `additionalProperties: false`. Frontend code that reads
|
|
294
|
+
* `data.success` / `data.message` (e.g. `useFormSubmission.ts`) is reading
|
|
295
|
+
* values the backend never sends. Kept OPTIONAL so consumers keep compiling
|
|
296
|
+
* during migration; drop them once no consumer references them.
|
|
297
|
+
*/
|
|
298
|
+
interface IFormResultLegacyFields {
|
|
299
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
300
|
+
success?: boolean;
|
|
301
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
290
302
|
redirect_url?: string;
|
|
303
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
291
304
|
message?: string;
|
|
305
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
292
306
|
field_errors?: Record<string, string>;
|
|
293
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Data returned by a successful POST form submit. Mirrors the backend contract
|
|
310
|
+
* `config/schemas/api/v1/responses/frontend/form_submitted.json`.
|
|
311
|
+
*/
|
|
312
|
+
interface IFormSubmitData extends IFormResultLegacyFields {
|
|
313
|
+
record_id: number;
|
|
314
|
+
section_id: number;
|
|
315
|
+
page_id: number;
|
|
316
|
+
submitted_at: string;
|
|
317
|
+
user_authenticated: boolean;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Data returned by a successful PUT form update. Mirrors the backend contract
|
|
321
|
+
* `config/schemas/api/v1/responses/frontend/form_updated.json` (note: the
|
|
322
|
+
* update response carries `updated_at`, not `submitted_at`/`user_authenticated`).
|
|
323
|
+
*/
|
|
324
|
+
interface IFormUpdateData extends IFormResultLegacyFields {
|
|
325
|
+
record_id: number;
|
|
326
|
+
section_id: number;
|
|
327
|
+
page_id: number;
|
|
328
|
+
updated_at: string;
|
|
329
|
+
}
|
|
294
330
|
type IFormSubmitResponse = IBaseApiResponse<IFormSubmitData>;
|
|
295
|
-
type IFormUpdateResponse = IBaseApiResponse<
|
|
331
|
+
type IFormUpdateResponse = IBaseApiResponse<IFormUpdateData>;
|
|
296
332
|
type IFormDeleteResponse = IBaseApiResponse<{
|
|
297
333
|
success: boolean;
|
|
298
334
|
message?: string;
|
|
@@ -600,4 +636,4 @@ declare function transformPageData(apiPage: IRawPage): IPageItem;
|
|
|
600
636
|
*/
|
|
601
637
|
declare function transformPagesData(pages: IRawPage[] | null | undefined): IPageItem[];
|
|
602
638
|
|
|
603
|
-
export { API_VERSION_PREFIX, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, ENDPOINTS, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type IConditionContext, IContentField, type IEvaluatedCondition, type IFormDeleteRequest, type IFormDeleteResponse, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateRequest, type IFormUpdateResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMeta, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type ISpacingValue, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUserData, type IUserDataResponse, LITERAL_CLASSES, PERMISSIONS, SIZE_VALUES, SPACING_VALUES, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
|
639
|
+
export { API_VERSION_PREFIX, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, ENDPOINTS, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type IConditionContext, IContentField, type IEvaluatedCondition, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMeta, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type ISpacingValue, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUserData, type IUserDataResponse, LITERAL_CLASSES, PERMISSIONS, SIZE_VALUES, SPACING_VALUES, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, f as IContentField } from './styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, h as IAccordionItemStyle, i as IAccordionStyle, j as IActionIconStyle, k as IAlertStyle, l as IAspectRatioStyle, m as IAudioStyle, n as IAvatarStyle, o as IBackgroundImageStyle, p as IBadgeStyle, q as IBaseStyle, r as IBlockquoteStyle, s as IBoxStyle, t as IButtonStyle, u as ICardSegmentStyle, v as ICardStyle, w as ICarouselStyle, x as ICenterStyle, y as ICheckboxStyle, z as IChipStyle, A as ICodeStyle, C as IColorInputStyle, D as IColorPickerStyle, E as IComboboxStyle, F as IContainerStyle, G as IDatePickerStyle, H as IDividerStyle, J as IEntryListStyle, K as IEntryRecordDeleteStyle, L as IEntryRecordStyle, M as IFieldsetStyle, N as IFigureStyle, O as IFileInputStyle, P as IFlexStyle, Q as IFormLogStyle, R as IFormRecordStyle, U as IFormStyle, V as IGridColumnStyle, W as IGridStyle, X as IGroupStyle, Y as IHighlightStyle, Z as IHtmlTagStyle, $ as IImageStyle, a0 as IIndicatorStyle, a1 as IInputStyle, a2 as IKbdStyle, a3 as ILinkStyle, a4 as IListItemStyle, a5 as IListStyle, a6 as ILoginStyle, a7 as ILoopStyle, a8 as INotificationStyle, a9 as INumberInputStyle, aa as IPaperStyle, a as IPluginStyleRegistryEntry, ab as IProfileStyle, ac as IProgressRootStyle, ad as IProgressSectionStyle, ae as IProgressStyle, af as IRadioStyle, ag as IRangeSliderStyle, ah as IRatingStyle, ai as IRegisterStyle, aj as IResetPasswordStyle, ak as IRichTextEditorStyle, al as IScrollAreaStyle, am as ISegmentedControlStyle, an as ISelectStyle, ao as ISimpleGridStyle, ap as ISliderStyle, aq as ISpaceStyle, ar as ISpoilerStyle, as as IStackStyle, I as IStyleRegistryEntry, at as IStyleWithSpacing, au as ISwitchStyle, av as ITabStyle, aw as ITabsStyle, ax as ITextInputStyle, ay as ITextStyle, az as ITextareaStyle, aA as IThemeIconStyle, aB as ITimelineStyle, aC as ITitleStyle, aD as ITwoFactorAuthStyle, aE as ITypographyStyle, aF as IUnknownStyle, aG as IValidateStyle, aH as IVideoStyle, S as STYLE_REGISTRY, aI as TMantineAccordionChevronPosition, aJ as TMantineAccordionDisableChevronRotation, aK as TMantineAccordionLoop, aL as TMantineAccordionMultiple, aM as TMantineBorder, aN as TMantineCardShadow, aO as TMantineCheckboxLabelPosition, aP as TMantineCols, aQ as TMantineDividerVariant, aR as TMantineGap, aS as TMantineGridOffset, aT as TMantineGridOrder, aU as TMantineHeight, aV as TMantineIconSize, aW as TMantineImageFit, aX as TMantineLineClamp, aY as TMantineListCenter, aZ as TMantineListStyleType, a_ as TMantineListType, a$ as TMantineListWithPadding, b0 as TMantinePaperShadow, b1 as TMantineProgressTransition, b2 as TMantineScrollAreaSize, b3 as TMantineScrollAreaType, b4 as TMantineTextAlign, b5 as TMantineTextDecoration, b6 as TMantineTextFontStyle, b7 as TMantineTextFontWeight, b8 as TMantineTextInherit, b9 as TMantineTextInputVariant, ba as TMantineTextSpan, bb as TMantineTextTransform, bc as TMantineTextTruncate, bd as TMantineTextVariant, be as TMantineTextareaAutosize, bf as TMantineTextareaResize, bg as TMantineTextareaVariant, bh as TMantineTimelineAlign, bi as TMantineTitleLineClamp, bj as TMantineTitleTextWrap, bk as TMantineTranslatable, bl as TMantineUseInputWrapper, bm as TMantineWidth, bn as TStyle, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from './styles.registry-
|
|
1
|
+
import { T as TStyleName, f as IContentField } from './styles.registry-BDk47JKd.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, h as IAccordionItemStyle, i as IAccordionStyle, j as IActionIconStyle, k as IAlertStyle, l as IAspectRatioStyle, m as IAudioStyle, n as IAvatarStyle, o as IBackgroundImageStyle, p as IBadgeStyle, q as IBaseStyle, r as IBlockquoteStyle, s as IBoxStyle, t as IButtonStyle, u as ICardSegmentStyle, v as ICardStyle, w as ICarouselStyle, x as ICenterStyle, y as ICheckboxStyle, z as IChipStyle, A as ICodeStyle, C as IColorInputStyle, D as IColorPickerStyle, E as IComboboxStyle, F as IContainerStyle, G as IDatePickerStyle, H as IDividerStyle, J as IEntryListStyle, K as IEntryRecordDeleteStyle, L as IEntryRecordStyle, M as IFieldsetStyle, N as IFigureStyle, O as IFileInputStyle, P as IFlexStyle, Q as IFormLogStyle, R as IFormRecordStyle, U as IFormStyle, V as IGridColumnStyle, W as IGridStyle, X as IGroupStyle, Y as IHighlightStyle, Z as IHtmlTagStyle, $ as IImageStyle, a0 as IIndicatorStyle, a1 as IInputStyle, a2 as IKbdStyle, a3 as ILinkStyle, a4 as IListItemStyle, a5 as IListStyle, a6 as ILoginStyle, a7 as ILoopStyle, a8 as INotificationStyle, a9 as INumberInputStyle, aa as IPaperStyle, a as IPluginStyleRegistryEntry, ab as IProfileStyle, ac as IProgressRootStyle, ad as IProgressSectionStyle, ae as IProgressStyle, af as IRadioStyle, ag as IRangeSliderStyle, ah as IRatingStyle, ai as IRegisterStyle, aj as IResetPasswordStyle, ak as IRichTextEditorStyle, al as IScrollAreaStyle, am as ISegmentedControlStyle, an as ISelectStyle, ao as ISimpleGridStyle, ap as ISliderStyle, aq as ISpaceStyle, ar as ISpoilerStyle, as as IStackStyle, I as IStyleRegistryEntry, at as IStyleWithSpacing, au as ISwitchStyle, av as ITabStyle, aw as ITabsStyle, ax as ITextInputStyle, ay as ITextStyle, az as ITextareaStyle, aA as IThemeIconStyle, aB as ITimelineStyle, aC as ITitleStyle, aD as ITwoFactorAuthStyle, aE as ITypographyStyle, aF as IUnknownStyle, aG as IValidateStyle, aH as IVideoStyle, S as STYLE_REGISTRY, aI as TMantineAccordionChevronPosition, aJ as TMantineAccordionDisableChevronRotation, aK as TMantineAccordionLoop, aL as TMantineAccordionMultiple, aM as TMantineBorder, aN as TMantineCardShadow, aO as TMantineCheckboxLabelPosition, aP as TMantineCols, aQ as TMantineDividerVariant, aR as TMantineGap, aS as TMantineGridOffset, aT as TMantineGridOrder, aU as TMantineHeight, aV as TMantineIconSize, aW as TMantineImageFit, aX as TMantineLineClamp, aY as TMantineListCenter, aZ as TMantineListStyleType, a_ as TMantineListType, a$ as TMantineListWithPadding, b0 as TMantinePaperShadow, b1 as TMantineProgressTransition, b2 as TMantineScrollAreaSize, b3 as TMantineScrollAreaType, b4 as TMantineTextAlign, b5 as TMantineTextDecoration, b6 as TMantineTextFontStyle, b7 as TMantineTextFontWeight, b8 as TMantineTextInherit, b9 as TMantineTextInputVariant, ba as TMantineTextSpan, bb as TMantineTextTransform, bc as TMantineTextTruncate, bd as TMantineTextVariant, be as TMantineTextareaAutosize, bf as TMantineTextareaResize, bg as TMantineTextareaVariant, bh as TMantineTimelineAlign, bi as TMantineTitleLineClamp, bj as TMantineTitleTextWrap, bk as TMantineTranslatable, bl as TMantineUseInputWrapper, bm as TMantineWidth, bn as TStyle, b as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, c as _resetPluginStyleRegistry, e as extendStyleRegistry, g as getMergedStyleRegistry, d as getPluginStyleRegistry } from './styles.registry-BDk47JKd.js';
|
|
3
3
|
export { s as TMantineAccordionVariant, v as TMantineActionIconLoading, d as TMantineAlign, w as TMantineAllowNextClicks, x as TMantineAllowStepClick, y as TMantineAspectRatio, z as TMantineAutoContrast, o as TMantineAvatarVariant, n as TMantineBadgeVariant, A as TMantineBlock, B as TMantineCenterInline, C as TMantineChecked, D as TMantineChipChecked, E as TMantineChipMultiple, p as TMantineChipVariant, F as TMantineClampBehavior, G as TMantineCodeBlock, i as TMantineColor, H as TMantineColorFormat, I as TMantineColorInputSwatches, J as TMantineColorPickerSwatches, K as TMantineColorPickerSwatchesPerRow, L as TMantineCompact, M as TMantineContainerFluid, e as TMantineDirection, N as TMantineDisabled, k as TMantineFieldsetVariant, O as TMantineFileAccept, P as TMantineFileInputMultiple, Q as TMantineFluid, R as TMantineFullWidth, S as TMantineGridGrow, U as TMantineGridOverflow, g as TMantineGridSpan, V as TMantineGroupGrow, W as TMantineGroupWrap, X as TMantineGrow, Y as TMantineHighlight, q as TMantineIndicatorPosition, Z as TMantineInline, _ as TMantineIsLink, c as TMantineJustify, $ as TMantineKbdSize, a0 as TMantineLoading, a1 as TMantineMultiple, a2 as TMantineNotificationWithCloseButton, a3 as TMantineNumberInputDecimalScale, a4 as TMantineOpenInNewTab, h as TMantineOrientation, a5 as TMantineProcessing, T as TMantineRadius, a6 as TMantineRangeSliderMarks, a7 as TMantineRatingCount, a8 as TMantineRatingFractions, a9 as TMantineRatingReadonly, aa as TMantineReadonly, a as TMantineSize, ab as TMantineSpaceHorizontal, b as TMantineSpacing, l as TMantineSpoilerMaxHeight, ac as TMantineSwatches, ad as TMantineTabDisabled, t as TMantineTabsVariant, r as TMantineThemeIconVariant, u as TMantineTimelineLineVariant, j as TMantineTitleOrder, ae as TMantineUseMantineStyle, m as TMantineVariant, af as TMantineWithCloseButton, ag as TMantineWithIcon, f as TMantineWrap } from './common-B96dASgu.js';
|
|
4
4
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePluginId, isKnownStyleName, isRegisteredStyleName } from './registry/index.js';
|
|
5
5
|
export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, ISpacingResolved, LINE_HEIGHT, RADIUS_PX, SPACING_PX, SPACING_TO_TAILWIND, TCanonicalColor, TCanonicalRadius, TCanonicalSpacing, colorToHex, radiusToPx, sizeToFontPx, spacingToPx } from './theme/index.js';
|
|
@@ -284,15 +284,51 @@ interface IFormDeleteRequest {
|
|
|
284
284
|
page_id?: number;
|
|
285
285
|
section_id: number;
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Legacy/aspirational form-result fields.
|
|
289
|
+
*
|
|
290
|
+
* @deprecated The current backend `form_submitted` / `form_updated` responses
|
|
291
|
+
* do NOT include these. `FormController` returns only the structured fields on
|
|
292
|
+
* {@link IFormSubmitData} / {@link IFormUpdateData}, and both JSON schemas
|
|
293
|
+
* declare `additionalProperties: false`. Frontend code that reads
|
|
294
|
+
* `data.success` / `data.message` (e.g. `useFormSubmission.ts`) is reading
|
|
295
|
+
* values the backend never sends. Kept OPTIONAL so consumers keep compiling
|
|
296
|
+
* during migration; drop them once no consumer references them.
|
|
297
|
+
*/
|
|
298
|
+
interface IFormResultLegacyFields {
|
|
299
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
300
|
+
success?: boolean;
|
|
301
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
290
302
|
redirect_url?: string;
|
|
303
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
291
304
|
message?: string;
|
|
305
|
+
/** @deprecated Not returned by the current backend form endpoints. */
|
|
292
306
|
field_errors?: Record<string, string>;
|
|
293
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Data returned by a successful POST form submit. Mirrors the backend contract
|
|
310
|
+
* `config/schemas/api/v1/responses/frontend/form_submitted.json`.
|
|
311
|
+
*/
|
|
312
|
+
interface IFormSubmitData extends IFormResultLegacyFields {
|
|
313
|
+
record_id: number;
|
|
314
|
+
section_id: number;
|
|
315
|
+
page_id: number;
|
|
316
|
+
submitted_at: string;
|
|
317
|
+
user_authenticated: boolean;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Data returned by a successful PUT form update. Mirrors the backend contract
|
|
321
|
+
* `config/schemas/api/v1/responses/frontend/form_updated.json` (note: the
|
|
322
|
+
* update response carries `updated_at`, not `submitted_at`/`user_authenticated`).
|
|
323
|
+
*/
|
|
324
|
+
interface IFormUpdateData extends IFormResultLegacyFields {
|
|
325
|
+
record_id: number;
|
|
326
|
+
section_id: number;
|
|
327
|
+
page_id: number;
|
|
328
|
+
updated_at: string;
|
|
329
|
+
}
|
|
294
330
|
type IFormSubmitResponse = IBaseApiResponse<IFormSubmitData>;
|
|
295
|
-
type IFormUpdateResponse = IBaseApiResponse<
|
|
331
|
+
type IFormUpdateResponse = IBaseApiResponse<IFormUpdateData>;
|
|
296
332
|
type IFormDeleteResponse = IBaseApiResponse<{
|
|
297
333
|
success: boolean;
|
|
298
334
|
message?: string;
|
|
@@ -600,4 +636,4 @@ declare function transformPageData(apiPage: IRawPage): IPageItem;
|
|
|
600
636
|
*/
|
|
601
637
|
declare function transformPagesData(pages: IRawPage[] | null | undefined): IPageItem[];
|
|
602
638
|
|
|
603
|
-
export { API_VERSION_PREFIX, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, ENDPOINTS, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type IConditionContext, IContentField, type IEvaluatedCondition, type IFormDeleteRequest, type IFormDeleteResponse, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateRequest, type IFormUpdateResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMeta, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type ISpacingValue, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUserData, type IUserDataResponse, LITERAL_CLASSES, PERMISSIONS, SIZE_VALUES, SPACING_VALUES, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|
|
639
|
+
export { API_VERSION_PREFIX, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, ENDPOINTS, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IClassPattern, type IClassRemap, type IConditionContext, IContentField, type IEvaluatedCondition, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IGetPageResponse, type IGetPagesResponse, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMeta, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageSectionWithFields, type IPageSectionsData, type IRefreshRequest, type IRefreshSuccessResponse, type ISpacingValue, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUserData, type IUserDataResponse, LITERAL_CLASSES, PERMISSIONS, SIZE_VALUES, SPACING_VALUES, type TCalcedValues, type TClassDecision, type TClientType, type TPermission, type TPlatform, TStyleName, buildConditionContext, classifyClass, classifyClassString, evaluateCondition, findRemap, parseSpacing, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, spacingToClasses, transformPageData, transformPagesData };
|