@vived/app 4.36.2 → 4.37.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.
@@ -1,3 +1,16 @@
1
- import { AppObjectRepo } from "../../../AppObject";
1
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
2
2
  import { CalloutEntity } from "../Entities";
3
- export declare function makeCalloutFactory(appObjects: AppObjectRepo): (id: string) => CalloutEntity;
3
+ import { LookAtCameraUC } from "../UC";
4
+ /**
5
+ * Configuration options for setting up a callout.
6
+ */
7
+ export interface CalloutOptions {
8
+ /**
9
+ * Factory function to create a custom LookAtCameraUC use case.
10
+ * If not provided, the default LookAtCameraUC will be created.
11
+ * @param appObject - The application object to associate with the hover label
12
+ * @returns A LookAtCameraUC instance
13
+ */
14
+ lookAtCameraFactory?: (appObject: AppObject) => LookAtCameraUC;
15
+ }
16
+ export declare function makeCalloutFactory(appObjects: AppObjectRepo, options?: CalloutOptions | undefined): (id: string) => CalloutEntity;
@@ -9,7 +9,7 @@ const Transform3D_1 = require("../../Transform3D");
9
9
  const Entities_1 = require("../Entities");
10
10
  const PM_1 = require("../PM");
11
11
  const UC_1 = require("../UC");
12
- function makeCalloutFactory(appObjects) {
12
+ function makeCalloutFactory(appObjects, options) {
13
13
  return function calloutFactory(id) {
14
14
  const appObject = appObjects.getOrCreate(id);
15
15
  const callout = Entities_1.makeCalloutEntity(appObject);
@@ -21,7 +21,13 @@ function makeCalloutFactory(appObjects) {
21
21
  Transform3D_1.makePanTransformUC(callout.labelTransform.appObject);
22
22
  new OverlayColor_1.SetOverlayColorUC(appObject);
23
23
  UC_1.makeSetCalloutSizeUC(appObject);
24
- UC_1.makeLookAtCameraUC(appObject);
24
+ // UC
25
+ if (options === null || options === void 0 ? void 0 : options.lookAtCameraFactory) {
26
+ options.lookAtCameraFactory(appObject);
27
+ }
28
+ else {
29
+ UC_1.makeLookAtCameraUC(appObject);
30
+ }
25
31
  // PMs
26
32
  Label_1.makeLabelPM(appObject);
27
33
  Transform3D_1.makeTransform3DPM(callout.rootTransform.appObject);
@@ -0,0 +1 @@
1
+ export * from "./setupFeatureFlags";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./setupFeatureFlags"), exports);
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ export declare function setupFeatureFlags(appObjects: AppObjectRepo): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupFeatureFlags = void 0;
4
+ const Entity_1 = require("../Entity");
5
+ const PMs_1 = require("../PMs");
6
+ function setupFeatureFlags(appObjects) {
7
+ const ao = appObjects.getOrCreate("FeatureFlags");
8
+ Entity_1.makeFeatureFlagsEntity(ao);
9
+ // PM
10
+ PMs_1.makeFeatureFlagsPM(ao);
11
+ }
12
+ exports.setupFeatureFlags = setupFeatureFlags;
@@ -1,4 +1,5 @@
1
1
  export * from "./Adapters";
2
2
  export * from "./Entity";
3
+ export * from "./Factory";
3
4
  export * from "./Mocks";
4
5
  export * from "./PMs";
@@ -12,5 +12,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./Adapters"), exports);
14
14
  __exportStar(require("./Entity"), exports);
15
+ __exportStar(require("./Factory"), exports);
15
16
  __exportStar(require("./Mocks"), exports);
16
17
  __exportStar(require("./PMs"), exports);
@@ -7,6 +7,7 @@ function setupAppHandlers(appObjects) {
7
7
  const handlerAO = appObjects.getOrCreate("AppHandlers");
8
8
  const appHandler = Entities_1.makeAppHandler(handlerAO);
9
9
  UC_1.makeDisposeAppUC(handlerAO);
10
+ UC_1.makeEnableFeatureUC(handlerAO);
10
11
  UC_1.makeSetAppStateUC(handlerAO);
11
12
  UC_1.makeSetIsAuthoringUC(handlerAO);
12
13
  UC_1.makeSetThemeColorUC(handlerAO);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "4.36.2",
3
+ "version": "4.37.1",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",