@epam/ai-dial-celebrations 1.3.1 → 1.3.2
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/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-celebrations",
|
|
3
3
|
"description": "Seasonal start-page celebrations with lazily loaded Halloween and New Year scenes that hosts can switch on and off one by one",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.css",
|
|
8
|
+
"**/*.scss"
|
|
9
|
+
],
|
|
6
10
|
"type": "module",
|
|
7
11
|
"main": "./index.js",
|
|
8
12
|
"module": "./index.js",
|
|
@@ -36,7 +40,7 @@
|
|
|
36
40
|
"react-error-boundary": "^6.1.6"
|
|
37
41
|
},
|
|
38
42
|
"peerDependencies": {
|
|
39
|
-
"@epam/ai-dial-chat-shared": "1.3.
|
|
43
|
+
"@epam/ai-dial-chat-shared": "1.3.2",
|
|
40
44
|
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
41
45
|
"react": "^19.2.8",
|
|
42
46
|
"react-dom": "^19.2.8"
|
package/packs/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { LottieScene } from '../components/LottieScene/LottieScene';
|
|
|
2
2
|
export type { LottieSceneProps } from '../components/LottieScene/LottieScene';
|
|
3
3
|
export { StaticTriggerDecoration } from '../components/StaticTriggerDecoration/StaticTriggerDecoration';
|
|
4
4
|
export type { StaticTriggerDecorationProps } from '../components/StaticTriggerDecoration/StaticTriggerDecoration';
|
|
5
|
-
export { createCelebrationEventFromDescriptor, createCelebrationSceneFromDescriptor, replaceCelebrationScenes, } from '../utils/celebration-descriptor-event';
|
|
5
|
+
export { addCelebrationScenes, createCelebrationEventFromDescriptor, createCelebrationSceneFromDescriptor, replaceCelebrationScenes, } from '../utils/celebration-descriptor-event';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/packs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/packs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AACxG,YAAY,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAClH,OAAO,EACL,oCAAoC,EACpC,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/packs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AACxG,YAAY,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAClH,OAAO,EACL,oBAAoB,EACpB,oCAAoC,EACpC,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,uCAAuC,CAAC"}
|
package/packs.js
CHANGED
|
@@ -172,21 +172,32 @@ var x = (e) => e.renderer === c.LottieLightSvgV1 && e.placement.template === u.V
|
|
|
172
172
|
} : e;
|
|
173
173
|
})
|
|
174
174
|
};
|
|
175
|
-
}, B = (e, t
|
|
175
|
+
}, B = (e, t, n = {}) => {
|
|
176
|
+
let r = new Set(e.scenes.map(({ id: e }) => e)), i = t.filter(({ id: e }) => !r.has(e));
|
|
177
|
+
return i.length ? {
|
|
178
|
+
...e,
|
|
179
|
+
scenes: [...e.scenes, ...i],
|
|
180
|
+
clickSceneIds: [...e.clickSceneIds, ...i.map(({ id: e }) => e)],
|
|
181
|
+
labels: {
|
|
182
|
+
...n,
|
|
183
|
+
...e.labels
|
|
184
|
+
}
|
|
185
|
+
} : e;
|
|
186
|
+
}, V = (e, t) => ({ onActivate: n }) => {
|
|
176
187
|
let { labels: r } = i();
|
|
177
188
|
return h(L, {
|
|
178
189
|
onActivate: n,
|
|
179
190
|
imageUrl: t,
|
|
180
191
|
label: r[e]
|
|
181
192
|
});
|
|
182
|
-
},
|
|
193
|
+
}, H = (e, t, n) => {
|
|
183
194
|
let { event: r } = e;
|
|
184
195
|
if (!r) throw TypeError(`Pack ${e.packId} does not describe an external event`);
|
|
185
196
|
let i = e.scenes.map((e) => R(e, t, n)), a = new Set(i.map(({ id: e }) => e)), { labelId: o, posterAssetId: s } = r.decoration, c = { ...e.labels };
|
|
186
197
|
return c[o] || (c[o] = I), {
|
|
187
198
|
id: e.eventId,
|
|
188
199
|
iconUrl: r.iconAssetId ? t.resolveImageUrl(r.iconAssetId) : void 0,
|
|
189
|
-
Decoration:
|
|
200
|
+
Decoration: V(o, t.resolveImageUrl(s)),
|
|
190
201
|
scenes: i,
|
|
191
202
|
clickSceneIds: r.clickSceneIds.filter((e) => a.has(e)),
|
|
192
203
|
labels: c,
|
|
@@ -194,4 +205,4 @@ var x = (e) => e.renderer === c.LottieLightSvgV1 && e.placement.template === u.V
|
|
|
194
205
|
};
|
|
195
206
|
};
|
|
196
207
|
//#endregion
|
|
197
|
-
export { P as LottieScene, L as StaticTriggerDecoration,
|
|
208
|
+
export { P as LottieScene, L as StaticTriggerDecoration, B as addCelebrationScenes, H as createCelebrationEventFromDescriptor, R as createCelebrationSceneFromDescriptor, z as replaceCelebrationScenes };
|
|
@@ -4,6 +4,8 @@ import { CelebrationAssetLoaders, CelebrationPackDescriptor, CelebrationSceneDes
|
|
|
4
4
|
export declare const createCelebrationSceneFromDescriptor: (descriptor: CelebrationSceneDescriptor, loaders: CelebrationAssetLoaders, context: CelebrationVariantContext) => CelebrationScene;
|
|
5
5
|
/** Returns a copy of `event` whose existing scenes are swapped for same-id replacements, keeping their `labelId`. */
|
|
6
6
|
export declare const replaceCelebrationScenes: (event: CelebrationEvent, scenes: readonly CelebrationScene[]) => CelebrationEvent;
|
|
7
|
+
/** Returns a copy of `event` with the scenes it does not define appended to its scenes and click pool; bundled labels win over `labels`. */
|
|
8
|
+
export declare const addCelebrationScenes: (event: CelebrationEvent, scenes: readonly CelebrationScene[], labels?: Readonly<Record<string, string>>) => CelebrationEvent;
|
|
7
9
|
/** Returns the event an external-only pack describes; throws when the descriptor has no `event` block. */
|
|
8
10
|
export declare const createCelebrationEventFromDescriptor: (descriptor: CelebrationPackDescriptor, loaders: CelebrationAssetLoaders, context: CelebrationVariantContext) => CelebrationEvent;
|
|
9
11
|
//# sourceMappingURL=celebration-descriptor-event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"celebration-descriptor-event.d.ts","sourceRoot":"","sources":["../../src/utils/celebration-descriptor-event.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAEpC,4GAA4G;AAC5G,eAAO,MAAM,oCAAoC,GAC/C,YAAY,0BAA0B,EACtC,SAAS,uBAAuB,EAChC,SAAS,yBAAyB,KACjC,gBASF,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,wBAAwB,GACnC,OAAO,gBAAgB,EACvB,QAAQ,SAAS,gBAAgB,EAAE,KAClC,gBASF,CAAC;AAiBF,0GAA0G;AAC1G,eAAO,MAAM,oCAAoC,GAC/C,YAAY,yBAAyB,EACrC,SAAS,uBAAuB,EAChC,SAAS,yBAAyB,KACjC,gBA2BF,CAAC"}
|
|
1
|
+
{"version":3,"file":"celebration-descriptor-event.d.ts","sourceRoot":"","sources":["../../src/utils/celebration-descriptor-event.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAEpC,4GAA4G;AAC5G,eAAO,MAAM,oCAAoC,GAC/C,YAAY,0BAA0B,EACtC,SAAS,uBAAuB,EAChC,SAAS,yBAAyB,KACjC,gBASF,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,wBAAwB,GACnC,OAAO,gBAAgB,EACvB,QAAQ,SAAS,gBAAgB,EAAE,KAClC,gBASF,CAAC;AAEF,4IAA4I;AAC5I,eAAO,MAAM,oBAAoB,GAC/B,OAAO,gBAAgB,EACvB,QAAQ,SAAS,gBAAgB,EAAE,EACnC,SAAQ,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,KAC5C,gBAUF,CAAC;AAiBF,0GAA0G;AAC1G,eAAO,MAAM,oCAAoC,GAC/C,YAAY,yBAAyB,EACrC,SAAS,uBAAuB,EAChC,SAAS,yBAAyB,KACjC,gBA2BF,CAAC"}
|