@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 CHANGED
@@ -1,4 +1,5 @@
1
1
  export type OnGoToType = (props: {
2
+ isDraft?: boolean
2
3
  href?: string | URL
3
4
  page?: number
4
5
  doc?: string
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 = {
@@ -31,6 +31,7 @@ declare global {
31
31
  var UNIVERSAL_VARS: UniversalVars
32
32
  var llsStorageReady: AsyncLocalStorage<Store>
33
33
  var llsStoragePromise: Promise<AsyncLocalStorage<Store>>
34
+ var isBun: boolean | undefined
34
35
 
35
36
  namespace NodeJS {
36
37
  interface ProcessEnv {
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lls/typings",
3
- "version": "24.25.0",
3
+ "version": "24.26.0-0cf8a3d0",
4
4
  "description": "types custom du monorepo",
5
5
  "main": "index.js",
6
6
  "keywords": [],
@@ -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 }