@nitida/sdk 0.25.3 → 0.27.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.
- package/AGENTS.md +96 -0
- package/README.md +211 -17
- package/dist/expo.d.ts +32 -3
- package/dist/expo.js.map +1 -1
- package/dist/index.d.ts +84 -13
- package/dist/index.js +56 -8
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +79 -8
- package/dist/server.js.map +1 -1
- package/dist/web.d.ts +2 -2
- package/dist/web.js +81 -8
- package/dist/web.js.map +1 -1
- package/package.json +3 -7
- package/skills/nitida-sdk/SKILL.md +102 -9
- package/src/audio-compat.ts +37 -0
- package/src/expo/index.ts +32 -3
- package/src/index.ts +75 -14
- package/src/server/index.ts +54 -1
- package/src/web/index.ts +66 -3
package/src/web/index.ts
CHANGED
|
@@ -88,44 +88,107 @@ export class NitidaClient extends BaseNitidaClient {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
// This subpath MIRRORS THE ROOT — which is what the sentence that used to sit
|
|
93
|
+
// here already promised: "browser consumers can satisfy 100% of their needs
|
|
94
|
+
// through this single subpath". Measured on 2026-08-21, it did not: this list
|
|
95
|
+
// was short by 37 of the root's 72, including every palette helper, every slot
|
|
96
|
+
// helper, the HLS ladder helpers, the preset constants and `setTenantId` —
|
|
97
|
+
// without which a browser app cannot build a video URL at all.
|
|
98
|
+
//
|
|
99
|
+
// ONE deliberate omission, and it is enforced as such rather than left to
|
|
100
|
+
// memory: `NitidaClientOptions`. That is the root options type and it CARRIES
|
|
101
|
+
// `apiKey`. The entire point of this subpath is that the apiKey-bearing shape
|
|
102
|
+
// is unreachable from browser code; `WebClientOptions` above is the one to
|
|
103
|
+
// use. Exporting the other from here is a mixed message even though the
|
|
104
|
+
// constructor would still reject it.
|
|
105
|
+
//
|
|
106
|
+
// The mirror and that single denial are both ASSERTED by
|
|
107
|
+
// scripts/check-published-doc-symbols.ts. Adding a new omission means adding a
|
|
108
|
+
// written reason there, or the build fails.
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
94
110
|
export {
|
|
95
111
|
type AssetDTO,
|
|
112
|
+
type AssetPalette,
|
|
96
113
|
type AssetVariant,
|
|
114
|
+
accessMessage,
|
|
115
|
+
assertPublic,
|
|
116
|
+
bestTextContrast,
|
|
117
|
+
type ComposeMarketingComposition,
|
|
118
|
+
type ComposeMarketingOptions,
|
|
119
|
+
type ComposeMarketingResult,
|
|
120
|
+
type ComposeMarketingSegment,
|
|
97
121
|
type CompressOptions as ClientCompressOptions,
|
|
98
122
|
computeVariantDimensions,
|
|
123
|
+
configureSlotResolver,
|
|
124
|
+
contrastRatio,
|
|
125
|
+
deriveAccessKey,
|
|
99
126
|
extractAssetSha,
|
|
127
|
+
getAmbientGradient,
|
|
100
128
|
getAssetDimensions,
|
|
101
129
|
getAssetSrcSet,
|
|
102
130
|
getAssetUrl,
|
|
131
|
+
getCdnBase,
|
|
132
|
+
getHlsLadder,
|
|
103
133
|
getHlsStreamingUrl,
|
|
134
|
+
getPaletteBlurBackground,
|
|
135
|
+
getPaletteCssVars,
|
|
136
|
+
getPrivateAssetUrl,
|
|
137
|
+
getPrivateTransformUrl,
|
|
104
138
|
getSignedTransformUrl,
|
|
139
|
+
getTenantId,
|
|
140
|
+
getTextColorForBackground,
|
|
105
141
|
getTransformSrcSet,
|
|
106
142
|
getTransformUrl,
|
|
107
143
|
getVideoTransformUrl,
|
|
144
|
+
type HlsRung,
|
|
108
145
|
hasPreset,
|
|
146
|
+
hlsLadderAlignment,
|
|
147
|
+
invalidateSlotCache,
|
|
148
|
+
isUniversallyPlayableAudio,
|
|
149
|
+
iteratePaletteSwatches,
|
|
150
|
+
mimeFromFileName,
|
|
151
|
+
type PaletteSwatch,
|
|
152
|
+
PRESET_EXT,
|
|
153
|
+
PRESET_LONG,
|
|
154
|
+
PRESET_MAX_DIM,
|
|
155
|
+
PRESET_SHORT,
|
|
156
|
+
type PresignUploadUrlOptions,
|
|
157
|
+
pickAmbientBackground,
|
|
109
158
|
type RegenerateResult,
|
|
159
|
+
type RequestablePreset,
|
|
110
160
|
type ResolveSlotOptions,
|
|
161
|
+
relativeLuminance,
|
|
162
|
+
resolveSlot,
|
|
163
|
+
resolveSlots,
|
|
164
|
+
type SignAccessOptions,
|
|
111
165
|
type SignedTransformOptions,
|
|
112
166
|
type SlotDTO,
|
|
113
167
|
type SlotHistoryEntry,
|
|
114
168
|
type SlotResolution,
|
|
115
169
|
serializeTransform,
|
|
170
|
+
setCdnBase,
|
|
171
|
+
setTenantId,
|
|
172
|
+
signAccessUrl,
|
|
116
173
|
signTransformUrl,
|
|
174
|
+
TRANSFORM_WIDTHS,
|
|
117
175
|
type TransformEffect,
|
|
118
176
|
type TransformFit,
|
|
119
177
|
type TransformFormat,
|
|
120
178
|
type TransformGravity,
|
|
121
179
|
type TransformOptions,
|
|
180
|
+
type TransformWidth,
|
|
122
181
|
type UploadOptions,
|
|
123
182
|
type UploadResult,
|
|
183
|
+
type UploadUrlResult,
|
|
184
|
+
type UploadVideoOptions,
|
|
124
185
|
type UsageDailyPoint,
|
|
125
186
|
type UsagePerKey,
|
|
126
187
|
type UsageSnapshot,
|
|
127
188
|
type UsageWindow,
|
|
189
|
+
type VariantEntryPreset,
|
|
128
190
|
type VariantPreset,
|
|
191
|
+
type VisibilityHint,
|
|
129
192
|
} from "..";
|
|
130
193
|
|
|
131
194
|
// Multipart uploader helpers are NOT re-exported from this subpath.
|