@almadar/ui 2.15.8 → 2.15.11
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/dist/components/atoms/ContentSection.d.ts +16 -0
- package/dist/components/atoms/SectionHeader.d.ts +14 -0
- package/dist/components/atoms/StatCard.d.ts +13 -0
- package/dist/components/atoms/index.d.ts +3 -0
- package/dist/components/atoms/svg/SvgBranch.d.ts +12 -0
- package/dist/components/atoms/svg/SvgConnection.d.ts +13 -0
- package/dist/components/atoms/svg/SvgFlow.d.ts +10 -0
- package/dist/components/atoms/svg/SvgGrid.d.ts +14 -0
- package/dist/components/atoms/svg/SvgLobe.d.ts +13 -0
- package/dist/components/atoms/svg/SvgMesh.d.ts +12 -0
- package/dist/components/atoms/svg/SvgMorph.d.ts +11 -0
- package/dist/components/atoms/svg/SvgNode.d.ts +12 -0
- package/dist/components/atoms/svg/SvgPulse.d.ts +12 -0
- package/dist/components/atoms/svg/SvgRing.d.ts +13 -0
- package/dist/components/atoms/svg/SvgShield.d.ts +11 -0
- package/dist/components/atoms/svg/SvgStack.d.ts +13 -0
- package/dist/components/atoms/svg/index.d.ts +12 -0
- package/dist/{chunk-ACUO2BBW.js → components/index.cjs} +24831 -16747
- package/dist/components/index.js +37754 -889
- package/dist/components/molecules/AnimatedCounter.d.ts +18 -0
- package/dist/components/molecules/ArticleSection.d.ts +18 -0
- package/dist/components/molecules/CTABanner.d.ts +31 -0
- package/dist/components/molecules/CaseStudyCard.d.ts +24 -0
- package/dist/components/molecules/CodeExample.d.ts +23 -0
- package/dist/components/molecules/CommunityLinks.d.ts +25 -0
- package/dist/components/molecules/DocBreadcrumb.d.ts +20 -0
- package/dist/components/molecules/DocCodeBlock.d.ts +13 -0
- package/dist/components/molecules/DocPagination.d.ts +14 -0
- package/dist/components/molecules/DocSearch.d.ts +15 -0
- package/dist/components/molecules/DocSidebar.d.ts +24 -0
- package/dist/components/molecules/DocTOC.d.ts +24 -0
- package/dist/components/molecules/FeatureCard.d.ts +26 -0
- package/dist/components/molecules/FeatureGrid.d.ts +19 -0
- package/dist/components/molecules/GradientDivider.d.ts +14 -0
- package/dist/components/molecules/HeroSection.d.ts +36 -0
- package/dist/components/molecules/InstallBox.d.ts +16 -0
- package/dist/components/molecules/MarketingFooter.d.ts +27 -0
- package/dist/components/molecules/PricingCard.d.ts +21 -0
- package/dist/components/molecules/PricingGrid.d.ts +13 -0
- package/dist/components/molecules/PullQuote.d.ts +14 -0
- package/dist/components/molecules/ServiceCatalog.d.ts +19 -0
- package/dist/components/molecules/ShowcaseCard.d.ts +20 -0
- package/dist/components/molecules/SocialProof.d.ts +25 -0
- package/dist/components/molecules/SplitSection.d.ts +21 -0
- package/dist/components/molecules/StatsGrid.d.ts +17 -0
- package/dist/components/molecules/StepFlow.d.ts +20 -0
- package/dist/components/molecules/TagCloud.d.ts +18 -0
- package/dist/components/molecules/TeamCard.d.ts +18 -0
- package/dist/components/molecules/index.d.ts +19 -0
- package/dist/components/molecules/svg/AIGenerates.d.ts +7 -0
- package/dist/components/molecules/svg/ClosedCircuit.d.ts +7 -0
- package/dist/components/molecules/svg/CommunityOwnership.d.ts +7 -0
- package/dist/components/molecules/svg/CompileAnywhere.d.ts +7 -0
- package/dist/components/molecules/svg/ComposableModels.d.ts +7 -0
- package/dist/components/molecules/svg/DescribeProveDeploy.d.ts +7 -0
- package/dist/components/molecules/svg/DomainGrid.d.ts +7 -0
- package/dist/components/molecules/svg/EventBus.d.ts +7 -0
- package/dist/components/molecules/svg/OrbitalUnit.d.ts +7 -0
- package/dist/components/molecules/svg/PlanVerifyRemember.d.ts +7 -0
- package/dist/components/molecules/svg/ProveCorrect.d.ts +7 -0
- package/dist/components/molecules/svg/ServiceLayers.d.ts +7 -0
- package/dist/components/molecules/svg/SharedReality.d.ts +7 -0
- package/dist/components/molecules/svg/StandardLibrary.d.ts +7 -0
- package/dist/components/molecules/svg/StateMachine.d.ts +7 -0
- package/dist/components/molecules/svg/WorldModel.d.ts +7 -0
- package/dist/components/molecules/svg/index.d.ts +16 -0
- package/dist/components/organisms/CaseStudyOrganism.d.ts +19 -0
- package/dist/components/organisms/FeatureGridOrganism.d.ts +20 -0
- package/dist/components/organisms/HeroOrganism.d.ts +18 -0
- package/dist/components/organisms/PricingOrganism.d.ts +19 -0
- package/dist/components/organisms/ShowcaseOrganism.d.ts +20 -0
- package/dist/components/organisms/StatsOrganism.d.ts +17 -0
- package/dist/components/organisms/StepFlowOrganism.d.ts +20 -0
- package/dist/components/organisms/TeamOrganism.d.ts +18 -0
- package/dist/components/organisms/game/three/index.cjs +2525 -0
- package/dist/components/organisms/game/three/index.js +1795 -50
- package/dist/components/organisms/index.d.ts +9 -0
- package/dist/components/organisms/marketing-types.d.ts +87 -0
- package/dist/components/templates/AboutPageTemplate.d.ts +26 -0
- package/dist/components/templates/FeatureDetailPageTemplate.d.ts +27 -0
- package/dist/components/templates/LandingPageTemplate.d.ts +31 -0
- package/dist/components/templates/PricingPageTemplate.d.ts +26 -0
- package/dist/components/templates/index.d.ts +4 -0
- package/dist/context/index.cjs +550 -0
- package/dist/context/index.js +420 -6
- package/dist/docs/index.cjs +4015 -0
- package/dist/docs/index.d.cts +412 -0
- package/dist/docs/index.d.ts +29 -0
- package/dist/docs/index.js +3977 -0
- package/dist/hooks/index.cjs +2606 -0
- package/dist/hooks/index.js +2535 -8
- package/dist/illustrations/index.cjs +3004 -0
- package/dist/illustrations/index.d.cts +261 -0
- package/dist/illustrations/index.d.ts +35 -0
- package/dist/illustrations/index.js +2971 -0
- package/dist/{chunk-XL7WB2O5.js → lib/index.cjs} +454 -274
- package/dist/lib/index.js +1407 -3
- package/dist/locales/index.cjs +340 -0
- package/dist/locales/index.js +105 -2
- package/dist/marketing/index.cjs +4680 -0
- package/dist/marketing/index.d.cts +831 -0
- package/dist/marketing/index.d.ts +62 -0
- package/dist/marketing/index.js +4623 -0
- package/dist/providers/index.cjs +4811 -0
- package/dist/providers/index.js +4765 -11
- package/dist/{chunk-K2D5D3WK.js → renderer/index.cjs} +101 -42
- package/dist/renderer/index.js +1036 -2
- package/dist/runtime/index.cjs +4400 -0
- package/dist/runtime/index.js +3615 -19
- package/dist/{chunk-N7MVUW4R.js → stores/index.cjs} +24 -1
- package/dist/stores/index.js +194 -2
- package/dist/tsup.config.d.ts +2 -1
- package/package.json +27 -12
- package/tailwind-preset.cjs +9 -0
- package/themes/almadar-website.css +195 -0
- package/themes/index.css +23 -20
- package/dist/chunk-3HJHHULT.js +0 -93
- package/dist/chunk-3JGAROCW.js +0 -149
- package/dist/chunk-4N3BAPDB.js +0 -1667
- package/dist/chunk-CDIOHSKG.js +0 -661
- package/dist/chunk-DKQN5FVU.js +0 -279
- package/dist/chunk-JJHCOO34.js +0 -375
- package/dist/chunk-PKBMQBKP.js +0 -5
- package/dist/chunk-QIABKRCN.js +0 -107
- package/dist/chunk-SD3KVCY6.js +0 -1465
- package/dist/chunk-YXZM3WCF.js +0 -222
package/dist/chunk-3JGAROCW.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
// hooks/useUISlots.ts
|
|
4
|
-
var DEFAULT_SLOTS = {
|
|
5
|
-
main: null,
|
|
6
|
-
sidebar: null,
|
|
7
|
-
modal: null,
|
|
8
|
-
drawer: null,
|
|
9
|
-
overlay: null,
|
|
10
|
-
center: null,
|
|
11
|
-
toast: null,
|
|
12
|
-
"hud-top": null,
|
|
13
|
-
"hud-bottom": null,
|
|
14
|
-
"hud-left": null,
|
|
15
|
-
"hud-right": null,
|
|
16
|
-
floating: null
|
|
17
|
-
};
|
|
18
|
-
var idCounter = 0;
|
|
19
|
-
function generateId() {
|
|
20
|
-
return `slot-content-${++idCounter}-${Date.now()}`;
|
|
21
|
-
}
|
|
22
|
-
function useUISlotManager() {
|
|
23
|
-
const [slots, setSlots] = useState(DEFAULT_SLOTS);
|
|
24
|
-
const subscribersRef = useRef(/* @__PURE__ */ new Set());
|
|
25
|
-
const timersRef = useRef(/* @__PURE__ */ new Map());
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
return () => {
|
|
28
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
29
|
-
timersRef.current.clear();
|
|
30
|
-
};
|
|
31
|
-
}, []);
|
|
32
|
-
const notifySubscribers = useCallback((slot, content) => {
|
|
33
|
-
subscribersRef.current.forEach((callback) => {
|
|
34
|
-
try {
|
|
35
|
-
callback(slot, content);
|
|
36
|
-
} catch (error) {
|
|
37
|
-
console.error("[UISlots] Subscriber error:", error);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}, []);
|
|
41
|
-
const render = useCallback((config) => {
|
|
42
|
-
const id = generateId();
|
|
43
|
-
const content = {
|
|
44
|
-
id,
|
|
45
|
-
pattern: config.pattern,
|
|
46
|
-
props: config.props ?? {},
|
|
47
|
-
priority: config.priority ?? 0,
|
|
48
|
-
animation: config.animation ?? "fade",
|
|
49
|
-
onDismiss: config.onDismiss,
|
|
50
|
-
sourceTrait: config.sourceTrait
|
|
51
|
-
};
|
|
52
|
-
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
53
|
-
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
54
|
-
const timer = setTimeout(() => {
|
|
55
|
-
setSlots((prev) => {
|
|
56
|
-
if (prev[config.target]?.id === id) {
|
|
57
|
-
content.onDismiss?.();
|
|
58
|
-
notifySubscribers(config.target, null);
|
|
59
|
-
return { ...prev, [config.target]: null };
|
|
60
|
-
}
|
|
61
|
-
return prev;
|
|
62
|
-
});
|
|
63
|
-
timersRef.current.delete(id);
|
|
64
|
-
}, config.autoDismissMs);
|
|
65
|
-
timersRef.current.set(id, timer);
|
|
66
|
-
}
|
|
67
|
-
setSlots((prev) => {
|
|
68
|
-
const existing = prev[config.target];
|
|
69
|
-
if (existing && existing.priority > content.priority) {
|
|
70
|
-
console.warn(
|
|
71
|
-
`[UISlots] Slot "${config.target}" already has higher priority content (${existing.priority} > ${content.priority})`
|
|
72
|
-
);
|
|
73
|
-
return prev;
|
|
74
|
-
}
|
|
75
|
-
notifySubscribers(config.target, content);
|
|
76
|
-
return { ...prev, [config.target]: content };
|
|
77
|
-
});
|
|
78
|
-
return id;
|
|
79
|
-
}, [notifySubscribers]);
|
|
80
|
-
const clear = useCallback((slot) => {
|
|
81
|
-
setSlots((prev) => {
|
|
82
|
-
const content = prev[slot];
|
|
83
|
-
if (content) {
|
|
84
|
-
const timer = timersRef.current.get(content.id);
|
|
85
|
-
if (timer) {
|
|
86
|
-
clearTimeout(timer);
|
|
87
|
-
timersRef.current.delete(content.id);
|
|
88
|
-
}
|
|
89
|
-
content.onDismiss?.();
|
|
90
|
-
notifySubscribers(slot, null);
|
|
91
|
-
}
|
|
92
|
-
return { ...prev, [slot]: null };
|
|
93
|
-
});
|
|
94
|
-
}, [notifySubscribers]);
|
|
95
|
-
const clearById = useCallback((id) => {
|
|
96
|
-
setSlots((prev) => {
|
|
97
|
-
const entry = Object.entries(prev).find(([, content]) => content?.id === id);
|
|
98
|
-
if (entry) {
|
|
99
|
-
const [slot, content] = entry;
|
|
100
|
-
const timer = timersRef.current.get(id);
|
|
101
|
-
if (timer) {
|
|
102
|
-
clearTimeout(timer);
|
|
103
|
-
timersRef.current.delete(id);
|
|
104
|
-
}
|
|
105
|
-
content.onDismiss?.();
|
|
106
|
-
notifySubscribers(slot, null);
|
|
107
|
-
return { ...prev, [slot]: null };
|
|
108
|
-
}
|
|
109
|
-
return prev;
|
|
110
|
-
});
|
|
111
|
-
}, [notifySubscribers]);
|
|
112
|
-
const clearAll = useCallback(() => {
|
|
113
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
114
|
-
timersRef.current.clear();
|
|
115
|
-
setSlots((prev) => {
|
|
116
|
-
Object.entries(prev).forEach(([slot, content]) => {
|
|
117
|
-
if (content) {
|
|
118
|
-
content.onDismiss?.();
|
|
119
|
-
notifySubscribers(slot, null);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
return DEFAULT_SLOTS;
|
|
123
|
-
});
|
|
124
|
-
}, [notifySubscribers]);
|
|
125
|
-
const subscribe = useCallback((callback) => {
|
|
126
|
-
subscribersRef.current.add(callback);
|
|
127
|
-
return () => {
|
|
128
|
-
subscribersRef.current.delete(callback);
|
|
129
|
-
};
|
|
130
|
-
}, []);
|
|
131
|
-
const hasContent = useCallback((slot) => {
|
|
132
|
-
return slots[slot] !== null;
|
|
133
|
-
}, [slots]);
|
|
134
|
-
const getContent = useCallback((slot) => {
|
|
135
|
-
return slots[slot];
|
|
136
|
-
}, [slots]);
|
|
137
|
-
return {
|
|
138
|
-
slots,
|
|
139
|
-
render,
|
|
140
|
-
clear,
|
|
141
|
-
clearById,
|
|
142
|
-
clearAll,
|
|
143
|
-
subscribe,
|
|
144
|
-
hasContent,
|
|
145
|
-
getContent
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export { DEFAULT_SLOTS, useUISlotManager };
|