@depup/sanity 5.17.1-depup.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/LICENSE +21 -0
- package/README.md +57 -0
- package/bin/sanity +209 -0
- package/changes.json +114 -0
- package/lib/_chunks-dts/ActiveWorkspaceMatcherContext.d.ts +16164 -0
- package/lib/_chunks-dts/index.d.ts +780 -0
- package/lib/_chunks-dts/types.d.ts +2765 -0
- package/lib/_chunks-dts/types2.d.ts +656 -0
- package/lib/_chunks-dts/types3.d.ts +303 -0
- package/lib/_chunks-es/BroadcastDisplayedDocument.js +20 -0
- package/lib/_chunks-es/BroadcastDisplayedDocument.js.map +1 -0
- package/lib/_chunks-es/DisplayedDocumentBroadcaster.js +32 -0
- package/lib/_chunks-es/DisplayedDocumentBroadcaster.js.map +1 -0
- package/lib/_chunks-es/LiveQueries.js +339 -0
- package/lib/_chunks-es/LiveQueries.js.map +1 -0
- package/lib/_chunks-es/MenuGroup.js +106 -0
- package/lib/_chunks-es/MenuGroup.js.map +1 -0
- package/lib/_chunks-es/PostMessageDocuments.js +72 -0
- package/lib/_chunks-es/PostMessageDocuments.js.map +1 -0
- package/lib/_chunks-es/PostMessagePerspective.js +23 -0
- package/lib/_chunks-es/PostMessagePerspective.js.map +1 -0
- package/lib/_chunks-es/PostMessagePreviewSnapshots.js +69 -0
- package/lib/_chunks-es/PostMessagePreviewSnapshots.js.map +1 -0
- package/lib/_chunks-es/PostMessageRefreshMutations.js +74 -0
- package/lib/_chunks-es/PostMessageRefreshMutations.js.map +1 -0
- package/lib/_chunks-es/PostMessageSchema.js +502 -0
- package/lib/_chunks-es/PostMessageSchema.js.map +1 -0
- package/lib/_chunks-es/PostMessageTelemetry.js +21 -0
- package/lib/_chunks-es/PostMessageTelemetry.js.map +1 -0
- package/lib/_chunks-es/PresentationToolGrantsCheck.js +3848 -0
- package/lib/_chunks-es/PresentationToolGrantsCheck.js.map +1 -0
- package/lib/_chunks-es/QRCodeSVG.js +692 -0
- package/lib/_chunks-es/QRCodeSVG.js.map +1 -0
- package/lib/_chunks-es/StructureToolProvider.js +2360 -0
- package/lib/_chunks-es/StructureToolProvider.js.map +1 -0
- package/lib/_chunks-es/VideoPlayer.js +22 -0
- package/lib/_chunks-es/VideoPlayer.js.map +1 -0
- package/lib/_chunks-es/ViteDevServerStopped.js +52 -0
- package/lib/_chunks-es/ViteDevServerStopped.js.map +1 -0
- package/lib/_chunks-es/index.js +285 -0
- package/lib/_chunks-es/index.js.map +1 -0
- package/lib/_chunks-es/index2.js +105 -0
- package/lib/_chunks-es/index2.js.map +1 -0
- package/lib/_chunks-es/index3.js +139 -0
- package/lib/_chunks-es/index3.js.map +1 -0
- package/lib/_chunks-es/index4.js +1020 -0
- package/lib/_chunks-es/index4.js.map +1 -0
- package/lib/_chunks-es/pane.js +5 -0
- package/lib/_chunks-es/pane.js.map +1 -0
- package/lib/_chunks-es/pane2.js +5 -0
- package/lib/_chunks-es/pane2.js.map +1 -0
- package/lib/_chunks-es/presentation.js +549 -0
- package/lib/_chunks-es/presentation.js.map +1 -0
- package/lib/_chunks-es/resources.js +303 -0
- package/lib/_chunks-es/resources.js.map +1 -0
- package/lib/_chunks-es/resources2.js +459 -0
- package/lib/_chunks-es/resources2.js.map +1 -0
- package/lib/_chunks-es/resources3.js +281 -0
- package/lib/_chunks-es/resources3.js.map +1 -0
- package/lib/_chunks-es/resources4.js +184 -0
- package/lib/_chunks-es/resources4.js.map +1 -0
- package/lib/_chunks-es/resources5.js +161 -0
- package/lib/_chunks-es/resources5.js.map +1 -0
- package/lib/_chunks-es/resources6.js +141 -0
- package/lib/_chunks-es/resources6.js.map +1 -0
- package/lib/_chunks-es/resources7.js +24 -0
- package/lib/_chunks-es/resources7.js.map +1 -0
- package/lib/_chunks-es/resources8.js +603 -0
- package/lib/_chunks-es/resources8.js.map +1 -0
- package/lib/_chunks-es/resources9.js +126 -0
- package/lib/_chunks-es/resources9.js.map +1 -0
- package/lib/_chunks-es/structureTool.js +13673 -0
- package/lib/_chunks-es/structureTool.js.map +1 -0
- package/lib/_chunks-es/version.js +17 -0
- package/lib/_chunks-es/version.js.map +1 -0
- package/lib/_createContext.d.ts +12 -0
- package/lib/_createContext.js +38 -0
- package/lib/_createContext.js.map +1 -0
- package/lib/_internal.d.ts +9 -0
- package/lib/_internal.js +12 -0
- package/lib/_internal.js.map +1 -0
- package/lib/_singletons.d.ts +951 -0
- package/lib/_singletons.js +284 -0
- package/lib/_singletons.js.map +1 -0
- package/lib/cli.d.ts +3 -0
- package/lib/cli.js +9 -0
- package/lib/cli.js.map +1 -0
- package/lib/desk.d.ts +910 -0
- package/lib/desk.js +71 -0
- package/lib/desk.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +92934 -0
- package/lib/index.js.map +1 -0
- package/lib/media-library.d.ts +85 -0
- package/lib/media-library.js +11 -0
- package/lib/media-library.js.map +1 -0
- package/lib/migrate.d.ts +1 -0
- package/lib/migrate.js +2 -0
- package/lib/migrate.js.map +1 -0
- package/lib/presentation.d.ts +28 -0
- package/lib/presentation.js +10 -0
- package/lib/presentation.js.map +1 -0
- package/lib/router.d.ts +560 -0
- package/lib/router.js +777 -0
- package/lib/router.js.map +1 -0
- package/lib/structure.d.ts +3 -0
- package/lib/structure.js +639 -0
- package/lib/structure.js.map +1 -0
- package/mock-browser-env-stub-loader.mjs +27 -0
- package/package.json +383 -0
- package/static/favicons/apple-touch-icon.png +0 -0
- package/static/favicons/favicon-192.png +0 -0
- package/static/favicons/favicon-512.png +0 -0
- package/static/favicons/favicon-96.png +0 -0
- package/static/favicons/favicon.ico +0 -0
- package/static/favicons/favicon.svg +12 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as _sanity_types0 from "@sanity/types";
|
|
2
|
+
import { AssetSource, FieldDefinitionBase, InitialValueProperty, ObjectDefinition, ObjectOptions, ObjectSchemaType, Reference, RuleDef, ValidationBuilder } from "@sanity/types";
|
|
3
|
+
/** @public */
|
|
4
|
+
interface VideoOptions extends ObjectOptions {
|
|
5
|
+
accept?: string;
|
|
6
|
+
sources?: AssetSource[];
|
|
7
|
+
}
|
|
8
|
+
/** @public */
|
|
9
|
+
interface VideoRule extends RuleDef<VideoRule, VideoValue> {
|
|
10
|
+
/**
|
|
11
|
+
* Require a file field has an asset.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* defineField({
|
|
16
|
+
* name: 'video',
|
|
17
|
+
* title: 'Video',
|
|
18
|
+
* type: 'sanity.video',
|
|
19
|
+
* validation: (Rule) => Rule.required().assetRequired(),
|
|
20
|
+
* })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
assetRequired(): VideoRule;
|
|
24
|
+
}
|
|
25
|
+
/** @public */
|
|
26
|
+
interface VideoValue {
|
|
27
|
+
asset?: Reference;
|
|
28
|
+
media?: Reference;
|
|
29
|
+
[index: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
/** @public */
|
|
32
|
+
interface VideoDefinition$1 extends Omit<ObjectDefinition, 'type' | 'fields' | 'options' | 'groups' | 'validation'> {
|
|
33
|
+
type: 'sanity.video';
|
|
34
|
+
fields?: ObjectDefinition['fields'];
|
|
35
|
+
options?: VideoOptions;
|
|
36
|
+
validation?: ValidationBuilder<VideoRule, VideoValue>;
|
|
37
|
+
initialValue?: InitialValueProperty<any, VideoValue>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
* @beta
|
|
42
|
+
*/
|
|
43
|
+
declare const videoTypeName: "sanity.video";
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
* @beta
|
|
47
|
+
*/
|
|
48
|
+
interface VideoDefinition extends Omit<ObjectDefinition, 'type' | 'fields' | 'options'> {
|
|
49
|
+
type: typeof videoTypeName;
|
|
50
|
+
options?: VideoOptions;
|
|
51
|
+
}
|
|
52
|
+
declare module '@sanity/types' {
|
|
53
|
+
interface IntrinsicDefinitions {
|
|
54
|
+
'sanity.video': VideoDefinition;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Define a video field within a document, object, image or file definition `fields` array.
|
|
59
|
+
*
|
|
60
|
+
* This function will narrow the schema type down to video fields and options based on the provided
|
|
61
|
+
* type-string.
|
|
62
|
+
*
|
|
63
|
+
* Using `defineVideoField` is optional, but should provide improved autocompletion in your IDE, when building your schema.
|
|
64
|
+
* Video field-properties like `validation` and `initialValue` will also be more specific.
|
|
65
|
+
*
|
|
66
|
+
* Note: This video field type is designed to work specifically with the Media Library asset source.
|
|
67
|
+
* Make sure you have the Media Library is enabled in your studio via sanity.config.ts.
|
|
68
|
+
*
|
|
69
|
+
* See {@link defineType} for similar examples.
|
|
70
|
+
*
|
|
71
|
+
* @param definition - should be a valid video field type definition.
|
|
72
|
+
*
|
|
73
|
+
* @see defineField
|
|
74
|
+
* @see defineArrayMember
|
|
75
|
+
* @see typed
|
|
76
|
+
*
|
|
77
|
+
* @beta
|
|
78
|
+
*/
|
|
79
|
+
declare function defineVideoField(definition: Omit<VideoDefinition$1, 'type'> & FieldDefinitionBase): {
|
|
80
|
+
type: "sanity.video";
|
|
81
|
+
name: string;
|
|
82
|
+
} & Omit<VideoDefinition, "preview"> & {
|
|
83
|
+
preview?: _sanity_types0.PreviewConfig<Record<string, string>, Record<string, any>> | undefined;
|
|
84
|
+
} & FieldDefinitionBase & _sanity_types0.WidenValidation & _sanity_types0.WidenInitialValue;
|
|
85
|
+
export { defineVideoField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-library.js","sources":["../src/media-library/plugin/schemas/defineVideoField.ts"],"sourcesContent":["import {defineField, type FieldDefinitionBase} from '@sanity/types'\n\nimport {type VideoDefinition} from './types'\n\n/**\n * Define a video field within a document, object, image or file definition `fields` array.\n *\n * This function will narrow the schema type down to video fields and options based on the provided\n * type-string.\n *\n * Using `defineVideoField` is optional, but should provide improved autocompletion in your IDE, when building your schema.\n * Video field-properties like `validation` and `initialValue` will also be more specific.\n *\n * Note: This video field type is designed to work specifically with the Media Library asset source.\n * Make sure you have the Media Library is enabled in your studio via sanity.config.ts.\n *\n * See {@link defineType} for similar examples.\n *\n * @param definition - should be a valid video field type definition.\n *\n * @see defineField\n * @see defineArrayMember\n * @see typed\n *\n * @beta\n */\nexport function defineVideoField(definition: Omit<VideoDefinition, 'type'> & FieldDefinitionBase) {\n // @ts-expect-error FIXME\n return defineField({\n ...definition,\n type: 'sanity.video',\n })\n}\n"],"names":["defineVideoField","definition","defineField","type"],"mappings":";AA0BO,SAASA,iBAAiBC,YAAiE;AAEhG,SAAOC,YAAY;AAAA,IACjB,GAAGD;AAAAA,IACHE,MAAM;AAAA,EAAA,CACP;AACH;"}
|
package/lib/migrate.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@sanity/migrate";
|
package/lib/migrate.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { C as PreviewUrlResolver, D as PreviewProps, E as PreviewHeaderProps, S as PreviewUrlOption, T as StructureDocumentPaneParams, _ as PresentationPerspective, a as DocumentLocationResolver, b as PresentationStateParams, c as DocumentLocationsState, d as HeaderOptions, f as InspectorTab, g as PresentationParamsContextValue, h as PresentationNavigateContextValue, i as DocumentLocation, l as DocumentResolver, n as ConnectionStatus, o as DocumentLocationResolverObject, p as NavigatorOptions, r as ContextFn, s as DocumentLocationResolvers, t as CombinedSearchParams, u as DocumentResolverContext, v as PresentationPluginOptions, w as PreviewUrlResolverOptions, x as PresentationViewport, y as PresentationSearchParams } from "./_chunks-dts/types2.js";
|
|
2
|
+
import * as sanity from "sanity";
|
|
3
|
+
import { Serializable, Serializable as Serializable$1, SerializableArray, SerializableObject, SerializablePrimitive } from "@sanity/presentation-comlink";
|
|
4
|
+
/** @public */
|
|
5
|
+
declare const useSharedState: (key: string, value: Serializable$1) => undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Define locations for a given document type.
|
|
8
|
+
* This function doesn't do anything itself, it is used to provide type information.
|
|
9
|
+
* @param resolver - resolver that return locations for a document.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
declare function defineLocations<K extends string>(resolver: DocumentLocationResolverObject<K> | DocumentLocationsState): typeof resolver;
|
|
13
|
+
/**
|
|
14
|
+
* Define documents for a given location.
|
|
15
|
+
* This function doesn't do anything itself, it is used to provide type information.
|
|
16
|
+
* @param resolvers - resolvers that return documents.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
declare function defineDocuments(resolvers: DocumentResolver[]): typeof resolvers;
|
|
20
|
+
/** @public */
|
|
21
|
+
declare const presentationTool: sanity.Plugin<PresentationPluginOptions>;
|
|
22
|
+
/** @public */
|
|
23
|
+
declare function usePresentationNavigate(): PresentationNavigateContextValue;
|
|
24
|
+
/** @public */
|
|
25
|
+
declare function usePresentationParams(throwOnMissingContext?: true): PresentationParamsContextValue;
|
|
26
|
+
/** @public */
|
|
27
|
+
declare function usePresentationParams(throwOnMissingContext: false): PresentationParamsContextValue | null;
|
|
28
|
+
export { type CombinedSearchParams, type ConnectionStatus, type ContextFn, type DocumentLocation, type DocumentLocationResolver, type DocumentLocationResolverObject, type DocumentLocationResolvers, type DocumentLocationsState, type DocumentResolver, type DocumentResolverContext, type HeaderOptions, type InspectorTab, type NavigatorOptions, type PresentationNavigateContextValue, type PresentationParamsContextValue as PresentationParams, type PresentationPerspective, type PresentationPluginOptions, type PresentationSearchParams, type PresentationStateParams, type PresentationViewport, type PreviewHeaderProps, type PreviewProps, type PreviewUrlOption, type PreviewUrlResolver, type PreviewUrlResolverOptions, type Serializable, type SerializableArray, type SerializableObject, type SerializablePrimitive, type StructureDocumentPaneParams, defineDocuments, defineLocations, presentationTool, usePresentationNavigate, usePresentationParams, useSharedState };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineDocuments, defineLocations, presentationTool, usePresentationNavigate, usePresentationParams, useSharedState } from "./_chunks-es/presentation.js";
|
|
2
|
+
export {
|
|
3
|
+
defineDocuments,
|
|
4
|
+
defineLocations,
|
|
5
|
+
presentationTool,
|
|
6
|
+
usePresentationNavigate,
|
|
7
|
+
usePresentationParams,
|
|
8
|
+
useSharedState
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=presentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|