@pie-players/pie-tool-dictionary 1.0.0-beta.0 → 1.0.0-beta.10
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/dist/THIRD-PARTY-LICENSES.txt +14 -0
- package/dist/element-props.d.ts +35 -0
- package/dist/index.d.ts +9 -12
- package/dist/tool-dictionary.js +3 -2733
- package/package.json +13 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PIE Framework contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Third-party software included in this package's bundles, with the licence each is used under.
|
|
2
|
+
|
|
3
|
+
========================================================================
|
|
4
|
+
|
|
5
|
+
svelte 5.57.3
|
|
6
|
+
License: MIT
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2016-2025 [Svelte Contributors](https://github.com/sveltejs/svelte/graphs/contributors)
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DictionaryLookup } from './lookup.js';
|
|
2
|
+
/** Inputs shared by the component and its native element declaration. */
|
|
3
|
+
export interface DictionaryElementProps {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
toolId?: string;
|
|
6
|
+
term?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Identity of the current `term`, changing once per time it was asked for.
|
|
9
|
+
*
|
|
10
|
+
* Optional: a host assigning `term` directly need not mint one, and the panel
|
|
11
|
+
* falls back to the term itself. What it buys is a learner selecting the same
|
|
12
|
+
* word twice — a second request for `cat` has a new id, so it re-runs, where an
|
|
13
|
+
* unchanged `term` alone looks like a re-render.
|
|
14
|
+
*/
|
|
15
|
+
termRequestId?: string | number;
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
language?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Host-supplied resolver, preferred over `endpoint`. A property rather than an
|
|
20
|
+
* attribute because it is a function; a host with its own client passes it
|
|
21
|
+
* directly instead of routing through HTTP shaping this package guessed at.
|
|
22
|
+
*/
|
|
23
|
+
lookup?: DictionaryLookup;
|
|
24
|
+
/**
|
|
25
|
+
* Extra request headers for the `endpoint` path, read per request so a
|
|
26
|
+
* short-lived token is fetched fresh rather than captured at mount.
|
|
27
|
+
*
|
|
28
|
+
* Only for a host whose route is not authorised by the assessment's own session:
|
|
29
|
+
* the endpoint is called `same-origin` by default, so a route behind that session
|
|
30
|
+
* needs nothing here.
|
|
31
|
+
*/
|
|
32
|
+
headers?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
33
|
+
/** Overrides the `same-origin` default for the `endpoint` path. */
|
|
34
|
+
credentials?: RequestCredentials;
|
|
35
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* `endpoint` attribute for the built-in POST shaping, or assign the element's `lookup`
|
|
11
|
-
* property to use a client of your own.
|
|
12
|
-
*/
|
|
1
|
+
import { DictionaryElementProps } from './element-props.js';
|
|
2
|
+
/** Native host interface for `<pie-tool-dictionary>`. Properties may be unset until it mounts. */
|
|
3
|
+
export interface PieToolDictionaryElement extends HTMLElement, DictionaryElementProps {
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
interface HTMLElementTagNameMap {
|
|
7
|
+
"pie-tool-dictionary": PieToolDictionaryElement;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
13
10
|
export type { DictionaryEntry, DictionaryLookup, DictionaryLookupRequest, DictionaryLookupResult, DictionarySense, } from './lookup.js';
|