@seedgrid/fe-components 2026.4.17 → 2026.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/ai/seedgrid-components.manifest.json +5231 -3622
  2. package/dist/commons/dismissSgToast.meta.d.ts +4 -0
  3. package/dist/commons/dismissSgToast.meta.d.ts.map +1 -0
  4. package/dist/commons/dismissSgToast.meta.js +69 -0
  5. package/dist/commons/dismissSgWhistle.meta.d.ts +4 -0
  6. package/dist/commons/dismissSgWhistle.meta.d.ts.map +1 -0
  7. package/dist/commons/dismissSgWhistle.meta.js +69 -0
  8. package/dist/commons/subscribeSgToasts.meta.d.ts +4 -0
  9. package/dist/commons/subscribeSgToasts.meta.d.ts.map +1 -0
  10. package/dist/commons/subscribeSgToasts.meta.js +71 -0
  11. package/dist/commons/subscribeSgWhistles.meta.d.ts +4 -0
  12. package/dist/commons/subscribeSgWhistles.meta.d.ts.map +1 -0
  13. package/dist/commons/subscribeSgWhistles.meta.js +71 -0
  14. package/dist/commons/toast.meta.d.ts +4 -0
  15. package/dist/commons/toast.meta.d.ts.map +1 -0
  16. package/dist/commons/toast.meta.js +138 -0
  17. package/dist/commons/whistle.meta.d.ts +4 -0
  18. package/dist/commons/whistle.meta.d.ts.map +1 -0
  19. package/dist/commons/whistle.meta.js +166 -0
  20. package/dist/environment/useSgEnvironment.meta.d.ts +4 -0
  21. package/dist/environment/useSgEnvironment.meta.d.ts.map +1 -0
  22. package/dist/environment/useSgEnvironment.meta.js +96 -0
  23. package/dist/environment/useSgNamespaceProvider.meta.d.ts +4 -0
  24. package/dist/environment/useSgNamespaceProvider.meta.d.ts.map +1 -0
  25. package/dist/environment/useSgNamespaceProvider.meta.js +62 -0
  26. package/dist/environment/useSgPersistence.meta.d.ts +4 -0
  27. package/dist/environment/useSgPersistence.meta.d.ts.map +1 -0
  28. package/dist/environment/useSgPersistence.meta.js +111 -0
  29. package/dist/environment/useSgPersistentState.meta.d.ts +4 -0
  30. package/dist/environment/useSgPersistentState.meta.d.ts.map +1 -0
  31. package/dist/environment/useSgPersistentState.meta.js +114 -0
  32. package/dist/gadgets/clock/themes/useSgClockThemeResolver.meta.d.ts +4 -0
  33. package/dist/gadgets/clock/themes/useSgClockThemeResolver.meta.d.ts.map +1 -0
  34. package/dist/gadgets/clock/themes/useSgClockThemeResolver.meta.js +83 -0
  35. package/dist/gadgets/clock/useSgTime.meta.d.ts +4 -0
  36. package/dist/gadgets/clock/useSgTime.meta.d.ts.map +1 -0
  37. package/dist/gadgets/clock/useSgTime.meta.js +83 -0
  38. package/dist/i18n/useComponentsI18n.meta.d.ts +4 -0
  39. package/dist/i18n/useComponentsI18n.meta.d.ts.map +1 -0
  40. package/dist/i18n/useComponentsI18n.meta.js +76 -0
  41. package/dist/inputs/SgAutocomplete.js +42 -9
  42. package/dist/sandbox.cjs +44 -44
  43. package/package.json +1 -1
