@innspel/core 0.7.0 → 0.8.0

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.
@@ -1,4 +1,4 @@
1
- import { U as Telemetry, W as TelemetryTelemetryBatch } from './typer-CZIalpLn.cjs';
1
+ import { V as Telemetry, X as TelemetryTelemetryBatch } from './typer-BJzuu_WP.cjs';
2
2
 
3
3
  /**
4
4
  * Mottaket for målemodellen (M4.2, docs/maaling.md) — plattformens eget, aldri en
@@ -1,4 +1,4 @@
1
- import { U as Telemetry, W as TelemetryTelemetryBatch } from './typer-CZIalpLn.js';
1
+ import { V as Telemetry, X as TelemetryTelemetryBatch } from './typer-BJzuu_WP.js';
2
2
 
3
3
  /**
4
4
  * Mottaket for målemodellen (M4.2, docs/maaling.md) — plattformens eget, aldri en
package/dist/telemetri.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createClient, createConfig, eventsSend, VERSJON } from './chunk-EDOTPUMZ.js';
1
+ import { createClient, createConfig, eventsSend, VERSJON } from './chunk-3EIBWCTT.js';
2
2
 
3
3
  // src/telemetri.ts
4
4
  var MAKS_BUNT = 100;
@@ -370,6 +370,20 @@ type TelemetryEvent = {
370
370
  interface Telemetry {
371
371
  emit(event: TelemetryEvent): void;
372
372
  }
373
+ /**
374
+ * Nettstatus, injisert av verten — som lagring og identitet. Kjernen har ingen egen
375
+ * kilde: `navigator.onLine` finnes ikke i React Native, og en peer-avhengighet for
376
+ * å lese nettet er ikke SDK-ets (K19). Uten den vet widgeten om nettet først når et
377
+ * kall feiler; køen virker likevel (DD-41). Med den vises «Ingen nett» FØR trykket,
378
+ * Send heter «Lagre — sendes når du er på nett», og køen tømmes når nettet kommer
379
+ * tilbake. Se docs/sdk/README.md, «Nettstatus».
380
+ */
381
+ interface Connectivity {
382
+ /** `true` når verten mener det er nett. Kalles ved åpning og etter hver endring. */
383
+ isOnline(): boolean;
384
+ /** Varsler ved endring, og gir en avmelding tilbake. Valgfri: uten den leses `isOnline` ved åpning. */
385
+ subscribe?(listener: (online: boolean) => void): () => void;
386
+ }
373
387
  /** Tekstgrensen per leietaker. Lukket valg — kontrakten har to verdier. */
374
388
  type TextMaxLength = 140 | 280;
