@oondemand/oon-core-front 0.5.6 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { O as OonMenuItem, a as OonRoute, b as OonNavigationConfig } from './types-BEVt-nU8.js';
3
+ import './theme-Clhoswb3.js';
4
+ import '@chakra-ui/react';
5
+
6
+ declare const OON_RESERVED_ROUTES: readonly string[];
7
+ declare function defineOonRoutes<const T extends readonly OonRoute[]>(routes: T): T;
8
+ declare function defineOonNavigation<const T extends readonly OonMenuItem[]>(items: T): T;
9
+ declare function routeElement(route: OonRoute): ReactNode;
10
+ declare function navigation(config: OonNavigationConfig): OonNavigationConfig;
11
+
12
+ export { OON_RESERVED_ROUTES, defineOonNavigation, defineOonRoutes, navigation, routeElement };
@@ -0,0 +1,17 @@
1
+ import {
2
+ OON_RESERVED_ROUTES,
3
+ defineOonNavigation,
4
+ defineOonRoutes,
5
+ navigation,
6
+ routeElement
7
+ } from "./chunk-32GGDIWB.js";
8
+ import "./chunk-ALZCHGGI.js";
9
+ import "./chunk-V6TY7KAL.js";
10
+ export {
11
+ OON_RESERVED_ROUTES,
12
+ defineOonNavigation,
13
+ defineOonRoutes,
14
+ navigation,
15
+ routeElement
16
+ };
17
+ //# sourceMappingURL=routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import { c as OonAppDefinition, d as OonCoreFrontConfig } from './types-BEVt-nU8.js';
2
+ import 'react';
3
+ import './theme-Clhoswb3.js';
4
+ import '@chakra-ui/react';
5
+
6
+ declare function createOonTestConfig(overrides?: Partial<OonAppDefinition>): OonCoreFrontConfig;
7
+
8
+ export { createOonTestConfig };
@@ -0,0 +1,22 @@
1
+ import {
2
+ appDefinitionToConfig
3
+ } from "./chunk-QXKS2WEG.js";
4
+ import "./chunk-R7ZBLDC2.js";
5
+ import "./chunk-32GGDIWB.js";
6
+ import "./chunk-ALZCHGGI.js";
7
+ import "./chunk-VJ7YNFF7.js";
8
+ import "./chunk-VC6NTMZS.js";
9
+ import "./chunk-V6TY7KAL.js";
10
+
11
+ // src/testing.ts
12
+ function createOonTestConfig(overrides = {}) {
13
+ return appDefinitionToConfig({
14
+ app: { id: "oon-test", name: "Oon Test", kind: "member-central", tenancyModel: "single_tenant" },
15
+ api: { baseUrl: "http://localhost" },
16
+ ...overrides
17
+ });
18
+ }
19
+ export {
20
+ createOonTestConfig
21
+ };
22
+ //# sourceMappingURL=testing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/testing.ts"],"sourcesContent":["import type { OonAppDefinition } from \"./types\";\nimport { appDefinitionToConfig } from \"./app/codeFirst\";\n\nexport function createOonTestConfig(overrides: Partial<OonAppDefinition> = {}) {\n return appDefinitionToConfig({\n app: { id: \"oon-test\", name: \"Oon Test\", kind: \"member-central\", tenancyModel: \"single_tenant\" },\n api: { baseUrl: \"http://localhost\" },\n ...overrides,\n });\n}\n"],"mappings":";;;;;;;;;;;AAGO,SAAS,oBAAoB,YAAuC,CAAC,GAAG;AAC7E,SAAO,sBAAsB;AAAA,IAC3B,KAAK,EAAE,IAAI,YAAY,MAAM,YAAY,MAAM,kBAAkB,cAAc,gBAAgB;AAAA,IAC/F,KAAK,EAAE,SAAS,mBAAmB;AAAA,IACnC,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
@@ -0,0 +1,28 @@
1
+ import * as _chakra_ui_react from '@chakra-ui/react';
2
+
3
+ type OonThemeDensity = "compact" | "comfortable";
4
+ type OonThemeContrast = "standard" | "high";
5
+ interface OonThemeDefinition {
6
+ id: string;
7
+ label?: string;
8
+ extends?: OonThemeDefinition;
9
+ density?: OonThemeDensity;
10
+ contrast?: OonThemeContrast;
11
+ /** Configuração pública do Chakra baseada em tokens, sem CSS remoto. */
12
+ config?: Record<string, unknown>;
13
+ }
14
+ declare function createOonTheme<const T extends OonThemeDefinition>(definition: T): T;
15
+ declare const oonDefaultTheme: {
16
+ readonly id: "oon-default";
17
+ readonly label: "Oon";
18
+ readonly density: "comfortable";
19
+ readonly contrast: "standard";
20
+ readonly config: Record<string, unknown>;
21
+ };
22
+ /**
23
+ * Constrói o system do Chakra. O padrão Minexco é aplicado primeiro e pode ser
24
+ * sobrescrito por uma identidade específica da Central sem reescrever o shell.
25
+ */
26
+ declare function createOonSystem(themeOverride?: OonThemeDefinition | Record<string, unknown>): _chakra_ui_react.SystemContext;
27
+
28
+ export { type OonThemeDefinition as O, type OonThemeContrast as a, type OonThemeDensity as b, createOonTheme as c, createOonSystem as d, oonDefaultTheme as o };
@@ -0,0 +1,12 @@
1
+ import { O as OonThemeDefinition } from './theme-Clhoswb3.js';
2
+ export { a as OonThemeContrast, b as OonThemeDensity, d as createOonSystem, c as createOonTheme, o as oonDefaultTheme } from './theme-Clhoswb3.js';
3
+ import '@chakra-ui/react';
4
+
5
+ interface OonThemeContextValue {
6
+ themes: readonly OonThemeDefinition[];
7
+ currentThemeId?: string;
8
+ setTheme(themeId: string): void;
9
+ }
10
+ declare function useOonTheme(): OonThemeContextValue;
11
+
12
+ export { type OonThemeContextValue, OonThemeDefinition, useOonTheme };
package/dist/theme.js ADDED
@@ -0,0 +1,14 @@
1
+ import {
2
+ createOonSystem,
3
+ createOonTheme,
4
+ oonDefaultTheme,
5
+ useOonTheme
6
+ } from "./chunk-VC6NTMZS.js";
7
+ import "./chunk-V6TY7KAL.js";
8
+ export {
9
+ createOonSystem,
10
+ createOonTheme,
11
+ oonDefaultTheme,
12
+ useOonTheme
13
+ };
14
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}