@inkbar/svelte 0.3.0 → 0.4.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/README.md +16 -9
- package/dist/components/InkColorMenu.svelte +242 -0
- package/dist/components/InkColorMenu.svelte.d.ts +33 -0
- package/dist/components/InkColorMenu.svelte.d.ts.map +1 -0
- package/dist/components/InkHighlightMenu.svelte +166 -0
- package/dist/components/InkHighlightMenu.svelte.d.ts +16 -0
- package/dist/components/InkHighlightMenu.svelte.d.ts.map +1 -0
- package/dist/components/InkLineStyleMenu.svelte +141 -0
- package/dist/components/InkLineStyleMenu.svelte.d.ts +15 -0
- package/dist/components/InkLineStyleMenu.svelte.d.ts.map +1 -0
- package/dist/components/InkRoot.svelte +77 -3
- package/dist/components/InkRoot.svelte.d.ts +20 -2
- package/dist/components/InkRoot.svelte.d.ts.map +1 -1
- package/dist/components/InkShapeMenu.svelte +157 -0
- package/dist/components/InkShapeMenu.svelte.d.ts +15 -0
- package/dist/components/InkShapeMenu.svelte.d.ts.map +1 -0
- package/dist/components/InkSignatureDialog.svelte +70 -0
- package/dist/components/InkSignatureDialog.svelte.d.ts +22 -0
- package/dist/components/InkSignatureDialog.svelte.d.ts.map +1 -0
- package/dist/components/InkSignatureMenu.svelte +263 -0
- package/dist/components/InkSignatureMenu.svelte.d.ts +18 -0
- package/dist/components/InkSignatureMenu.svelte.d.ts.map +1 -0
- package/dist/components/InkTextStyleMenu.svelte +225 -0
- package/dist/components/InkTextStyleMenu.svelte.d.ts +15 -0
- package/dist/components/InkTextStyleMenu.svelte.d.ts.map +1 -0
- package/dist/components/{InkNotePopover.svelte → InkThreadPopover.svelte} +37 -32
- package/dist/components/InkThreadPopover.svelte.d.ts +9 -0
- package/dist/components/InkThreadPopover.svelte.d.ts.map +1 -0
- package/dist/components/InkToolButton.svelte +23 -7
- package/dist/components/InkToolButton.svelte.d.ts.map +1 -1
- package/dist/components/InkViewport.svelte +7 -0
- package/dist/components/InkViewport.svelte.d.ts.map +1 -1
- package/dist/components/SignatureForm.svelte +219 -0
- package/dist/components/SignatureForm.svelte.d.ts +10 -0
- package/dist/components/SignatureForm.svelte.d.ts.map +1 -0
- package/dist/components/ThreadForm.svelte +4 -2
- package/dist/components/ThreadForm.svelte.d.ts +1 -0
- package/dist/components/ThreadForm.svelte.d.ts.map +1 -1
- package/dist/components/child-snippet.d.ts +8 -0
- package/dist/components/child-snippet.d.ts.map +1 -1
- package/dist/components/child-snippet.js +15 -0
- package/dist/context.d.ts +14 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/hooks/useAnnotations.svelte.d.ts +1289 -71
- package/dist/hooks/useAnnotations.svelte.d.ts.map +1 -1
- package/dist/hooks/useToolOptions.svelte.d.ts +11 -0
- package/dist/hooks/useToolOptions.svelte.d.ts.map +1 -0
- package/dist/hooks/useToolOptions.svelte.js +19 -0
- package/dist/hooks/useToolStyle.svelte.d.ts +33 -0
- package/dist/hooks/useToolStyle.svelte.d.ts.map +1 -0
- package/dist/hooks/useToolStyle.svelte.js +33 -0
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/package.json +5 -5
- package/dist/components/InkNotePopover.svelte.d.ts +0 -9
- package/dist/components/InkNotePopover.svelte.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnnotations.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/hooks/useAnnotations.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useAnnotations.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/hooks/useAnnotations.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAc,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEhF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAC9B,MAAM;kBACL,MAAM,EAAE;IACtB,sFAAsF;iBACzE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAIL,MAAM;EAEvB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolId } from '@inkbar/core/dom';
|
|
2
|
+
/**
|
|
3
|
+
* A tool's options and a setter that merges a patch into them without switching tools.
|
|
4
|
+
* `id` may be a getter. Options are empty, and the setter does nothing, until the viewport
|
|
5
|
+
* has mounted.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useToolOptions<O extends object = object>(id: ToolId | (() => ToolId)): {
|
|
8
|
+
readonly options: O;
|
|
9
|
+
setOptions: (patch: Partial<O>) => void;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useToolOptions.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolOptions.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/hooks/useToolOptions.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAI9C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACtD,EAAE,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IAAC,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;CAAE,CAUlE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useInkContext } from '../context.js';
|
|
2
|
+
import { useReadable } from '../use-readable.svelte.js';
|
|
3
|
+
const NO_OPTIONS = {};
|
|
4
|
+
/**
|
|
5
|
+
* A tool's options and a setter that merges a patch into them without switching tools.
|
|
6
|
+
* `id` may be a getter. Options are empty, and the setter does nothing, until the viewport
|
|
7
|
+
* has mounted.
|
|
8
|
+
*/
|
|
9
|
+
export function useToolOptions(id) {
|
|
10
|
+
const ctx = useInkContext('useToolOptions()');
|
|
11
|
+
const toolId = () => (typeof id === 'function' ? id() : id);
|
|
12
|
+
const options = useReadable(() => ctx.tools?.options(toolId()), NO_OPTIONS);
|
|
13
|
+
return {
|
|
14
|
+
get options() {
|
|
15
|
+
return options.current;
|
|
16
|
+
},
|
|
17
|
+
setOptions: (patch) => ctx.tools?.setOptions(toolId(), patch),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CurrentStyle, StyleGroup, StyleKey, StyleProps } from '@inkbar/core';
|
|
2
|
+
interface ToolStyleView {
|
|
3
|
+
readonly current: CurrentStyle;
|
|
4
|
+
readonly supported: ReadonlySet<StyleKey>;
|
|
5
|
+
/** A group's own style. */
|
|
6
|
+
get: (group: StyleGroup) => Readonly<StyleProps>;
|
|
7
|
+
}
|
|
8
|
+
/** The tool style for the active tool or the selection. */
|
|
9
|
+
export interface ToolStyleHandle extends ToolStyleView {
|
|
10
|
+
set: (patch: StyleProps, opts?: {
|
|
11
|
+
group?: StyleGroup;
|
|
12
|
+
apply?: boolean;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
/** The tool style scoped to one group: `set` writes that group, so it takes no options. */
|
|
16
|
+
export interface ScopedToolStyleHandle extends ToolStyleView {
|
|
17
|
+
set: (patch: StyleProps) => void;
|
|
18
|
+
}
|
|
19
|
+
/** A style group, or a getter for one that may change (a prop). */
|
|
20
|
+
export type StyleGroupSource = StyleGroup | undefined | (() => StyleGroup | undefined);
|
|
21
|
+
/**
|
|
22
|
+
* The tool style the style controls read and write: `current` shows the selection's values
|
|
23
|
+
* (`'mixed'` where they differ), else the active tool's group; `supported` names the props
|
|
24
|
+
* the active tool or the selection has. `set` updates the group and the selected annotations.
|
|
25
|
+
*
|
|
26
|
+
* With `group` (or a getter for it, so a prop can change it), the style as a control for that group sees it, whatever tool is active: the
|
|
27
|
+
* selection's when it is all in the group, else the group's own; `set` updates the group, and
|
|
28
|
+
* the selection only when it is all in the group.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useToolStyle(): ToolStyleHandle;
|
|
31
|
+
export declare function useToolStyle(group: StyleGroupSource): ScopedToolStyleHandle;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=useToolStyle.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolStyle.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/hooks/useToolStyle.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAMlF,UAAU,aAAa;IACrB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;IAC9B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA;IACzC,2BAA2B;IAC3B,GAAG,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,QAAQ,CAAC,UAAU,CAAC,CAAA;CACjD;AAED,2DAA2D;AAC3D,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,GAAG,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;CACjF;AAED,2FAA2F;AAC3F,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,GAAG,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;CACjC;AAED,mEAAmE;AACnE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,CAAA;AAEtF;;;;;;;;GAQG;AACH,wBAAgB,YAAY,IAAI,eAAe,CAAA;AAC/C,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useInkContext } from '../context.js';
|
|
2
|
+
import { useReadable } from '../use-readable.svelte.js';
|
|
3
|
+
const NO_STYLE = {};
|
|
4
|
+
const NO_PROPS = new Set();
|
|
5
|
+
const EMPTY = {};
|
|
6
|
+
export function useToolStyle(group) {
|
|
7
|
+
const ctx = useInkContext('useToolStyle()');
|
|
8
|
+
const scope = () => typeof group === 'function' ? group() : group;
|
|
9
|
+
const view = () => {
|
|
10
|
+
const style = ctx.toolStyle;
|
|
11
|
+
const g = scope();
|
|
12
|
+
return g && style ? style.scoped(g) : style;
|
|
13
|
+
};
|
|
14
|
+
const current = useReadable(() => view()?.current, NO_STYLE);
|
|
15
|
+
const supported = useReadable(() => view()?.supported, NO_PROPS);
|
|
16
|
+
return {
|
|
17
|
+
get current() {
|
|
18
|
+
return current.current;
|
|
19
|
+
},
|
|
20
|
+
get supported() {
|
|
21
|
+
return supported.current;
|
|
22
|
+
},
|
|
23
|
+
set: (patch, opts) => {
|
|
24
|
+
const style = ctx.toolStyle;
|
|
25
|
+
const g = scope();
|
|
26
|
+
if (g)
|
|
27
|
+
style?.scoped(g).set(patch);
|
|
28
|
+
else
|
|
29
|
+
style?.set(patch, opts);
|
|
30
|
+
},
|
|
31
|
+
get: (group) => ctx.toolStyle?.get(group) ?? EMPTY,
|
|
32
|
+
};
|
|
33
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,14 @@ export { useInkContext } from './context.js';
|
|
|
3
3
|
export type { InkContext, InkHistory, InkStatus } from './context.js';
|
|
4
4
|
export { useReadable } from './use-readable.svelte.js';
|
|
5
5
|
export type { ReadableRef } from './use-readable.svelte.js';
|
|
6
|
-
export type { AnnotationSlotProps, AnnotationState,
|
|
6
|
+
export type { AnnotationSlotProps, AnnotationState, ThreadPopoverSlotProps, SuggestionCardSlotProps, } from '@inkbar/core/dom';
|
|
7
7
|
export type { ConfidenceBucket } from '@inkbar/core';
|
|
8
8
|
export { useDocument } from './hooks/useDocument.svelte.js';
|
|
9
9
|
export { useAnnotations } from './hooks/useAnnotations.svelte.js';
|
|
10
10
|
export { useTool } from './hooks/useTool.svelte.js';
|
|
11
|
+
export { useToolStyle } from './hooks/useToolStyle.svelte.js';
|
|
12
|
+
export type { ScopedToolStyleHandle, StyleGroupSource, ToolStyleHandle, } from './hooks/useToolStyle.svelte.js';
|
|
13
|
+
export { useToolOptions } from './hooks/useToolOptions.svelte.js';
|
|
11
14
|
export { useSelection } from './hooks/useSelection.svelte.js';
|
|
12
15
|
export { useZoom } from './hooks/useZoom.svelte.js';
|
|
13
16
|
export { usePage } from './hooks/usePage.svelte.js';
|
|
@@ -36,6 +39,20 @@ export type { InkHistoryButtonProps } from './components/history-button.js';
|
|
|
36
39
|
export { default as InkZoomIn } from './components/InkZoomIn.svelte';
|
|
37
40
|
export { default as InkZoomOut } from './components/InkZoomOut.svelte';
|
|
38
41
|
export type { InkZoomButtonProps } from './components/zoom-button.js';
|
|
42
|
+
export { default as InkColorMenu } from './components/InkColorMenu.svelte';
|
|
43
|
+
export type { InkColorMenuProps } from './components/InkColorMenu.svelte';
|
|
44
|
+
export { default as InkShapeMenu } from './components/InkShapeMenu.svelte';
|
|
45
|
+
export type { InkShapeMenuProps } from './components/InkShapeMenu.svelte';
|
|
46
|
+
export { default as InkSignatureMenu } from './components/InkSignatureMenu.svelte';
|
|
47
|
+
export type { InkSignatureMenuProps } from './components/InkSignatureMenu.svelte';
|
|
48
|
+
export { default as InkSignatureDialog } from './components/InkSignatureDialog.svelte';
|
|
49
|
+
export type { InkSignatureDialogProps } from './components/InkSignatureDialog.svelte';
|
|
50
|
+
export { default as InkHighlightMenu } from './components/InkHighlightMenu.svelte';
|
|
51
|
+
export type { InkHighlightMenuProps } from './components/InkHighlightMenu.svelte';
|
|
52
|
+
export { default as InkLineStyleMenu } from './components/InkLineStyleMenu.svelte';
|
|
53
|
+
export type { InkLineStyleMenuProps } from './components/InkLineStyleMenu.svelte';
|
|
54
|
+
export { default as InkTextStyleMenu } from './components/InkTextStyleMenu.svelte';
|
|
55
|
+
export type { InkTextStyleMenuProps } from './components/InkTextStyleMenu.svelte';
|
|
39
56
|
export { default as InkZoomSelect } from './components/InkZoomSelect.svelte';
|
|
40
57
|
export type { InkZoomSelectProps } from './components/InkZoomSelect.svelte';
|
|
41
58
|
export { default as InkPageInput } from './components/InkPageInput.svelte';
|
|
@@ -46,8 +63,8 @@ export { default as InkPrevPage } from './components/InkPrevPage.svelte';
|
|
|
46
63
|
export { default as InkNextPage } from './components/InkNextPage.svelte';
|
|
47
64
|
export type { InkPageButtonProps } from './components/page-button.js';
|
|
48
65
|
export type { ChildSnippet } from './components/child-snippet.js';
|
|
49
|
-
export { default as
|
|
50
|
-
export type {
|
|
66
|
+
export { default as InkThreadPopover } from './components/InkThreadPopover.svelte';
|
|
67
|
+
export type { InkThreadPopoverProps } from './components/InkThreadPopover.svelte';
|
|
51
68
|
export { default as InkSuggestionCard } from './components/InkSuggestionCard.svelte';
|
|
52
69
|
export type { InkSuggestionCardProps } from './components/InkSuggestionCard.svelte';
|
|
53
70
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAA;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAA;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,YAAY,EAAE,WAAW,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AACpF,YAAY,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,8 @@ export { useReadable } from './use-readable.svelte.js';
|
|
|
3
3
|
export { useDocument } from './hooks/useDocument.svelte.js';
|
|
4
4
|
export { useAnnotations } from './hooks/useAnnotations.svelte.js';
|
|
5
5
|
export { useTool } from './hooks/useTool.svelte.js';
|
|
6
|
+
export { useToolStyle } from './hooks/useToolStyle.svelte.js';
|
|
7
|
+
export { useToolOptions } from './hooks/useToolOptions.svelte.js';
|
|
6
8
|
export { useSelection } from './hooks/useSelection.svelte.js';
|
|
7
9
|
export { useZoom } from './hooks/useZoom.svelte.js';
|
|
8
10
|
export { usePage } from './hooks/usePage.svelte.js';
|
|
@@ -20,10 +22,17 @@ export { default as InkUndo } from './components/InkUndo.svelte';
|
|
|
20
22
|
export { default as InkRedo } from './components/InkRedo.svelte';
|
|
21
23
|
export { default as InkZoomIn } from './components/InkZoomIn.svelte';
|
|
22
24
|
export { default as InkZoomOut } from './components/InkZoomOut.svelte';
|
|
25
|
+
export { default as InkColorMenu } from './components/InkColorMenu.svelte';
|
|
26
|
+
export { default as InkShapeMenu } from './components/InkShapeMenu.svelte';
|
|
27
|
+
export { default as InkSignatureMenu } from './components/InkSignatureMenu.svelte';
|
|
28
|
+
export { default as InkSignatureDialog } from './components/InkSignatureDialog.svelte';
|
|
29
|
+
export { default as InkHighlightMenu } from './components/InkHighlightMenu.svelte';
|
|
30
|
+
export { default as InkLineStyleMenu } from './components/InkLineStyleMenu.svelte';
|
|
31
|
+
export { default as InkTextStyleMenu } from './components/InkTextStyleMenu.svelte';
|
|
23
32
|
export { default as InkZoomSelect } from './components/InkZoomSelect.svelte';
|
|
24
33
|
export { default as InkPageInput } from './components/InkPageInput.svelte';
|
|
25
34
|
export { default as InkPageCount } from './components/InkPageCount.svelte';
|
|
26
35
|
export { default as InkPrevPage } from './components/InkPrevPage.svelte';
|
|
27
36
|
export { default as InkNextPage } from './components/InkNextPage.svelte';
|
|
28
|
-
export { default as
|
|
37
|
+
export { default as InkThreadPopover } from './components/InkThreadPopover.svelte';
|
|
29
38
|
export { default as InkSuggestionCard } from './components/InkSuggestionCard.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkbar/svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Svelte 5 components and hooks for Inkbar, the browser PDF viewer and editor.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://inkbar.dev",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inkbar/icons": "^0.
|
|
29
|
+
"@inkbar/icons": "^0.4.0",
|
|
30
30
|
"@internationalized/date": "^3.12.4",
|
|
31
31
|
"bits-ui": "^2.19.5",
|
|
32
32
|
"esm-env": "^1.2.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@inkbar/core": "^0.
|
|
35
|
+
"@inkbar/core": "^0.4.0",
|
|
36
36
|
"svelte": "^5.46.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@inkbar/core": "0.
|
|
39
|
+
"@inkbar/core": "0.4.0",
|
|
40
40
|
"@inkbar/fixtures": "0.0.0",
|
|
41
|
-
"@inkbar/theme": "0.
|
|
41
|
+
"@inkbar/theme": "0.4.0",
|
|
42
42
|
"@sveltejs/package": "^3.0.0",
|
|
43
43
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
44
44
|
"@vitest/browser-playwright": "^5.0.4",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NotePopoverSlotProps } from '@inkbar/core/dom';
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
export interface InkNotePopoverProps {
|
|
4
|
-
children?: Snippet<[NotePopoverSlotProps]> | undefined;
|
|
5
|
-
}
|
|
6
|
-
declare const InkNotePopover: import("svelte").Component<InkNotePopoverProps, {}, "">;
|
|
7
|
-
type InkNotePopover = ReturnType<typeof InkNotePopover>;
|
|
8
|
-
export default InkNotePopover;
|
|
9
|
-
//# sourceMappingURL=InkNotePopover.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InkNotePopover.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/InkNotePopover.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC,GAAG,SAAS,CAAA;CACvD;AAwLH,QAAA,MAAM,cAAc,yDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|