teamplay 0.3.27 → 0.3.28

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.
Files changed (2) hide show
  1. package/index.d.ts +47 -0
  2. package/package.json +8 -8
package/index.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ // teamplay/index.d.ts
2
+ import type React from 'react'
3
+
4
+ export interface ObserverOptions {
5
+ /** Wrap the resulting component with forwardRef */
6
+ forwardRef?: boolean
7
+ /** Enable/disable the internal cache (default: true) */
8
+ cache?: boolean
9
+ /** Milliseconds or boolean to throttle reactive updates */
10
+ throttle?: number | boolean
11
+ /** Pass-through flag consumed by wrapIntoSuspense */
12
+ defer?: boolean | number
13
+ /** Props forwarded to React.Suspense (fallback required internally) */
14
+ suspenseProps?: React.ComponentProps<typeof React.Suspense>
15
+ }
16
+
17
+ /**
18
+ * Makes any React component reactive and Suspense-aware.
19
+ * Props are passed through unchanged; the returned component
20
+ * preserves the original type so consumers keep full typings.
21
+ */
22
+ export function observer<P, C extends React.ComponentType<P>> (
23
+ component: C,
24
+ options?: ObserverOptions
25
+ ): C
26
+
27
+ // Keep existing public surface available even if typed loosely for now.
28
+ export const $: any
29
+ export { default as Signal, SEGMENTS } from './orm/Signal.js'
30
+ export { __DEBUG_SIGNALS_CACHE__, rawSignal, getSignalClass } from './orm/getSignal.js'
31
+ export { default as addModel } from './orm/addModel.js'
32
+ export { default as signal } from './orm/getSignal.js'
33
+ export { GLOBAL_ROOT_ID } from './orm/Root.js'
34
+ export { default as sub } from './orm/sub.js'
35
+ export {
36
+ default as useSub,
37
+ useAsyncSub,
38
+ setUseDeferredValue as __setUseDeferredValue,
39
+ setDefaultDefer as __setDefaultDefer
40
+ } from './react/useSub.js'
41
+ export { connection, setConnection, getConnection, fetchOnly, setFetchOnly, publicOnly, setPublicOnly } from './orm/connection.js'
42
+ export { useId, useNow, useScheduleUpdate, useTriggerUpdate } from './react/helpers.js'
43
+ export { GUID_PATTERN, hasMany, hasOne, hasManyFlags, belongsTo, pickFormFields } from '@teamplay/schema'
44
+ export { aggregation, aggregationHeader as __aggregationHeader } from '@teamplay/utils/aggregation'
45
+ export { accessControl } from '@teamplay/utils/accessControl'
46
+ export function getRootSignal (options?: Record<string, any>): any
47
+ export default $
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamplay",
3
- "version": "0.3.27",
3
+ "version": "0.3.28",
4
4
  "description": "Full-stack signals ORM with multiplayer",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@nx-js/observer-util": "^4.1.3",
26
- "@teamplay/backend": "^0.3.27",
27
- "@teamplay/cache": "^0.3.27",
28
- "@teamplay/channel": "^0.3.27",
29
- "@teamplay/debug": "^0.3.27",
30
- "@teamplay/schema": "^0.3.27",
31
- "@teamplay/utils": "^0.3.27",
26
+ "@teamplay/backend": "^0.3.28",
27
+ "@teamplay/cache": "^0.3.28",
28
+ "@teamplay/channel": "^0.3.28",
29
+ "@teamplay/debug": "^0.3.28",
30
+ "@teamplay/schema": "^0.3.28",
31
+ "@teamplay/utils": "^0.3.28",
32
32
  "diff-match-patch": "^1.0.5",
33
33
  "events": "^3.3.0",
34
34
  "json0-ot-diff": "^1.1.2",
@@ -64,5 +64,5 @@
64
64
  ]
65
65
  },
66
66
  "license": "MIT",
67
- "gitHead": "4a3fbec77123972874cb03bf5197983fe69f1118"
67
+ "gitHead": "68528eaf5e8ba2dadd4ed46eee3038416a364f66"
68
68
  }