@almadar/ui 2.15.7 → 2.15.10
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-K43H3ZDY.js → components/index.cjs} +24780 -16651
- package/dist/components/index.js +37757 -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/UISlotRenderer.d.ts +1 -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/DashboardLayout.d.ts +2 -1
- 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 +4683 -0
- package/dist/marketing/index.d.cts +831 -0
- package/dist/marketing/index.d.ts +62 -0
- package/dist/marketing/index.js +4626 -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 +27 -2
- package/themes/index.css +22 -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-GF6RQBO7.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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
1
3
|
// stores/filtering.ts
|
|
2
4
|
function getDateString(value) {
|
|
3
5
|
if (!value) return null;
|
|
@@ -191,4 +193,25 @@ function getFilterSnapshot() {
|
|
|
191
193
|
return filters;
|
|
192
194
|
}
|
|
193
195
|
|
|
194
|
-
|
|
196
|
+
exports.applyFilters = applyFilters;
|
|
197
|
+
exports.clearAllFilters = clearAllFilters;
|
|
198
|
+
exports.clearEntities = clearEntities;
|
|
199
|
+
exports.clearFilter = clearFilter;
|
|
200
|
+
exports.createFilter = createFilter;
|
|
201
|
+
exports.getAllEntities = getAllEntities;
|
|
202
|
+
exports.getByType = getByType;
|
|
203
|
+
exports.getByTypeFiltered = getByTypeFiltered;
|
|
204
|
+
exports.getDateString = getDateString;
|
|
205
|
+
exports.getEntities = getEntities;
|
|
206
|
+
exports.getEntity = getEntity;
|
|
207
|
+
exports.getFilterSnapshot = getFilterSnapshot;
|
|
208
|
+
exports.getFilters = getFilters;
|
|
209
|
+
exports.getSingleton = getSingleton;
|
|
210
|
+
exports.getSnapshot = getSnapshot;
|
|
211
|
+
exports.matchesFilter = matchesFilter;
|
|
212
|
+
exports.removeEntity = removeEntity;
|
|
213
|
+
exports.setFilter = setFilter;
|
|
214
|
+
exports.spawnEntity = spawnEntity;
|
|
215
|
+
exports.subscribe = subscribe;
|
|
216
|
+
exports.updateEntity = updateEntity;
|
|
217
|
+
exports.updateSingleton = updateSingleton;
|
package/dist/stores/index.js
CHANGED
|
@@ -1,2 +1,194 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// stores/filtering.ts
|
|
2
|
+
function getDateString(value) {
|
|
3
|
+
if (!value) return null;
|
|
4
|
+
if (typeof value === "string") {
|
|
5
|
+
const match = value.match(/^(\d{4}-\d{2}-\d{2})/);
|
|
6
|
+
return match ? match[1] : null;
|
|
7
|
+
}
|
|
8
|
+
if (value instanceof Date) {
|
|
9
|
+
return value.toISOString().split("T")[0];
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
function matchesFilter(record, filter) {
|
|
14
|
+
const fieldToCompare = filter.targetField || filter.field;
|
|
15
|
+
const recordValue = record[fieldToCompare];
|
|
16
|
+
const filterValue = filter.value;
|
|
17
|
+
const operator = filter.operator || "eq";
|
|
18
|
+
if (filterValue === null || filterValue === void 0 || filterValue === "") {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
switch (operator) {
|
|
22
|
+
case "eq":
|
|
23
|
+
if (typeof recordValue === "string" && typeof filterValue === "string") {
|
|
24
|
+
return recordValue.toLowerCase() === filterValue.toLowerCase();
|
|
25
|
+
}
|
|
26
|
+
return recordValue === filterValue;
|
|
27
|
+
case "contains":
|
|
28
|
+
if (typeof recordValue !== "string") return false;
|
|
29
|
+
return recordValue.toLowerCase().includes(String(filterValue).toLowerCase());
|
|
30
|
+
case "in":
|
|
31
|
+
if (Array.isArray(filterValue)) {
|
|
32
|
+
const normalizedFilterValues = filterValue.map(
|
|
33
|
+
(v) => typeof v === "string" ? v.toLowerCase() : v
|
|
34
|
+
);
|
|
35
|
+
const normalizedRecordValue = typeof recordValue === "string" ? recordValue.toLowerCase() : recordValue;
|
|
36
|
+
return normalizedFilterValues.includes(normalizedRecordValue);
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
case "date_eq": {
|
|
40
|
+
const recordDate = getDateString(recordValue);
|
|
41
|
+
const filterDate = getDateString(filterValue);
|
|
42
|
+
return Boolean(recordDate && filterDate && recordDate === filterDate);
|
|
43
|
+
}
|
|
44
|
+
case "date_gte": {
|
|
45
|
+
const recordDate = getDateString(recordValue);
|
|
46
|
+
const filterDate = getDateString(filterValue);
|
|
47
|
+
return Boolean(recordDate && filterDate && recordDate >= filterDate);
|
|
48
|
+
}
|
|
49
|
+
case "date_lte": {
|
|
50
|
+
const recordDate = getDateString(recordValue);
|
|
51
|
+
const filterDate = getDateString(filterValue);
|
|
52
|
+
return Boolean(recordDate && filterDate && recordDate <= filterDate);
|
|
53
|
+
}
|
|
54
|
+
case "search": {
|
|
55
|
+
if (typeof filterValue !== "string" || !filterValue.trim()) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
const searchTerm = filterValue.toLowerCase();
|
|
59
|
+
return Object.values(record).some((value) => {
|
|
60
|
+
if (value === null || value === void 0) return false;
|
|
61
|
+
return String(value).toLowerCase().includes(searchTerm);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
default:
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function applyFilters(records, entityFilters) {
|
|
69
|
+
if (entityFilters.size === 0) return records;
|
|
70
|
+
return records.filter((record) => {
|
|
71
|
+
for (const [, filter] of entityFilters) {
|
|
72
|
+
if (!matchesFilter(record, filter)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function createFilter(field, value, operator = "eq", targetField) {
|
|
80
|
+
return {
|
|
81
|
+
field,
|
|
82
|
+
value,
|
|
83
|
+
operator,
|
|
84
|
+
targetField: targetField || field
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// stores/entityStore.ts
|
|
89
|
+
var entities = /* @__PURE__ */ new Map();
|
|
90
|
+
var filters = /* @__PURE__ */ new Map();
|
|
91
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
92
|
+
var idCounter = 0;
|
|
93
|
+
function subscribe(listener) {
|
|
94
|
+
listeners.add(listener);
|
|
95
|
+
return () => listeners.delete(listener);
|
|
96
|
+
}
|
|
97
|
+
function notify() {
|
|
98
|
+
listeners.forEach((listener) => listener());
|
|
99
|
+
}
|
|
100
|
+
function getEntities() {
|
|
101
|
+
return entities;
|
|
102
|
+
}
|
|
103
|
+
function getEntity(id) {
|
|
104
|
+
return entities.get(id);
|
|
105
|
+
}
|
|
106
|
+
function getByType(type) {
|
|
107
|
+
const types = Array.isArray(type) ? type : [type];
|
|
108
|
+
return [...entities.values()].filter((e) => types.includes(e.type));
|
|
109
|
+
}
|
|
110
|
+
function getAllEntities() {
|
|
111
|
+
return [...entities.values()];
|
|
112
|
+
}
|
|
113
|
+
function getSingleton(type) {
|
|
114
|
+
return [...entities.values()].find((e) => e.type === type);
|
|
115
|
+
}
|
|
116
|
+
function spawnEntity(config) {
|
|
117
|
+
const id = config.id ?? `entity_${++idCounter}`;
|
|
118
|
+
const entity = { ...config, id };
|
|
119
|
+
entities = new Map(entities);
|
|
120
|
+
entities.set(id, entity);
|
|
121
|
+
notify();
|
|
122
|
+
return id;
|
|
123
|
+
}
|
|
124
|
+
function updateEntity(id, updates) {
|
|
125
|
+
const entity = entities.get(id);
|
|
126
|
+
if (entity) {
|
|
127
|
+
entities = new Map(entities);
|
|
128
|
+
entities.set(id, { ...entity, ...updates });
|
|
129
|
+
notify();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function updateSingleton(type, updates) {
|
|
133
|
+
const entity = getSingleton(type);
|
|
134
|
+
if (entity) {
|
|
135
|
+
updateEntity(entity.id, updates);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function removeEntity(id) {
|
|
139
|
+
if (entities.has(id)) {
|
|
140
|
+
entities = new Map(entities);
|
|
141
|
+
entities.delete(id);
|
|
142
|
+
notify();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function clearEntities() {
|
|
146
|
+
entities = /* @__PURE__ */ new Map();
|
|
147
|
+
notify();
|
|
148
|
+
}
|
|
149
|
+
function setFilter(entityType, field, value, operator = "eq", targetField) {
|
|
150
|
+
filters = new Map(filters);
|
|
151
|
+
const entityFilters = new Map(filters.get(entityType) || []);
|
|
152
|
+
entityFilters.set(field, createFilter(field, value, operator, targetField));
|
|
153
|
+
filters.set(entityType, entityFilters);
|
|
154
|
+
notify();
|
|
155
|
+
}
|
|
156
|
+
function clearFilter(entityType, field) {
|
|
157
|
+
const entityFilters = filters.get(entityType);
|
|
158
|
+
if (entityFilters && entityFilters.has(field)) {
|
|
159
|
+
filters = new Map(filters);
|
|
160
|
+
const newFilters = new Map(entityFilters);
|
|
161
|
+
newFilters.delete(field);
|
|
162
|
+
filters.set(entityType, newFilters);
|
|
163
|
+
notify();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function clearAllFilters(entityType) {
|
|
167
|
+
if (filters.has(entityType)) {
|
|
168
|
+
filters = new Map(filters);
|
|
169
|
+
filters.set(entityType, /* @__PURE__ */ new Map());
|
|
170
|
+
notify();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function getFilters(entityType) {
|
|
174
|
+
return filters.get(entityType) || /* @__PURE__ */ new Map();
|
|
175
|
+
}
|
|
176
|
+
function getByTypeFiltered(type) {
|
|
177
|
+
const types = Array.isArray(type) ? type : [type];
|
|
178
|
+
let result = [...entities.values()].filter((e) => types.includes(e.type));
|
|
179
|
+
for (const t of types) {
|
|
180
|
+
const typeFilters = filters.get(t);
|
|
181
|
+
if (typeFilters && typeFilters.size > 0) {
|
|
182
|
+
result = applyFilters(result, typeFilters);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return result;
|
|
186
|
+
}
|
|
187
|
+
function getSnapshot() {
|
|
188
|
+
return entities;
|
|
189
|
+
}
|
|
190
|
+
function getFilterSnapshot() {
|
|
191
|
+
return filters;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export { applyFilters, clearAllFilters, clearEntities, clearFilter, createFilter, getAllEntities, getByType, getByTypeFiltered, getDateString, getEntities, getEntity, getFilterSnapshot, getFilters, getSingleton, getSnapshot, matchesFilter, removeEntity, setFilter, spawnEntity, subscribe, updateEntity, updateSingleton };
|
package/dist/tsup.config.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Options } from 'tsup';
|
|
2
|
+
declare const _default: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
2
3
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.10",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -10,52 +10,52 @@
|
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/components/index.d.ts",
|
|
12
12
|
"import": "./dist/components/index.js",
|
|
13
|
-
"require": "./dist/components/index.
|
|
13
|
+
"require": "./dist/components/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./components": {
|
|
16
16
|
"types": "./dist/components/index.d.ts",
|
|
17
17
|
"import": "./dist/components/index.js",
|
|
18
|
-
"require": "./dist/components/index.
|
|
18
|
+
"require": "./dist/components/index.cjs"
|
|
19
19
|
},
|
|
20
20
|
"./hooks": {
|
|
21
21
|
"types": "./dist/hooks/index.d.ts",
|
|
22
22
|
"import": "./dist/hooks/index.js",
|
|
23
|
-
"require": "./dist/hooks/index.
|
|
23
|
+
"require": "./dist/hooks/index.cjs"
|
|
24
24
|
},
|
|
25
25
|
"./providers": {
|
|
26
26
|
"types": "./dist/providers/index.d.ts",
|
|
27
27
|
"import": "./dist/providers/index.js",
|
|
28
|
-
"require": "./dist/providers/index.
|
|
28
|
+
"require": "./dist/providers/index.cjs"
|
|
29
29
|
},
|
|
30
30
|
"./context": {
|
|
31
31
|
"types": "./dist/context/index.d.ts",
|
|
32
32
|
"import": "./dist/context/index.js",
|
|
33
|
-
"require": "./dist/context/index.
|
|
33
|
+
"require": "./dist/context/index.cjs"
|
|
34
34
|
},
|
|
35
35
|
"./renderer": {
|
|
36
36
|
"types": "./dist/renderer/index.d.ts",
|
|
37
37
|
"import": "./dist/renderer/index.js",
|
|
38
|
-
"require": "./dist/renderer/index.
|
|
38
|
+
"require": "./dist/renderer/index.cjs"
|
|
39
39
|
},
|
|
40
40
|
"./runtime": {
|
|
41
41
|
"types": "./dist/runtime/index.d.ts",
|
|
42
42
|
"import": "./dist/runtime/index.js",
|
|
43
|
-
"require": "./dist/runtime/index.
|
|
43
|
+
"require": "./dist/runtime/index.cjs"
|
|
44
44
|
},
|
|
45
45
|
"./stores": {
|
|
46
46
|
"types": "./dist/stores/index.d.ts",
|
|
47
47
|
"import": "./dist/stores/index.js",
|
|
48
|
-
"require": "./dist/stores/index.
|
|
48
|
+
"require": "./dist/stores/index.cjs"
|
|
49
49
|
},
|
|
50
50
|
"./lib": {
|
|
51
51
|
"types": "./dist/lib/index.d.ts",
|
|
52
52
|
"import": "./dist/lib/index.js",
|
|
53
|
-
"require": "./dist/lib/index.
|
|
53
|
+
"require": "./dist/lib/index.cjs"
|
|
54
54
|
},
|
|
55
55
|
"./components/organisms/game/three": {
|
|
56
56
|
"types": "./dist/components/organisms/game/three/index.d.ts",
|
|
57
57
|
"import": "./dist/components/organisms/game/three/index.js",
|
|
58
|
-
"require": "./dist/components/organisms/game/three/index.
|
|
58
|
+
"require": "./dist/components/organisms/game/three/index.cjs"
|
|
59
59
|
},
|
|
60
60
|
"./components/organisms/game/TraitStateViewer": {
|
|
61
61
|
"import": "./components/organisms/game/TraitStateViewer.tsx",
|
|
@@ -69,11 +69,26 @@
|
|
|
69
69
|
"import": "./templates/index.ts",
|
|
70
70
|
"types": "./templates/index.ts"
|
|
71
71
|
},
|
|
72
|
+
"./marketing": {
|
|
73
|
+
"types": "./dist/marketing/index.d.ts",
|
|
74
|
+
"import": "./dist/marketing/index.js",
|
|
75
|
+
"require": "./dist/marketing/index.cjs"
|
|
76
|
+
},
|
|
77
|
+
"./docs": {
|
|
78
|
+
"types": "./dist/docs/index.d.ts",
|
|
79
|
+
"import": "./dist/docs/index.js",
|
|
80
|
+
"require": "./dist/docs/index.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./illustrations": {
|
|
83
|
+
"types": "./dist/illustrations/index.d.ts",
|
|
84
|
+
"import": "./dist/illustrations/index.js",
|
|
85
|
+
"require": "./dist/illustrations/index.cjs"
|
|
86
|
+
},
|
|
72
87
|
"./themes/*.css": "./themes/*.css",
|
|
73
88
|
"./locales": {
|
|
74
89
|
"types": "./dist/locales/index.d.ts",
|
|
75
90
|
"import": "./dist/locales/index.js",
|
|
76
|
-
"require": "./dist/locales/index.
|
|
91
|
+
"require": "./dist/locales/index.cjs"
|
|
77
92
|
},
|
|
78
93
|
"./locales/en.json": "./locales/en.json",
|
|
79
94
|
"./locales/ar.json": "./locales/ar.json",
|
package/tailwind-preset.cjs
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
* @almadar/ui Tailwind Preset
|
|
3
3
|
*
|
|
4
4
|
* Provides the complete Almadar design token system as a Tailwind preset.
|
|
5
|
-
* Includes a safelist
|
|
6
|
-
*
|
|
5
|
+
* Includes a safelist for CSS-variable-based arbitrary classes that use
|
|
6
|
+
* bracket notation (Tailwind can't extract these from source scanning).
|
|
7
|
+
*
|
|
8
|
+
* Note: @almadar/ui dist content scanning is handled by tailwind.config.js
|
|
9
|
+
* in the shell template, not here. The config resolves the dist path via
|
|
10
|
+
* require.resolve('@almadar/ui') which works regardless of hoisting.
|
|
7
11
|
*
|
|
8
12
|
* Usage in tailwind.config.js:
|
|
9
13
|
* presets: [require('@almadar/ui/tailwind-preset')]
|
|
@@ -13,6 +17,18 @@
|
|
|
13
17
|
module.exports = {
|
|
14
18
|
darkMode: 'class',
|
|
15
19
|
safelist: [
|
|
20
|
+
// Standard utilities used via dynamic className from .orb schemas
|
|
21
|
+
'p-4', 'p-6', 'p-8',
|
|
22
|
+
'px-4', 'px-6', 'py-4', 'py-6',
|
|
23
|
+
'mx-auto',
|
|
24
|
+
'w-full',
|
|
25
|
+
'max-w-sm', 'max-w-md', 'max-w-lg', 'max-w-xl', 'max-w-2xl', 'max-w-3xl', 'max-w-4xl', 'max-w-5xl', 'max-w-6xl', 'max-w-7xl',
|
|
26
|
+
'min-h-screen',
|
|
27
|
+
'gap-1', 'gap-2', 'gap-3', 'gap-4', 'gap-6', 'gap-8',
|
|
28
|
+
'grid-cols-1', 'grid-cols-2', 'grid-cols-3', 'grid-cols-4',
|
|
29
|
+
'sm:grid-cols-2', 'md:grid-cols-2', 'md:grid-cols-3', 'lg:grid-cols-3', 'lg:grid-cols-4',
|
|
30
|
+
'text-center', 'text-left', 'text-right',
|
|
31
|
+
// CSS variable-based classes from @almadar/ui components
|
|
16
32
|
'accent-[var(--color-foreground)]',
|
|
17
33
|
'accent-[var(--color-primary)]',
|
|
18
34
|
'active:bg-[var(--color-muted)]',
|
|
@@ -161,6 +177,15 @@ module.exports = {
|
|
|
161
177
|
'text-[var(--color-warning)]',
|
|
162
178
|
'text-[var(--color-warning-foreground)]',
|
|
163
179
|
'to-[var(--color-accent)]',
|
|
180
|
+
// Hover elevation & micro-interactions
|
|
181
|
+
'hover:-translate-y-0.5',
|
|
182
|
+
'hover:-translate-y-1',
|
|
183
|
+
'hover:scale-105',
|
|
184
|
+
'scale-[1.05]',
|
|
185
|
+
'transition-all',
|
|
186
|
+
'duration-200',
|
|
187
|
+
'ring-2',
|
|
188
|
+
'ring-[var(--color-primary)]',
|
|
164
189
|
],
|
|
165
190
|
theme: {
|
|
166
191
|
fontFamily: {
|
package/themes/index.css
CHANGED
|
@@ -4,8 +4,30 @@
|
|
|
4
4
|
* Each theme provides both light and dark modes via:
|
|
5
5
|
* [data-theme="themename-light"] { ... }
|
|
6
6
|
* [data-theme="themename-dark"] { ... }
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: @import must precede all other statements (Vite requirement).
|
|
7
9
|
*/
|
|
8
10
|
|
|
11
|
+
/* Core themes */
|
|
12
|
+
@import "./wireframe.css";
|
|
13
|
+
@import "./minimalist.css";
|
|
14
|
+
@import "./almadar.css";
|
|
15
|
+
@import "./trait-wars.css";
|
|
16
|
+
|
|
17
|
+
/* Extended themes */
|
|
18
|
+
@import "./ocean.css";
|
|
19
|
+
@import "./forest.css";
|
|
20
|
+
@import "./sunset.css";
|
|
21
|
+
@import "./lavender.css";
|
|
22
|
+
@import "./rose.css";
|
|
23
|
+
@import "./slate.css";
|
|
24
|
+
@import "./ember.css";
|
|
25
|
+
@import "./midnight.css";
|
|
26
|
+
@import "./sand.css";
|
|
27
|
+
@import "./neon.css";
|
|
28
|
+
@import "./arctic.css";
|
|
29
|
+
@import "./copper.css";
|
|
30
|
+
|
|
9
31
|
/**
|
|
10
32
|
* Minimal element reset for @almadar/ui components.
|
|
11
33
|
*
|
|
@@ -56,23 +78,3 @@
|
|
|
56
78
|
#ui-slot-portal-root h6 {
|
|
57
79
|
font-family: var(--font-family, inherit);
|
|
58
80
|
}
|
|
59
|
-
|
|
60
|
-
/* Core themes */
|
|
61
|
-
@import "./wireframe.css";
|
|
62
|
-
@import "./minimalist.css";
|
|
63
|
-
@import "./almadar.css";
|
|
64
|
-
@import "./trait-wars.css";
|
|
65
|
-
|
|
66
|
-
/* Extended themes */
|
|
67
|
-
@import "./ocean.css";
|
|
68
|
-
@import "./forest.css";
|
|
69
|
-
@import "./sunset.css";
|
|
70
|
-
@import "./lavender.css";
|
|
71
|
-
@import "./rose.css";
|
|
72
|
-
@import "./slate.css";
|
|
73
|
-
@import "./ember.css";
|
|
74
|
-
@import "./midnight.css";
|
|
75
|
-
@import "./sand.css";
|
|
76
|
-
@import "./neon.css";
|
|
77
|
-
@import "./arctic.css";
|
|
78
|
-
@import "./copper.css";
|
package/dist/chunk-3HJHHULT.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// lib/api-client.ts
|
|
2
|
-
var API_BASE_URL = typeof process !== "undefined" && process.env?.VITE_API_URL ? process.env.VITE_API_URL : "/api";
|
|
3
|
-
var ApiError = class extends Error {
|
|
4
|
-
constructor(status, statusText, message) {
|
|
5
|
-
super(message || `API Error: ${status} ${statusText}`);
|
|
6
|
-
this.status = status;
|
|
7
|
-
this.statusText = statusText;
|
|
8
|
-
this.name = "ApiError";
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
async function handleResponse(response) {
|
|
12
|
-
if (!response.ok) {
|
|
13
|
-
let message;
|
|
14
|
-
try {
|
|
15
|
-
const errorData = await response.json();
|
|
16
|
-
message = errorData.message || errorData.error;
|
|
17
|
-
} catch {
|
|
18
|
-
}
|
|
19
|
-
throw new ApiError(response.status, response.statusText, message);
|
|
20
|
-
}
|
|
21
|
-
const text = await response.text();
|
|
22
|
-
if (!text) {
|
|
23
|
-
return void 0;
|
|
24
|
-
}
|
|
25
|
-
return JSON.parse(text);
|
|
26
|
-
}
|
|
27
|
-
function getHeaders() {
|
|
28
|
-
const headers = {
|
|
29
|
-
"Content-Type": "application/json"
|
|
30
|
-
};
|
|
31
|
-
const token = typeof localStorage !== "undefined" ? localStorage.getItem("authToken") : null;
|
|
32
|
-
if (token) {
|
|
33
|
-
headers["Authorization"] = `Bearer ${token}`;
|
|
34
|
-
}
|
|
35
|
-
return headers;
|
|
36
|
-
}
|
|
37
|
-
var apiClient = {
|
|
38
|
-
/**
|
|
39
|
-
* GET request
|
|
40
|
-
*/
|
|
41
|
-
async get(endpoint) {
|
|
42
|
-
const response = await fetch(`${API_BASE_URL}${endpoint}`, {
|
|
43
|
-
method: "GET",
|
|
44
|
-
headers: getHeaders()
|
|
45
|
-
});
|
|
46
|
-
return handleResponse(response);
|
|
47
|
-
},
|
|
48
|
-
/**
|
|
49
|
-
* POST request
|
|
50
|
-
*/
|
|
51
|
-
async post(endpoint, data) {
|
|
52
|
-
const response = await fetch(`${API_BASE_URL}${endpoint}`, {
|
|
53
|
-
method: "POST",
|
|
54
|
-
headers: getHeaders(),
|
|
55
|
-
body: data ? JSON.stringify(data) : void 0
|
|
56
|
-
});
|
|
57
|
-
return handleResponse(response);
|
|
58
|
-
},
|
|
59
|
-
/**
|
|
60
|
-
* PUT request
|
|
61
|
-
*/
|
|
62
|
-
async put(endpoint, data) {
|
|
63
|
-
const response = await fetch(`${API_BASE_URL}${endpoint}`, {
|
|
64
|
-
method: "PUT",
|
|
65
|
-
headers: getHeaders(),
|
|
66
|
-
body: data ? JSON.stringify(data) : void 0
|
|
67
|
-
});
|
|
68
|
-
return handleResponse(response);
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
* PATCH request
|
|
72
|
-
*/
|
|
73
|
-
async patch(endpoint, data) {
|
|
74
|
-
const response = await fetch(`${API_BASE_URL}${endpoint}`, {
|
|
75
|
-
method: "PATCH",
|
|
76
|
-
headers: getHeaders(),
|
|
77
|
-
body: data ? JSON.stringify(data) : void 0
|
|
78
|
-
});
|
|
79
|
-
return handleResponse(response);
|
|
80
|
-
},
|
|
81
|
-
/**
|
|
82
|
-
* DELETE request
|
|
83
|
-
*/
|
|
84
|
-
async delete(endpoint) {
|
|
85
|
-
const response = await fetch(`${API_BASE_URL}${endpoint}`, {
|
|
86
|
-
method: "DELETE",
|
|
87
|
-
headers: getHeaders()
|
|
88
|
-
});
|
|
89
|
-
return handleResponse(response);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export { ApiError, apiClient };
|
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 };
|