@concord-consortium/lara-interactive-api 1.9.2 → 1.9.3-pre.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/hooks.d.ts +6 -4
- package/index-bundle.d.ts +31 -5
- package/index.js +3636 -3596
- package/package.json +1 -1
package/hooks.d.ts
CHANGED
|
@@ -22,8 +22,10 @@ export interface IUseReportItemOptions<InteractiveState, AuthoredState> {
|
|
|
22
22
|
}
|
|
23
23
|
export declare const useReportItem: <InteractiveState, AuthoredState>({ metadata, handler }: IUseReportItemOptions<InteractiveState, AuthoredState>) => void;
|
|
24
24
|
export declare const DefaultAccessibilitySettings: IAccessibilitySettings;
|
|
25
|
-
export
|
|
26
|
-
updateHtmlFontSize?: boolean
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
export interface IUseAccessibilityProps {
|
|
26
|
+
updateHtmlFontSize?: boolean;
|
|
27
|
+
updateHtmlFontFamily?: boolean;
|
|
28
|
+
addBodyClass?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const useAccessibility: (props?: IUseAccessibilityProps | undefined) => IAccessibilitySettings;
|
|
29
31
|
export {};
|
package/index-bundle.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ interface IHostFeatures extends Record<string, IHostFeatureSupport | string | un
|
|
|
73
73
|
interface IAccessibilitySettings {
|
|
74
74
|
fontSize: string;
|
|
75
75
|
fontSizeInPx: number;
|
|
76
|
+
fontType: string;
|
|
77
|
+
fontFamilyForType: string;
|
|
76
78
|
}
|
|
77
79
|
interface IRuntimeInitInteractive<InteractiveState = {}, AuthoredState = {}, GlobalInteractiveState = {}> extends IInteractiveStateProps<InteractiveState> {
|
|
78
80
|
version: 1;
|
|
@@ -98,6 +100,7 @@ interface IRuntimeInitInteractive<InteractiveState = {}, AuthoredState = {}, Glo
|
|
|
98
100
|
themeInfo: IThemeInfo;
|
|
99
101
|
attachments?: AttachmentInfoMap;
|
|
100
102
|
accessibility: IAccessibilitySettings;
|
|
103
|
+
mediaLibrary: IMediaLibrary;
|
|
101
104
|
}
|
|
102
105
|
interface IThemeInfo {
|
|
103
106
|
colors: {
|
|
@@ -442,6 +445,27 @@ interface IGetInteractiveState {
|
|
|
442
445
|
unloading?: boolean;
|
|
443
446
|
}
|
|
444
447
|
declare type OnUnloadFunction<InteractiveState = {}> = (options: IGetInteractiveState) => Promise<InteractiveState>;
|
|
448
|
+
/**
|
|
449
|
+
* Type of the exported media library items found in the activity or sequence. Initially this will just
|
|
450
|
+
* be "image" but could be extended in the future to "video" or "audio". The exact mime type would be
|
|
451
|
+
* preferable but that is not always detectable from the exported media library urls.
|
|
452
|
+
*/
|
|
453
|
+
declare type IMediaLibraryItemType = "image";
|
|
454
|
+
/**
|
|
455
|
+
* Interface for the exported media library items found in the activity or sequence.
|
|
456
|
+
*/
|
|
457
|
+
interface IMediaLibraryItem {
|
|
458
|
+
url: string;
|
|
459
|
+
type: IMediaLibraryItemType;
|
|
460
|
+
caption?: string;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Interface for the media library.
|
|
464
|
+
*/
|
|
465
|
+
interface IMediaLibrary {
|
|
466
|
+
enabled: boolean;
|
|
467
|
+
items: IMediaLibraryItem[];
|
|
468
|
+
}
|
|
445
469
|
|
|
446
470
|
declare type ChoiceId = string;
|
|
447
471
|
interface IAuthoringMetadataBase {
|
|
@@ -650,10 +674,12 @@ interface IUseReportItemOptions<InteractiveState, AuthoredState> {
|
|
|
650
674
|
}
|
|
651
675
|
declare const useReportItem: <InteractiveState, AuthoredState>({ metadata, handler }: IUseReportItemOptions<InteractiveState, AuthoredState>) => void;
|
|
652
676
|
declare const DefaultAccessibilitySettings: IAccessibilitySettings;
|
|
653
|
-
|
|
654
|
-
updateHtmlFontSize?: boolean
|
|
655
|
-
|
|
656
|
-
|
|
677
|
+
interface IUseAccessibilityProps {
|
|
678
|
+
updateHtmlFontSize?: boolean;
|
|
679
|
+
updateHtmlFontFamily?: boolean;
|
|
680
|
+
addBodyClass?: boolean;
|
|
681
|
+
}
|
|
682
|
+
declare const useAccessibility: (props?: IUseAccessibilityProps | undefined) => IAccessibilitySettings;
|
|
657
683
|
|
|
658
684
|
declare type ManagedStateEvent = "interactiveStateUpdated" | "globalInteractiveStateUpdated" | "authoredStateUpdated" | "initInteractive";
|
|
659
685
|
declare class ManagedState {
|
|
@@ -700,4 +726,4 @@ declare class Client {
|
|
|
700
726
|
private connect;
|
|
701
727
|
}
|
|
702
728
|
|
|
703
|
-
export { AttachmentInfoMap, ChoiceId, Client, ClientMessage, DefaultAccessibilitySettings, DeprecatedRuntimeClientMessage, DeprecatedRuntimeServerMessage, GetAttachmentUrlParams, GlobalIFrameSaverClientMessage, GlobalIFrameSaverServerMessage, IAccessibilitySettings, IAddLinkedInteractiveStateListenerOptions, IAddLinkedInteractiveStateListenerRequest, IAttachmentInfo, IAttachmentUrlRequest, IAttachmentUrlResponse, IAuthInfo, IAuthoringClientMessage, IAuthoringCustomReportField, IAuthoringCustomReportFields, IAuthoringImageQuestionMetadata, IAuthoringInitInteractive, IAuthoringInteractiveMetadata, IAuthoringMetadata, IAuthoringMetadataBase, IAuthoringMultipleChoiceChoiceMetadata, IAuthoringMultipleChoiceMetadata, IAuthoringOpenResponseMetadata, IAuthoringServerMessage, IBaseShowModal, ICloseModal, IContextMember, IContextMembership, ICustomMessage, ICustomMessageHandler, ICustomMessageOptions, ICustomMessagesHandledMap, ICustomReportFieldsAuthoredState, ICustomReportFieldsAuthoredStateField, ICustomReportFieldsInteractiveState, IDataset, IDecoratedContentEvent, IGetAuthInfoRequest, IGetAuthInfoResponse, IGetFirebaseJwtRequest, IGetFirebaseJwtResponse, IGetInteractiveListOptions, IGetInteractiveListRequest, IGetInteractiveListResponse, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotRequest, IGetInteractiveSnapshotResponse, IGetInteractiveState, IGetLibraryInteractiveListOptions, IGetLibraryInteractiveListRequest, IGetLibraryInteractiveListResponse, IGetReportItemAnswer, IGetReportItemAnswerHandler, IHintRequest, IHostFeatureSupport, IHostFeatures, IHostModalSupport, IInitInteractive, IInteractiveListResponseItem, IInteractiveStateProps, IInteractiveStateWithDataset, IJwtClaims, IJwtResponse, ILibraryInteractiveListResponseItem, ILinkedInteractive, ILinkedInteractiveStateResponse, INavigationOptions, IPortalClaims, IRemoveLinkedInteractiveStateListenerRequest, IReportInitInteractive, IReportItemAnswer, IReportItemAnswerItem, IReportItemAnswerItemAnswerText, IReportItemAnswerItemAttachment, IReportItemAnswerItemHtml, IReportItemAnswerItemLinks, IReportItemAnswerItemScore, IReportItemClientMessage, IReportItemHandlerMetadata, IReportItemInitInteractive, IReportItemServerMessage, IRuntimeClientMessage, IRuntimeCustomReportValues, IRuntimeImageQuestionMetadata, IRuntimeInitInteractive, IRuntimeInteractiveMetadata, IRuntimeMetadata, IRuntimeMetadataBase, IRuntimeMultipleChoiceMetadata, IRuntimeOpenResponseMetadata, IRuntimeServerMessage, ISetLinkedInteractives, IShowAlert, IShowDialog, IShowLightbox, IShowModal, ISupportedFeatures, ISupportedFeaturesRequest, ITextDecorationHandler, ITextDecorationHandlerInfo, ITextDecorationInfo, IThemeInfo, IUseReportItemOptions, IWriteAttachmentRequest, IframePhoneServerMessage, InitInteractiveMode, InteractiveItemId, LoggerClientMessage, ModalType, OnUnloadFunction, ReadAttachmentParams, ReportItemsType, ServerMessage, WriteAttachmentParams, addAuthoredStateListener, addCustomMessageListener, addDecorateContentListener, addGetReportItemAnswerListener, addGlobalInteractiveStateListener, addInteractiveStateListener, addLinkedInteractiveStateListener, closeModal, flushStateUpdates, getAttachmentUrl, getAuthInfo, getAuthoredState, getClient, getFirebaseJwt, getGlobalInteractiveState, getInitInteractiveMessage, getInteractiveList, getInteractiveSnapshot, getInteractiveState, getLibraryInteractiveList, getMode, inIframe, log, notifyReportItemClientReady, postDecoratedContentEvent, readAttachment, removeAuthoredStateListener, removeCustomMessageListener, removeDecorateContentListener, removeGetReportItemAnswerListener, removeGlobalInteractiveStateListener, removeInteractiveStateListener, removeLinkedInteractiveStateListener, sendCustomMessage, sendReportItemAnswer, setAuthoredState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAccessibility, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useReportItem, writeAttachment };
|
|
729
|
+
export { AttachmentInfoMap, ChoiceId, Client, ClientMessage, DefaultAccessibilitySettings, DeprecatedRuntimeClientMessage, DeprecatedRuntimeServerMessage, GetAttachmentUrlParams, GlobalIFrameSaverClientMessage, GlobalIFrameSaverServerMessage, IAccessibilitySettings, IAddLinkedInteractiveStateListenerOptions, IAddLinkedInteractiveStateListenerRequest, IAttachmentInfo, IAttachmentUrlRequest, IAttachmentUrlResponse, IAuthInfo, IAuthoringClientMessage, IAuthoringCustomReportField, IAuthoringCustomReportFields, IAuthoringImageQuestionMetadata, IAuthoringInitInteractive, IAuthoringInteractiveMetadata, IAuthoringMetadata, IAuthoringMetadataBase, IAuthoringMultipleChoiceChoiceMetadata, IAuthoringMultipleChoiceMetadata, IAuthoringOpenResponseMetadata, IAuthoringServerMessage, IBaseShowModal, ICloseModal, IContextMember, IContextMembership, ICustomMessage, ICustomMessageHandler, ICustomMessageOptions, ICustomMessagesHandledMap, ICustomReportFieldsAuthoredState, ICustomReportFieldsAuthoredStateField, ICustomReportFieldsInteractiveState, IDataset, IDecoratedContentEvent, IGetAuthInfoRequest, IGetAuthInfoResponse, IGetFirebaseJwtRequest, IGetFirebaseJwtResponse, IGetInteractiveListOptions, IGetInteractiveListRequest, IGetInteractiveListResponse, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotRequest, IGetInteractiveSnapshotResponse, IGetInteractiveState, IGetLibraryInteractiveListOptions, IGetLibraryInteractiveListRequest, IGetLibraryInteractiveListResponse, IGetReportItemAnswer, IGetReportItemAnswerHandler, IHintRequest, IHostFeatureSupport, IHostFeatures, IHostModalSupport, IInitInteractive, IInteractiveListResponseItem, IInteractiveStateProps, IInteractiveStateWithDataset, IJwtClaims, IJwtResponse, ILibraryInteractiveListResponseItem, ILinkedInteractive, ILinkedInteractiveStateResponse, IMediaLibrary, IMediaLibraryItem, IMediaLibraryItemType, INavigationOptions, IPortalClaims, IRemoveLinkedInteractiveStateListenerRequest, IReportInitInteractive, IReportItemAnswer, IReportItemAnswerItem, IReportItemAnswerItemAnswerText, IReportItemAnswerItemAttachment, IReportItemAnswerItemHtml, IReportItemAnswerItemLinks, IReportItemAnswerItemScore, IReportItemClientMessage, IReportItemHandlerMetadata, IReportItemInitInteractive, IReportItemServerMessage, IRuntimeClientMessage, IRuntimeCustomReportValues, IRuntimeImageQuestionMetadata, IRuntimeInitInteractive, IRuntimeInteractiveMetadata, IRuntimeMetadata, IRuntimeMetadataBase, IRuntimeMultipleChoiceMetadata, IRuntimeOpenResponseMetadata, IRuntimeServerMessage, ISetLinkedInteractives, IShowAlert, IShowDialog, IShowLightbox, IShowModal, ISupportedFeatures, ISupportedFeaturesRequest, ITextDecorationHandler, ITextDecorationHandlerInfo, ITextDecorationInfo, IThemeInfo, IUseAccessibilityProps, IUseReportItemOptions, IWriteAttachmentRequest, IframePhoneServerMessage, InitInteractiveMode, InteractiveItemId, LoggerClientMessage, ModalType, OnUnloadFunction, ReadAttachmentParams, ReportItemsType, ServerMessage, WriteAttachmentParams, addAuthoredStateListener, addCustomMessageListener, addDecorateContentListener, addGetReportItemAnswerListener, addGlobalInteractiveStateListener, addInteractiveStateListener, addLinkedInteractiveStateListener, closeModal, flushStateUpdates, getAttachmentUrl, getAuthInfo, getAuthoredState, getClient, getFirebaseJwt, getGlobalInteractiveState, getInitInteractiveMessage, getInteractiveList, getInteractiveSnapshot, getInteractiveState, getLibraryInteractiveList, getMode, inIframe, log, notifyReportItemClientReady, postDecoratedContentEvent, readAttachment, removeAuthoredStateListener, removeCustomMessageListener, removeDecorateContentListener, removeGetReportItemAnswerListener, removeGlobalInteractiveStateListener, removeInteractiveStateListener, removeLinkedInteractiveStateListener, sendCustomMessage, sendReportItemAnswer, setAuthoredState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAccessibility, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useReportItem, writeAttachment };
|