@lls/typings 24.29.0 → 24.30.0-18b9c8ac

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/historyProps.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { Page } from '@lls/store'
2
- import type { OnChangeContext } from '@typings/viewer'
3
2
 
4
3
  export type HistoryItem = {
5
4
  template: Page
@@ -13,11 +12,6 @@ export type LightEditorHistory = {
13
12
 
14
13
  export type LightTouchedIds = Record<string, number>
15
14
 
16
- export type useViewerHistoryProps = {
17
- template: Page
18
- onChange?: (template: Page, context: OnChangeContext | string) => void
19
- }
20
-
21
15
  export type HistoryProps = {
22
16
  lightTouchedIds: LightTouchedIds
23
17
  addEntry: (template: Page, id: string) => void
@@ -1,7 +1,7 @@
1
1
  import type { AsyncLocalStorage } from 'node:async_hooks'
2
- import type { Polypad as PolypadType } from '@typings/polypad'
3
- import type { AnyFunction, TODO } from '@typings/utils'
4
- import type CheerioModule from 'cheerio'
2
+ import type { Polypad as PolypadType } from '@lls/typings/polypad'
3
+ import type { AnyFunction, TODO } from '@lls/typings/utils'
4
+ import type * as CheerioModule from 'cheerio'
5
5
 
6
6
  type LlsNamespace = 'UNIVERSAL_VARS'
7
7
  export type UniversalVars = {
@@ -14,7 +14,7 @@ type Store = Map<LlsNamespace, (UniversalVars & Record<string, any>) | undefined
14
14
  declare global {
15
15
  // https://stackoverflow.com/questions/35074713/extending-typescript-global-object-in-node-js
16
16
  var cheerio: typeof CheerioModule
17
- var Polypad: PolypadType | Promise | undefined
17
+ var Polypad: PolypadType | undefined
18
18
  var __CONFIG__: {
19
19
  env?: typeof process.env.CONF_ENV
20
20
  api_url?: string
@@ -44,7 +44,7 @@ declare global {
44
44
  mockKeys: (keys: string[]) => (importActual: () => Promise<unknown>) => Promise<unknown>
45
45
  mockRestore: AnyFunction
46
46
  mocked: <T>(t: T) => TODO
47
- mockCustom: <T, U>(fn: (T) => U) => (t: T) => U
47
+ mockCustom: <T, U>(fn: (t: T) => U) => (t: T) => U
48
48
  unmockAll: AnyFunction
49
49
  }
50
50
  }
@@ -1,4 +1,4 @@
1
- import type { AnyFunction, ValueOf } from '@typings/utils'
1
+ import type { AnyFunction, ValueOf } from '@lls/typings/utils'
2
2
  import type lo from 'lodash'
3
3
  import type _ from 'lodash/fp'
4
4
 
package/package.json CHANGED
@@ -1,21 +1,25 @@
1
1
  {
2
2
  "name": "@lls/typings",
3
- "version": "24.29.0",
3
+ "version": "24.30.0-18b9c8ac",
4
4
  "description": "types custom du monorepo",
5
5
  "main": "index.js",
6
+ "imports": {
7
+ "#typings/*": "./*.d.ts"
8
+ },
6
9
  "keywords": [],
7
10
  "author": "",
8
11
  "license": "ISC",
9
12
  "devDependencies": {
10
13
  "@types/domhandler": "2.4.5",
11
- "@types/lodash": "4.17.17",
14
+ "@types/lodash": "4.17.20",
12
15
  "@types/react": "18.3.12",
13
16
  "@yorab/react-paint": "0.11.4",
14
- "cheerio": "1.0.0",
17
+ "cheerio": "1.1.2",
15
18
  "typescript": "5.8.3"
16
19
  },
17
20
  "peerDependencies": {
18
- "@biomejs/biome": "*"
21
+ "@biomejs/biome": "*",
22
+ "cheerio": "*"
19
23
  },
20
24
  "scripts": {
21
25
  "dts": "pnpm tsc --project tsconfig.production.json",
@@ -1,5 +1,5 @@
1
1
  import type { DocJson, LayoutItem, LearningResource } from '@lls/store'
2
- import type { ReactSetState } from '@typings/react'
2
+ import type { ReactSetState } from '@lls/typings/react'
3
3
  type ZoomPropsType = {
4
4
  zoomStep?: number
5
5
  zoom: number
package/viewer.ts DELETED
@@ -1,40 +0,0 @@
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 }