@upnextapp/plugin-sdk 1.0.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.
@@ -0,0 +1,5 @@
1
+ export type { ReminderStatus, ScheduledReminder, RecurrenceType, ResponsibilityDef, AppSettings, StoreSchema } from './types';
2
+ export type { PageRegistration, WindowRegistration, WindowHandle, ReminderTypeRegistration, PluginInfo, DrawerUrgencyLevel } from './plugin-types';
3
+ export type { PluginContext } from './plugin-context';
4
+ export { validatePluginManifest, pluginManifestSchema } from './manifest';
5
+ export type { PluginManifest } from './manifest';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { validatePluginManifest, pluginManifestSchema } from './manifest';
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ export declare const pluginManifestSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ version: z.ZodString;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ author: z.ZodOptional<z.ZodString>;
8
+ icon: z.ZodOptional<z.ZodString>;
9
+ color: z.ZodOptional<z.ZodString>;
10
+ minPlatformVersion: z.ZodOptional<z.ZodString>;
11
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
12
+ client: z.ZodObject<{
13
+ entry: z.ZodString;
14
+ pages: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ label: z.ZodString;
17
+ icon: z.ZodString;
18
+ }, z.core.$strip>>>;
19
+ windows: z.ZodDefault<z.ZodArray<z.ZodObject<{
20
+ id: z.ZodString;
21
+ size: z.ZodObject<{
22
+ width: z.ZodNumber;
23
+ height: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"full">]>;
24
+ }, z.core.$strip>;
25
+ position: z.ZodOptional<z.ZodEnum<{
26
+ center: "center";
27
+ "right-edge": "right-edge";
28
+ "left-edge": "left-edge";
29
+ }>>;
30
+ frameless: z.ZodOptional<z.ZodBoolean>;
31
+ alwaysOnTop: z.ZodOptional<z.ZodBoolean>;
32
+ persistent: z.ZodOptional<z.ZodBoolean>;
33
+ skipTaskbar: z.ZodOptional<z.ZodBoolean>;
34
+ }, z.core.$strip>>>;
35
+ reminderTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
36
+ settingsPanel: z.ZodOptional<z.ZodBoolean>;
37
+ componentMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
38
+ }, z.core.$strip>;
39
+ server: z.ZodOptional<z.ZodObject<{
40
+ entry: z.ZodString;
41
+ routes: z.ZodDefault<z.ZodArray<z.ZodAny>>;
42
+ webhooks: z.ZodDefault<z.ZodArray<z.ZodAny>>;
43
+ cronJobs: z.ZodDefault<z.ZodArray<z.ZodAny>>;
44
+ tables: z.ZodDefault<z.ZodArray<z.ZodString>>;
45
+ env: z.ZodDefault<z.ZodArray<z.ZodString>>;
46
+ }, z.core.$strip>>;
47
+ }, z.core.$strip>;
48
+ export type PluginManifest = z.infer<typeof pluginManifestSchema>;
49
+ export declare function validatePluginManifest(data: unknown): z.ZodSafeParseResult<{
50
+ id: string;
51
+ name: string;
52
+ version: string;
53
+ capabilities: string[];
54
+ client: {
55
+ entry: string;
56
+ pages: {
57
+ id: string;
58
+ label: string;
59
+ icon: string;
60
+ }[];
61
+ windows: {
62
+ id: string;
63
+ size: {
64
+ width: number;
65
+ height: number | "full";
66
+ };
67
+ position?: "center" | "right-edge" | "left-edge" | undefined;
68
+ frameless?: boolean | undefined;
69
+ alwaysOnTop?: boolean | undefined;
70
+ persistent?: boolean | undefined;
71
+ skipTaskbar?: boolean | undefined;
72
+ }[];
73
+ reminderTypes: string[];
74
+ settingsPanel?: boolean | undefined;
75
+ componentMap?: Record<string, string> | undefined;
76
+ };
77
+ description?: string | undefined;
78
+ author?: string | undefined;
79
+ icon?: string | undefined;
80
+ color?: string | undefined;
81
+ minPlatformVersion?: string | undefined;
82
+ server?: {
83
+ entry: string;
84
+ routes: any[];
85
+ webhooks: any[];
86
+ cronJobs: any[];
87
+ tables: string[];
88
+ env: string[];
89
+ } | undefined;
90
+ }>;
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ const windowConfigSchema = z.object({
3
+ id: z.string().min(1),
4
+ size: z.object({
5
+ width: z.number().positive(),
6
+ height: z.union([z.number().positive(), z.literal('full')]),
7
+ }),
8
+ position: z.enum(['center', 'right-edge', 'left-edge']).optional(),
9
+ frameless: z.boolean().optional(),
10
+ alwaysOnTop: z.boolean().optional(),
11
+ persistent: z.boolean().optional(),
12
+ skipTaskbar: z.boolean().optional(),
13
+ });
14
+ const pageConfigSchema = z.object({
15
+ id: z.string().min(1),
16
+ label: z.string(),
17
+ icon: z.string(),
18
+ });
19
+ export const pluginManifestSchema = z.object({
20
+ id: z.string().min(1).refine(id => !id.startsWith('__'), 'Plugin IDs cannot start with __'),
21
+ name: z.string().min(1),
22
+ version: z.string().regex(/^\d+\.\d+\.\d+$/),
23
+ description: z.string().optional(),
24
+ author: z.string().optional(),
25
+ icon: z.string().optional(),
26
+ color: z.string().optional(),
27
+ minPlatformVersion: z.string().optional(),
28
+ capabilities: z.array(z.string()).default([]),
29
+ client: z.object({
30
+ entry: z.string().min(1).refine(e => !e.includes('..') && !e.startsWith('/'), {
31
+ message: 'Entry path must not contain ".." or start with "/"',
32
+ }),
33
+ pages: z.array(pageConfigSchema).default([]),
34
+ windows: z.array(windowConfigSchema).default([]),
35
+ reminderTypes: z.array(z.string()).default([]),
36
+ settingsPanel: z.boolean().optional(),
37
+ componentMap: z.record(z.string().regex(/^(pages|windows|edit|css):[a-zA-Z0-9_-]+$/, 'componentMap keys must follow pattern "category:id" where category is pages, windows, edit, or css'), z.string().min(1).refine(e => !e.includes('..') && !e.startsWith('/'), {
38
+ message: 'Path must not contain ".." or start with "/"',
39
+ })).optional(),
40
+ }),
41
+ server: z
42
+ .object({
43
+ entry: z.string().min(1).refine(e => !e.includes('..') && !e.startsWith('/'), {
44
+ message: 'Entry path must not contain ".." or start with "/"',
45
+ }),
46
+ routes: z.array(z.any()).default([]),
47
+ webhooks: z.array(z.any()).default([]),
48
+ cronJobs: z.array(z.any()).default([]),
49
+ tables: z.array(z.string()).default([]),
50
+ env: z.array(z.string()).default([]),
51
+ })
52
+ .optional(),
53
+ });
54
+ export function validatePluginManifest(data) {
55
+ return pluginManifestSchema.safeParse(data);
56
+ }
@@ -0,0 +1,14 @@
1
+ import type { PageRegistration, WindowRegistration, WindowHandle, ReminderTypeRegistration, DrawerUrgencyLevel } from './plugin-types';
2
+ export interface PluginContext {
3
+ pluginId: string;
4
+ locked: boolean;
5
+ registerPage(config: Omit<PageRegistration, 'pluginId'>): void;
6
+ registerWindow(config: Omit<WindowRegistration, 'pluginId'>): WindowHandle;
7
+ registerReminderType(config: Omit<ReminderTypeRegistration, 'pluginId'>): void;
8
+ on(event: string, handler: (data: unknown) => void): () => void;
9
+ emit(event: string, data: unknown): void;
10
+ getSetting(key: string): string | undefined;
11
+ setSetting(key: string, value: string): void;
12
+ getAllSettings(): Record<string, string>;
13
+ setDrawerUrgency(reminderId: string, level: DrawerUrgencyLevel): void;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ export interface PageRegistration {
2
+ pluginId: string;
3
+ id: string;
4
+ label: string;
5
+ icon: string;
6
+ }
7
+ export interface WindowRegistration {
8
+ pluginId: string;
9
+ id: string;
10
+ size: {
11
+ width: number;
12
+ height: number | 'full';
13
+ };
14
+ position?: 'center' | 'right-edge' | 'left-edge';
15
+ frameless?: boolean;
16
+ alwaysOnTop?: boolean;
17
+ persistent?: boolean;
18
+ skipTaskbar?: boolean;
19
+ }
20
+ export interface WindowHandle {
21
+ show(data?: Record<string, unknown>): Promise<void>;
22
+ hide(instanceKey?: string): Promise<void>;
23
+ close(instanceKey?: string): Promise<void>;
24
+ minimize(instanceKey?: string): Promise<void>;
25
+ restore(instanceKey?: string): Promise<void>;
26
+ onClosed(callback: () => void, instanceKey?: string): void;
27
+ }
28
+ export interface ReminderTypeRegistration {
29
+ pluginId: string;
30
+ id: string;
31
+ onActivated?: (reminderId: string, data: Record<string, unknown>, activatedAt?: number) => Promise<Record<string, unknown> | void>;
32
+ onTick?: (reminderId: string, data: Record<string, unknown>) => Promise<Record<string, unknown> | void>;
33
+ onResolved?: (reminderId: string) => Promise<void>;
34
+ onDelayed?: (reminderId: string, durationMs: number) => Promise<void>;
35
+ }
36
+ export type DrawerUrgencyLevel = 'idle' | 'noticing' | 'alerting' | 'demanding';
37
+ export interface PluginInfo {
38
+ id: string;
39
+ name: string;
40
+ version: string;
41
+ icon?: string;
42
+ color?: string;
43
+ locked?: boolean;
44
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ export declare const MutationType: any;
2
+ export declare const acceptHMRUpdate: any;
3
+ export declare const createPinia: any;
4
+ export declare const defineStore: any;
5
+ export declare const disposePinia: any;
6
+ export declare const getActivePinia: any;
7
+ export declare const mapActions: any;
8
+ export declare const mapGetters: any;
9
+ export declare const mapState: any;
10
+ export declare const mapStores: any;
11
+ export declare const mapWritableState: any;
12
+ export declare const setActivePinia: any;
13
+ export declare const setMapStoreSuffix: any;
14
+ export declare const shouldHydrate: any;
15
+ export declare const skipHydrate: any;
16
+ export declare const storeToRefs: any;
@@ -0,0 +1,19 @@
1
+ const pinia = window.__UPNEXT_PINIA__;
2
+ if (!pinia)
3
+ throw new Error('[UpNext] window.__UPNEXT_PINIA__ not set — plugin components must be loaded inside a host renderer window');
4
+ export const MutationType = pinia.MutationType;
5
+ export const acceptHMRUpdate = pinia.acceptHMRUpdate;
6
+ export const createPinia = pinia.createPinia;
7
+ export const defineStore = pinia.defineStore;
8
+ export const disposePinia = pinia.disposePinia;
9
+ export const getActivePinia = pinia.getActivePinia;
10
+ export const mapActions = pinia.mapActions;
11
+ export const mapGetters = pinia.mapGetters;
12
+ export const mapState = pinia.mapState;
13
+ export const mapStores = pinia.mapStores;
14
+ export const mapWritableState = pinia.mapWritableState;
15
+ export const setActivePinia = pinia.setActivePinia;
16
+ export const setMapStoreSuffix = pinia.setMapStoreSuffix;
17
+ export const shouldHydrate = pinia.shouldHydrate;
18
+ export const skipHydrate = pinia.skipHydrate;
19
+ export const storeToRefs = pinia.storeToRefs;
@@ -0,0 +1,170 @@
1
+ export declare const compile: any;
2
+ export declare const Transition: any;
3
+ export declare const TransitionGroup: any;
4
+ export declare const VueElement: any;
5
+ export declare const createApp: any;
6
+ export declare const createSSRApp: any;
7
+ export declare const defineCustomElement: any;
8
+ export declare const defineSSRCustomElement: any;
9
+ export declare const hydrate: any;
10
+ export declare const initDirectivesForSSR: any;
11
+ export declare const nodeOps: any;
12
+ export declare const patchProp: any;
13
+ export declare const render: any;
14
+ export declare const useCssModule: any;
15
+ export declare const useCssVars: any;
16
+ export declare const useHost: any;
17
+ export declare const useShadowRoot: any;
18
+ export declare const vModelCheckbox: any;
19
+ export declare const vModelDynamic: any;
20
+ export declare const vModelRadio: any;
21
+ export declare const vModelSelect: any;
22
+ export declare const vModelText: any;
23
+ export declare const vShow: any;
24
+ export declare const withKeys: any;
25
+ export declare const withModifiers: any;
26
+ export declare const EffectScope: any;
27
+ export declare const ReactiveEffect: any;
28
+ export declare const TrackOpTypes: any;
29
+ export declare const TriggerOpTypes: any;
30
+ export declare const customRef: any;
31
+ export declare const effect: any;
32
+ export declare const effectScope: any;
33
+ export declare const getCurrentScope: any;
34
+ export declare const getCurrentWatcher: any;
35
+ export declare const isProxy: any;
36
+ export declare const isReactive: any;
37
+ export declare const isReadonly: any;
38
+ export declare const isRef: any;
39
+ export declare const isShallow: any;
40
+ export declare const markRaw: any;
41
+ export declare const onScopeDispose: any;
42
+ export declare const onWatcherCleanup: any;
43
+ export declare const proxyRefs: any;
44
+ export declare const reactive: any;
45
+ export declare const readonly: any;
46
+ export declare const ref: any;
47
+ export declare const shallowReactive: any;
48
+ export declare const shallowReadonly: any;
49
+ export declare const shallowRef: any;
50
+ export declare const stop: any;
51
+ export declare const toRaw: any;
52
+ export declare const toRef: any;
53
+ export declare const toRefs: any;
54
+ export declare const toValue: any;
55
+ export declare const triggerRef: any;
56
+ export declare const unref: any;
57
+ export declare const camelize: any;
58
+ export declare const capitalize: any;
59
+ export declare const normalizeClass: any;
60
+ export declare const normalizeProps: any;
61
+ export declare const normalizeStyle: any;
62
+ export declare const toDisplayString: any;
63
+ export declare const toHandlerKey: any;
64
+ export declare const BaseTransition: any;
65
+ export declare const BaseTransitionPropsValidators: any;
66
+ export declare const Comment: any;
67
+ export declare const DeprecationTypes: any;
68
+ export declare const ErrorCodes: any;
69
+ export declare const ErrorTypeStrings: any;
70
+ export declare const Fragment: any;
71
+ export declare const KeepAlive: any;
72
+ export declare const Static: any;
73
+ export declare const Suspense: any;
74
+ export declare const Teleport: any;
75
+ export declare const Text: any;
76
+ export declare const assertNumber: any;
77
+ export declare const callWithAsyncErrorHandling: any;
78
+ export declare const callWithErrorHandling: any;
79
+ export declare const cloneVNode: any;
80
+ export declare const compatUtils: any;
81
+ export declare const computed: any;
82
+ export declare const createBlock: any;
83
+ export declare const createCommentVNode: any;
84
+ export declare const createElementBlock: any;
85
+ export declare const createElementVNode: any;
86
+ export declare const createHydrationRenderer: any;
87
+ export declare const createPropsRestProxy: any;
88
+ export declare const createRenderer: any;
89
+ export declare const createSlots: any;
90
+ export declare const createStaticVNode: any;
91
+ export declare const createTextVNode: any;
92
+ export declare const createVNode: any;
93
+ export declare const defineAsyncComponent: any;
94
+ export declare const defineComponent: any;
95
+ export declare const defineEmits: any;
96
+ export declare const defineExpose: any;
97
+ export declare const defineModel: any;
98
+ export declare const defineOptions: any;
99
+ export declare const defineProps: any;
100
+ export declare const defineSlots: any;
101
+ export declare const getCurrentInstance: any;
102
+ export declare const getTransitionRawChildren: any;
103
+ export declare const guardReactiveProps: any;
104
+ export declare const h: any;
105
+ export declare const handleError: any;
106
+ export declare const hasInjectionContext: any;
107
+ export declare const hydrateOnIdle: any;
108
+ export declare const hydrateOnInteraction: any;
109
+ export declare const hydrateOnMediaQuery: any;
110
+ export declare const hydrateOnVisible: any;
111
+ export declare const initCustomFormatter: any;
112
+ export declare const inject: any;
113
+ export declare const isMemoSame: any;
114
+ export declare const isRuntimeOnly: any;
115
+ export declare const isVNode: any;
116
+ export declare const mergeDefaults: any;
117
+ export declare const mergeModels: any;
118
+ export declare const mergeProps: any;
119
+ export declare const nextTick: any;
120
+ export declare const onActivated: any;
121
+ export declare const onBeforeMount: any;
122
+ export declare const onBeforeUnmount: any;
123
+ export declare const onBeforeUpdate: any;
124
+ export declare const onDeactivated: any;
125
+ export declare const onErrorCaptured: any;
126
+ export declare const onMounted: any;
127
+ export declare const onRenderTracked: any;
128
+ export declare const onRenderTriggered: any;
129
+ export declare const onServerPrefetch: any;
130
+ export declare const onUnmounted: any;
131
+ export declare const onUpdated: any;
132
+ export declare const openBlock: any;
133
+ export declare const popScopeId: any;
134
+ export declare const provide: any;
135
+ export declare const pushScopeId: any;
136
+ export declare const queuePostFlushCb: any;
137
+ export declare const registerRuntimeCompiler: any;
138
+ export declare const renderList: any;
139
+ export declare const renderSlot: any;
140
+ export declare const resolveComponent: any;
141
+ export declare const resolveDirective: any;
142
+ export declare const resolveDynamicComponent: any;
143
+ export declare const resolveFilter: any;
144
+ export declare const resolveTransitionHooks: any;
145
+ export declare const setBlockTracking: any;
146
+ export declare const setDevtoolsHook: any;
147
+ export declare const setTransitionHooks: any;
148
+ export declare const ssrContextKey: any;
149
+ export declare const ssrUtils: any;
150
+ export declare const toHandlers: any;
151
+ export declare const transformVNodeArgs: any;
152
+ export declare const useAttrs: any;
153
+ export declare const useId: any;
154
+ export declare const useModel: any;
155
+ export declare const useSSRContext: any;
156
+ export declare const useSlots: any;
157
+ export declare const useTemplateRef: any;
158
+ export declare const useTransitionState: any;
159
+ export declare const version: any;
160
+ export declare const warn: any;
161
+ export declare const watch: any;
162
+ export declare const watchEffect: any;
163
+ export declare const watchPostEffect: any;
164
+ export declare const watchSyncEffect: any;
165
+ export declare const withAsyncContext: any;
166
+ export declare const withCtx: any;
167
+ export declare const withDefaults: any;
168
+ export declare const withDirectives: any;
169
+ export declare const withMemo: any;
170
+ export declare const withScopeId: any;
@@ -0,0 +1,173 @@
1
+ const vue = window.__UPNEXT_VUE__;
2
+ if (!vue)
3
+ throw new Error('[UpNext] window.__UPNEXT_VUE__ not set — plugin components must be loaded inside a host renderer window');
4
+ export const compile = vue.compile;
5
+ export const Transition = vue.Transition;
6
+ export const TransitionGroup = vue.TransitionGroup;
7
+ export const VueElement = vue.VueElement;
8
+ export const createApp = vue.createApp;
9
+ export const createSSRApp = vue.createSSRApp;
10
+ export const defineCustomElement = vue.defineCustomElement;
11
+ export const defineSSRCustomElement = vue.defineSSRCustomElement;
12
+ export const hydrate = vue.hydrate;
13
+ export const initDirectivesForSSR = vue.initDirectivesForSSR;
14
+ export const nodeOps = vue.nodeOps;
15
+ export const patchProp = vue.patchProp;
16
+ export const render = vue.render;
17
+ export const useCssModule = vue.useCssModule;
18
+ export const useCssVars = vue.useCssVars;
19
+ export const useHost = vue.useHost;
20
+ export const useShadowRoot = vue.useShadowRoot;
21
+ export const vModelCheckbox = vue.vModelCheckbox;
22
+ export const vModelDynamic = vue.vModelDynamic;
23
+ export const vModelRadio = vue.vModelRadio;
24
+ export const vModelSelect = vue.vModelSelect;
25
+ export const vModelText = vue.vModelText;
26
+ export const vShow = vue.vShow;
27
+ export const withKeys = vue.withKeys;
28
+ export const withModifiers = vue.withModifiers;
29
+ export const EffectScope = vue.EffectScope;
30
+ export const ReactiveEffect = vue.ReactiveEffect;
31
+ export const TrackOpTypes = vue.TrackOpTypes;
32
+ export const TriggerOpTypes = vue.TriggerOpTypes;
33
+ export const customRef = vue.customRef;
34
+ export const effect = vue.effect;
35
+ export const effectScope = vue.effectScope;
36
+ export const getCurrentScope = vue.getCurrentScope;
37
+ export const getCurrentWatcher = vue.getCurrentWatcher;
38
+ export const isProxy = vue.isProxy;
39
+ export const isReactive = vue.isReactive;
40
+ export const isReadonly = vue.isReadonly;
41
+ export const isRef = vue.isRef;
42
+ export const isShallow = vue.isShallow;
43
+ export const markRaw = vue.markRaw;
44
+ export const onScopeDispose = vue.onScopeDispose;
45
+ export const onWatcherCleanup = vue.onWatcherCleanup;
46
+ export const proxyRefs = vue.proxyRefs;
47
+ export const reactive = vue.reactive;
48
+ export const readonly = vue.readonly;
49
+ export const ref = vue.ref;
50
+ export const shallowReactive = vue.shallowReactive;
51
+ export const shallowReadonly = vue.shallowReadonly;
52
+ export const shallowRef = vue.shallowRef;
53
+ export const stop = vue.stop;
54
+ export const toRaw = vue.toRaw;
55
+ export const toRef = vue.toRef;
56
+ export const toRefs = vue.toRefs;
57
+ export const toValue = vue.toValue;
58
+ export const triggerRef = vue.triggerRef;
59
+ export const unref = vue.unref;
60
+ export const camelize = vue.camelize;
61
+ export const capitalize = vue.capitalize;
62
+ export const normalizeClass = vue.normalizeClass;
63
+ export const normalizeProps = vue.normalizeProps;
64
+ export const normalizeStyle = vue.normalizeStyle;
65
+ export const toDisplayString = vue.toDisplayString;
66
+ export const toHandlerKey = vue.toHandlerKey;
67
+ export const BaseTransition = vue.BaseTransition;
68
+ export const BaseTransitionPropsValidators = vue.BaseTransitionPropsValidators;
69
+ export const Comment = vue.Comment;
70
+ export const DeprecationTypes = vue.DeprecationTypes;
71
+ export const ErrorCodes = vue.ErrorCodes;
72
+ export const ErrorTypeStrings = vue.ErrorTypeStrings;
73
+ export const Fragment = vue.Fragment;
74
+ export const KeepAlive = vue.KeepAlive;
75
+ export const Static = vue.Static;
76
+ export const Suspense = vue.Suspense;
77
+ export const Teleport = vue.Teleport;
78
+ export const Text = vue.Text;
79
+ export const assertNumber = vue.assertNumber;
80
+ export const callWithAsyncErrorHandling = vue.callWithAsyncErrorHandling;
81
+ export const callWithErrorHandling = vue.callWithErrorHandling;
82
+ export const cloneVNode = vue.cloneVNode;
83
+ export const compatUtils = vue.compatUtils;
84
+ export const computed = vue.computed;
85
+ export const createBlock = vue.createBlock;
86
+ export const createCommentVNode = vue.createCommentVNode;
87
+ export const createElementBlock = vue.createElementBlock;
88
+ export const createElementVNode = vue.createElementVNode;
89
+ export const createHydrationRenderer = vue.createHydrationRenderer;
90
+ export const createPropsRestProxy = vue.createPropsRestProxy;
91
+ export const createRenderer = vue.createRenderer;
92
+ export const createSlots = vue.createSlots;
93
+ export const createStaticVNode = vue.createStaticVNode;
94
+ export const createTextVNode = vue.createTextVNode;
95
+ export const createVNode = vue.createVNode;
96
+ export const defineAsyncComponent = vue.defineAsyncComponent;
97
+ export const defineComponent = vue.defineComponent;
98
+ export const defineEmits = vue.defineEmits;
99
+ export const defineExpose = vue.defineExpose;
100
+ export const defineModel = vue.defineModel;
101
+ export const defineOptions = vue.defineOptions;
102
+ export const defineProps = vue.defineProps;
103
+ export const defineSlots = vue.defineSlots;
104
+ export const getCurrentInstance = vue.getCurrentInstance;
105
+ export const getTransitionRawChildren = vue.getTransitionRawChildren;
106
+ export const guardReactiveProps = vue.guardReactiveProps;
107
+ export const h = vue.h;
108
+ export const handleError = vue.handleError;
109
+ export const hasInjectionContext = vue.hasInjectionContext;
110
+ export const hydrateOnIdle = vue.hydrateOnIdle;
111
+ export const hydrateOnInteraction = vue.hydrateOnInteraction;
112
+ export const hydrateOnMediaQuery = vue.hydrateOnMediaQuery;
113
+ export const hydrateOnVisible = vue.hydrateOnVisible;
114
+ export const initCustomFormatter = vue.initCustomFormatter;
115
+ export const inject = vue.inject;
116
+ export const isMemoSame = vue.isMemoSame;
117
+ export const isRuntimeOnly = vue.isRuntimeOnly;
118
+ export const isVNode = vue.isVNode;
119
+ export const mergeDefaults = vue.mergeDefaults;
120
+ export const mergeModels = vue.mergeModels;
121
+ export const mergeProps = vue.mergeProps;
122
+ export const nextTick = vue.nextTick;
123
+ export const onActivated = vue.onActivated;
124
+ export const onBeforeMount = vue.onBeforeMount;
125
+ export const onBeforeUnmount = vue.onBeforeUnmount;
126
+ export const onBeforeUpdate = vue.onBeforeUpdate;
127
+ export const onDeactivated = vue.onDeactivated;
128
+ export const onErrorCaptured = vue.onErrorCaptured;
129
+ export const onMounted = vue.onMounted;
130
+ export const onRenderTracked = vue.onRenderTracked;
131
+ export const onRenderTriggered = vue.onRenderTriggered;
132
+ export const onServerPrefetch = vue.onServerPrefetch;
133
+ export const onUnmounted = vue.onUnmounted;
134
+ export const onUpdated = vue.onUpdated;
135
+ export const openBlock = vue.openBlock;
136
+ export const popScopeId = vue.popScopeId;
137
+ export const provide = vue.provide;
138
+ export const pushScopeId = vue.pushScopeId;
139
+ export const queuePostFlushCb = vue.queuePostFlushCb;
140
+ export const registerRuntimeCompiler = vue.registerRuntimeCompiler;
141
+ export const renderList = vue.renderList;
142
+ export const renderSlot = vue.renderSlot;
143
+ export const resolveComponent = vue.resolveComponent;
144
+ export const resolveDirective = vue.resolveDirective;
145
+ export const resolveDynamicComponent = vue.resolveDynamicComponent;
146
+ export const resolveFilter = vue.resolveFilter;
147
+ export const resolveTransitionHooks = vue.resolveTransitionHooks;
148
+ export const setBlockTracking = vue.setBlockTracking;
149
+ export const setDevtoolsHook = vue.setDevtoolsHook;
150
+ export const setTransitionHooks = vue.setTransitionHooks;
151
+ export const ssrContextKey = vue.ssrContextKey;
152
+ export const ssrUtils = vue.ssrUtils;
153
+ export const toHandlers = vue.toHandlers;
154
+ export const transformVNodeArgs = vue.transformVNodeArgs;
155
+ export const useAttrs = vue.useAttrs;
156
+ export const useId = vue.useId;
157
+ export const useModel = vue.useModel;
158
+ export const useSSRContext = vue.useSSRContext;
159
+ export const useSlots = vue.useSlots;
160
+ export const useTemplateRef = vue.useTemplateRef;
161
+ export const useTransitionState = vue.useTransitionState;
162
+ export const version = vue.version;
163
+ export const warn = vue.warn;
164
+ export const watch = vue.watch;
165
+ export const watchEffect = vue.watchEffect;
166
+ export const watchPostEffect = vue.watchPostEffect;
167
+ export const watchSyncEffect = vue.watchSyncEffect;
168
+ export const withAsyncContext = vue.withAsyncContext;
169
+ export const withCtx = vue.withCtx;
170
+ export const withDefaults = vue.withDefaults;
171
+ export const withDirectives = vue.withDirectives;
172
+ export const withMemo = vue.withMemo;
173
+ export const withScopeId = vue.withScopeId;
@@ -0,0 +1,11 @@
1
+ export declare const sharedTheme: {
2
+ colors: {
3
+ bg: string;
4
+ 'bg-solid': string;
5
+ text: string;
6
+ accent: string;
7
+ warning: string;
8
+ danger: string;
9
+ muted: string;
10
+ };
11
+ };
package/dist/theme.js ADDED
@@ -0,0 +1,11 @@
1
+ export const sharedTheme = {
2
+ colors: {
3
+ bg: 'rgba(30, 30, 35, 0.95)',
4
+ 'bg-solid': '#1e1e23',
5
+ text: '#e0e0e0',
6
+ accent: '#4a9eff',
7
+ warning: '#ff9f43',
8
+ danger: '#ff6b6b',
9
+ muted: '#6b7280',
10
+ },
11
+ };
@@ -0,0 +1,36 @@
1
+ export type ReminderStatus = 'scheduled' | 'active' | 'delayed' | 'completed';
2
+ export interface ScheduledReminder {
3
+ defId: string;
4
+ status: ReminderStatus;
5
+ nextTriggerTime: number;
6
+ activatedAt?: number;
7
+ delayUntil?: number;
8
+ lastCompletedAt?: number;
9
+ pluginData?: Record<string, unknown>;
10
+ }
11
+ export type RecurrenceType = 'once' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly';
12
+ export interface ResponsibilityDef {
13
+ id: string;
14
+ title: string;
15
+ recurrenceType: RecurrenceType;
16
+ interval?: number;
17
+ startDateTime: string;
18
+ endTime?: string;
19
+ enabled: boolean;
20
+ daysOfWeek?: number[];
21
+ pluginId?: string;
22
+ reminderType?: string;
23
+ pluginData?: Record<string, unknown>;
24
+ }
25
+ export interface AppSettings {
26
+ workStartTime: string;
27
+ workEndTime: string;
28
+ autostart: boolean;
29
+ drawerEdge: 'right' | 'left';
30
+ }
31
+ export interface StoreSchema {
32
+ version: number;
33
+ responsibilities: ResponsibilityDef[];
34
+ reminders: ScheduledReminder[];
35
+ settings: AppSettings;
36
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@upnextapp/plugin-sdk",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "Plugin SDK for building UpNext reminder platform plugins",
6
+ "license": "MIT",
7
+ "author": "UpNext",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/morcth/upnext",
11
+ "directory": "packages/plugin-sdk"
12
+ },
13
+ "keywords": ["upnext", "plugin", "sdk", "reminders", "electron"],
14
+ "main": "dist/index.js",
15
+ "types": "dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./theme": {
22
+ "types": "./dist/theme.d.ts",
23
+ "import": "./dist/theme.js"
24
+ },
25
+ "./shims/vue": {
26
+ "types": "./dist/shims/vue.d.ts",
27
+ "import": "./dist/shims/vue.js"
28
+ },
29
+ "./shims/pinia": {
30
+ "types": "./dist/shims/pinia.d.ts",
31
+ "import": "./dist/shims/pinia.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc",
42
+ "prepublishOnly": "npm run build"
43
+ },
44
+ "peerDependencies": {
45
+ "zod": "^3.0.0 || ^4.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "typescript": "^5.9.3",
49
+ "zod": "^4.4.3"
50
+ }
51
+ }