@lls/typings 24.25.0 → 24.26.0-0cf8a3d0
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/button.d.ts +1 -0
- package/historyProps.d.ts +2 -1
- package/overrides/global.d.ts +1 -0
- package/overrides/window.d.ts +5 -0
- package/package.json +1 -1
- package/presentationProps.d.ts +0 -1
- package/viewer.ts +40 -0
package/button.d.ts
CHANGED
package/historyProps.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Page } from '@lls/store'
|
|
2
|
+
import type { OnChangeContext } from '@typings/viewer'
|
|
2
3
|
|
|
3
4
|
export type HistoryItem = {
|
|
4
5
|
template: Page
|
|
@@ -14,7 +15,7 @@ export type LightTouchedIds = Record<string, number>
|
|
|
14
15
|
|
|
15
16
|
export type useViewerHistoryProps = {
|
|
16
17
|
template: Page
|
|
17
|
-
onChange?: (template: Page, context: string) => void
|
|
18
|
+
onChange?: (template: Page, context: OnChangeContext | string) => void
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export type HistoryProps = {
|
package/overrides/global.d.ts
CHANGED
package/overrides/window.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ interface Window {
|
|
|
8
8
|
opera: any | undefined
|
|
9
9
|
MSStream: any | undefined
|
|
10
10
|
coreOpenWindow?: typeof window.open
|
|
11
|
+
cocoreOpenWindow?: typeof window.open
|
|
11
12
|
coreHref?: string
|
|
12
13
|
outerHTML: unknown
|
|
13
14
|
pa?: {
|
|
@@ -26,6 +27,10 @@ interface Window {
|
|
|
26
27
|
Tally?: any
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
interface WindowEventHandlersEventMap {
|
|
31
|
+
tabletMessage: MessageEvent
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
type requestFullscreenType = (typeof Element.prototype)['requestFullscreen']
|
|
30
35
|
|
|
31
36
|
interface Element {
|
package/package.json
CHANGED
package/presentationProps.d.ts
CHANGED
|
@@ -86,7 +86,6 @@ export type PresentationPropsType = {
|
|
|
86
86
|
boardId?: string | undefined
|
|
87
87
|
showHomo?: boolean
|
|
88
88
|
docsUuidWithFullscreenEnabled?: { groups: Record<LayoutItem['id'] | 'root', NonNullable<DocJson['uuid']>[]> }
|
|
89
|
-
isArchipel?: boolean // TODO a supprimer
|
|
90
89
|
isInFullscreen?: boolean
|
|
91
90
|
archipelParams?: ArchipelParamsType
|
|
92
91
|
learningResources?: LearningResource[]
|
package/viewer.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { DocJson, Page } from '@lls/store'
|
|
2
|
+
import type { OnChangeContextSource } from '@viewer/constants/lightEditor.ts'
|
|
3
|
+
|
|
4
|
+
type OnChangeContextLightTag = {
|
|
5
|
+
source: OnChangeContextSource.LIGHT_EDITOR_ONCHANGE_TAG_CONTEXT
|
|
6
|
+
contentMd: string // when adding a <b> tag, DOM is not modified, in this case trust given html
|
|
7
|
+
}
|
|
8
|
+
type OnChangeContextExercise = {
|
|
9
|
+
source:
|
|
10
|
+
| OnChangeContextSource.EXERCISE_CONTEXT
|
|
11
|
+
| OnChangeContextSource.EXERCISE_CONTEXT_NEXT
|
|
12
|
+
| OnChangeContextSource.EXERCISE_CONTEXT_SKIP
|
|
13
|
+
| OnChangeContextSource.EXERCISE_CONTEXT_SELECT
|
|
14
|
+
document: Page
|
|
15
|
+
isTask?: boolean
|
|
16
|
+
}
|
|
17
|
+
type OnChangeContextWorkplanCard = {
|
|
18
|
+
source: OnChangeContextSource.WORKPLAN_CONTEXT
|
|
19
|
+
document: Page
|
|
20
|
+
workplanCardOption: { uuid: DocJson['uuid']; time: string }
|
|
21
|
+
}
|
|
22
|
+
type OnChangeContextWorkplanDuplicateTaskSource = {
|
|
23
|
+
source: OnChangeContextSource.WORKPLAN_CONTEXT_DUPLICATE_TASK_SOURCE
|
|
24
|
+
}
|
|
25
|
+
type OnChangeContextDefault = {
|
|
26
|
+
source: Exclude<
|
|
27
|
+
OnChangeContextSource,
|
|
28
|
+
| OnChangeContextLightTag['source']
|
|
29
|
+
| OnChangeContextWorkplanCard['source']
|
|
30
|
+
| OnChangeContextWorkplanDuplicateTaskSource['source']
|
|
31
|
+
>
|
|
32
|
+
contentMd?: string
|
|
33
|
+
}
|
|
34
|
+
export type OnChangeContext = (
|
|
35
|
+
| OnChangeContextLightTag
|
|
36
|
+
| OnChangeContextExercise
|
|
37
|
+
| OnChangeContextWorkplanCard
|
|
38
|
+
| OnChangeContextWorkplanDuplicateTaskSource
|
|
39
|
+
| OnChangeContextDefault
|
|
40
|
+
) & { buildFromHtml?: boolean; contentMd?: string }
|