375
389
  interface InnspelOptions {
@@ -405,6 +419,8 @@ interface InnspelOptions {
405
419
  screenshotsEnabled?: boolean;
406
420
  /** Standard er `noop`. */
407
421
  telemetry?: Telemetry;
422
+ /** Nettstatus fra verten. Uten den: køen som før, ingen melding før et kall feiler. */
423
+ connectivity?: Connectivity;
408
424
  /** Injiserbar `fetch`, for test og for verter med egen nettverksstakk. */
409
425
  fetch?: typeof fetch;
410
426
  /** Tidsavbrudd per kall i millisekunder. Standard 10 000 (wireframe 2i). */
@@ -557,4 +573,4 @@ interface OpenFeedbackOptions {
557
573
  track?: 'feil' | 'onske';
558
574
  }
559
575
 
560
- export type { AttachmentInput as A, ProgramsTask as B, ContextInput as C, ProgramsProgramView as D, SubmissionsReasonCode as E, FlushResult as F, SubmissionsReplyView as G, SubmissionsStatusType as H, InnspelOptions as I, SubmissionsSubmissionStatus as J, KnownIssueQuery as K, SubmissionsSubmissionType as L, MySubmission as M, ProgramsTaskOutcome as N, OpenFeedbackOptions as O, ProgramsMyPrograms as P, QueuedSubmission as Q, ResolvedSettings as R, SubmissionsSubmissionStatusView as S, TelemetryEvent as T, Telemetry as U, TextMaxLength as V, TelemetryTelemetryBatch as W, CaptureInput as a, CaptureResult as b, KnownIssuesKnownIssueCard as c, ProgramsParticipationView as d, ProgramsTaskCompletionCreate as e, ProgramsTaskCompletionView as f, ProgramsFollowUpResponseCreate as g, SubmissionsAttachmentView as h, PatternFinding as i, Presenter as j, CommonErrorCode as k, SubmissionsAttachmentMime as l, AttachmentBody as m, AttachmentOutcome as n, CaptureFeil as o, CaptureOnske as p, CommonCorrelation as q, ProgramsFollowUpKind as r, ProgramsFollowUpView as s, IdentityProvider as t, InnspelStorage as u, ProgramsInvitationView as v, SubmissionsKnownIssueRef as w, KnownIssuesKnownIssueStatus as x, PatternKind as y, CommonPlatform as z };
576
+ export type { AttachmentInput as A, CommonPlatform as B, Connectivity as C, ProgramsTask as D, ProgramsProgramView as E, FlushResult as F, SubmissionsReasonCode as G, SubmissionsReplyView as H, InnspelOptions as I, SubmissionsStatusType as J, KnownIssueQuery as K, SubmissionsSubmissionStatus as L, MySubmission as M, SubmissionsSubmissionType as N, OpenFeedbackOptions as O, ProgramsMyPrograms as P, QueuedSubmission as Q, ResolvedSettings as R, SubmissionsSubmissionStatusView as S, TelemetryEvent as T, ProgramsTaskOutcome as U, Telemetry as V, TextMaxLength as W, TelemetryTelemetryBatch as X, ContextInput as a, CaptureInput as b, CaptureResult as c, KnownIssuesKnownIssueCard as d, ProgramsParticipationView as e, ProgramsTaskCompletionCreate as f, ProgramsTaskCompletionView as g, ProgramsFollowUpResponseCreate as h, SubmissionsAttachmentView as i, PatternFinding as j, Presenter as k, CommonErrorCode as l, SubmissionsAttachmentMime as m, AttachmentBody as n, AttachmentOutcome as o, CaptureFeil as p, CaptureOnske as q, CommonCorrelation as r, ProgramsFollowUpKind as s, ProgramsFollowUpView as t, IdentityProvider as u, InnspelStorage as v, ProgramsInvitationView as w, SubmissionsKnownIssueRef as x, KnownIssuesKnownIssueStatus as y, PatternKind as z };
@@ -370,6 +370,20 @@ type TelemetryEvent = {
370
370
  interface Telemetry {
371
371
  emit(event: TelemetryEvent): void;
372
372
  }
373
+ /**
374
+ * Nettstatus, injisert av verten — som lagring og identitet. Kjernen har ingen egen
375
+ * kilde: `navigator.onLine` finnes ikke i React Native, og en peer-avhengighet for
376
+ * å lese nettet er ikke SDK-ets (K19). Uten den vet widgeten om nettet først når et
377
+ * kall feiler; køen virker likevel (DD-41). Med den vises «Ingen nett» FØR trykket,
378
+ * Send heter «Lagre — sendes når du er på nett», og køen tømmes når nettet kommer
379
+ * tilbake. Se docs/sdk/README.md, «Nettstatus».
380
+ */
381
+ interface Connectivity {
382
+ /** `true` når verten mener det er nett. Kalles ved åpning og etter hver endring. */
383
+ isOnline(): boolean;
384
+ /** Varsler ved endring, og gir en avmelding tilbake. Valgfri: uten den leses `isOnline` ved åpning. */
385
+ subscribe?(listener: (online: boolean) => void): () => void;
386
+ }
373
387
  /** Tekstgrensen per leietaker. Lukket valg — kontrakten har to verdier. */
374
388
  type TextMaxLength = 140 | 280;
375
389
  interface InnspelOptions {
@@ -405,6 +419,8 @@ interface InnspelOptions {
405
419
  screenshotsEnabled?: boolean;
406
420
  /** Standard er `noop`. */
407
421
  telemetry?: Telemetry;
422
+ /** Nettstatus fra verten. Uten den: køen som før, ingen melding før et kall feiler. */
423
+ connectivity?: Connectivity;
408
424
  /** Injiserbar `fetch`, for test og for verter med egen nettverksstakk. */
409
425
  fetch?: typeof fetch;
410
426
  /** Tidsavbrudd per kall i millisekunder. Standard 10 000 (wireframe 2i). */
@@ -557,4 +573,4 @@ interface OpenFeedbackOptions {
557
573
  track?: 'feil' | 'onske';
558
574
  }
559
575
 
560
- export type { AttachmentInput as A, ProgramsTask as B, ContextInput as C, ProgramsProgramView as D, SubmissionsReasonCode as E, FlushResult as F, SubmissionsReplyView as G, SubmissionsStatusType as H, InnspelOptions as I, SubmissionsSubmissionStatus as J, KnownIssueQuery as K, SubmissionsSubmissionType as L, MySubmission as M, ProgramsTaskOutcome as N, OpenFeedbackOptions as O, ProgramsMyPrograms as P, QueuedSubmission as Q, ResolvedSettings as R, SubmissionsSubmissionStatusView as S, TelemetryEvent as T, Telemetry as U, TextMaxLength as V, TelemetryTelemetryBatch as W, CaptureInput as a, CaptureResult as b, KnownIssuesKnownIssueCard as c, ProgramsParticipationView as d, ProgramsTaskCompletionCreate as e, ProgramsTaskCompletionView as f, ProgramsFollowUpResponseCreate as g, SubmissionsAttachmentView as h, PatternFinding as i, Presenter as j, CommonErrorCode as k, SubmissionsAttachmentMime as l, AttachmentBody as m, AttachmentOutcome as n, CaptureFeil as o, CaptureOnske as p, CommonCorrelation as q, ProgramsFollowUpKind as r, ProgramsFollowUpView as s, IdentityProvider as t, InnspelStorage as u, ProgramsInvitationView as v, SubmissionsKnownIssueRef as w, KnownIssuesKnownIssueStatus as x, PatternKind as y, CommonPlatform as z };
576
+ export type { AttachmentInput as A, CommonPlatform as B, Connectivity as C, ProgramsTask as D, ProgramsProgramView as E, FlushResult as F, SubmissionsReasonCode as G, SubmissionsReplyView as H, InnspelOptions as I, SubmissionsStatusType as J, KnownIssueQuery as K, SubmissionsSubmissionStatus as L, MySubmission as M, SubmissionsSubmissionType as N, OpenFeedbackOptions as O, ProgramsMyPrograms as P, QueuedSubmission as Q, ResolvedSettings as R, SubmissionsSubmissionStatusView as S, TelemetryEvent as T, ProgramsTaskOutcome as U, Telemetry as V, TextMaxLength as W, TelemetryTelemetryBatch as X, ContextInput as a, CaptureInput as b, CaptureResult as c, KnownIssuesKnownIssueCard as d, ProgramsParticipationView as e, ProgramsTaskCompletionCreate as f, ProgramsTaskCompletionView as g, ProgramsFollowUpResponseCreate as h, SubmissionsAttachmentView as i, PatternFinding as j, Presenter as k, CommonErrorCode as l, SubmissionsAttachmentMime as m, AttachmentBody as n, AttachmentOutcome as o, CaptureFeil as p, CaptureOnske as q, CommonCorrelation as r, ProgramsFollowUpKind as s, ProgramsFollowUpView as t, IdentityProvider as u, InnspelStorage as v, ProgramsInvitationView as w, SubmissionsKnownIssueRef as x, KnownIssuesKnownIssueStatus as y, PatternKind as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innspel/core",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Kjernen i Innspels SDK: innsending, kjente feil, offline-kø og mønstervarsel. Ren TypeScript uten runtime-avhengigheter.",
5
5
  "license": "MIT",
6
6
  "type": "module",