@owlmeans/web-panel 0.1.18-rc.9 → 0.1.18
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/README.md +510 -143
- package/THIRD-PARTY-NOTICES.txt +24 -0
- package/agent-meta/manifest.json +163 -4
- package/agent-meta/skills/web-panel/SKILL.md +136 -83
- package/agent-meta/skills/web-panel/parts/consent.md +114 -0
- package/agent-meta/skills/web-panel/parts/editor.md +47 -0
- package/agent-meta/skills/web-panel/parts/forms.md +85 -0
- package/agent-meta/skills/web-panel/parts/navigation.md +203 -0
- package/agent-meta/skills/web-panel/parts/picker.md +164 -0
- package/agent-meta/skills/web-panel/parts/reload.md +46 -0
- package/agent-meta/skills/web-panel/parts/sign-in.md +65 -0
- package/agent-meta/skills/web-panel/parts/theme.md +74 -0
- package/build/@/components/ui/alert-dialog.d.ts +15 -0
- package/build/@/components/ui/alert-dialog.d.ts.map +1 -0
- package/build/@/components/ui/alert-dialog.js +39 -0
- package/build/@/components/ui/alert-dialog.js.map +1 -0
- package/build/@/components/ui/alert.js +1 -1
- package/build/@/components/ui/alert.js.map +1 -1
- package/build/@/components/ui/button.js +1 -1
- package/build/@/components/ui/button.js.map +1 -1
- package/build/@/components/ui/card.js +1 -1
- package/build/@/components/ui/card.js.map +1 -1
- package/build/@/components/ui/input.js +1 -1
- package/build/@/components/ui/input.js.map +1 -1
- package/build/@/components/ui/label.js +1 -1
- package/build/@/components/ui/label.js.map +1 -1
- package/build/@/components/ui/navigation-menu.js +1 -1
- package/build/@/components/ui/navigation-menu.js.map +1 -1
- package/build/@/components/ui/popover.d.ts +8 -0
- package/build/@/components/ui/popover.d.ts.map +1 -0
- package/build/@/components/ui/popover.js +17 -0
- package/build/@/components/ui/popover.js.map +1 -0
- package/build/@/components/ui/progress.js +1 -1
- package/build/@/components/ui/progress.js.map +1 -1
- package/build/@/components/ui/separator.js +1 -1
- package/build/@/components/ui/separator.js.map +1 -1
- package/build/@/components/ui/sheet.d.ts +15 -0
- package/build/@/components/ui/sheet.d.ts.map +1 -0
- package/build/@/components/ui/sheet.js +40 -0
- package/build/@/components/ui/sheet.js.map +1 -0
- package/build/auth/context.d.ts.map +1 -1
- package/build/auth/context.js +0 -1
- package/build/auth/context.js.map +1 -1
- package/build/auth/entrypoints.d.ts +10 -0
- package/build/auth/entrypoints.d.ts.map +1 -0
- package/build/auth/entrypoints.js +4 -0
- package/build/auth/entrypoints.js.map +1 -0
- package/build/auth/exports.d.ts +4 -4
- package/build/auth/exports.d.ts.map +1 -1
- package/build/auth/exports.js +3 -3
- package/build/auth/exports.js.map +1 -1
- package/build/auth/modules.d.ts +1 -1
- package/build/auth/modules.d.ts.map +1 -1
- package/build/auth/plugins/basic-ed25519.js +4 -4
- package/build/auth/plugins/basic-ed25519.js.map +1 -1
- package/build/auth/plugins/re-captcha.js +3 -3
- package/build/auth/plugins/re-captcha.js.map +1 -1
- package/build/auth/plugins/tunnel-consumer.js +1 -1
- package/build/auth/plugins/tunnel-consumer.js.map +1 -1
- package/build/components/block.js +2 -2
- package/build/components/block.js.map +1 -1
- package/build/components/consts.local.d.ts +14 -0
- package/build/components/consts.local.d.ts.map +1 -0
- package/build/components/consts.local.js +26 -0
- package/build/components/consts.local.js.map +1 -0
- package/build/components/footer/component.d.ts +19 -1
- package/build/components/footer/component.d.ts.map +1 -1
- package/build/components/footer/component.js +38 -11
- package/build/components/footer/component.js.map +1 -1
- package/build/components/footer/credit.d.ts +27 -0
- package/build/components/footer/credit.d.ts.map +1 -0
- package/build/components/footer/credit.js +42 -0
- package/build/components/footer/credit.js.map +1 -0
- package/build/components/footer/index.d.ts +1 -0
- package/build/components/footer/index.d.ts.map +1 -1
- package/build/components/footer/index.js +1 -0
- package/build/components/footer/index.js.map +1 -1
- package/build/components/footer/types.d.ts +22 -1
- package/build/components/footer/types.d.ts.map +1 -1
- package/build/components/form/button/component.d.ts.map +1 -1
- package/build/components/form/button/component.js +5 -3
- package/build/components/form/button/component.js.map +1 -1
- package/build/components/form/component.js +2 -2
- package/build/components/form/component.js.map +1 -1
- package/build/components/form/text/component.js +2 -2
- package/build/components/form/text/component.js.map +1 -1
- package/build/components/helper.d.ts.map +1 -1
- package/build/components/helper.js +1 -12
- package/build/components/helper.js.map +1 -1
- package/build/components/index.d.ts +4 -0
- package/build/components/index.d.ts.map +1 -1
- package/build/components/index.js +4 -0
- package/build/components/index.js.map +1 -1
- package/build/components/link.js +3 -3
- package/build/components/link.js.map +1 -1
- package/build/components/login/append.d.ts +15 -0
- package/build/components/login/append.d.ts.map +1 -0
- package/build/components/login/append.js +26 -0
- package/build/components/login/append.js.map +1 -0
- package/build/components/login/consts.d.ts +3 -0
- package/build/components/login/consts.d.ts.map +1 -0
- package/build/components/login/consts.js +3 -0
- package/build/components/login/consts.js.map +1 -0
- package/build/components/login/consts.local.d.ts +4 -0
- package/build/components/login/consts.local.d.ts.map +1 -0
- package/build/components/login/consts.local.js +8 -0
- package/build/components/login/consts.local.js.map +1 -0
- package/build/components/login/credit.d.ts +12 -0
- package/build/components/login/credit.d.ts.map +1 -0
- package/build/components/login/credit.js +18 -0
- package/build/components/login/credit.js.map +1 -0
- package/build/components/login/i18n/be.json +10 -0
- package/build/components/login/i18n/de.json +10 -0
- package/build/components/login/i18n/en.json +10 -0
- package/build/components/login/i18n/es.json +10 -0
- package/build/components/login/i18n/fr.json +10 -0
- package/build/components/login/i18n/pl.json +10 -0
- package/build/components/login/i18n/ru.json +10 -0
- package/build/components/login/i18n/uk.json +10 -0
- package/build/components/login/i18n.d.ts +2 -0
- package/build/components/login/i18n.d.ts.map +1 -0
- package/build/components/login/i18n.js +28 -0
- package/build/components/login/i18n.js.map +1 -0
- package/build/components/login/icons.d.ts +14 -0
- package/build/components/login/icons.d.ts.map +1 -0
- package/build/components/login/icons.js +29 -0
- package/build/components/login/icons.js.map +1 -0
- package/build/components/login/index.d.ts +11 -0
- package/build/components/login/index.d.ts.map +1 -0
- package/build/components/login/index.js +10 -0
- package/build/components/login/index.js.map +1 -0
- package/build/components/login/notify.d.ts +18 -0
- package/build/components/login/notify.d.ts.map +1 -0
- package/build/components/login/notify.js +41 -0
- package/build/components/login/notify.js.map +1 -0
- package/build/components/login/provider.d.ts +20 -0
- package/build/components/login/provider.d.ts.map +1 -0
- package/build/components/login/provider.js +31 -0
- package/build/components/login/provider.js.map +1 -0
- package/build/components/login/screen.d.ts +24 -0
- package/build/components/login/screen.d.ts.map +1 -0
- package/build/components/login/screen.js +92 -0
- package/build/components/login/screen.js.map +1 -0
- package/build/components/login/terms.d.ts +19 -0
- package/build/components/login/terms.d.ts.map +1 -0
- package/build/components/login/terms.js +32 -0
- package/build/components/login/terms.js.map +1 -0
- package/build/components/login/types.d.ts +28 -0
- package/build/components/login/types.d.ts.map +1 -0
- package/build/components/login/types.js +2 -0
- package/build/components/login/types.js.map +1 -0
- package/build/components/nav/consts.local.d.ts +41 -0
- package/build/components/nav/consts.local.d.ts.map +1 -0
- package/build/components/nav/consts.local.js +60 -0
- package/build/components/nav/consts.local.js.map +1 -0
- package/build/components/nav/index.d.ts +1 -0
- package/build/components/nav/index.d.ts.map +1 -1
- package/build/components/nav/index.js +1 -0
- package/build/components/nav/index.js.map +1 -1
- package/build/components/nav/layout.d.ts +9 -2
- package/build/components/nav/layout.d.ts.map +1 -1
- package/build/components/nav/layout.js +48 -7
- package/build/components/nav/layout.js.map +1 -1
- package/build/components/nav/mobile.d.ts +21 -0
- package/build/components/nav/mobile.d.ts.map +1 -0
- package/build/components/nav/mobile.js +55 -0
- package/build/components/nav/mobile.js.map +1 -0
- package/build/components/nav/side.d.ts.map +1 -1
- package/build/components/nav/side.js +10 -10
- package/build/components/nav/side.js.map +1 -1
- package/build/components/nav/top.d.ts.map +1 -1
- package/build/components/nav/top.js +12 -8
- package/build/components/nav/top.js.map +1 -1
- package/build/components/nav/types.d.ts +64 -1
- package/build/components/nav/types.d.ts.map +1 -1
- package/build/components/nav/viewport.d.ts +3 -0
- package/build/components/nav/viewport.d.ts.map +1 -0
- package/build/components/nav/viewport.js +14 -0
- package/build/components/nav/viewport.js.map +1 -0
- package/build/components/panel-app/component.d.ts.map +1 -1
- package/build/components/panel-app/component.js +4 -3
- package/build/components/panel-app/component.js.map +1 -1
- package/build/components/picker/color-picker.d.ts +9 -0
- package/build/components/picker/color-picker.d.ts.map +1 -0
- package/build/components/picker/color-picker.js +9 -0
- package/build/components/picker/color-picker.js.map +1 -0
- package/build/components/picker/consts.local.d.ts +76 -0
- package/build/components/picker/consts.local.d.ts.map +1 -0
- package/build/components/picker/consts.local.js +214 -0
- package/build/components/picker/consts.local.js.map +1 -0
- package/build/components/picker/dot.d.ts +8 -0
- package/build/components/picker/dot.d.ts.map +1 -0
- package/build/components/picker/dot.js +10 -0
- package/build/components/picker/dot.js.map +1 -0
- package/build/components/picker/grid.d.ts +17 -0
- package/build/components/picker/grid.d.ts.map +1 -0
- package/build/components/picker/grid.js +73 -0
- package/build/components/picker/grid.js.map +1 -0
- package/build/components/picker/i18n/be.json +60 -0
- package/build/components/picker/i18n/de.json +60 -0
- package/build/components/picker/i18n/en.json +60 -0
- package/build/components/picker/i18n/es.json +60 -0
- package/build/components/picker/i18n/fr.json +60 -0
- package/build/components/picker/i18n/pl.json +60 -0
- package/build/components/picker/i18n/ru.json +60 -0
- package/build/components/picker/i18n/uk.json +60 -0
- package/build/components/picker/i18n.d.ts +2 -0
- package/build/components/picker/i18n.d.ts.map +1 -0
- package/build/components/picker/i18n.js +18 -0
- package/build/components/picker/i18n.js.map +1 -0
- package/build/components/picker/icon-color-picker.d.ts +14 -0
- package/build/components/picker/icon-color-picker.d.ts.map +1 -0
- package/build/components/picker/icon-color-picker.js +15 -0
- package/build/components/picker/icon-color-picker.js.map +1 -0
- package/build/components/picker/icon-picker.d.ts +8 -0
- package/build/components/picker/icon-picker.d.ts.map +1 -0
- package/build/components/picker/icon-picker.js +8 -0
- package/build/components/picker/icon-picker.js.map +1 -0
- package/build/components/picker/index.d.ts +11 -0
- package/build/components/picker/index.d.ts.map +1 -0
- package/build/components/picker/index.js +10 -0
- package/build/components/picker/index.js.map +1 -0
- package/build/components/picker/panel.d.ts +9 -0
- package/build/components/picker/panel.d.ts.map +1 -0
- package/build/components/picker/panel.js +23 -0
- package/build/components/picker/panel.js.map +1 -0
- package/build/components/picker/root.d.ts +13 -0
- package/build/components/picker/root.d.ts.map +1 -0
- package/build/components/picker/root.js +55 -0
- package/build/components/picker/root.js.map +1 -0
- package/build/components/picker/roving.d.ts +8 -0
- package/build/components/picker/roving.d.ts.map +1 -0
- package/build/components/picker/roving.js +62 -0
- package/build/components/picker/roving.js.map +1 -0
- package/build/components/picker/surface.d.ts +18 -0
- package/build/components/picker/surface.d.ts.map +1 -0
- package/build/components/picker/surface.js +36 -0
- package/build/components/picker/surface.js.map +1 -0
- package/build/components/picker/swatches/custom.d.ts +10 -0
- package/build/components/picker/swatches/custom.d.ts.map +1 -0
- package/build/components/picker/swatches/custom.js +65 -0
- package/build/components/picker/swatches/custom.js.map +1 -0
- package/build/components/picker/swatches.d.ts +16 -0
- package/build/components/picker/swatches.d.ts.map +1 -0
- package/build/components/picker/swatches.js +35 -0
- package/build/components/picker/swatches.js.map +1 -0
- package/build/components/picker/text.d.ts +5 -0
- package/build/components/picker/text.d.ts.map +1 -0
- package/build/components/picker/text.js +29 -0
- package/build/components/picker/text.js.map +1 -0
- package/build/components/picker/tile.d.ts +11 -0
- package/build/components/picker/tile.d.ts.map +1 -0
- package/build/components/picker/tile.js +19 -0
- package/build/components/picker/tile.js.map +1 -0
- package/build/components/picker/translate.d.ts +9 -0
- package/build/components/picker/translate.d.ts.map +1 -0
- package/build/components/picker/translate.js +13 -0
- package/build/components/picker/translate.js.map +1 -0
- package/build/components/picker/trigger.d.ts +12 -0
- package/build/components/picker/trigger.d.ts.map +1 -0
- package/build/components/picker/trigger.js +29 -0
- package/build/components/picker/trigger.js.map +1 -0
- package/build/components/picker/types.d.ts +114 -0
- package/build/components/picker/types.d.ts.map +1 -0
- package/build/components/picker/types.js +2 -0
- package/build/components/picker/types.js.map +1 -0
- package/build/components/picker/types.local.d.ts +143 -0
- package/build/components/picker/types.local.d.ts.map +1 -0
- package/build/components/picker/types.local.js +2 -0
- package/build/components/picker/types.local.js.map +1 -0
- package/build/components/scheme/consts.local.d.ts +8 -0
- package/build/components/scheme/consts.local.d.ts.map +1 -0
- package/build/components/scheme/consts.local.js +13 -0
- package/build/components/scheme/consts.local.js.map +1 -0
- package/build/components/scheme/hook.d.ts +16 -0
- package/build/components/scheme/hook.d.ts.map +1 -0
- package/build/components/scheme/hook.js +52 -0
- package/build/components/scheme/hook.js.map +1 -0
- package/build/components/scheme/index.d.ts +4 -0
- package/build/components/scheme/index.d.ts.map +1 -0
- package/build/components/scheme/index.js +3 -0
- package/build/components/scheme/index.js.map +1 -0
- package/build/components/scheme/toggle.d.ts +14 -0
- package/build/components/scheme/toggle.d.ts.map +1 -0
- package/build/components/scheme/toggle.js +24 -0
- package/build/components/scheme/toggle.js.map +1 -0
- package/build/components/scheme/types.d.ts +21 -0
- package/build/components/scheme/types.d.ts.map +1 -0
- package/build/components/scheme/types.js +2 -0
- package/build/components/scheme/types.js.map +1 -0
- package/build/components/socket/i18n/be.json +9 -0
- package/build/components/socket/i18n/de.json +9 -0
- package/build/components/socket/i18n/en.json +9 -0
- package/build/components/socket/i18n/es.json +9 -0
- package/build/components/socket/i18n/fr.json +9 -0
- package/build/components/socket/i18n/pl.json +9 -0
- package/build/components/socket/i18n/ru.json +9 -0
- package/build/components/socket/i18n/uk.json +9 -0
- package/build/components/socket/i18n.d.ts +2 -0
- package/build/components/socket/i18n.d.ts.map +1 -0
- package/build/components/socket/i18n.js +18 -0
- package/build/components/socket/i18n.js.map +1 -0
- package/build/components/socket/index.d.ts +3 -0
- package/build/components/socket/index.d.ts.map +1 -0
- package/build/components/socket/index.js +3 -0
- package/build/components/socket/index.js.map +1 -0
- package/build/components/socket/reload-dialog.d.ts +22 -0
- package/build/components/socket/reload-dialog.d.ts.map +1 -0
- package/build/components/socket/reload-dialog.js +34 -0
- package/build/components/socket/reload-dialog.js.map +1 -0
- package/build/components/status.js +1 -1
- package/build/components/status.js.map +1 -1
- package/build/components/text.d.ts.map +1 -1
- package/build/components/text.js +2 -13
- package/build/components/text.js.map +1 -1
- package/build/components/toaster.d.ts +16 -0
- package/build/components/toaster.d.ts.map +1 -0
- package/build/components/toaster.js +52 -0
- package/build/components/toaster.js.map +1 -0
- package/build/components/uploader/consts.local.d.ts +4 -0
- package/build/components/uploader/consts.local.d.ts.map +1 -0
- package/build/components/uploader/consts.local.js +6 -0
- package/build/components/uploader/consts.local.js.map +1 -0
- package/build/components/uploader/image.d.ts.map +1 -1
- package/build/components/uploader/image.js +2 -6
- package/build/components/uploader/image.js.map +1 -1
- package/build/consent/component.d.ts +27 -0
- package/build/consent/component.d.ts.map +1 -0
- package/build/consent/component.js +60 -0
- package/build/consent/component.js.map +1 -0
- package/build/consent/consts.d.ts +2 -0
- package/build/consent/consts.d.ts.map +1 -0
- package/build/consent/consts.js +2 -0
- package/build/consent/consts.js.map +1 -0
- package/build/consent/consts.local.d.ts +9 -0
- package/build/consent/consts.local.d.ts.map +1 -0
- package/build/consent/consts.local.js +9 -0
- package/build/consent/consts.local.js.map +1 -0
- package/build/consent/geo.d.ts +17 -0
- package/build/consent/geo.d.ts.map +1 -0
- package/build/consent/geo.js +19 -0
- package/build/consent/geo.js.map +1 -0
- package/build/consent/index.d.ts +11 -0
- package/build/consent/index.d.ts.map +1 -0
- package/build/consent/index.js +9 -0
- package/build/consent/index.js.map +1 -0
- package/build/consent/language.d.ts +12 -0
- package/build/consent/language.d.ts.map +1 -0
- package/build/consent/language.js +11 -0
- package/build/consent/language.js.map +1 -0
- package/build/consent/menu-widget.d.ts +13 -0
- package/build/consent/menu-widget.d.ts.map +1 -0
- package/build/consent/menu-widget.js +20 -0
- package/build/consent/menu-widget.js.map +1 -0
- package/build/consent/presence.d.ts +30 -0
- package/build/consent/presence.d.ts.map +1 -0
- package/build/consent/presence.js +40 -0
- package/build/consent/presence.js.map +1 -0
- package/build/consent/service.d.ts +18 -0
- package/build/consent/service.d.ts.map +1 -0
- package/build/consent/service.js +53 -0
- package/build/consent/service.js.map +1 -0
- package/build/consent/translate.d.ts +14 -0
- package/build/consent/translate.d.ts.map +1 -0
- package/build/consent/translate.js +28 -0
- package/build/consent/translate.js.map +1 -0
- package/build/consent/types.d.ts +39 -0
- package/build/consent/types.d.ts.map +1 -0
- package/build/consent/types.js +2 -0
- package/build/consent/types.js.map +1 -0
- package/build/consent/types.local.d.ts +6 -0
- package/build/consent/types.local.d.ts.map +1 -0
- package/build/consent/types.local.js +2 -0
- package/build/consent/types.local.js.map +1 -0
- package/build/context.d.ts.map +1 -1
- package/build/context.js +10 -0
- package/build/context.js.map +1 -1
- package/build/editor/component.d.ts +4 -0
- package/build/editor/component.d.ts.map +1 -0
- package/build/editor/component.js +103 -0
- package/build/editor/component.js.map +1 -0
- package/build/editor/consts.local.d.ts +6 -0
- package/build/editor/consts.local.d.ts.map +1 -0
- package/build/editor/consts.local.js +58 -0
- package/build/editor/consts.local.js.map +1 -0
- package/build/editor/index.d.ts +3 -0
- package/build/editor/index.d.ts.map +1 -0
- package/build/editor/index.js +2 -0
- package/build/editor/index.js.map +1 -0
- package/build/editor/types.d.ts +24 -0
- package/build/editor/types.d.ts.map +1 -0
- package/build/editor/types.js +2 -0
- package/build/editor/types.js.map +1 -0
- package/build/entrypoints.d.ts +8 -0
- package/build/entrypoints.d.ts.map +1 -0
- package/build/entrypoints.js +4 -0
- package/build/entrypoints.js.map +1 -0
- package/build/exports.d.ts +6 -5
- package/build/exports.d.ts.map +1 -1
- package/build/exports.js +5 -5
- package/build/exports.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/main.d.ts +1 -4
- package/build/main.d.ts.map +1 -1
- package/build/main.js.map +1 -1
- package/build/modules.d.ts +1 -1
- package/build/modules.d.ts.map +1 -1
- package/build/permission/i18n/be.json +13 -0
- package/build/permission/i18n/de.json +13 -0
- package/build/permission/i18n/en.json +13 -0
- package/build/permission/i18n/es.json +13 -0
- package/build/permission/i18n/fr.json +13 -0
- package/build/permission/i18n/pl.json +13 -0
- package/build/permission/i18n/ru.json +13 -0
- package/build/permission/i18n/uk.json +13 -0
- package/build/permission/i18n.d.ts +2 -0
- package/build/permission/i18n.d.ts.map +1 -0
- package/build/permission/i18n.js +13 -0
- package/build/permission/i18n.js.map +1 -0
- package/build/permission/index.d.ts +6 -0
- package/build/permission/index.d.ts.map +1 -0
- package/build/permission/index.js +27 -0
- package/build/permission/index.js.map +1 -0
- package/build/permission/toast.d.ts +5 -0
- package/build/permission/toast.d.ts.map +1 -0
- package/build/permission/toast.js +8 -0
- package/build/permission/toast.js.map +1 -0
- package/build/permission/types.d.ts +6 -0
- package/build/permission/types.d.ts.map +1 -0
- package/build/permission/types.js +2 -0
- package/build/permission/types.js.map +1 -0
- package/build/picker/icons/consts.d.ts +9 -0
- package/build/picker/icons/consts.d.ts.map +1 -0
- package/build/picker/icons/consts.js +264 -0
- package/build/picker/icons/consts.js.map +1 -0
- package/build/picker/icons/types.d.ts +18 -0
- package/build/picker/icons/types.d.ts.map +1 -0
- package/build/picker/icons/types.js +2 -0
- package/build/picker/icons/types.js.map +1 -0
- package/build/picker/icons.d.ts +4 -0
- package/build/picker/icons.d.ts.map +1 -0
- package/build/picker/icons.js +54 -0
- package/build/picker/icons.js.map +1 -0
- package/build/picker/index.d.ts +11 -0
- package/build/picker/index.d.ts.map +1 -0
- package/build/picker/index.js +10 -0
- package/build/picker/index.js.map +1 -0
- package/build/picker/utils/color/types.d.ts +35 -0
- package/build/picker/utils/color/types.d.ts.map +1 -0
- package/build/picker/utils/color/types.js +2 -0
- package/build/picker/utils/color/types.js.map +1 -0
- package/build/picker/utils/color.d.ts +4 -0
- package/build/picker/utils/color.d.ts.map +1 -0
- package/build/picker/utils/color.js +96 -0
- package/build/picker/utils/color.js.map +1 -0
- package/build/picker/vocabulary/consts.d.ts +26 -0
- package/build/picker/vocabulary/consts.d.ts.map +1 -0
- package/build/picker/vocabulary/consts.js +336 -0
- package/build/picker/vocabulary/consts.js.map +1 -0
- package/build/picker/vocabulary/types.d.ts +67 -0
- package/build/picker/vocabulary/types.d.ts.map +1 -0
- package/build/picker/vocabulary/types.js +2 -0
- package/build/picker/vocabulary/types.js.map +1 -0
- package/build/picker/vocabulary.d.ts +11 -0
- package/build/picker/vocabulary.d.ts.map +1 -0
- package/build/picker/vocabulary.js +83 -0
- package/build/picker/vocabulary.js.map +1 -0
- package/build/scheme/consts.d.ts +8 -0
- package/build/scheme/consts.d.ts.map +1 -0
- package/build/scheme/consts.js +8 -0
- package/build/scheme/consts.js.map +1 -0
- package/build/scheme/index.d.ts +4 -0
- package/build/scheme/index.d.ts.map +1 -0
- package/build/scheme/index.js +3 -0
- package/build/scheme/index.js.map +1 -0
- package/build/scheme/scheme.d.ts +16 -0
- package/build/scheme/scheme.d.ts.map +1 -0
- package/build/scheme/scheme.js +58 -0
- package/build/scheme/scheme.js.map +1 -0
- package/build/scheme/types.d.ts +30 -0
- package/build/scheme/types.d.ts.map +1 -0
- package/build/scheme/types.js +2 -0
- package/build/scheme/types.js.map +1 -0
- package/build/types.d.ts +18 -2
- package/build/types.d.ts.map +1 -1
- package/package.json +107 -52
- package/src/@/components/ui/alert-dialog.tsx +156 -0
- package/src/@/components/ui/alert.tsx +1 -1
- package/src/@/components/ui/button.tsx +1 -1
- package/src/@/components/ui/card.tsx +1 -1
- package/src/@/components/ui/input.tsx +1 -1
- package/src/@/components/ui/label.tsx +1 -1
- package/src/@/components/ui/navigation-menu.tsx +1 -1
- package/src/@/components/ui/popover.tsx +47 -0
- package/src/@/components/ui/progress.tsx +1 -1
- package/src/@/components/ui/separator.tsx +1 -1
- package/src/@/components/ui/sheet.tsx +142 -0
- package/src/auth/context.ts +0 -2
- package/src/auth/entrypoints.ts +5 -0
- package/src/auth/exports.ts +4 -4
- package/src/auth/plugins/basic-ed25519.tsx +4 -4
- package/src/auth/plugins/re-captcha.tsx +3 -3
- package/src/auth/plugins/tunnel-consumer.tsx +1 -1
- package/src/components/block.tsx +2 -2
- package/src/components/consts.local.ts +29 -0
- package/src/components/footer/component.tsx +58 -16
- package/src/components/footer/credit.tsx +61 -0
- package/src/components/footer/index.ts +1 -0
- package/src/components/footer/types.ts +22 -1
- package/src/components/form/button/component.tsx +7 -4
- package/src/components/form/component.tsx +2 -2
- package/src/components/form/text/component.tsx +2 -2
- package/src/components/helper.ts +1 -13
- package/src/components/index.ts +4 -0
- package/src/components/link.tsx +3 -3
- package/src/components/login/append.ts +34 -0
- package/src/components/login/consts.local.ts +10 -0
- package/src/components/login/consts.ts +2 -0
- package/src/components/login/credit.tsx +33 -0
- package/src/components/login/i18n/be.json +10 -0
- package/src/components/login/i18n/de.json +10 -0
- package/src/components/login/i18n/en.json +10 -0
- package/src/components/login/i18n/es.json +10 -0
- package/src/components/login/i18n/fr.json +10 -0
- package/src/components/login/i18n/pl.json +10 -0
- package/src/components/login/i18n/ru.json +10 -0
- package/src/components/login/i18n/uk.json +10 -0
- package/src/components/login/i18n.ts +29 -0
- package/src/components/login/icons.tsx +39 -0
- package/src/components/login/index.ts +11 -0
- package/src/components/login/notify.ts +48 -0
- package/src/components/login/provider.tsx +57 -0
- package/src/components/login/screen.tsx +178 -0
- package/src/components/login/terms.tsx +75 -0
- package/src/components/login/types.ts +30 -0
- package/src/components/nav/consts.local.ts +64 -0
- package/src/components/nav/index.ts +1 -0
- package/src/components/nav/layout.tsx +184 -26
- package/src/components/nav/mobile.tsx +165 -0
- package/src/components/nav/side.tsx +43 -27
- package/src/components/nav/top.tsx +44 -22
- package/src/components/nav/types.ts +65 -2
- package/src/components/nav/viewport.ts +16 -0
- package/src/components/panel-app/component.tsx +9 -1
- package/src/components/picker/color-picker.tsx +15 -0
- package/src/components/picker/consts.local.ts +267 -0
- package/src/components/picker/dot.tsx +21 -0
- package/src/components/picker/grid.tsx +138 -0
- package/src/components/picker/i18n/be.json +60 -0
- package/src/components/picker/i18n/de.json +60 -0
- package/src/components/picker/i18n/en.json +60 -0
- package/src/components/picker/i18n/es.json +60 -0
- package/src/components/picker/i18n/fr.json +60 -0
- package/src/components/picker/i18n/pl.json +60 -0
- package/src/components/picker/i18n/ru.json +60 -0
- package/src/components/picker/i18n/uk.json +60 -0
- package/src/components/picker/i18n.ts +19 -0
- package/src/components/picker/icon-color-picker.tsx +25 -0
- package/src/components/picker/icon-picker.tsx +13 -0
- package/src/components/picker/index.ts +11 -0
- package/src/components/picker/panel.tsx +61 -0
- package/src/components/picker/root.tsx +81 -0
- package/src/components/picker/roving.ts +70 -0
- package/src/components/picker/surface.tsx +62 -0
- package/src/components/picker/swatches/custom.tsx +110 -0
- package/src/components/picker/swatches.tsx +67 -0
- package/src/components/picker/text.ts +46 -0
- package/src/components/picker/tile.tsx +35 -0
- package/src/components/picker/translate.ts +15 -0
- package/src/components/picker/trigger.tsx +54 -0
- package/src/components/picker/types.local.ts +154 -0
- package/src/components/picker/types.ts +125 -0
- package/src/components/scheme/consts.local.ts +13 -0
- package/src/components/scheme/hook.ts +62 -0
- package/src/components/scheme/index.ts +4 -0
- package/src/components/scheme/toggle.tsx +32 -0
- package/src/components/scheme/types.ts +23 -0
- package/src/components/socket/i18n/be.json +9 -0
- package/src/components/socket/i18n/de.json +9 -0
- package/src/components/socket/i18n/en.json +9 -0
- package/src/components/socket/i18n/es.json +9 -0
- package/src/components/socket/i18n/fr.json +9 -0
- package/src/components/socket/i18n/pl.json +9 -0
- package/src/components/socket/i18n/ru.json +9 -0
- package/src/components/socket/i18n/uk.json +9 -0
- package/src/components/socket/i18n.ts +19 -0
- package/src/components/socket/index.ts +2 -0
- package/src/components/socket/reload-dialog.tsx +61 -0
- package/src/components/status.tsx +1 -1
- package/src/components/text.tsx +2 -14
- package/src/components/toaster.tsx +65 -0
- package/src/components/uploader/consts.local.ts +7 -0
- package/src/components/uploader/image.tsx +2 -6
- package/src/consent/component.tsx +84 -0
- package/src/consent/consts.local.ts +10 -0
- package/src/consent/consts.ts +1 -0
- package/src/consent/geo.ts +26 -0
- package/src/consent/index.ts +24 -0
- package/src/consent/language.ts +12 -0
- package/src/consent/menu-widget.tsx +22 -0
- package/src/consent/presence.ts +45 -0
- package/src/consent/service.ts +75 -0
- package/src/consent/translate.ts +31 -0
- package/src/consent/types.local.ts +6 -0
- package/src/consent/types.ts +43 -0
- package/src/context.ts +12 -0
- package/src/editor/component.tsx +172 -0
- package/src/editor/consts.local.ts +62 -0
- package/src/editor/index.ts +2 -0
- package/src/editor/types.ts +24 -0
- package/src/entrypoints.ts +5 -0
- package/src/exports.ts +6 -5
- package/src/index.ts +1 -1
- package/src/main.tsx +2 -6
- package/src/permission/i18n/be.json +13 -0
- package/src/permission/i18n/de.json +13 -0
- package/src/permission/i18n/en.json +13 -0
- package/src/permission/i18n/es.json +13 -0
- package/src/permission/i18n/fr.json +13 -0
- package/src/permission/i18n/pl.json +13 -0
- package/src/permission/i18n/ru.json +13 -0
- package/src/permission/i18n/uk.json +13 -0
- package/src/permission/i18n.ts +13 -0
- package/src/permission/index.ts +27 -0
- package/src/permission/toast.tsx +20 -0
- package/src/permission/types.ts +5 -0
- package/src/picker/icons/consts.ts +309 -0
- package/src/picker/icons/types.ts +18 -0
- package/src/picker/icons.ts +70 -0
- package/src/picker/index.ts +11 -0
- package/src/picker/utils/color/types.ts +37 -0
- package/src/picker/utils/color.ts +119 -0
- package/src/picker/vocabulary/consts.ts +347 -0
- package/src/picker/vocabulary/types.ts +72 -0
- package/src/picker/vocabulary.ts +111 -0
- package/src/scheme/consts.ts +8 -0
- package/src/scheme/index.ts +3 -0
- package/src/scheme/scheme.ts +66 -0
- package/src/scheme/types.ts +30 -0
- package/src/types.ts +19 -2
- package/tests/consent-language.spec.ts +31 -0
- package/tests/consent.spec.ts +112 -0
- package/tests/context.ts +4 -0
- package/tests/editor.spec.ts +58 -0
- package/tests/harness/editor.tsx +32 -0
- package/tests/harness/index.html +1 -0
- package/tests/harness/lazy-screen.tsx +9 -0
- package/tests/harness/mount.tsx +370 -29
- package/tests/harness/picker.tsx +110 -0
- package/tests/lazy.spec.ts +104 -0
- package/tests/login-provider.spec.ts +114 -0
- package/tests/login.spec.ts +447 -0
- package/tests/nav.spec.ts +449 -3
- package/tests/package-boundary.spec.ts +19 -0
- package/tests/picker-shots.spec.ts +174 -0
- package/tests/picker-vocabulary.spec.ts +217 -0
- package/tests/picker.spec.ts +333 -0
- package/tests/scheme.spec.ts +149 -0
- package/tests/smoke.spec.ts +2 -2
- package/tests/socket-dialog.spec.ts +154 -0
- package/tests/toaster.spec.ts +59 -0
- package/zz-tw.d.mts +2 -0
- package/zz-tw.d.mts.map +1 -0
- package/build/.gitkeep +0 -0
- package/src/auth/modules.ts +0 -5
- package/src/modules.ts +0 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConsentLocale } from '@owlmeans/web-consent'
|
|
2
|
+
import { SUPPORTED_LNGS } from '@owlmeans/i18n'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The consent package carries its own locale list because it must build with no dependency on the
|
|
6
|
+
* i18n package at all. This assertion is what keeps the two from drifting: a language added to the
|
|
7
|
+
* framework and not to the bundle fails here, at build time, rather than as a dialog rendering
|
|
8
|
+
* English to the one reader who cannot report it.
|
|
9
|
+
*/
|
|
10
|
+
export const _localeParity: readonly ConsentLocale[] = SUPPORTED_LNGS as readonly ConsentLocale[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CONSENT_WIDGET_SERVICE = 'consent-widget'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { consentPluginHelper, type ConsentGeoPlugin } from '@owlmeans/web-consent'
|
|
2
|
+
import type { ClientConfig } from '@owlmeans/client-context'
|
|
3
|
+
import type { ClientContext } from '@owlmeans/client'
|
|
4
|
+
import type { ConsentGeoPluginAppend } from './types.js'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Add the application's own country locator while its context is configured — beside
|
|
8
|
+
* `appendConsentWidgetService`, before anything renders.
|
|
9
|
+
*
|
|
10
|
+
* A locator is one async method that resolves the visitor's country or throws
|
|
11
|
+
* (`ConsentGeoPlugin`). It is registered into `@owlmeans/consent`'s plugin registry, ahead of the
|
|
12
|
+
* built-in Cloudflare one, and `PanelCookieConsent` turns the geo gate on for it even where
|
|
13
|
+
* `cfg.cookieConsent.geo` says nothing — appending a locator IS asking for the gate. Its result
|
|
14
|
+
* decides as Cloudflare's would: a visitor in a consent country is asked, anyone else is decided for
|
|
15
|
+
* automatically, and a throw hands over to the next locator — with none left, the visitor is asked.
|
|
16
|
+
*/
|
|
17
|
+
export const appendConsentGeoPlugin = <C extends ClientConfig, T extends ClientContext<C>>(
|
|
18
|
+
ctx: T, plugin: ConsentGeoPlugin
|
|
19
|
+
): T & ConsentGeoPluginAppend => {
|
|
20
|
+
const _ctx = ctx as T & ConsentGeoPluginAppend
|
|
21
|
+
|
|
22
|
+
consentPluginHelper.registerConsentPlugin(plugin)
|
|
23
|
+
_ctx.consentGeo = () => plugin
|
|
24
|
+
|
|
25
|
+
return _ctx
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './component.js'
|
|
2
|
+
export * from './menu-widget.js'
|
|
3
|
+
export * from './presence.js'
|
|
4
|
+
export { installConsentLanguage } from './language.js'
|
|
5
|
+
export { createConsentWidgetService, appendConsentWidgetService, CONSENT_WIDGET_STATE } from './service.js'
|
|
6
|
+
export { appendConsentGeoPlugin } from './geo.js'
|
|
7
|
+
export { CONSENT_WIDGET_SERVICE } from './consts.js'
|
|
8
|
+
export type {
|
|
9
|
+
ConsentWidgetPresenceRecord, ConsentWidgetService, ConsentWidgetServiceAppend,
|
|
10
|
+
PanelCookieConsentConfig, ConsentGeoPluginAppend,
|
|
11
|
+
} from './types.js'
|
|
12
|
+
export {
|
|
13
|
+
useConsent, useConsentCategory, consentStore, openConsent, isConsented,
|
|
14
|
+
readConsent, writeConsent, clearConsent, DEFAULT_CONSENT_CATEGORIES,
|
|
15
|
+
CONSENT_KEY, CONSENT_ESSENTIAL, CONSENT_ANALYTICS, CONSENT_MARKETING,
|
|
16
|
+
CONSENT_EVENT,
|
|
17
|
+
consentBootstrapScript,
|
|
18
|
+
CONSENT_REQUIRED_COUNTRIES,
|
|
19
|
+
} from '@owlmeans/web-consent'
|
|
20
|
+
export type {
|
|
21
|
+
ConsentCategory, ConsentMenuWidgetProps, ConsentOptions, ConsentRecord, ConsentSignal,
|
|
22
|
+
ConsentState, CookieConsentProps, CookiePolicyProps, ConsentDisplayMode, ConsentGeoOptions,
|
|
23
|
+
ConsentGeoPlugin, ConsentGeoLocation,
|
|
24
|
+
} from '@owlmeans/web-consent'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConsentOptions } from '@owlmeans/web-consent'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated The interface language is strictly necessary storage: `@owlmeans/client-i18n` writes
|
|
5
|
+
* it on every switch and reads it at every start, and `@owlmeans/consent` stores a language that
|
|
6
|
+
* arrives with a link — none of it waits for a cookie decision, so there is nothing left to bind.
|
|
7
|
+
*
|
|
8
|
+
* Kept as a no-op (returning a no-op cleanup) only so an application written against the earlier,
|
|
9
|
+
* consent-gated API — a generated target that floats to a newer release — still builds. Remove the
|
|
10
|
+
* call.
|
|
11
|
+
*/
|
|
12
|
+
export const installConsentLanguage = (_opts?: ConsentOptions): (() => void) => () => undefined
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FC } from 'react'
|
|
2
|
+
import { ConsentMenuWidget } from '@owlmeans/web-consent'
|
|
3
|
+
import type { ConsentMenuWidgetProps } from '@owlmeans/web-consent'
|
|
4
|
+
import { useLanguage } from '@owlmeans/client-i18n'
|
|
5
|
+
import { useConsentTranslate } from './translate.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The cookie-preferences row for a host's own dropdown/menu, bound to this app's language.
|
|
9
|
+
*
|
|
10
|
+
* Purely the visual row — it carries no presence signalling of its own, since it is typically
|
|
11
|
+
* rendered inside a dropdown's lazily-mounted content (only present while the menu is actually
|
|
12
|
+
* open). A host that wants `PanelCookieConsent`'s floating button hidden for the whole time this
|
|
13
|
+
* row is REACHABLE (not just while the dropdown happens to be open) calls
|
|
14
|
+
* `useConsentMenuPresence()` from its own always-mounted menu shell instead.
|
|
15
|
+
*/
|
|
16
|
+
export const PanelConsentMenuWidget: FC<ConsentMenuWidgetProps> = props => {
|
|
17
|
+
const [lng] = useLanguage()
|
|
18
|
+
const locale = props.locale ?? lng
|
|
19
|
+
const translate = useConsentTranslate(locale, props.translate)
|
|
20
|
+
|
|
21
|
+
return <ConsentMenuWidget {...props} locale={locale} translate={translate} />
|
|
22
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useLayoutEffect } from 'react'
|
|
2
|
+
import { useStoreModel } from '@owlmeans/client'
|
|
3
|
+
import { useContext } from '../context.js'
|
|
4
|
+
import { CONSENT_WIDGET_STATE } from './service.js'
|
|
5
|
+
import type { AppConfig, AppContext } from '../types.js'
|
|
6
|
+
import type { ConsentWidgetPresenceRecord, ConsentWidgetServiceAppend } from './types.js'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Whether a cookie-preferences action is currently reachable elsewhere in this app — what
|
|
10
|
+
* `PanelCookieConsent` reads to hide its own floating button while it is.
|
|
11
|
+
*
|
|
12
|
+
* Reads the state resource directly, never `useConsent()` — that hook's own mount triggers
|
|
13
|
+
* `consentStore.init()` as a side effect, which this must not do. The resource exists only once
|
|
14
|
+
* `appendConsentWidgetService(context)` has run; `PanelCookieConsent` checks for the service before
|
|
15
|
+
* calling this, and so must any other caller.
|
|
16
|
+
*/
|
|
17
|
+
export const useConsentWidgetPresent = (): boolean => {
|
|
18
|
+
const model = useStoreModel<ConsentWidgetPresenceRecord>(undefined, CONSENT_WIDGET_STATE)
|
|
19
|
+
|
|
20
|
+
return model.record.present === true
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Declares that a cookie-preferences action is reachable for as long as the CALLING component
|
|
25
|
+
* stays mounted.
|
|
26
|
+
*
|
|
27
|
+
* Call this from a component that is mounted for the whole time the action is reachable — a
|
|
28
|
+
* dropdown/menu's own shell, not the menu's lazily-rendered content. Radix's `DropdownMenuContent`
|
|
29
|
+
* (and most headless menu content primitives) only mount their children while the menu is actually
|
|
30
|
+
* OPEN, so a `PanelConsentMenuWidget` row placed there is present for a fraction of the time the
|
|
31
|
+
* menu itself is on screen — calling this hook from inside that row hid the floating button only
|
|
32
|
+
* while the dropdown happened to be open, and showed it again the instant it closed.
|
|
33
|
+
*
|
|
34
|
+
* A layout effect, not a plain one: an ordinary effect runs after paint, so the floating button
|
|
35
|
+
* would flash for one frame before a fresh mount reports presence.
|
|
36
|
+
*
|
|
37
|
+
* Without `appendConsentWidgetService(context)` there is nothing to claim and this does nothing:
|
|
38
|
+
* `PanelCookieConsent` then keeps its floating button, which is visible on screen, rather than a
|
|
39
|
+
* throw from a layout effect, which takes the whole application down.
|
|
40
|
+
*/
|
|
41
|
+
export const useConsentMenuPresence = (): void => {
|
|
42
|
+
const context = useContext<AppConfig, AppContext<AppConfig> & Partial<ConsentWidgetServiceAppend>>()
|
|
43
|
+
|
|
44
|
+
useLayoutEffect(() => context.consentWidget?.().claim(), [context])
|
|
45
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { createService } from '@owlmeans/context'
|
|
2
|
+
import { appendStateResource, stateAlias } from '@owlmeans/state'
|
|
3
|
+
import type { ClientConfig } from '@owlmeans/client-context'
|
|
4
|
+
import type { ClientContext } from '@owlmeans/client'
|
|
5
|
+
import { CONSENT_WIDGET_SERVICE } from './consts.js'
|
|
6
|
+
import type {
|
|
7
|
+
ConsentWidgetPresenceRecord, ConsentWidgetService, ConsentWidgetServiceAppend
|
|
8
|
+
} from './types.js'
|
|
9
|
+
|
|
10
|
+
/** The presence flag's state-resource alias — `single: true`, no id. */
|
|
11
|
+
export const CONSENT_WIDGET_STATE = stateAlias<ConsentWidgetPresenceRecord>('consent-widget-presence')
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Tracks how many cookie-preferences menu rows are currently mounted, and publishes a plain
|
|
15
|
+
* present/absent flag into a state resource for `PanelCookieConsent` to read.
|
|
16
|
+
*
|
|
17
|
+
* Ref-counted rather than a boolean latch: a nav-mode transition can mount a new menu row before
|
|
18
|
+
* the old one unmounts (confirmed reachable in manager-web's own nav — a stale header still
|
|
19
|
+
* rendering its own dropdown for one commit while a project screen's dropdown has already
|
|
20
|
+
* mounted), and React 18 StrictMode double-invokes mount/cleanup in dev. Counting means the
|
|
21
|
+
* published flag only ever flips on a genuine 0-to-1 or 1-to-0 transition.
|
|
22
|
+
*/
|
|
23
|
+
export const createConsentWidgetService = (
|
|
24
|
+
alias: string = CONSENT_WIDGET_SERVICE
|
|
25
|
+
): ConsentWidgetService => {
|
|
26
|
+
let count = 0
|
|
27
|
+
|
|
28
|
+
const publish = (present: boolean): void => {
|
|
29
|
+
const ctx = service.assertCtx<ClientConfig, ClientContext<ClientConfig>>()
|
|
30
|
+
void ctx.getStateResource<ConsentWidgetPresenceRecord>(CONSENT_WIDGET_STATE).save({ present })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const service: ConsentWidgetService = createService<ConsentWidgetService>(alias, {
|
|
34
|
+
claim: () => {
|
|
35
|
+
count += 1
|
|
36
|
+
if (count === 1) {
|
|
37
|
+
publish(true)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
let released = false
|
|
41
|
+
return () => {
|
|
42
|
+
if (released) {
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
released = true
|
|
46
|
+
count = Math.max(0, count - 1)
|
|
47
|
+
if (count === 0) {
|
|
48
|
+
publish(false)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
present: () => count > 0,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
return service
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const appendConsentWidgetService = <C extends ClientConfig, T extends ClientContext<C>>(
|
|
60
|
+
ctx: T, alias: string = CONSENT_WIDGET_SERVICE
|
|
61
|
+
): T & ConsentWidgetServiceAppend => {
|
|
62
|
+
const _ctx = ctx as T & ConsentWidgetServiceAppend
|
|
63
|
+
|
|
64
|
+
appendStateResource<C, T, ConsentWidgetPresenceRecord>(
|
|
65
|
+
ctx, CONSENT_WIDGET_STATE, { single: true, default: () => ({ present: false }) }
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
if (!_ctx.hasService(alias)) {
|
|
69
|
+
_ctx.registerService(createConsentWidgetService(alias))
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
_ctx.consentWidget = () => _ctx.service(alias)
|
|
73
|
+
|
|
74
|
+
return _ctx
|
|
75
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useCallback } from 'react'
|
|
2
|
+
import { useI18nLib } from '@owlmeans/client-i18n'
|
|
3
|
+
import { consentI18nHelper } from '@owlmeans/web-consent'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resolve consent copy through the application first, and the packaged bundle second.
|
|
7
|
+
*
|
|
8
|
+
* The chain matters. `@owlmeans/web-consent` takes `translate` as a prop and, once given one,
|
|
9
|
+
* stops consulting its own translations — so a wrapper that forwarded the framework resolver
|
|
10
|
+
* alone would render the ENGLISH default for every key the application had not overridden, in
|
|
11
|
+
* every language. Falling through to the packaged bundle for the current locale means an
|
|
12
|
+
* application overrides what it wants to and inherits the packaged languages for the rest.
|
|
13
|
+
*
|
|
14
|
+
* Shared by `PanelCookieConsent`/`PanelCookiePolicy` and `PanelConsentMenuWidget` — every
|
|
15
|
+
* `web-panel/consent` surface resolves copy through this one chain.
|
|
16
|
+
*/
|
|
17
|
+
export const useConsentTranslate = (
|
|
18
|
+
locale: string, override?: (key: string, defaultValue: string) => string
|
|
19
|
+
): ((key: string, defaultValue: string) => string) => {
|
|
20
|
+
const t = useI18nLib('consent')
|
|
21
|
+
|
|
22
|
+
return useCallback((key: string, defaultValue: string) => {
|
|
23
|
+
if (override != null) {
|
|
24
|
+
return override(key, defaultValue)
|
|
25
|
+
}
|
|
26
|
+
const packaged = consentI18nHelper.defaultConsentTranslate(locale)(key, defaultValue)
|
|
27
|
+
// `t` answers with whatever it is given when the key is unknown, so the packaged string is
|
|
28
|
+
// what it is given — an application's override wins, and everything else stays translated.
|
|
29
|
+
return t(key, { defaultValue: packaged })
|
|
30
|
+
}, [t, locale, override])
|
|
31
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ResourceRecord } from '@owlmeans/resource'
|
|
2
|
+
import type { InitializedService } from '@owlmeans/context'
|
|
3
|
+
import type { ConsentDisplayMode, ConsentGeoOptions, ConsentGeoPlugin } from '@owlmeans/web-consent'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `cfg.cookieConsent` — how the application's cookie consent asks, set where the rest of its
|
|
7
|
+
* configuration is. A prop on `PanelCookieConsent` / `PanelCookiePolicy` always wins.
|
|
8
|
+
*/
|
|
9
|
+
export interface PanelCookieConsentConfig {
|
|
10
|
+
/** `bar` (the default) or `window` — see `ConsentDisplayMode`. */
|
|
11
|
+
mode?: ConsentDisplayMode
|
|
12
|
+
/**
|
|
13
|
+
* Ask only where the law requires it. `{ cloudflare: true }` locates the visitor through the
|
|
14
|
+
* Cloudflare edge the application is served from; a locator of the application's own is added in
|
|
15
|
+
* code with `appendConsentGeoPlugin`. See `ConsentGeoOptions`.
|
|
16
|
+
*/
|
|
17
|
+
geo?: ConsentGeoOptions
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** What `appendConsentGeoPlugin` adds to the context. */
|
|
21
|
+
export interface ConsentGeoPluginAppend {
|
|
22
|
+
/** The application's own locator, registered while the context was configured. */
|
|
23
|
+
consentGeo: () => ConsentGeoPlugin
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** A `single`-store presence flag: one record, no id needed. */
|
|
27
|
+
export interface ConsentWidgetPresenceRecord extends ResourceRecord {
|
|
28
|
+
present: boolean
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ConsentWidgetService extends InitializedService {
|
|
32
|
+
/**
|
|
33
|
+
* Register one mounted cookie-preferences menu row. Returns its release — call it exactly
|
|
34
|
+
* once, on that instance's unmount.
|
|
35
|
+
*/
|
|
36
|
+
claim: () => () => void
|
|
37
|
+
/** Whether at least one row is currently mounted anywhere in the app. */
|
|
38
|
+
present: () => boolean
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ConsentWidgetServiceAppend {
|
|
42
|
+
consentWidget: () => ConsentWidgetService
|
|
43
|
+
}
|
package/src/context.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { appendFlowService } from '@owlmeans/web-flow'
|
|
|
2
2
|
import type { AppConfig , AppContext } from './types.js'
|
|
3
3
|
import { makeContext as makeClientContext, useContext as useCtx } from '@owlmeans/web-client'
|
|
4
4
|
import { apiConfigMiddleware } from '@owlmeans/api-config-client'
|
|
5
|
+
import { appendLoginScreen } from './components/login/append.js'
|
|
6
|
+
import { appendSocketStatus } from '@owlmeans/client-socket'
|
|
5
7
|
|
|
6
8
|
export const makeContext = <C extends AppConfig, T extends AppContext<C>>(cfg: C): T => {
|
|
7
9
|
const context = makeClientContext(cfg) as T
|
|
@@ -11,6 +13,16 @@ export const makeContext = <C extends AppConfig, T extends AppContext<C>>(cfg: C
|
|
|
11
13
|
appendFlowService<C, T>(context)
|
|
12
14
|
context.flow = () => context.service('flow')
|
|
13
15
|
|
|
16
|
+
// Registered unconditionally — cheap, and it is what lets `SocketReloadDialog` and
|
|
17
|
+
// `useSocketStatus()` work at all. It stays inert for an app that never opts into
|
|
18
|
+
// `cfg.socket.reloadDialog`: nothing renders, and every `ws()`/`useWs()` connection reporting
|
|
19
|
+
// into it costs one map write per state change.
|
|
20
|
+
appendSocketStatus<C, T>(context)
|
|
21
|
+
|
|
22
|
+
// Every app on this package gets the shadcn sign-in screen with no wiring of its own; one that
|
|
23
|
+
// wants its logo on it calls `appendLoginScreen` again, which is idempotent.
|
|
24
|
+
appendLoginScreen<C, T>(context)
|
|
25
|
+
|
|
14
26
|
return context
|
|
15
27
|
}
|
|
16
28
|
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { useEffect, useId, useMemo, useRef, useState } from 'react'
|
|
2
|
+
import type { FC } from 'react'
|
|
3
|
+
import { basicSetup } from 'codemirror'
|
|
4
|
+
import { Compartment, EditorState } from '@codemirror/state'
|
|
5
|
+
import { EditorView } from '@codemirror/view'
|
|
6
|
+
import { syntaxHighlighting } from '@codemirror/language'
|
|
7
|
+
import { json, jsonParseLinter } from '@codemirror/lang-json'
|
|
8
|
+
import { linter } from '@codemirror/lint'
|
|
9
|
+
import { Braces, Check, Copy, LockKeyhole, WrapText } from 'lucide-react'
|
|
10
|
+
import { Button } from '../@/components/ui/button.js'
|
|
11
|
+
import { cn } from '../@/lib/utils.js'
|
|
12
|
+
import { EDITOR_THEME, JSON_HIGHLIGHT, LABELS } from './consts.local.js'
|
|
13
|
+
import type { JsonEditorProps } from './types.js'
|
|
14
|
+
|
|
15
|
+
export const JsonEditor: FC<JsonEditorProps> = ({
|
|
16
|
+
value,
|
|
17
|
+
onChange,
|
|
18
|
+
onValidityChange,
|
|
19
|
+
readOnly = false,
|
|
20
|
+
id,
|
|
21
|
+
ariaLabel = 'JSON',
|
|
22
|
+
testId,
|
|
23
|
+
className,
|
|
24
|
+
minHeight = 120,
|
|
25
|
+
maxHeight = 560,
|
|
26
|
+
labels
|
|
27
|
+
}) => {
|
|
28
|
+
const copy = { ...LABELS, ...labels }
|
|
29
|
+
const errorId = useId()
|
|
30
|
+
const mount = useRef<HTMLDivElement>(null)
|
|
31
|
+
const editor = useRef<EditorView | null>(null)
|
|
32
|
+
const callback = useRef(onChange)
|
|
33
|
+
const external = useRef(false)
|
|
34
|
+
const [access] = useState(() => new Compartment())
|
|
35
|
+
const [attributes] = useState(() => new Compartment())
|
|
36
|
+
const [copied, setCopied] = useState(false)
|
|
37
|
+
const [copyFailed, setCopyFailed] = useState(false)
|
|
38
|
+
const error = useMemo(() => {
|
|
39
|
+
try {
|
|
40
|
+
JSON.parse(value)
|
|
41
|
+
return null
|
|
42
|
+
} catch (cause) {
|
|
43
|
+
return cause instanceof Error ? cause.message : String(cause)
|
|
44
|
+
}
|
|
45
|
+
}, [value])
|
|
46
|
+
callback.current = onChange
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (mount.current == null) return
|
|
50
|
+
const view = new EditorView({
|
|
51
|
+
parent: mount.current,
|
|
52
|
+
doc: value,
|
|
53
|
+
extensions: [
|
|
54
|
+
basicSetup,
|
|
55
|
+
json(),
|
|
56
|
+
linter(jsonParseLinter()),
|
|
57
|
+
EDITOR_THEME,
|
|
58
|
+
syntaxHighlighting(JSON_HIGHLIGHT),
|
|
59
|
+
EditorView.lineWrapping,
|
|
60
|
+
access.of([EditorState.readOnly.of(readOnly), EditorView.editable.of(!readOnly)]),
|
|
61
|
+
attributes.of(EditorView.contentAttributes.of({ 'aria-label': ariaLabel })),
|
|
62
|
+
EditorView.updateListener.of((update) => {
|
|
63
|
+
if (update.docChanged && !external.current) callback.current?.(update.state.doc.toString())
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
editor.current = view
|
|
68
|
+
return () => {
|
|
69
|
+
view.destroy()
|
|
70
|
+
editor.current = null
|
|
71
|
+
}
|
|
72
|
+
}, [])
|
|
73
|
+
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
const view = editor.current
|
|
76
|
+
if (view == null || view.state.doc.toString() === value) return
|
|
77
|
+
external.current = true
|
|
78
|
+
view.dispatch({ changes: { from: 0, to: view.state.doc.length, insert: value } })
|
|
79
|
+
external.current = false
|
|
80
|
+
}, [value])
|
|
81
|
+
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
editor.current?.dispatch({
|
|
84
|
+
effects: [
|
|
85
|
+
access.reconfigure([EditorState.readOnly.of(readOnly), EditorView.editable.of(!readOnly)]),
|
|
86
|
+
attributes.reconfigure(
|
|
87
|
+
EditorView.contentAttributes.of({
|
|
88
|
+
...(id != null ? { id } : {}),
|
|
89
|
+
...(testId != null ? { 'data-testid': testId } : {}),
|
|
90
|
+
'aria-label': ariaLabel,
|
|
91
|
+
'aria-readonly': String(readOnly),
|
|
92
|
+
'aria-invalid': String(error != null),
|
|
93
|
+
...(error != null ? { 'aria-describedby': errorId } : {})
|
|
94
|
+
})
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
})
|
|
98
|
+
}, [readOnly, id, testId, ariaLabel, error])
|
|
99
|
+
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
onValidityChange?.(error == null)
|
|
102
|
+
}, [error, onValidityChange])
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
setCopied(false)
|
|
105
|
+
setCopyFailed(false)
|
|
106
|
+
}, [value])
|
|
107
|
+
|
|
108
|
+
const copyText = async (): Promise<void> => {
|
|
109
|
+
try {
|
|
110
|
+
await navigator.clipboard.writeText(value)
|
|
111
|
+
setCopied(true)
|
|
112
|
+
setCopyFailed(false)
|
|
113
|
+
} catch {
|
|
114
|
+
setCopyFailed(true)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<div
|
|
120
|
+
data-json-editor
|
|
121
|
+
data-valid={error == null}
|
|
122
|
+
className={cn(
|
|
123
|
+
'min-w-0 overflow-hidden rounded-lg border bg-background text-foreground shadow-xs focus-within:ring-2 focus-within:ring-ring/40',
|
|
124
|
+
error != null && 'border-destructive',
|
|
125
|
+
className
|
|
126
|
+
)}
|
|
127
|
+
>
|
|
128
|
+
<div className="flex min-h-10 flex-wrap items-center justify-between gap-2 border-b bg-muted/50 px-3 py-1">
|
|
129
|
+
<span className="inline-flex items-center gap-2 font-mono text-xs text-muted-foreground">
|
|
130
|
+
<Braces className="size-3.5" aria-hidden="true" />
|
|
131
|
+
JSON
|
|
132
|
+
{readOnly && (
|
|
133
|
+
<span className="inline-flex items-center gap-1 font-sans">
|
|
134
|
+
<LockKeyhole className="size-3" />
|
|
135
|
+
{copy.readOnly}
|
|
136
|
+
</span>
|
|
137
|
+
)}
|
|
138
|
+
</span>
|
|
139
|
+
<div className="flex items-center gap-1">
|
|
140
|
+
{!readOnly && (
|
|
141
|
+
<Button
|
|
142
|
+
type="button"
|
|
143
|
+
size="sm"
|
|
144
|
+
variant="ghost"
|
|
145
|
+
disabled={error != null}
|
|
146
|
+
onClick={() => onChange?.(JSON.stringify(JSON.parse(value), null, 2))}
|
|
147
|
+
>
|
|
148
|
+
<WrapText className="size-3.5" />
|
|
149
|
+
{copy.format}
|
|
150
|
+
</Button>
|
|
151
|
+
)}
|
|
152
|
+
<Button type="button" size="sm" variant="ghost" onClick={() => void copyText()}>
|
|
153
|
+
{copied ? <Check className="size-3.5" /> : <Copy className="size-3.5" />}
|
|
154
|
+
{copied ? copy.copied : copyFailed ? copy.copyFailed : copy.copy}
|
|
155
|
+
</Button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div
|
|
159
|
+
ref={mount}
|
|
160
|
+
className="[&_.cm-scroller]:max-h-[var(--json-max-height)] [&_.cm-scroller]:min-h-[var(--json-min-height)]"
|
|
161
|
+
style={{ '--json-min-height': `${minHeight}px`, '--json-max-height': `${maxHeight}px` } as React.CSSProperties}
|
|
162
|
+
/>
|
|
163
|
+
<div
|
|
164
|
+
className={cn('border-t px-3 py-1.5 text-xs', error != null ? 'text-destructive' : 'text-muted-foreground')}
|
|
165
|
+
aria-live="polite"
|
|
166
|
+
id={errorId}
|
|
167
|
+
>
|
|
168
|
+
{error != null ? `${copy.invalid}: ${error}` : copy.valid}
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
)
|
|
172
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view'
|
|
2
|
+
import { HighlightStyle } from '@codemirror/language'
|
|
3
|
+
import { tags } from '@lezer/highlight'
|
|
4
|
+
import type { JsonEditorLabels } from './types.js'
|
|
5
|
+
|
|
6
|
+
export const LABELS: JsonEditorLabels = {
|
|
7
|
+
format: 'Format',
|
|
8
|
+
copy: 'Copy',
|
|
9
|
+
copied: 'Copied',
|
|
10
|
+
copyFailed: 'Copy failed',
|
|
11
|
+
readOnly: 'Read only',
|
|
12
|
+
valid: 'Valid JSON',
|
|
13
|
+
invalid: 'Invalid JSON'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const EDITOR_THEME = EditorView.theme({
|
|
17
|
+
'&': {
|
|
18
|
+
backgroundColor: 'var(--background, var(--color-background))',
|
|
19
|
+
color: 'var(--foreground, var(--color-foreground))',
|
|
20
|
+
fontSize: '13px'
|
|
21
|
+
},
|
|
22
|
+
'&.cm-focused': { outline: 'none' },
|
|
23
|
+
'.cm-scroller': { fontFamily: 'ui-monospace, SFMono-Regular, monospace', overflow: 'auto', lineHeight: '1.7' },
|
|
24
|
+
'.cm-content': { padding: '12px 0', caretColor: 'var(--foreground, var(--color-foreground))' },
|
|
25
|
+
'.cm-line': { padding: '0 16px 0 10px' },
|
|
26
|
+
'.cm-gutters': {
|
|
27
|
+
backgroundColor: 'var(--muted, var(--color-muted))',
|
|
28
|
+
color: 'var(--muted-foreground, var(--color-muted-foreground))',
|
|
29
|
+
borderRight: '1px solid var(--border, var(--color-border))'
|
|
30
|
+
},
|
|
31
|
+
'.cm-activeLine, .cm-activeLineGutter': { backgroundColor: 'var(--accent, var(--color-accent))' },
|
|
32
|
+
'.cm-selectionBackground, &.cm-focused .cm-selectionBackground': {
|
|
33
|
+
backgroundColor: 'var(--accent, var(--color-accent))'
|
|
34
|
+
},
|
|
35
|
+
'.cm-cursor': { borderLeftColor: 'var(--foreground, var(--color-foreground))' },
|
|
36
|
+
'.cm-foldPlaceholder, .cm-tooltip': {
|
|
37
|
+
backgroundColor: 'var(--popover, var(--color-popover))',
|
|
38
|
+
color: 'var(--popover-foreground, var(--color-popover-foreground))',
|
|
39
|
+
border: '1px solid var(--border, var(--color-border))'
|
|
40
|
+
},
|
|
41
|
+
'.cm-matchingBracket': {
|
|
42
|
+
backgroundColor: 'var(--accent, var(--color-accent))',
|
|
43
|
+
outline: '1px solid var(--ring, var(--color-ring))'
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
export const JSON_HIGHLIGHT = HighlightStyle.define([
|
|
48
|
+
{ tag: tags.propertyName, color: 'var(--primary-bright, var(--color-primary))', fontWeight: '600' },
|
|
49
|
+
{ tag: tags.string, color: 'var(--foreground, var(--color-foreground))' },
|
|
50
|
+
{
|
|
51
|
+
tag: tags.number,
|
|
52
|
+
color: 'color-mix(in oklch, var(--chart-3, var(--color-primary)), var(--foreground, var(--color-foreground)) 30%)'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
tag: tags.bool,
|
|
56
|
+
color:
|
|
57
|
+
'color-mix(in oklch, var(--secondary, var(--color-primary)), var(--foreground, var(--color-foreground)) 20%)',
|
|
58
|
+
fontWeight: '600'
|
|
59
|
+
},
|
|
60
|
+
{ tag: tags.null, color: 'var(--muted-foreground, var(--color-muted-foreground))', fontStyle: 'italic' },
|
|
61
|
+
{ tag: tags.punctuation, color: 'var(--muted-foreground, var(--color-muted-foreground))' }
|
|
62
|
+
])
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface JsonEditorLabels {
|
|
2
|
+
format: string
|
|
3
|
+
copy: string
|
|
4
|
+
copied: string
|
|
5
|
+
copyFailed: string
|
|
6
|
+
readOnly: string
|
|
7
|
+
valid: string
|
|
8
|
+
invalid: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** JSON stays text until the host saves it, including incomplete and invalid drafts. */
|
|
12
|
+
export interface JsonEditorProps {
|
|
13
|
+
value: string
|
|
14
|
+
onChange?: (value: string) => void
|
|
15
|
+
onValidityChange?: (valid: boolean) => void
|
|
16
|
+
readOnly?: boolean
|
|
17
|
+
id?: string
|
|
18
|
+
ariaLabel?: string
|
|
19
|
+
testId?: string
|
|
20
|
+
className?: string
|
|
21
|
+
minHeight?: number
|
|
22
|
+
maxHeight?: number
|
|
23
|
+
labels?: Partial<JsonEditorLabels>
|
|
24
|
+
}
|
package/src/exports.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
export { handler, useNavigate, useValue,
|
|
2
|
+
export { handler, lazyHandler, lazyComponent, useNavigate, useValue, useEntrypoint } from '@owlmeans/client'
|
|
3
|
+
export type { LazyComponent, LazyComponentOptions, LazyHandler } from '@owlmeans/client'
|
|
3
4
|
export { config } from '@owlmeans/client-context'
|
|
4
5
|
export { service } from '@owlmeans/config'
|
|
5
|
-
export { guard, parent } from '@owlmeans/entrypoint'
|
|
6
6
|
export { addWebService } from '@owlmeans/client-config'
|
|
7
|
-
export {
|
|
7
|
+
export { bind, bindAll, bindScreen, clientRequestHelper, provideRequest, stab } from '@owlmeans/client-entrypoint'
|
|
8
|
+
export { appendPermissionDeniedToast, PermissionDeniedToast } from './permission/index.js'
|
|
8
9
|
export type { ClientEntrypoint as Module } from '@owlmeans/client-entrypoint'
|
|
9
10
|
export { route as croute } from '@owlmeans/client-route'
|
|
10
11
|
export { route, frontend } from '@owlmeans/route'
|
|
11
|
-
export { DEFAULT_ALIAS as DAUTH_GUARD,
|
|
12
|
+
export { DEFAULT_ALIAS as DAUTH_GUARD, bindExternalAuthentication } from '@owlmeans/client-auth'
|
|
12
13
|
|
|
13
14
|
export { AppType, HOME, ROOT, BASE, GUEST } from '@owlmeans/context'
|
|
14
15
|
|
|
@@ -16,7 +17,7 @@ export { DISPATCHER, CAUTHEN_FLOW_ENTER } from '@owlmeans/auth'
|
|
|
16
17
|
export type { AuthToken } from '@owlmeans/auth'
|
|
17
18
|
|
|
18
19
|
export { composePrefix, useI18n, useI18nApp, useI18nLib, useLanguage } from '@owlmeans/client-i18n'
|
|
19
|
-
export { addI18nApp, addI18nLib, SUPPORTED_LNGS } from '@owlmeans/i18n'
|
|
20
|
+
export { addI18nApp, addI18nLib, i18nHelper, SUPPORTED_LNGS } from '@owlmeans/i18n'
|
|
20
21
|
export { flow, configureFlows } from '@owlmeans/flow'
|
|
21
22
|
export { QUERY_PARAM as FLOW_PARAM, SERVICE_PARAM, useFlow } from '@owlmeans/web-flow'
|
|
22
23
|
export { Dispatcher, appendWebAuthService } from '@owlmeans/web-client'
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type * from './types.js'
|
|
|
3
3
|
export * from './main.js'
|
|
4
4
|
export * from './exports.js'
|
|
5
5
|
export * from './context.js'
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './entrypoints.js'
|
|
7
7
|
export * from './components/index.js'
|
|
8
8
|
|
|
9
9
|
export * from '@owlmeans/client-panel'
|
package/src/main.tsx
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type AppContext, render as basicRender } from '@owlmeans/web-client'
|
|
2
2
|
import type { ClientConfig, ClientContext } from '@owlmeans/client-context'
|
|
3
|
-
import { render as basicRender } from '@owlmeans/web-client'
|
|
4
3
|
import type { FC } from 'react'
|
|
5
4
|
import { useI18nInstance } from '@owlmeans/client-i18n/utils'
|
|
6
5
|
import detector from 'i18next-browser-languagedetector'
|
|
7
6
|
import { PanelApp } from './components/panel-app/component.js'
|
|
8
|
-
|
|
9
|
-
export interface WebRenderOptions extends RenderOptions {
|
|
10
|
-
rootClassName?: string
|
|
11
|
-
}
|
|
7
|
+
import type { WebRenderOptions } from './types.js'
|
|
12
8
|
|
|
13
9
|
export const render = <C extends ClientConfig, T extends ClientContext<C>>(context: T, opts?: WebRenderOptions) => {
|
|
14
10
|
basicRender(<App context={context as unknown as AppContext} rootClassName={opts?.rootClassName}/>, opts)
|