@@ -0,0 +1,96 @@
1
+ export const sgMeta = {
2
+ version: "0.1",
3
+ componentId: "hook.environment",
4
+ package: "@seedgrid/fe-components",
5
+ exportName: "useSgEnvironment",
6
+ slug: "use-sg-environment",
7
+ displayName: "useSgEnvironment",
8
+ category: "hook",
9
+ subcategory: "environment",
10
+ description: "Hook para acessar configuracao de ambiente (namespace, estrategia de persistencia, modo e escopo). Retorna o contexto completo do SgEnvironmentProvider.",
11
+ tags: ["hook", "environment", "persistence", "namespace"],
12
+ capabilities: ["namespace-access", "persistence-config", "environment-context"],
13
+ fieldSemantics: ["environmentContext", "persistenceConfig", "namespaceScope"],
14
+ props: [
15
+ {
16
+ name: "returns.namespaceProvider",
17
+ type: "NamespaceProvider",
18
+ description: "Provedor que fornece namespace/tenant atual.",
19
+ semanticRole: "behavior",
20
+ bindable: false
21
+ },
22
+ {
23
+ name: "returns.persistenceStrategy",
24
+ type: "PersistenceStrategy",
25
+ description: "Estrategia que carrega, salva e limpa estado persistido.",
26
+ semanticRole: "behavior",
27
+ bindable: false
28
+ },
29
+ {
30
+ name: "returns.persistence.scope",
31
+ type: "string",
32
+ description: "Escopo logico para chaves persistidas (ex: 'app:myapp').",
33
+ semanticRole: "data",
34
+ bindable: false
35
+ },
36
+ {
37
+ name: "returns.persistence.mode",
38
+ type: "SgPersistenceMode",
39
+ description: "Modo de persistencia (local, api, fallback).",
40
+ semanticRole: "behavior",
41
+ bindable: false
42
+ },
43
+ {
44
+ name: "returns.persistence.stateVersion",
45
+ type: "number",
46
+ description: "Versao logica do estado persistido para migracao.",
47
+ semanticRole: "data",
48
+ bindable: false
49
+ }
50
+ ],
51
+ states: ["default", "custom", "persisted"],
52
+ examples: [
53
+ {
54
+ id: "basic",
55
+ title: "Acessar config de ambiente",
56
+ file: "apps/showcase/src/app/components/hooks/use-sg-environment/samples/basic.tsx.sample",
57
+ kind: "sample"
58
+ },
59
+ {
60
+ id: "with-namespace",
61
+ title: "Com namespace customizado",
62
+ file: "apps/showcase/src/app/components/hooks/use-sg-environment/samples/with-namespace.tsx.sample",
63
+ kind: "sample"
64
+ }
65
+ ],
66
+ showcase: {
67
+ route: "/components/hooks/use-sg-environment",
68
+ hasPlayground: false,
69
+ hasPropsTable: true
70
+ }
71
+ };
72
+ export const aiHints = {
73
+ version: "0.1",
74
+ preferredUseCases: [
75
+ "Acessar namespace e escopo de persistencia dentro de uma subtree.",
76
+ "Validar que SgEnvironmentProvider esta presente.",
77
+ "Implementar persistencia customizada em cima da estrategia configurada."
78
+ ],
79
+ avoidUseCases: [
80
+ "Usar para dados de aplicacao; use useSgPersistence ou useSgPersistentState.",
81
+ "Mudar configuracao de ambiente em tempo de execucao; provider e imutavel."
82
+ ],
83
+ synonyms: ["environment context", "environment hook", "persistence context"],
84
+ relatedEntityFields: ["namespace", "persistence", "scope", "configuration"],
85
+ compositionHints: [
86
+ "Envolver a arvore com SgEnvironmentProvider antes de usar.",
87
+ "Usar com useSgPersistence e useSgPersistentState para persistencia."
88
+ ],
89
+ rankingSignals: {
90
+ freeText: 0,
91
+ structuredChoice: 0.8,
92
+ date: 0,
93
+ number: 0.5,
94
+ denseLayout: 0.6
95
+ }
96
+ };
@@ -0,0 +1,4 @@
1
+ import type { SgAiHintsV0, SgMetaV0 } from "../ai-meta/types";
2
+ export declare const sgMeta: SgMetaV0;
3
+ export declare const aiHints: SgAiHintsV0;
4
+ //# sourceMappingURL=useSgNamespaceProvider.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSgNamespaceProvider.meta.d.ts","sourceRoot":"","sources":["../../src/environment/useSgNamespaceProvider.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,MAAM,EAAE,QAqCpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,WAwBrB,CAAC"}
@@ -0,0 +1,62 @@
1
+ export const sgMeta = {
2
+ version: "0.1",
3
+ componentId: "hook.namespace-provider",
4
+ package: "@seedgrid/fe-components",
5
+ exportName: "useSgNamespaceProvider",
6
+ slug: "use-sg-namespace-provider",
7
+ displayName: "useSgNamespaceProvider",
8
+ category: "hook",
9
+ subcategory: "namespace",
10
+ description: "Hook para acessar o NamespaceProvider configurado. Permite obter o namespace/tenant atual para isolamento de estado e chaves de persistencia.",
11
+ tags: ["hook", "namespace", "tenant", "isolation"],
12
+ capabilities: ["namespace-access", "tenant-isolation", "state-key-building"],
13
+ fieldSemantics: ["namespaceContext", "tenantId", "isolationScope"],
14
+ props: [
15
+ {
16
+ name: "returns.getNamespace",
17
+ type: "() => string",
18
+ description: "Funcao que retorna o namespace/tenant atual.",
19
+ semanticRole: "data",
20
+ bindable: false
21
+ }
22
+ ],
23
+ states: ["default", "custom"],
24
+ examples: [
25
+ {
26
+ id: "basic",
27
+ title: "Obter namespace atual",
28
+ file: "apps/showcase/src/app/components/hooks/use-sg-namespace-provider/samples/basic.tsx.sample",
29
+ kind: "sample"
30
+ }
31
+ ],
32
+ showcase: {
33
+ route: "/components/hooks/use-sg-namespace-provider",
34
+ hasPlayground: false,
35
+ hasPropsTable: true
36
+ }
37
+ };
38
+ export const aiHints = {
39
+ version: "0.1",
40
+ preferredUseCases: [
41
+ "Isolar estado e chaves de persistencia por namespace/tenant.",
42
+ "Construir chaves de storage que respeitam namespace.",
43
+ "Implementar multi-tenancy em componentes customizados."
44
+ ],
45
+ avoidUseCases: [
46
+ "Usar para dados de negocio; use useSgEnvironment em vez disso.",
47
+ "Assumir um namespace vazio; sempre validar a resposta."
48
+ ],
49
+ synonyms: ["namespace context", "tenant provider", "isolation scope"],
50
+ relatedEntityFields: ["namespace", "tenant", "isolation"],
51
+ compositionHints: [
52
+ "Envolver a arvore com SgEnvironmentProvider com um NamespaceProvider customizado.",
53
+ "Usar com useSgPersistence para construir chaves isoladas."
54
+ ],
55
+ rankingSignals: {
56
+ freeText: 0,
57
+ structuredChoice: 0.7,
58
+ date: 0,
59
+ number: 0.4,
60
+ denseLayout: 0.5
61
+ }
62
+ };
@@ -0,0 +1,4 @@
1
+ import type { SgAiHintsV0, SgMetaV0 } from "../ai-meta/types";
2
+ export declare const sgMeta: SgMetaV0;
3
+ export declare const aiHints: SgAiHintsV0;
4
+ //# sourceMappingURL=useSgPersistence.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSgPersistence.meta.d.ts","sourceRoot":"","sources":["../../src/environment/useSgPersistence.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,MAAM,EAAE,QAqFpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,WAyBrB,CAAC"}
@@ -0,0 +1,111 @@
1
+ export const sgMeta = {
2
+ version: "0.1",
3
+ componentId: "hook.persistence",
4
+ package: "@seedgrid/fe-components",
5
+ exportName: "useSgPersistence",
6
+ slug: "use-sg-persistence",
7
+ displayName: "useSgPersistence",
8
+ category: "hook",
9
+ subcategory: "persistence",
10
+ description: "Hook de baixo nivel para carregar, salvar e limpar estado persistido. Gerencia chaves isoladas por namespace e escopo, respeitando a estrategia configurada.",
11
+ tags: ["hook", "persistence", "storage", "state-management"],
12
+ capabilities: ["load-state", "save-state", "clear-state", "namespace-isolation"],
13
+ fieldSemantics: ["persistenceLayer", "stateStorage", "asyncStorage"],
14
+ props: [
15
+ {
16
+ name: "returns.namespace",
17
+ type: "string",
18
+ description: "Namespace/tenant atual.",
19
+ semanticRole: "data",
20
+ bindable: false
21
+ },
22
+ {
23
+ name: "returns.scope",
24
+ type: "string",
25
+ description: "Escopo logico para chaves (ex: 'app:myapp').",
26
+ semanticRole: "data",
27
+ bindable: false
28
+ },
29
+ {
30
+ name: "returns.mode",
31
+ type: "SgPersistenceMode",
32
+ description: "Modo de persistencia (local, api, fallback).",
33
+ semanticRole: "behavior",
34
+ bindable: false
35
+ },
36
+ {
37
+ name: "returns.stateVersion",
38
+ type: "number",
39
+ description: "Versao logica do estado para migracao.",
40
+ semanticRole: "data",
41
+ bindable: false
42
+ },
43
+ {
44
+ name: "returns.load",
45
+ type: "(baseKey: string) => Promise<unknown>",
46
+ description: "Carregar valor persistido da chave (isolada por namespace e escopo).",
47
+ semanticRole: "data",
48
+ bindable: false
49
+ },
50
+ {
51
+ name: "returns.save",
52
+ type: "(baseKey: string, state: unknown) => Promise<void>",
53
+ description: "Salvar valor persistido na chave (isolada por namespace e escopo).",
54
+ semanticRole: "data",
55
+ bindable: false
56
+ },
57
+ {
58
+ name: "returns.clear",
59
+ type: "(baseKey: string) => Promise<void>",
60
+ description: "Limpar valor persistido da chave.",
61
+ semanticRole: "data",
62
+ bindable: false
63
+ }
64
+ ],
65
+ states: ["idle", "loading", "saving", "error"],
66
+ examples: [
67
+ {
68
+ id: "basic",
69
+ title: "Carregar e salvar estado",
70
+ file: "apps/showcase/src/app/components/hooks/use-sg-persistence/samples/basic.tsx.sample",
71
+ kind: "sample"
72
+ },
73
+ {
74
+ id: "form-state",
75
+ title: "Persistir estado de formulario",
76
+ file: "apps/showcase/src/app/components/hooks/use-sg-persistence/samples/form-state.tsx.sample",
77
+ kind: "sample"
78
+ }
79
+ ],
80
+ showcase: {
81
+ route: "/components/hooks/use-sg-persistence",
82
+ hasPlayground: false,
83
+ hasPropsTable: true
84
+ }
85
+ };
86
+ export const aiHints = {
87
+ version: "0.1",
88
+ preferredUseCases: [
89
+ "Carregar estado persistido de componentes customizados no init.",
90
+ "Salvar layout, preferencias ou estado do usuario.",
91
+ "Implementar cache persistente com isolamento por namespace."
92
+ ],
93
+ avoidUseCases: [
94
+ "Estado simples e sem persistencia; use useState.",
95
+ "Dados de negocio que vem do servidor; use useQuery ou hooks de data-fetching."
96
+ ],
97
+ synonyms: ["persistence hook", "state storage", "persistence layer"],
98
+ relatedEntityFields: ["storage", "cache", "state", "persistence"],
99
+ compositionHints: [
100
+ "Envolver a arvore com SgEnvironmentProvider para estrategia customizada.",
101
+ "Usar com try-catch para tratar erros de persistencia.",
102
+ "Preferir useSgPersistentState para casos simples de estado persistido."
103
+ ],
104
+ rankingSignals: {
105
+ freeText: 0,
106
+ structuredChoice: 0.8,
107
+ date: 0.6,
108
+ number: 0.7,
109
+ denseLayout: 0.6
110
+ }
111
+ };
@@ -0,0 +1,4 @@
1
+ import type { SgAiHintsV0, SgMetaV0 } from "../ai-meta/types";
2
+ export declare const sgMeta: SgMetaV0;
3
+ export declare const aiHints: SgAiHintsV0;
4
+ //# sourceMappingURL=useSgPersistentState.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSgPersistentState.meta.d.ts","sourceRoot":"","sources":["../../src/environment/useSgPersistentState.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,MAAM,EAAE,QAsFpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,WA2BrB,CAAC"}
@@ -0,0 +1,114 @@
1
+ export const sgMeta = {
2
+ version: "0.1",
3
+ componentId: "hook.persistent-state",
4
+ package: "@seedgrid/fe-components",
5
+ exportName: "useSgPersistentState",
6
+ slug: "use-sg-persistent-state",
7
+ displayName: "useSgPersistentState",
8
+ category: "hook",
9
+ subcategory: "persistent-state",
10
+ description: "Hook de alto nivel para estado persistido. Similar a useState mas sincroniza com persistencia (localStorage, API ou hibrida) com carregamento asincrono e isolamento por namespace.",
11
+ tags: ["hook", "persistent-state", "storage", "state-sync"],
12
+ capabilities: ["state-persistence", "async-init", "serialization", "namespace-isolation"],
13
+ fieldSemantics: ["persistentState", "syncedState", "storedValue"],
14
+ props: [
15
+ {
16
+ name: "args.baseKey",
17
+ type: "string",
18
+ required: true,
19
+ description: "Chave base para persistencia (sera isolada por namespace e escopo).",
20
+ semanticRole: "data",
21
+ bindable: false
22
+ },
23
+ {
24
+ name: "args.defaultValue",
25
+ type: "T",
26
+ required: true,
27
+ description: "Valor padrao enquanto carrega do storage.",
28
+ semanticRole: "data",
29
+ bindable: true
30
+ },
31
+ {
32
+ name: "args.serialize",
33
+ type: "(value: T) => unknown",
34
+ description: "Funcao customizada para serializar ao persistir.",
35
+ semanticRole: "behavior",
36
+ bindable: false
37
+ },
38
+ {
39
+ name: "args.deserialize",
40
+ type: "(value: unknown) => T",
41
+ description: "Funcao customizada para desserializar ao carregar.",
42
+ semanticRole: "behavior",
43
+ bindable: false
44
+ },
45
+ {
46
+ name: "returns[0]",
47
+ type: "T",
48
+ description: "Valor atual (pode ser defaultValue durante carregamento asincrono).",
49
+ semanticRole: "data",
50
+ bindable: true
51
+ },
52
+ {
53
+ name: "returns[1]",
54
+ type: "(value: T) => Promise<void>",
55
+ description: "Funcao para atualizar estado e persistir asincronamente.",
56
+ semanticRole: "event",
57
+ bindable: false
58
+ }
59
+ ],
60
+ states: ["loading", "loaded", "saving", "error"],
61
+ examples: [
62
+ {
63
+ id: "basic",
64
+ title: "Estado persistido simples",
65
+ file: "apps/showcase/src/app/components/hooks/use-sg-persistent-state/samples/basic.tsx.sample",
66
+ kind: "sample"
67
+ },
68
+ {
69
+ id: "with-serialization",
70
+ title: "Com serializacao customizada",
71
+ file: "apps/showcase/src/app/components/hooks/use-sg-persistent-state/samples/with-serialization.tsx.sample",
72
+ kind: "sample"
73
+ },
74
+ {
75
+ id: "form-state",
76
+ title: "Estado persistido de formulario",
77
+ file: "apps/showcase/src/app/components/hooks/use-sg-persistent-state/samples/form-state.tsx.sample",
78
+ kind: "sample"
79
+ }
80
+ ],
81
+ showcase: {
82
+ route: "/components/hooks/use-sg-persistent-state",
83
+ hasPlayground: true,
84
+ hasPropsTable: true
85
+ }
86
+ };
87
+ export const aiHints = {
88
+ version: "0.1",
89
+ preferredUseCases: [
90
+ "Persistir estado de formulario entre sessoes.",
91
+ "Salvar preferencias do usuario (tema, layout, filtros).",
92
+ "Sincronizar estado local com storage com fallback para valor padrao.",
93
+ "Implementar historico de acoes que sobrevive a reload."
94
+ ],
95
+ avoidUseCases: [
96
+ "Estado que so existe durante a sessao; use useState.",
97
+ "Dados do servidor que mudam frequentemente; use useQuery ou SWR.",
98
+ "Estado muito grande que pode sobrecarregar storage; considere chunking."
99
+ ],
100
+ synonyms: ["persistent state", "synced state", "stored state"],
101
+ relatedEntityFields: ["preference", "setting", "cache", "history"],
102
+ compositionHints: [
103
+ "Combinar com SgEnvironmentProvider para estrategia de persistencia customizada.",
104
+ "Usar baseKey semantico como 'sidebar:collapsed' ou 'form:draft:order'.",
105
+ "Implementar serialize/deserialize para tipos complexos ou versioning."
106
+ ],
107
+ rankingSignals: {
108
+ freeText: 0.6,
109
+ structuredChoice: 0.8,
110
+ date: 0.7,
111
+ number: 0.8,
112
+ denseLayout: 0.7
113
+ }
114
+ };
@@ -0,0 +1,4 @@
1
+ import type { SgAiHintsV0, SgMetaV0 } from "../../../ai-meta/types";
2
+ export declare const sgMeta: SgMetaV0;
3
+ export declare const aiHints: SgAiHintsV0;
4
+ //# sourceMappingURL=useSgClockThemeResolver.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSgClockThemeResolver.meta.d.ts","sourceRoot":"","sources":["../../../../src/gadgets/clock/themes/useSgClockThemeResolver.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEpE,eAAO,MAAM,MAAM,EAAE,QA0DpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,WAwBrB,CAAC"}
@@ -0,0 +1,83 @@
1
+ export const sgMeta = {
2
+ version: "0.1",
3
+ componentId: "hook.clock-theme-resolver",
4
+ package: "@seedgrid/fe-components",
5
+ exportName: "useSgClockThemeResolver",
6
+ slug: "use-sg-clock-theme-resolver",
7
+ displayName: "useSgClockThemeResolver",
8
+ category: "hook",
9
+ subcategory: "clock-theme",
10
+ description: "Hook para resolver tema do SgClock dinamicamente. Permite consultar temas registrados, alternar entre eles e acessar a configuracao current.",
11
+ tags: ["hook", "clock", "theme", "resolver"],
12
+ capabilities: ["theme-resolution", "dynamic-theme-switching", "theme-registry-access"],
13
+ fieldSemantics: ["themeResolver", "clockTheme", "dynamicStyling"],
14
+ props: [
15
+ {
16
+ name: "returns.resolveMode",
17
+ type: "SgClockThemeResolveMode",
18
+ description: "Modo de resolucao do tema (auto, light, dark, custom).",
19
+ semanticRole: "behavior",
20
+ bindable: true
21
+ },
22
+ {
23
+ name: "returns.resolveTheme",
24
+ type: "(themeId: string) => SgClockTheme | null",
25
+ description: "Funcao para resolver um tema pelo ID.",
26
+ semanticRole: "data",
27
+ bindable: false
28
+ },
29
+ {
30
+ name: "returns.currentTheme",
31
+ type: "SgClockTheme | null",
32
+ description: "Tema atualmente ativo.",
33
+ semanticRole: "data",
34
+ bindable: false
35
+ },
36
+ {
37
+ name: "returns.setResolveMode",
38
+ type: "(mode: SgClockThemeResolveMode) => void",
39
+ description: "Alterar modo de resolucao do tema.",
40
+ semanticRole: "behavior",
41
+ bindable: false
42
+ }
43
+ ],
44
+ states: ["auto", "light", "dark", "custom"],
45
+ examples: [
46
+ {
47
+ id: "basic",
48
+ title: "Resolver e alternar temas",
49
+ file: "apps/showcase/src/app/components/hooks/use-sg-clock-theme-resolver/samples/basic.tsx.sample",
50
+ kind: "sample"
51
+ }
52
+ ],
53
+ showcase: {
54
+ route: "/components/hooks/use-sg-clock-theme-resolver",
55
+ hasPlayground: true,
56
+ hasPropsTable: true
57
+ }
58
+ };
59
+ export const aiHints = {
60
+ version: "0.1",
61
+ preferredUseCases: [
62
+ "Alternar dinamicamente entre temas de relogio.",
63
+ "Implementar modo claro/escuro personalizado para SgClock.",
64
+ "Consultar temas registrados e renderizar seletor de tema."
65
+ ],
66
+ avoidUseCases: [
67
+ "Estilizar componentes nao-clock; use SgClockThemeProvider ou estilo CSS direto.",
68
+ "Mutacao manual de registro de temas; use registerTheme() em vez disso."
69
+ ],
70
+ synonyms: ["theme resolver", "clock theme", "theme switcher"],
71
+ relatedEntityFields: ["theme", "display", "style"],
72
+ compositionHints: [
73
+ "Usar dentro de SgClockThemeProvider para acesso a resolucao de temas.",
74
+ "Combinar com SgClock para renderizar relógios com temas dinamicos."
75
+ ],
76
+ rankingSignals: {
77
+ freeText: 0,
78
+ structuredChoice: 0.8,
79
+ date: 0.6,
80
+ number: 0,
81
+ denseLayout: 0.5
82
+ }
83
+ };
@@ -0,0 +1,4 @@
1
+ import type { SgAiHintsV0, SgMetaV0 } from "../../ai-meta/types";
2
+ export declare const sgMeta: SgMetaV0;
3
+ export declare const aiHints: SgAiHintsV0;
4
+ //# sourceMappingURL=useSgTime.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSgTime.meta.d.ts","sourceRoot":"","sources":["../../../src/gadgets/clock/useSgTime.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEjE,eAAO,MAAM,MAAM,EAAE,QA0DpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,WAwBrB,CAAC"}
@@ -0,0 +1,83 @@
1
+ export const sgMeta = {
2
+ version: "0.1",
3
+ componentId: "hook.time",
4
+ package: "@seedgrid/fe-components",
5
+ exportName: "useSgTime",
6
+ slug: "use-sg-time",
7
+ displayName: "useSgTime",
8
+ category: "hook",
9
+ subcategory: "time",
10
+ description: "Hook para acessar contexto de sincronizacao de tempo com servidor. Fornece timestamp atual e tick para atualizacoes periodicas.",
11
+ tags: ["hook", "time", "sync", "context"],
12
+ capabilities: ["server-time-sync", "tick-updates", "fallback-local-time"],
13
+ fieldSemantics: ["timeContext", "serverSync", "tickUpdates"],
14
+ props: [
15
+ {
16
+ name: "returns.serverStartMs",
17
+ type: "number",
18
+ description: "Timestamp do servidor em milissegundos quando o provider foi montado.",
19
+ semanticRole: "data",
20
+ bindable: false
21
+ },
22
+ {
23
+ name: "returns.perfStartMs",
24
+ type: "number",
25
+ description: "Marca de performance.now() quando o provider hidratou.",
26
+ semanticRole: "data",
27
+ bindable: false
28
+ },
29
+ {
30
+ name: "returns.tick",
31
+ type: "number",
32
+ description: "Contador que incrementa a cada segundo, dispara atualizacoes.",
33
+ semanticRole: "data",
34
+ bindable: false
35
+ },
36
+ {
37
+ name: "returns.nowMs",
38
+ type: "() => number",
39
+ description: "Funcao que retorna o timestamp atual sincronizado com servidor.",
40
+ semanticRole: "data",
41
+ bindable: false
42
+ }
43
+ ],
44
+ states: ["hydrated", "synced", "ticking"],
45
+ examples: [
46
+ {
47
+ id: "basic",
48
+ title: "Acessar tempo sincronizado",
49
+ file: "apps/showcase/src/app/components/hooks/use-sg-time/samples/basic.tsx.sample",
50
+ kind: "sample"
51
+ }
52
+ ],
53
+ showcase: {
54
+ route: "/components/hooks/use-sg-time",
55
+ hasPlayground: false,
56
+ hasPropsTable: true
57
+ }
58
+ };
59
+ export const aiHints = {
60
+ version: "0.1",
61
+ preferredUseCases: [
62
+ "Sincronizar relogios e contadores com o servidor.",
63
+ "Animar displays de tempo ou contagens regressivas com atualizacoes de tick.",
64
+ "Garantir que componentes vizuais permanecam alinhados apos SSR."
65
+ ],
66
+ avoidUseCases: [
67
+ "Usar para polling rapido de dados; use callbacks ou react-query.",
68
+ "Armazenar estado derivado de time; use useMemo ou useCallback."
69
+ ],
70
+ synonyms: ["time context", "time sync", "server time", "ticker"],
71
+ relatedEntityFields: ["timestamp", "synchronization", "ticker"],
72
+ compositionHints: [
73
+ "Envolver a arvore com SgTimeProvider antes de usar este hook.",
74
+ "Usar com SgClock ou outros gadgets de exibicao de tempo."
75
+ ],
76
+ rankingSignals: {
77
+ freeText: 0,
78
+ structuredChoice: 0,
79
+ date: 0.85,
80
+ number: 0.7,
81
+ denseLayout: 0
82
+ }
83
+ };
@@ -0,0 +1,4 @@
1
+ import type { SgAiHintsV0, SgMetaV0 } from "../ai-meta/types";
2
+ export declare const sgMeta: SgMetaV0;
3
+ export declare const aiHints: SgAiHintsV0;
4
+ //# sourceMappingURL=useComponentsI18n.meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComponentsI18n.meta.d.ts","sourceRoot":"","sources":["../../src/i18n/useComponentsI18n.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,MAAM,EAAE,QAkDpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,WAyBrB,CAAC"}