@embedpdf/plugin-search 2.14.4 → 2.15.1

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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("svelte/internal/client"),t=require("@embedpdf/core/svelte"),r=require("@embedpdf/plugin-search");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}require("svelte/internal/disclose-version");const n=i(e),o=()=>t.useCapability(r.SearchPlugin.id);var s=n.from_html("<div></div>"),l=n.from_html("<div></div>");exports.SearchLayer=function(e,r){n.push(r,!0);let i=n.prop(r,"highlightColor",3,"#FFFF00"),a=n.prop(r,"activeHighlightColor",3,"#FFBF00"),c=n.rest_props(r,["$$slots","$$events","$$legacy","documentId","pageIndex","scale","highlightColor","activeHighlightColor"]);const u=o(),g=t.useDocumentState(()=>r.documentId);let d=n.state(null);const p=n.derived(()=>{var e;return(null==(e=u.provides)?void 0:e.forDocument(r.documentId))??null}),v=n.derived(()=>{var e;return void 0!==r.scale?r.scale:(null==(e=g.current)?void 0:e.scale)??1});n.user_effect(()=>{if(!n.get(p))return void n.set(d,null);const e=n.get(p).getState();return n.set(d,{results:e.results,activeResultIndex:e.activeResultIndex,showAllResults:e.showAllResults,active:e.active},!0),n.get(p).onSearchResultStateChange(e=>{n.set(d,e,!0)})});const h=n.derived(()=>n.get(d)?n.get(d).results.map((e,t)=>({result:e,originalIndex:t})).filter(({result:e})=>e.pageIndex===r.pageIndex):[]),f=n.derived(()=>n.get(d)?n.get(h).filter(({originalIndex:e})=>n.get(d).showAllResults||e===n.get(d).activeResultIndex):[]);var m=n.comment(),x=n.first_child(m),S=e=>{var t=l();n.attribute_effect(t,()=>({...c,[n.STYLE]:{"pointer-events":"none"}})),n.each(t,23,()=>n.get(f),({result:e,originalIndex:t},r)=>`result-${r}`,(e,t,r)=>{var o=n.comment(),l=n.first_child(o);n.each(l,19,()=>n.get(t).result.rects,(e,t)=>`rect-${n.get(r)}-${t}`,(e,r)=>{var o=s();let l;n.template_effect(()=>l=n.set_style(o,"",l,{position:"absolute",top:n.get(r).origin.y*n.get(v)+"px",left:n.get(r).origin.x*n.get(v)+"px",width:n.get(r).size.width*n.get(v)+"px",height:n.get(r).size.height*n.get(v)+"px","background-color":n.get(t).originalIndex===n.get(d).activeResultIndex?a():i(),"mix-blend-mode":"multiply",transform:"scale(1.02)","transform-origin":"center",transition:"opacity .3s ease-in-out",opacity:"1"})),n.append(e,o)}),n.append(e,o)}),n.reset(t),n.append(e,t)};n.if(x,e=>{n.get(d)&&n.get(d).active&&e(S)}),n.append(e,m),n.pop()},exports.useSearch=e=>{const t=o();let i=n.state(n.proxy(r.initialSearchDocumentState));const s=n.derived(e),l=n.derived(()=>t.provides&&n.get(s)?t.provides.forDocument(n.get(s)):null);return n.user_effect(()=>{const e=t.provides,o=n.get(s);if(!e||!o)return void n.set(i,r.initialSearchDocumentState,!0);const l=e.forDocument(o);return n.set(i,l.getState(),!0),l.onStateChange(e=>{n.set(i,e,!0)})}),{get provides(){return n.get(l)},get state(){return n.get(i)}}},exports.useSearchCapability=o,exports.useSearchPlugin=()=>t.usePlugin(r.SearchPlugin.id),Object.keys(r).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("svelte/internal/client"),t=require("@embedpdf/core/svelte"),r=require("@embedpdf/plugin-search");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}require("svelte/internal/disclose-version");const n=i(e),o=()=>t.useCapability(r.SearchPlugin.id);var s=n.from_html("<div></div>"),l=n.from_html("<div></div>");exports.SearchLayer=function(e,r){n.push(r,!0);let i=n.prop(r,"highlightColor",3,"#FFFF00"),a=n.prop(r,"activeHighlightColor",3,"#FFBF00"),c=function(e,t,r){const i=t instanceof Set?t:new Set(t);"function"!=typeof i.includes&&(i.includes=Set.prototype.has.bind(i));return n.rest_props(e,i,r)}(r,["$$slots","$$events","$$legacy","documentId","pageIndex","scale","highlightColor","activeHighlightColor"]);const u=o(),d=t.useDocumentState(()=>r.documentId);let g=n.state(null);const p=n.derived(()=>{var e;return(null==(e=u.provides)?void 0:e.forDocument(r.documentId))??null}),v=n.derived(()=>{var e;return void 0!==r.scale?r.scale:(null==(e=d.current)?void 0:e.scale)??1});n.user_effect(()=>{if(!n.get(p))return void n.set(g,null);const e=n.get(p).getState();return n.set(g,{results:e.results,activeResultIndex:e.activeResultIndex,showAllResults:e.showAllResults,active:e.active},!0),n.get(p).onSearchResultStateChange(e=>{n.set(g,e,!0)})});const f=n.derived(()=>n.get(g)?n.get(g).results.map((e,t)=>({result:e,originalIndex:t})).filter(({result:e})=>e.pageIndex===r.pageIndex):[]),h=n.derived(()=>n.get(g)?n.get(f).filter(({originalIndex:e})=>n.get(g).showAllResults||e===n.get(g).activeResultIndex):[]);var m=n.comment(),x=n.first_child(m),S=e=>{var t=l();n.attribute_effect(t,()=>({...c,[n.STYLE]:{"pointer-events":"none"}})),n.each(t,23,()=>n.get(h),({result:e,originalIndex:t},r)=>`result-${r}`,(e,t,r)=>{var o=n.comment(),l=n.first_child(o);n.each(l,19,()=>n.get(t).result.rects,(e,t)=>`rect-${n.get(r)}-${t}`,(e,r)=>{var o=s();let l;n.template_effect(()=>l=n.set_style(o,"",l,{position:"absolute",top:n.get(r).origin.y*n.get(v)+"px",left:n.get(r).origin.x*n.get(v)+"px",width:n.get(r).size.width*n.get(v)+"px",height:n.get(r).size.height*n.get(v)+"px","background-color":n.get(t).originalIndex===n.get(g).activeResultIndex?a():i(),"mix-blend-mode":"multiply",transform:"scale(1.02)","transform-origin":"center",transition:"opacity .3s ease-in-out",opacity:"1"})),n.append(e,o)}),n.append(e,o)}),n.reset(t),n.append(e,t)};n.if(x,e=>{n.get(g)&&n.get(g).active&&e(S)}),n.append(e,m),n.pop()},exports.useSearch=e=>{const t=o();let i=n.state(n.proxy(r.initialSearchDocumentState));const s=n.derived(e),l=n.derived(()=>t.provides&&n.get(s)?t.provides.forDocument(n.get(s)):null);return n.user_effect(()=>{const e=t.provides,o=n.get(s);if(!e||!o)return void n.set(i,r.initialSearchDocumentState,!0);const l=e.forDocument(o);return n.set(i,l.getState(),!0),l.onStateChange(e=>{n.set(i,e,!0)})}),{get provides(){return n.get(l)},get state(){return n.get(i)}}},exports.useSearchCapability=o,exports.useSearchPlugin=()=>t.usePlugin(r.SearchPlugin.id),Object.keys(r).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/svelte/hooks/use-search.svelte.ts","../../src/svelte/components/SearchLayer.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport {\n SearchPlugin,\n SearchDocumentState,\n SearchScope,\n initialSearchDocumentState,\n} from '@embedpdf/plugin-search';\n\nexport const useSearchPlugin = () => usePlugin<SearchPlugin>(SearchPlugin.id);\nexport const useSearchCapability = () => useCapability<SearchPlugin>(SearchPlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseSearchReturn {\n provides: SearchScope | null;\n state: SearchDocumentState;\n}\n\n/**\n * Hook for search state for a specific document\n * @param getDocumentId Function that returns the document ID\n */\nexport const useSearch = (getDocumentId: () => string | null): UseSearchReturn => {\n const capability = useSearchCapability();\n\n let searchState = $state<SearchDocumentState>(initialSearchDocumentState);\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n // Scoped capability for current docId\n const scopedProvides = $derived(\n capability.provides && documentId ? capability.provides.forDocument(documentId) : null,\n );\n\n $effect(() => {\n const provides = capability.provides;\n const docId = documentId;\n\n if (!provides || !docId) {\n searchState = initialSearchDocumentState;\n return;\n }\n\n const scope = provides.forDocument(docId);\n\n // Set initial state\n searchState = scope.getState();\n\n // Subscribe to changes\n return scope.onStateChange((state) => {\n searchState = state;\n });\n });\n\n return {\n get provides() {\n return scopedProvides;\n },\n get state() {\n return searchState;\n },\n };\n};\n","<script lang=\"ts\">\n import type { SearchResultState } from '@embedpdf/plugin-search';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { useSearchCapability } from '../hooks';\n import type { HTMLAttributes } from 'svelte/elements';\n\n interface SearchLayerProps extends HTMLAttributes<HTMLDivElement> {\n documentId: string;\n pageIndex: number;\n scale?: number;\n highlightColor?: string;\n activeHighlightColor?: string;\n }\n\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n highlightColor = '#FFFF00',\n activeHighlightColor = '#FFBF00',\n ...divProps\n }: SearchLayerProps = $props();\n\n const searchCapability = useSearchCapability();\n const documentState = useDocumentState(() => documentId);\n\n let searchResultState = $state<SearchResultState | null>(null);\n\n const scope = $derived(searchCapability.provides?.forDocument(documentId) ?? null);\n\n const actualScale = $derived(\n scaleOverride !== undefined ? scaleOverride : (documentState.current?.scale ?? 1),\n );\n\n $effect(() => {\n if (!scope) {\n searchResultState = null;\n return;\n }\n\n // Set initial state\n const currentState = scope.getState();\n searchResultState = {\n results: currentState.results,\n activeResultIndex: currentState.activeResultIndex,\n showAllResults: currentState.showAllResults,\n active: currentState.active,\n };\n\n // Subscribe to changes\n return scope.onSearchResultStateChange((state) => {\n searchResultState = state;\n });\n });\n\n // Filter results for current page while preserving original indices\n const pageResults = $derived(\n searchResultState\n ? searchResultState.results\n .map((result, originalIndex) => ({ result, originalIndex }))\n .filter(({ result }) => result.pageIndex === pageIndex)\n : [],\n );\n\n // Decide which results to show\n const resultsToShow = $derived(\n searchResultState\n ? pageResults.filter(\n ({ originalIndex }) =>\n searchResultState!.showAllResults ||\n originalIndex === searchResultState!.activeResultIndex,\n )\n : [],\n );\n</script>\n\n{#if searchResultState && searchResultState.active}\n <div style:pointer-events=\"none\" {...divProps}>\n {#each resultsToShow as { result, originalIndex }, idx (`result-${idx}`)}\n {#each result.rects as rect, rectIdx (`rect-${idx}-${rectIdx}`)}\n <div\n style:position=\"absolute\"\n style:top=\"{rect.origin.y * actualScale}px\"\n style:left=\"{rect.origin.x * actualScale}px\"\n style:width=\"{rect.size.width * actualScale}px\"\n style:height=\"{rect.size.height * actualScale}px\"\n style:background-color={originalIndex === searchResultState.activeResultIndex\n ? activeHighlightColor\n : highlightColor}\n style:mix-blend-mode=\"multiply\"\n style:transform=\"scale(1.02)\"\n style:transform-origin=\"center\"\n style:transition=\"opacity .3s ease-in-out\"\n style:opacity=\"1\"\n ></div>\n {/each}\n {/each}\n </div>\n{/if}\n"],"names":["useSearchCapability","useCapability","SearchPlugin","id","highlightColor","activeHighlightColor","divProps","$","rest_props","$$props","searchCapability","documentState","useDocumentState","documentId","searchResultState","state","scope","_a","provides","forDocument","actualScale","derived","scale","current","user_effect","get","set","currentState","getState","results","activeResultIndex","showAllResults","active","onSearchResultStateChange","pageResults","map","result","originalIndex","filter","pageIndex","resultsToShow","div","root_1","attribute_effect","STYLE","each","idx","$$anchor","$$item","rects","rect","rectIdx","div_1","root_3","styles","top","origin","y","left","x","width","size","height","$$render","consequent","getDocumentId","capability","searchState","initialSearchDocumentState","scopedProvides","docId","onStateChange","usePlugin"],"mappings":"sgBASaA,EAAA,IAA4BC,gBAA4BC,EAAAA,aAAaC,iHCS9E,IAAAC,8BAAiB,WACjBC,oCAAuB,WACpBC,EAAOC,EAAAC,WAAAC,EAAA,4GAGN,MAAAC,EAAmBV,IACnBW,EAAgBC,EAAAA,iBAAgB,IAAAH,EAA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OG,QAAIvC,GAAhB,KACCwC,MAAArD,EAAAkB,IAAAyB,GAAKW,KAAKD,YAAQxC,GAAlB,KACC0C,OAAAvD,EAAAkB,IAAAyB,GAAKW,KAAKC,aAAS1C,GAAnB,KACS,4BARKiB,sBAQavB,GAAkBgB,kBACxDzB,IACAD,mJARLgD,6BAHNX,cAAAA,qBADE3B,IAAiBP,EAAAkB,IAAIX,GAAkBkB,QAAM+B,EAAAC,0BAF1C,oBDrDkBC,IAClB,MAAAC,EAAalE,QAEfmE,EAAc5D,EAAAQ,cAA4BqD,EAAAA,6BAGxC,MAAAvD,YAAsBoD,GAGtBI,EAAA9D,EAAAc,QAAA,IACJ6C,EAAWhD,gBAAYL,GAAaqD,EAAWhD,SAASC,kBAAYN,IAAc,aAGpFN,EAAAiB,uBACQN,EAAWgD,EAAWhD,SACtBoD,QAAQzD,OAETK,IAAaoD,cAChB/D,EAAAmB,IAAAyC,EAAcC,EAAAA,4BAAA,GAIV,MAAApD,EAAQE,EAASC,YAAYmD,GAM5B,aAHPH,EAAcnD,EAAMY,YAAA,GAGbZ,EAAMuD,cAAexD,IAC1BR,EAAAmB,IAAAyC,EAAcpD,GAAA,QAKZ,YAAAG,gBACKmD,EACT,EACI,SAAAtD,gBACKoD,EACT,0DApDS,IAAwBK,YAAwBtE,EAAAA,aAAaC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/svelte/hooks/use-search.svelte.ts","../../src/svelte/components/SearchLayer.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport {\n SearchPlugin,\n SearchDocumentState,\n SearchScope,\n initialSearchDocumentState,\n} from '@embedpdf/plugin-search';\n\nexport const useSearchPlugin = () => usePlugin<SearchPlugin>(SearchPlugin.id);\nexport const useSearchCapability = () => useCapability<SearchPlugin>(SearchPlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseSearchReturn {\n provides: SearchScope | null;\n state: SearchDocumentState;\n}\n\n/**\n * Hook for search state for a specific document\n * @param getDocumentId Function that returns the document ID\n */\nexport const useSearch = (getDocumentId: () => string | null): UseSearchReturn => {\n const capability = useSearchCapability();\n\n let searchState = $state<SearchDocumentState>(initialSearchDocumentState);\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n // Scoped capability for current docId\n const scopedProvides = $derived(\n capability.provides && documentId ? capability.provides.forDocument(documentId) : null,\n );\n\n $effect(() => {\n const provides = capability.provides;\n const docId = documentId;\n\n if (!provides || !docId) {\n searchState = initialSearchDocumentState;\n return;\n }\n\n const scope = provides.forDocument(docId);\n\n // Set initial state\n searchState = scope.getState();\n\n // Subscribe to changes\n return scope.onStateChange((state) => {\n searchState = state;\n });\n });\n\n return {\n get provides() {\n return scopedProvides;\n },\n get state() {\n return searchState;\n },\n };\n};\n","<script lang=\"ts\">\n import type { SearchResultState } from '@embedpdf/plugin-search';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { useSearchCapability } from '../hooks';\n import type { HTMLAttributes } from 'svelte/elements';\n\n interface SearchLayerProps extends HTMLAttributes<HTMLDivElement> {\n documentId: string;\n pageIndex: number;\n scale?: number;\n highlightColor?: string;\n activeHighlightColor?: string;\n }\n\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n highlightColor = '#FFFF00',\n activeHighlightColor = '#FFBF00',\n ...divProps\n }: SearchLayerProps = $props();\n\n const searchCapability = useSearchCapability();\n const documentState = useDocumentState(() => documentId);\n\n let searchResultState = $state<SearchResultState | null>(null);\n\n const scope = $derived(searchCapability.provides?.forDocument(documentId) ?? null);\n\n const actualScale = $derived(\n scaleOverride !== undefined ? scaleOverride : (documentState.current?.scale ?? 1),\n );\n\n $effect(() => {\n if (!scope) {\n searchResultState = null;\n return;\n }\n\n // Set initial state\n const currentState = scope.getState();\n searchResultState = {\n results: currentState.results,\n activeResultIndex: currentState.activeResultIndex,\n showAllResults: currentState.showAllResults,\n active: currentState.active,\n };\n\n // Subscribe to changes\n return scope.onSearchResultStateChange((state) => {\n searchResultState = state;\n });\n });\n\n // Filter results for current page while preserving original indices\n const pageResults = $derived(\n searchResultState\n ? searchResultState.results\n .map((result, originalIndex) => ({ result, originalIndex }))\n .filter(({ result }) => result.pageIndex === pageIndex)\n : [],\n );\n\n // Decide which results to show\n const resultsToShow = $derived(\n searchResultState\n ? pageResults.filter(\n ({ originalIndex }) =>\n searchResultState!.showAllResults ||\n originalIndex === searchResultState!.activeResultIndex,\n )\n : [],\n );\n</script>\n\n{#if searchResultState && searchResultState.active}\n <div style:pointer-events=\"none\" {...divProps}>\n {#each resultsToShow as { result, originalIndex }, idx (`result-${idx}`)}\n {#each result.rects as rect, rectIdx (`rect-${idx}-${rectIdx}`)}\n <div\n style:position=\"absolute\"\n style:top=\"{rect.origin.y * actualScale}px\"\n style:left=\"{rect.origin.x * actualScale}px\"\n style:width=\"{rect.size.width * actualScale}px\"\n style:height=\"{rect.size.height * actualScale}px\"\n style:background-color={originalIndex === searchResultState.activeResultIndex\n ? activeHighlightColor\n : highlightColor}\n style:mix-blend-mode=\"multiply\"\n style:transform=\"scale(1.02)\"\n style:transform-origin=\"center\"\n style:transition=\"opacity .3s ease-in-out\"\n style:opacity=\"1\"\n ></div>\n {/each}\n {/each}\n </div>\n{/if}\n"],"names":["useSearchCapability","useCapability","SearchPlugin","id","highlightColor","activeHighlightColor","divProps","$$rest_props_compat","$$props","searchCapability","documentState","useDocumentState","documentId","searchResultState","$","state","scope","_a","provides","forDocument","actualScale","derived","scale","current","user_effect","get","set","currentState","getState","results","activeResultIndex","showAllResults","active","onSearchResultStateChange","pageResults","map","result","originalIndex","filter","pageIndex","resultsToShow","div","root_1","attribute_effect","STYLE","each","idx","$$anchor","$$item","rects","rect","rectIdx","div_1","root_3","styles","top","origin","y","left","x","width","size","height","$$render","consequent","getDocumentId","capability","searchState","initialSearchDocumentState","scopedProvides","docId","onStateChange","usePlugin"],"mappings":"sgBASaA,EAAA,IAA4BC,gBAA4BC,EAAAA,aAAaC,iHCS9E,IAAAC,8BAAiB,WACjBC,oCA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AAAyB,GAAKM,OAAOC,QAAIrC,GAAhB,KACCsC,KAAA5C,EAAAW,IAAAyB,GAAKM,OAAOG,QAAIvC,GAAhB,KACCwC,MAAA9C,EAAAW,IAAAyB,GAAKW,KAAKD,YAAQxC,GAAlB,KACC0C,OAAAhD,EAAAW,IAAAyB,GAAKW,KAAKC,aAAS1C,GAAnB,KACS,4BARKiB,sBAQaxB,GAAkBiB,kBACxDzB,IACAD,mJARLgD,6BAHNX,cAAAA,qBADE5B,IAAiBC,EAAAW,IAAIZ,GAAkBmB,QAAM+B,EAAAC,0BAF1C,oBDrDkBC,IAClB,MAAAC,EAAalE,QAEfmE,EAAcrD,EAAAC,cAA4BqD,EAAAA,6BAGxC,MAAAxD,YAAsBqD,GAGtBI,EAAAvD,EAAAO,QAAA,IACJ6C,EAAWhD,gBAAYN,GAAasD,EAAWhD,SAASC,kBAAYP,IAAc,aAGpFE,EAAAU,uBACQN,EAAWgD,EAAWhD,SACtBoD,QAAQ1D,OAETM,IAAaoD,cAChBxD,EAAAY,IAAAyC,EAAcC,EAAAA,4BAAA,GAIV,MAAApD,EAAQE,EAASC,YAAYmD,GAM5B,aAHPH,EAAcnD,EAAMY,YAAA,GAGbZ,EAAMuD,cAAexD,IAC1BD,EAAAY,IAAAyC,EAAcpD,GAAA,QAKZ,YAAAG,gBACKmD,EACT,EACI,SAAAtD,gBACKoD,EACT,0DApDS,IAAwBK,YAAwBtE,EAAAA,aAAaC"}
@@ -36,7 +36,7 @@ var root_3 = $.from_html(`<div></div>`);
36
36
  var root_1 = $.from_html(`<div></div>`);
37
37
  function SearchLayer($$anchor, $$props) {
38
38
  $.push($$props, true);
39
- let highlightColor = $.prop($$props, "highlightColor", 3, "#FFFF00"), activeHighlightColor = $.prop($$props, "activeHighlightColor", 3, "#FFBF00"), divProps = $.rest_props($$props, [
39
+ let highlightColor = $.prop($$props, "highlightColor", 3, "#FFFF00"), activeHighlightColor = $.prop($$props, "activeHighlightColor", 3, "#FFBF00"), divProps = $$rest_props_compat($$props, [
40
40
  "$$slots",
41
41
  "$$events",
42
42
  "$$legacy",
@@ -120,6 +120,11 @@ function SearchLayer($$anchor, $$props) {
120
120
  $.append($$anchor, fragment);
121
121
  $.pop();
122
122
  }
123
+ function $$rest_props_compat(props, exclude, name) {
124
+ const set = exclude instanceof Set ? exclude : new Set(exclude);
125
+ if (typeof set.includes !== "function") set.includes = Set.prototype.has.bind(set);
126
+ return $.rest_props(props, set, name);
127
+ }
123
128
  export {
124
129
  SearchLayer,
125
130
  useSearch,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/svelte/hooks/use-search.svelte.ts","../../src/svelte/components/SearchLayer.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport {\n SearchPlugin,\n SearchDocumentState,\n SearchScope,\n initialSearchDocumentState,\n} from '@embedpdf/plugin-search';\n\nexport const useSearchPlugin = () => usePlugin<SearchPlugin>(SearchPlugin.id);\nexport const useSearchCapability = () => useCapability<SearchPlugin>(SearchPlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseSearchReturn {\n provides: SearchScope | null;\n state: SearchDocumentState;\n}\n\n/**\n * Hook for search state for a specific document\n * @param getDocumentId Function that returns the document ID\n */\nexport const useSearch = (getDocumentId: () => string | null): UseSearchReturn => {\n const capability = useSearchCapability();\n\n let searchState = $state<SearchDocumentState>(initialSearchDocumentState);\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n // Scoped capability for current docId\n const scopedProvides = $derived(\n capability.provides && documentId ? capability.provides.forDocument(documentId) : null,\n );\n\n $effect(() => {\n const provides = capability.provides;\n const docId = documentId;\n\n if (!provides || !docId) {\n searchState = initialSearchDocumentState;\n return;\n }\n\n const scope = provides.forDocument(docId);\n\n // Set initial state\n searchState = scope.getState();\n\n // Subscribe to changes\n return scope.onStateChange((state) => {\n searchState = state;\n });\n });\n\n return {\n get provides() {\n return scopedProvides;\n },\n get state() {\n return searchState;\n },\n };\n};\n","<script lang=\"ts\">\n import type { SearchResultState } from '@embedpdf/plugin-search';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { useSearchCapability } from '../hooks';\n import type { HTMLAttributes } from 'svelte/elements';\n\n interface SearchLayerProps extends HTMLAttributes<HTMLDivElement> {\n documentId: string;\n pageIndex: number;\n scale?: number;\n highlightColor?: string;\n activeHighlightColor?: string;\n }\n\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n highlightColor = '#FFFF00',\n activeHighlightColor = '#FFBF00',\n ...divProps\n }: SearchLayerProps = $props();\n\n const searchCapability = useSearchCapability();\n const documentState = useDocumentState(() => documentId);\n\n let searchResultState = $state<SearchResultState | null>(null);\n\n const scope = $derived(searchCapability.provides?.forDocument(documentId) ?? null);\n\n const actualScale = $derived(\n scaleOverride !== undefined ? scaleOverride : (documentState.current?.scale ?? 1),\n );\n\n $effect(() => {\n if (!scope) {\n searchResultState = null;\n return;\n }\n\n // Set initial state\n const currentState = scope.getState();\n searchResultState = {\n results: currentState.results,\n activeResultIndex: currentState.activeResultIndex,\n showAllResults: currentState.showAllResults,\n active: currentState.active,\n };\n\n // Subscribe to changes\n return scope.onSearchResultStateChange((state) => {\n searchResultState = state;\n });\n });\n\n // Filter results for current page while preserving original indices\n const pageResults = $derived(\n searchResultState\n ? searchResultState.results\n .map((result, originalIndex) => ({ result, originalIndex }))\n .filter(({ result }) => result.pageIndex === pageIndex)\n : [],\n );\n\n // Decide which results to show\n const resultsToShow = $derived(\n searchResultState\n ? pageResults.filter(\n ({ originalIndex }) =>\n searchResultState!.showAllResults ||\n originalIndex === searchResultState!.activeResultIndex,\n )\n : [],\n );\n</script>\n\n{#if searchResultState && searchResultState.active}\n <div style:pointer-events=\"none\" {...divProps}>\n {#each resultsToShow as { result, originalIndex }, idx (`result-${idx}`)}\n {#each result.rects as rect, rectIdx (`rect-${idx}-${rectIdx}`)}\n <div\n style:position=\"absolute\"\n style:top=\"{rect.origin.y * actualScale}px\"\n style:left=\"{rect.origin.x * actualScale}px\"\n style:width=\"{rect.size.width * actualScale}px\"\n style:height=\"{rect.size.height * actualScale}px\"\n style:background-color={originalIndex === searchResultState.activeResultIndex\n ? activeHighlightColor\n : highlightColor}\n style:mix-blend-mode=\"multiply\"\n style:transform=\"scale(1.02)\"\n style:transform-origin=\"center\"\n style:transition=\"opacity .3s ease-in-out\"\n style:opacity=\"1\"\n ></div>\n {/each}\n {/each}\n </div>\n{/if}\n"],"names":["$$anchor"],"mappings":";;;;;AAQa,MAAA,kBAAA,MAAwB,UAAwB,aAAa,EAAE;AAC/D,MAAA,sBAAA,MAA4B,cAA4B,aAAa,EAAE;MAYvE,YAAA,CAAa,kBAAwD;AAC1E,QAAA,aAAa,oBAAA;MAEf,cAAc,EAAA,cAA4B,0BAA0B,CAAA;AAGlE,QAAA,uBAAsB,aAAA;AAGtB,QAAA,iBAAA,EAAA,QAAA,MACJ,WAAW,kBAAY,UAAA,IAAa,WAAW,SAAS,kBAAY,UAAU,CAAA,IAAI,IAAA;AAGpF,IAAA,kBAAc;UACN,WAAW,WAAW;AACtB,UAAA,cAAQ,UAAA;SAET,YAAA,CAAa,OAAO;AACvB,QAAA,IAAA,aAAc,4BAAA,IAAA;;IAEhB;AAEM,UAAA,QAAQ,SAAS,YAAY,KAAK;UAGxC,aAAc,MAAM,SAAA,GAAA,IAAA;AAGb,WAAA,MAAM,cAAA,CAAe,UAAU;AACpC,QAAA,IAAA,aAAc,OAAA,IAAA;AAAA,IAChB,CAAC;AAAA,EACH,CAAC;;IAGK,IAAA,WAAW;mBACN,cAAA;AAAA,IACT;AAAA,IACI,IAAA,QAAQ;mBACH,WAAA;AAAA,IACT;AAAA;AAEJ;;;wCC9DA;;AAkBI,MAAA,sDAAiB,SAAS,GAC1B,kEAAuB,SAAS,GAC7B,WAAO,EAAA,WAAA,SAAA;AAAA;;;;;;;;;AAGN,QAAA,mBAAmB,oBAAmB;AACtC,QAAA,gBAAgB,iBAAgB,MAAA,QAAA,UAAA;MAElC,oBAAoB,EAA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AI,OAAO,IAAA,CAAAA,WAArC,SAAI;cACxB,QAAE,OAAA;;uDAAF,OAAE,IAAA,QAAA;AAAA;YAEW,KAAA,GAAA,EAAA,IAAA,IAAI,EAAC,OAAO,UAAI,WAAW,CAAA;AAAA,YAC1B,MAAA,GAAA,EAAA,IAAA,IAAI,EAAC,OAAO,UAAI,WAAW,CAAA;AAAA,YAC1B,OAAA,GAAA,EAAA,IAAA,IAAI,EAAC,KAAK,cAAQ,WAAW,CAAA;AAAA,YAC5B,QAAA,GAAA,EAAA,IAAA,IAAI,EAAC,KAAK,eAAS,WAAW,CAAA;AAAA,YACrB,oBAAA,0BAAkB,iBAAiB,EAAC,oBACxD,qBAAmB,IACnB,eAAc;AAAA;;;;;;8BARnB,KAAE;AAAA;;;cAHR,GAAG;0BAAH,GAAG;AAAA;;gBADD,iBAAiB,KAAA,EAAA,IAAI,iBAAiB,EAAC,OAAM,UAAA,UAAA;AAAA;;;;AAF1C;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/svelte/hooks/use-search.svelte.ts","../../src/svelte/components/SearchLayer.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport {\n SearchPlugin,\n SearchDocumentState,\n SearchScope,\n initialSearchDocumentState,\n} from '@embedpdf/plugin-search';\n\nexport const useSearchPlugin = () => usePlugin<SearchPlugin>(SearchPlugin.id);\nexport const useSearchCapability = () => useCapability<SearchPlugin>(SearchPlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseSearchReturn {\n provides: SearchScope | null;\n state: SearchDocumentState;\n}\n\n/**\n * Hook for search state for a specific document\n * @param getDocumentId Function that returns the document ID\n */\nexport const useSearch = (getDocumentId: () => string | null): UseSearchReturn => {\n const capability = useSearchCapability();\n\n let searchState = $state<SearchDocumentState>(initialSearchDocumentState);\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n // Scoped capability for current docId\n const scopedProvides = $derived(\n capability.provides && documentId ? capability.provides.forDocument(documentId) : null,\n );\n\n $effect(() => {\n const provides = capability.provides;\n const docId = documentId;\n\n if (!provides || !docId) {\n searchState = initialSearchDocumentState;\n return;\n }\n\n const scope = provides.forDocument(docId);\n\n // Set initial state\n searchState = scope.getState();\n\n // Subscribe to changes\n return scope.onStateChange((state) => {\n searchState = state;\n });\n });\n\n return {\n get provides() {\n return scopedProvides;\n },\n get state() {\n return searchState;\n },\n };\n};\n","<script lang=\"ts\">\n import type { SearchResultState } from '@embedpdf/plugin-search';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { useSearchCapability } from '../hooks';\n import type { HTMLAttributes } from 'svelte/elements';\n\n interface SearchLayerProps extends HTMLAttributes<HTMLDivElement> {\n documentId: string;\n pageIndex: number;\n scale?: number;\n highlightColor?: string;\n activeHighlightColor?: string;\n }\n\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n highlightColor = '#FFFF00',\n activeHighlightColor = '#FFBF00',\n ...divProps\n }: SearchLayerProps = $props();\n\n const searchCapability = useSearchCapability();\n const documentState = useDocumentState(() => documentId);\n\n let searchResultState = $state<SearchResultState | null>(null);\n\n const scope = $derived(searchCapability.provides?.forDocument(documentId) ?? null);\n\n const actualScale = $derived(\n scaleOverride !== undefined ? scaleOverride : (documentState.current?.scale ?? 1),\n );\n\n $effect(() => {\n if (!scope) {\n searchResultState = null;\n return;\n }\n\n // Set initial state\n const currentState = scope.getState();\n searchResultState = {\n results: currentState.results,\n activeResultIndex: currentState.activeResultIndex,\n showAllResults: currentState.showAllResults,\n active: currentState.active,\n };\n\n // Subscribe to changes\n return scope.onSearchResultStateChange((state) => {\n searchResultState = state;\n });\n });\n\n // Filter results for current page while preserving original indices\n const pageResults = $derived(\n searchResultState\n ? searchResultState.results\n .map((result, originalIndex) => ({ result, originalIndex }))\n .filter(({ result }) => result.pageIndex === pageIndex)\n : [],\n );\n\n // Decide which results to show\n const resultsToShow = $derived(\n searchResultState\n ? pageResults.filter(\n ({ originalIndex }) =>\n searchResultState!.showAllResults ||\n originalIndex === searchResultState!.activeResultIndex,\n )\n : [],\n );\n</script>\n\n{#if searchResultState && searchResultState.active}\n <div style:pointer-events=\"none\" {...divProps}>\n {#each resultsToShow as { result, originalIndex }, idx (`result-${idx}`)}\n {#each result.rects as rect, rectIdx (`rect-${idx}-${rectIdx}`)}\n <div\n style:position=\"absolute\"\n style:top=\"{rect.origin.y * actualScale}px\"\n style:left=\"{rect.origin.x * actualScale}px\"\n style:width=\"{rect.size.width * actualScale}px\"\n style:height=\"{rect.size.height * actualScale}px\"\n style:background-color={originalIndex === searchResultState.activeResultIndex\n ? activeHighlightColor\n : highlightColor}\n style:mix-blend-mode=\"multiply\"\n style:transform=\"scale(1.02)\"\n style:transform-origin=\"center\"\n style:transition=\"opacity .3s ease-in-out\"\n style:opacity=\"1\"\n ></div>\n {/each}\n {/each}\n </div>\n{/if}\n"],"names":["$$anchor"],"mappings":";;;;;AAQa,MAAA,kBAAA,MAAwB,UAAwB,aAAa,EAAE;AAC/D,MAAA,sBAAA,MAA4B,cAA4B,aAAa,EAAE;MAYvE,YAAA,CAAa,kBAAwD;AAC1E,QAAA,aAAa,oBAAA;MAEf,cAAc,EAAA,cAA4B,0BAA0B,CAAA;AAGlE,QAAA,uBAAsB,aAAA;AAGtB,QAAA,iBAAA,EAAA,QAAA,MACJ,WAAW,kBAAY,UAAA,IAAa,WAAW,SAAS,kBAAY,UAAU,CAAA,IAAI,IAAA;AAGpF,IAAA,kBAAc;UACN,WAAW,WAAW;AACtB,UAAA,cAAQ,UAAA;SAET,YAAA,CAAa,OAAO;AACvB,QAAA,IAAA,aAAc,4BAAA,IAAA;;IAEhB;AAEM,UAAA,QAAQ,SAAS,YAAY,KAAK;UAGxC,aAAc,MAAM,SAAA,GAAA,IAAA;AAGb,WAAA,MAAM,cAAA,CAAe,UAAU;AACpC,QAAA,IAAA,aAAc,OAAA,IAAA;AAAA,IAChB,CAAC;AAAA,EACH,CAAC;;IAGK,IAAA,WAAW;mBACN,cAAA;AAAA,IACT;AAAA,I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AAA,EAAA,KAAA,GAAA,EAAA,kBAAA,OAAA,EAAA,EAAA;AAA5C,QAAA,KAAA,qBACQ,aAAa,GAAA,CAAA,EAAO,QAAQ,mCAA+B,GAAG,IAAA,CAAAA,WAAA,QAAA,QAAA;AAA1C,YAAA,6BAAA;AAAQ,YAAA,oCAAA;;;iCAC1B,SAAO,OAAK,CAAI,gCAAuB,GAAG,CAAA,IAAI,OAAO,IAAA,CAAAA,WAArC,SAAI;cACxB,QAAE,OAAA;;uDAAF,OAAE,IAAA,QAAA;AAAA;YAEW,KAAA,GAAA,EAAA,IAAA,IAAI,EAAC,OAAO,UAAI,WAAW,CAAA;AAAA,YAC1B,MAAA,GAAA,EAAA,IAAA,IAAI,EAAC,OAAO,UAAI,WAAW,CAAA;AAAA,YAC1B,OAAA,GAAA,EAAA,IAAA,IAAI,EAAC,KAAK,cAAQ,WAAW,CAAA;AAAA,YAC5B,QAAA,GAAA,EAAA,IAAA,IAAI,EAAC,KAAK,eAAS,WAAW,CAAA;AAAA,YACrB,oBAAA,0BAAkB,iBAAiB,EAAC,oBACxD,qBAAmB,IACnB,eAAc;AAAA;;;;;;8BARnB,KAAE;AAAA;;;cAHR,GAAG;0BAAH,GAAG;AAAA;;gBADD,iBAAiB,KAAA,EAAA,IAAI,iBAAiB,EAAC,OAAM,UAAA,UAAA;AAAA;;;;AAF1C;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-search",
3
- "version": "2.14.4",
3
+ "version": "2.15.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs",
@@ -34,13 +34,13 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@embedpdf/models": "2.14.4"
37
+ "@embedpdf/models": "2.15.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/react": "^18.2.0",
41
41
  "typescript": "^5.0.0",
42
- "@embedpdf/core": "2.14.4",
43
- "@embedpdf/build": "1.1.0"
42
+ "@embedpdf/build": "1.1.0",
43
+ "@embedpdf/core": "2.15.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.8.0",
@@ -48,7 +48,7 @@
48
48
  "preact": "^10.26.4",
49
49
  "vue": ">=3.2.0",
50
50
  "svelte": ">=5 <6",
51
- "@embedpdf/core": "2.14.4"
51
+ "@embedpdf/core": "2.15.1"
52
52
  },
53
53
  "files": [
54
54
  "dist",