@vue-skuilder/common 0.1.16 → 0.1.18
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/dist/interfaces/TagFilter.d.ts +27 -0
- package/dist/interfaces/TagFilter.d.ts.map +1 -0
- package/dist/interfaces/TagFilter.js +22 -0
- package/dist/interfaces/TagFilter.js.map +1 -0
- package/dist/interfaces/TagFilter.mjs +18 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/index.mjs +1 -0
- package/dist/logshim.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/interfaces/TagFilter.ts +37 -0
- package/src/interfaces/index.ts +1 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag filter configuration for scoped study sessions.
|
|
3
|
+
*
|
|
4
|
+
* Allows users to focus on specific topics within a course by
|
|
5
|
+
* filtering cards based on their tags.
|
|
6
|
+
*/
|
|
7
|
+
export interface TagFilter {
|
|
8
|
+
/**
|
|
9
|
+
* Cards must have at least one of these tags to be included.
|
|
10
|
+
* An empty array means no inclusion filter (all cards eligible).
|
|
11
|
+
*/
|
|
12
|
+
include: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Cards with any of these tags will be excluded.
|
|
15
|
+
* Applied after inclusion filter.
|
|
16
|
+
*/
|
|
17
|
+
exclude: string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates an empty TagFilter with no constraints.
|
|
21
|
+
*/
|
|
22
|
+
export declare function emptyTagFilter(): TagFilter;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if a TagFilter has any active constraints.
|
|
25
|
+
*/
|
|
26
|
+
export declare function hasActiveFilter(filter: TagFilter | undefined): boolean;
|
|
27
|
+
//# sourceMappingURL=TagFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagFilter.d.ts","sourceRoot":"","sources":["../../src/interfaces/TagFilter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;;OAGG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,SAAS,CAK1C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAGtE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyTagFilter = emptyTagFilter;
|
|
4
|
+
exports.hasActiveFilter = hasActiveFilter;
|
|
5
|
+
/**
|
|
6
|
+
* Creates an empty TagFilter with no constraints.
|
|
7
|
+
*/
|
|
8
|
+
function emptyTagFilter() {
|
|
9
|
+
return {
|
|
10
|
+
include: [],
|
|
11
|
+
exclude: [],
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Checks if a TagFilter has any active constraints.
|
|
16
|
+
*/
|
|
17
|
+
function hasActiveFilter(filter) {
|
|
18
|
+
if (!filter)
|
|
19
|
+
return false;
|
|
20
|
+
return filter.include.length > 0 || filter.exclude.length > 0;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=TagFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagFilter.js","sourceRoot":"","sources":["../../src/interfaces/TagFilter.ts"],"names":[],"mappings":"AAoBA;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAA6B;IAC3D,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an empty TagFilter with no constraints.
|
|
3
|
+
*/
|
|
4
|
+
export function emptyTagFilter() {
|
|
5
|
+
return {
|
|
6
|
+
include: [],
|
|
7
|
+
exclude: [],
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Checks if a TagFilter has any active constraints.
|
|
12
|
+
*/
|
|
13
|
+
export function hasActiveFilter(filter) {
|
|
14
|
+
if (!filter)
|
|
15
|
+
return false;
|
|
16
|
+
return filter.include.length > 0 || filter.exclude.length > 0;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=TagFilter.js.map
|
|
@@ -2,6 +2,7 @@ export * from './AnswerInterfaces.js';
|
|
|
2
2
|
export * from './DataShape.js';
|
|
3
3
|
export * from './FieldDefinition.js';
|
|
4
4
|
export * from './Tagger.js';
|
|
5
|
+
export * from './TagFilter.js';
|
|
5
6
|
export * from './Validator.js';
|
|
6
7
|
export * from './ViewData.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -18,6 +18,7 @@ __exportStar(require("./AnswerInterfaces.js"), exports);
|
|
|
18
18
|
__exportStar(require("./DataShape.js"), exports);
|
|
19
19
|
__exportStar(require("./FieldDefinition.js"), exports);
|
|
20
20
|
__exportStar(require("./Tagger.js"), exports);
|
|
21
|
+
__exportStar(require("./TagFilter.js"), exports);
|
|
21
22
|
__exportStar(require("./Validator.js"), exports);
|
|
22
23
|
__exportStar(require("./ViewData.js"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
@@ -2,6 +2,7 @@ export * from './AnswerInterfaces.mjs';
|
|
|
2
2
|
export * from './DataShape.mjs';
|
|
3
3
|
export * from './FieldDefinition.mjs';
|
|
4
4
|
export * from './Tagger.mjs';
|
|
5
|
+
export * from './TagFilter.mjs';
|
|
5
6
|
export * from './Validator.mjs';
|
|
6
7
|
export * from './ViewData.mjs';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/logshim.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logshim.d.ts","sourceRoot":"","sources":["../src/logshim.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"logshim.d.ts","sourceRoot":"","sources":["../src/logshim.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,OAAO,EAAE,KAAG,IAGxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.18",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.mjs",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"packageManager": "yarn@4.6.0",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"typescript": "~5.
|
|
32
|
+
"typescript": "~5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"moment": "^2.30.1",
|
|
36
36
|
"zod": "^3.23.8",
|
|
37
37
|
"zod-to-json-schema": "^3.23.5"
|
|
38
38
|
},
|
|
39
|
-
"stableVersion": "0.1.
|
|
39
|
+
"stableVersion": "0.1.18"
|
|
40
40
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag filter configuration for scoped study sessions.
|
|
3
|
+
*
|
|
4
|
+
* Allows users to focus on specific topics within a course by
|
|
5
|
+
* filtering cards based on their tags.
|
|
6
|
+
*/
|
|
7
|
+
export interface TagFilter {
|
|
8
|
+
/**
|
|
9
|
+
* Cards must have at least one of these tags to be included.
|
|
10
|
+
* An empty array means no inclusion filter (all cards eligible).
|
|
11
|
+
*/
|
|
12
|
+
include: string[];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Cards with any of these tags will be excluded.
|
|
16
|
+
* Applied after inclusion filter.
|
|
17
|
+
*/
|
|
18
|
+
exclude: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates an empty TagFilter with no constraints.
|
|
23
|
+
*/
|
|
24
|
+
export function emptyTagFilter(): TagFilter {
|
|
25
|
+
return {
|
|
26
|
+
include: [],
|
|
27
|
+
exclude: [],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Checks if a TagFilter has any active constraints.
|
|
33
|
+
*/
|
|
34
|
+
export function hasActiveFilter(filter: TagFilter | undefined): boolean {
|
|
35
|
+
if (!filter) return false;
|
|
36
|
+
return filter.include.length > 0 || filter.exclude.length > 0;
|
|
37
|
+
}
|
package/src/interfaces/index.ts
CHANGED