@fgv/ts-extras-transformers 5.1.0-29 → 5.1.0-31

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.
Files changed (56) hide show
  1. package/.rush/temp/{cad001c0dd0af20627d8849ed0e5fa4904160f67.tar.log → 68c2ac21917fe0732986270e7582d872fc12e9b8.tar.log} +2 -2
  2. package/.rush/temp/chunked-rush-logs/ts-extras-transformers.build.chunks.jsonl +2 -2
  3. package/.rush/temp/operation/build/all.log +2 -2
  4. package/.rush/temp/operation/build/log-chunks.jsonl +2 -2
  5. package/.rush/temp/operation/build/state.json +1 -1
  6. package/dist/index.js +27 -3
  7. package/dist/index.js.map +1 -1
  8. package/dist/test/unit/transformers.test.js +38 -1
  9. package/dist/test/unit/transformers.test.js.map +1 -1
  10. package/dist/ts-extras-transformers.d.ts +32 -3
  11. package/etc/ts-extras-transformers.api.md +9 -0
  12. package/lib/index.d.ts +27 -5
  13. package/lib/index.d.ts.map +1 -1
  14. package/lib/index.js +28 -3
  15. package/lib/index.js.map +1 -1
  16. package/lib/test/unit/transformers.test.js +37 -0
  17. package/lib/test/unit/transformers.test.js.map +1 -1
  18. package/package.json +19 -19
  19. package/rush-logs/ts-extras-transformers.build.cache.log +1 -1
  20. package/rush-logs/ts-extras-transformers.build.log +2 -2
  21. package/src/index.ts +36 -3
  22. package/src/test/unit/transformers.test.ts +53 -0
  23. package/temp/build/lint/_eslint-5eVG3S6w.json +3 -3
  24. package/temp/build/typescript/ts_8nwakTlr.json +1 -1
  25. package/temp/ts-extras-transformers.api.json +116 -1
  26. package/temp/ts-extras-transformers.api.md +9 -0
  27. package/.rush/temp/chunked-rush-logs/ts-extras-transformers.test.chunks.jsonl +0 -28
  28. package/.rush/temp/operation/test/all.log +0 -28
  29. package/.rush/temp/operation/test/log-chunks.jsonl +0 -28
  30. package/.rush/temp/operation/test/state.json +0 -3
  31. package/rush-logs/ts-extras-transformers.test.cache.log +0 -1
  32. package/rush-logs/ts-extras-transformers.test.log +0 -28
  33. package/temp/coverage/base.css +0 -224
  34. package/temp/coverage/block-navigation.js +0 -87
  35. package/temp/coverage/favicon.png +0 -0
  36. package/temp/coverage/index.html +0 -116
  37. package/temp/coverage/index.ts.html +0 -622
  38. package/temp/coverage/lcov-report/base.css +0 -224
  39. package/temp/coverage/lcov-report/block-navigation.js +0 -87
  40. package/temp/coverage/lcov-report/favicon.png +0 -0
  41. package/temp/coverage/lcov-report/index.html +0 -116
  42. package/temp/coverage/lcov-report/index.ts.html +0 -622
  43. package/temp/coverage/lcov-report/prettify.css +0 -1
  44. package/temp/coverage/lcov-report/prettify.js +0 -2
  45. package/temp/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  46. package/temp/coverage/lcov-report/sorter.js +0 -210
  47. package/temp/coverage/lcov.info +0 -209
  48. package/temp/coverage/prettify.css +0 -1
  49. package/temp/coverage/prettify.js +0 -2
  50. package/temp/coverage/sort-arrow-sprite.png +0 -0
  51. package/temp/coverage/sorter.js +0 -210
  52. package/temp/test/jest/haste-map-502913d9c10083bec2207119c45d7122-cd1aa4a0322f87b67f395127aa5e94ac-091f69b131db2c080ae4b15b7b2d4a16 +0 -0
  53. package/temp/test/jest/jest-transform-cache-502913d9c10083bec2207119c45d7122-79ef2876fae7ca75eedb2aa53dc48338/8d/package_8dec8c7ec8d6c787063a4a014e769a65 +0 -53
  54. package/temp/test/jest/jest-transform-cache-502913d9c10083bec2207119c45d7122-79ef2876fae7ca75eedb2aa53dc48338/d5/package_d56b0a8a49dbfccad646fc2e21950522 +0 -203
  55. package/temp/test/jest/jest-transform-cache-502913d9c10083bec2207119c45d7122-79ef2876fae7ca75eedb2aa53dc48338/fc/versions_fc561f31b0dfb504443c5b8531747bfb +0 -31
  56. package/temp/test/jest/perf-cache-502913d9c10083bec2207119c45d7122-da39a3ee5e6b4b0d3255bfef95601890 +0 -1
@@ -178,7 +178,7 @@
178
178
  },
179
179
  "kind": "Package",
180
180
  "canonicalReference": "@fgv/ts-extras-transformers!",
181
- "docComment": "/**\n * `@fgv/ts-extras-transformers` — Result-integration boundary over `@huggingface/transformers` (Node-side).\n *\n * A thin facade that wraps `@huggingface/transformers` calls in `Result<T>` from `@fgv/ts-utils`, mirroring the discipline established by `@fgv/ts-extras-webauthn`: one-line `captureAsyncResult` wrappers around upstream primitives with **no opinionated orchestration** above the boundary.\n *\n * **In scope:** `loadPipeline`, `classify`, `classifyAll`, `embed` — the surface needed by the B-3/B-4a local-classifier and embedding scenarios. `generate` is explicitly deferred until a concrete consumer use case surfaces (see `phase-b2-result.md`).\n *\n * **Explicitly NOT in scope:** - Pipeline cache / lifecycle management - Model registry or download management - GPU/CPU device selection policy - Quantization selection - Embedding-store integration - Classifier label allowlists - Request batching - Pipeline dispose semantics\n *\n * For any of the above, use `@huggingface/transformers` directly (with `captureAsyncResult` for your own Result wrapping).\n *\n * @packageDocumentation\n */\n",
181
+ "docComment": "/**\n * `@fgv/ts-extras-transformers` — Result-integration boundary over `@huggingface/transformers` (Node-side).\n *\n * A thin facade that wraps `@huggingface/transformers` calls in `Result<T>` from `@fgv/ts-utils`, mirroring the discipline established by `@fgv/ts-extras-webauthn`: one-line `captureAsyncResult` wrappers around upstream primitives with **no opinionated orchestration** above the boundary.\n *\n * **In scope:** `loadPipeline`, `classify`, `classifyAll`, `embed`, `summarize` — the task types exercised by real consumers so far. The general `generate` primitive is explicitly deferred until a concrete consumer use case surfaces (summarization is its own task-specific primitive).\n *\n * **Explicitly NOT in scope:** - Pipeline cache / lifecycle management - Model registry or download management - GPU/CPU device selection policy - Quantization selection - Embedding-store integration - Classifier label allowlists - Request batching - Pipeline dispose semantics\n *\n * For any of the above, use `@huggingface/transformers` directly (with `captureAsyncResult` for your own Result wrapping).\n *\n * @packageDocumentation\n */\n",
182
182
  "name": "@fgv/ts-extras-transformers",
183
183
  "preserveMemberOrder": false,
184
184
  "members": [
@@ -668,6 +668,121 @@
668
668
  }
669
669
  ],
670
670
  "name": "loadPipeline"
671
+ },
672
+ {
673
+ "kind": "Function",
674
+ "canonicalReference": "@fgv/ts-extras-transformers!summarize:function(1)",
675
+ "docComment": "/**\n * Result-integration wrapper that invokes a `SummarizationPipeline` on a single text input. Returns the upstream `SummarizationOutput` Result-wrapped (an array of `{ summary_text }` entries; one for a single-string input).\n *\n * Callers should retrieve the summarizer via `loadPipeline('summarization', modelId)` — e.g. `Xenova/distilbart-cnn-6-6` for a small, local-friendly model. This facade applies no opinionated orchestration (no length policy, no local-vs-cloud routing) — `options` are passed through verbatim and the caller owns any escalation decision.\n *\n * Returns `Promise<Result<SummarizationOutput>>`; upstream errors (inference failures, tokenisation errors) are captured as `Failure` with the original message.\n *\n * @param summarizer - A `SummarizationPipeline` obtained from `loadPipeline`.\n *\n * @param text - The text to summarize.\n *\n * @param options - Optional upstream summarization options (e.g. `min_length`, `max_length`, `max_new_tokens`). Passed through verbatim to the pipeline call.\n *\n * @see\n *\n * https://huggingface.co/docs/transformers.js\n *\n * @public\n */\n",
676
+ "excerptTokens": [
677
+ {
678
+ "kind": "Content",
679
+ "text": "export declare function summarize(summarizer: "
680
+ },
681
+ {
682
+ "kind": "Reference",
683
+ "text": "SummarizationPipeline",
684
+ "canonicalReference": "@huggingface/transformers!SummarizationPipeline:class"
685
+ },
686
+ {
687
+ "kind": "Content",
688
+ "text": ", text: "
689
+ },
690
+ {
691
+ "kind": "Content",
692
+ "text": "string"
693
+ },
694
+ {
695
+ "kind": "Content",
696
+ "text": ", options?: "
697
+ },
698
+ {
699
+ "kind": "Reference",
700
+ "text": "Parameters",
701
+ "canonicalReference": "!Parameters:type"
702
+ },
703
+ {
704
+ "kind": "Content",
705
+ "text": "<"
706
+ },
707
+ {
708
+ "kind": "Reference",
709
+ "text": "SummarizationPipeline",
710
+ "canonicalReference": "@huggingface/transformers!SummarizationPipeline:class"
711
+ },
712
+ {
713
+ "kind": "Content",
714
+ "text": ">[1]"
715
+ },
716
+ {
717
+ "kind": "Content",
718
+ "text": "): "
719
+ },
720
+ {
721
+ "kind": "Reference",
722
+ "text": "Promise",
723
+ "canonicalReference": "!Promise:interface"
724
+ },
725
+ {
726
+ "kind": "Content",
727
+ "text": "<"
728
+ },
729
+ {
730
+ "kind": "Reference",
731
+ "text": "Result",
732
+ "canonicalReference": "@fgv/ts-utils!Result:type"
733
+ },
734
+ {
735
+ "kind": "Content",
736
+ "text": "<"
737
+ },
738
+ {
739
+ "kind": "Reference",
740
+ "text": "SummarizationOutput",
741
+ "canonicalReference": "@huggingface/transformers!SummarizationOutput:type"
742
+ },
743
+ {
744
+ "kind": "Content",
745
+ "text": ">>"
746
+ },
747
+ {
748
+ "kind": "Content",
749
+ "text": ";"
750
+ }
751
+ ],
752
+ "fileUrlPath": "src/index.ts",
753
+ "returnTypeTokenRange": {
754
+ "startIndex": 10,
755
+ "endIndex": 16
756
+ },
757
+ "releaseTag": "Public",
758
+ "overloadIndex": 1,
759
+ "parameters": [
760
+ {
761
+ "parameterName": "summarizer",
762
+ "parameterTypeTokenRange": {
763
+ "startIndex": 1,
764
+ "endIndex": 2
765
+ },
766
+ "isOptional": false
767
+ },
768
+ {
769
+ "parameterName": "text",
770
+ "parameterTypeTokenRange": {
771
+ "startIndex": 3,
772
+ "endIndex": 4
773
+ },
774
+ "isOptional": false
775
+ },
776
+ {
777
+ "parameterName": "options",
778
+ "parameterTypeTokenRange": {
779
+ "startIndex": 5,
780
+ "endIndex": 9
781
+ },
782
+ "isOptional": true
783
+ }
784
+ ],
785
+ "name": "summarize"
671
786
  }
672
787
  ]
673
788
  }
@@ -10,6 +10,8 @@ import { pipeline } from '@huggingface/transformers';
10
10
  import { PipelineType } from '@huggingface/transformers';
11
11
  import { PretrainedModelOptions } from '@huggingface/transformers';
12
12
  import { Result } from '@fgv/ts-utils';
13
+ import { SummarizationOutput } from '@huggingface/transformers';
14
+ import { SummarizationPipeline } from '@huggingface/transformers';
13
15
  import { Tensor } from '@huggingface/transformers';
14
16
  import { TextClassificationOutput } from '@huggingface/transformers';
15
17
  import { TextClassificationPipeline } from '@huggingface/transformers';
@@ -34,6 +36,13 @@ export { PipelineType }
34
36
 
35
37
  export { PretrainedModelOptions }
36
38
 
39
+ export { SummarizationOutput }
40
+
41
+ export { SummarizationPipeline }
42
+
43
+ // @public
44
+ export function summarize(summarizer: SummarizationPipeline, text: string, options?: Parameters<SummarizationPipeline>[1]): Promise<Result<SummarizationOutput>>;
45
+
37
46
  export { Tensor }
38
47
 
39
48
  export { TextClassificationOutput }
@@ -1,28 +0,0 @@
1
- {"kind":"O","text":"Invoking: heft test --clean \n"}
2
- {"kind":"O","text":" ---- build started ---- \n"}
3
- {"kind":"O","text":"[build:clean] Deleted 0 files and 3 folders\n"}
4
- {"kind":"O","text":"[build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.\n"}
5
- {"kind":"O","text":"[build:typescript] Using TypeScript version 5.9.3\n"}
6
- {"kind":"O","text":"[build:lint] Using ESLint version 9.39.4\n"}
7
- {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.58.7\n"}
8
- {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.9.3\n"}
9
- {"kind":"O","text":" ---- build finished (2.842s) ---- \n"}
10
- {"kind":"O","text":" ---- test started ---- \n"}
11
- {"kind":"O","text":"[test:jest] Using Jest version 29.5.0\n"}
12
- {"kind":"O","text":"[test:jest] \n"}
13
- {"kind":"O","text":"[test:jest] Run start. 1 test suite\n"}
14
- {"kind":"O","text":"[test:jest] START lib/test/unit/transformers.test.js\n"}
15
- {"kind":"O","text":"[test:jest] PASS lib/test/unit/transformers.test.js (duration: 2.076s, 23 passed, 0 failed)\n"}
16
- {"kind":"O","text":"[test:jest] \n"}
17
- {"kind":"O","text":"[test:jest] Tests finished:\n"}
18
- {"kind":"O","text":"[test:jest] Successes: 23\n"}
19
- {"kind":"O","text":"[test:jest] Failures: 0\n"}
20
- {"kind":"O","text":"[test:jest] Total: 23\n"}
21
- {"kind":"O","text":"----------|---------|----------|---------|---------|-------------------\n"}
22
- {"kind":"O","text":"File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n"}
23
- {"kind":"O","text":"----------|---------|----------|---------|---------|-------------------\n"}
24
- {"kind":"O","text":"All files | 100 | 100 | 100 | 100 | \n"}
25
- {"kind":"O","text":" index.ts | 100 | 100 | 100 | 100 | \n"}
26
- {"kind":"O","text":"----------|---------|----------|---------|---------|-------------------\n"}
27
- {"kind":"O","text":" ---- test finished (2.889s) ---- \n"}
28
- {"kind":"O","text":"-------------------- Finished (5.736s) --------------------\n"}
@@ -1,28 +0,0 @@
1
- Invoking: heft test --clean
2
- ---- build started ----
3
- [build:clean] Deleted 0 files and 3 folders
4
- [build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.
5
- [build:typescript] Using TypeScript version 5.9.3
6
- [build:lint] Using ESLint version 9.39.4
7
- [build:api-extractor] Using API Extractor version 7.58.7
8
- [build:api-extractor] Analysis will use the bundled TypeScript version 5.9.3
9
- ---- build finished (2.842s) ----
10
- ---- test started ----
11
- [test:jest] Using Jest version 29.5.0
12
- [test:jest]
13
- [test:jest] Run start. 1 test suite
14
- [test:jest] START lib/test/unit/transformers.test.js
15
- [test:jest] PASS lib/test/unit/transformers.test.js (duration: 2.076s, 23 passed, 0 failed)
16
- [test:jest]
17
- [test:jest] Tests finished:
18
- [test:jest] Successes: 23
19
- [test:jest] Failures: 0
20
- [test:jest] Total: 23
21
- ----------|---------|----------|---------|---------|-------------------
22
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
23
- ----------|---------|----------|---------|---------|-------------------
24
- All files | 100 | 100 | 100 | 100 |
25
- index.ts | 100 | 100 | 100 | 100 |
26
- ----------|---------|----------|---------|---------|-------------------
27
- ---- test finished (2.889s) ----
28
- -------------------- Finished (5.736s) --------------------
@@ -1,28 +0,0 @@
1
- {"kind":"O","text":"Invoking: heft test --clean \n"}
2
- {"kind":"O","text":" ---- build started ---- \n"}
3
- {"kind":"O","text":"[build:clean] Deleted 0 files and 3 folders\n"}
4
- {"kind":"O","text":"[build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.\n"}
5
- {"kind":"O","text":"[build:typescript] Using TypeScript version 5.9.3\n"}
6
- {"kind":"O","text":"[build:lint] Using ESLint version 9.39.4\n"}
7
- {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.58.7\n"}
8
- {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.9.3\n"}
9
- {"kind":"O","text":" ---- build finished (2.842s) ---- \n"}
10
- {"kind":"O","text":" ---- test started ---- \n"}
11
- {"kind":"O","text":"[test:jest] Using Jest version 29.5.0\n"}
12
- {"kind":"O","text":"[test:jest] \n"}
13
- {"kind":"O","text":"[test:jest] Run start. 1 test suite\n"}
14
- {"kind":"O","text":"[test:jest] START lib/test/unit/transformers.test.js\n"}
15
- {"kind":"O","text":"[test:jest] PASS lib/test/unit/transformers.test.js (duration: 2.076s, 23 passed, 0 failed)\n"}
16
- {"kind":"O","text":"[test:jest] \n"}
17
- {"kind":"O","text":"[test:jest] Tests finished:\n"}
18
- {"kind":"O","text":"[test:jest] Successes: 23\n"}
19
- {"kind":"O","text":"[test:jest] Failures: 0\n"}
20
- {"kind":"O","text":"[test:jest] Total: 23\n"}
21
- {"kind":"O","text":"----------|---------|----------|---------|---------|-------------------\n"}
22
- {"kind":"O","text":"File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n"}
23
- {"kind":"O","text":"----------|---------|----------|---------|---------|-------------------\n"}
24
- {"kind":"O","text":"All files | 100 | 100 | 100 | 100 | \n"}
25
- {"kind":"O","text":" index.ts | 100 | 100 | 100 | 100 | \n"}
26
- {"kind":"O","text":"----------|---------|----------|---------|---------|-------------------\n"}
27
- {"kind":"O","text":" ---- test finished (2.889s) ---- \n"}
28
- {"kind":"O","text":"-------------------- Finished (5.736s) --------------------\n"}
@@ -1,3 +0,0 @@
1
- {
2
- "nonCachedDurationMs": 6144.683416000002
3
- }
@@ -1 +0,0 @@
1
- This project does not define the caching behavior of the "test" command, so caching has been disabled.
@@ -1,28 +0,0 @@
1
- Invoking: heft test --clean
2
- ---- build started ----
3
- [build:clean] Deleted 0 files and 3 folders
4
- [build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.
5
- [build:typescript] Using TypeScript version 5.9.3
6
- [build:lint] Using ESLint version 9.39.4
7
- [build:api-extractor] Using API Extractor version 7.58.7
8
- [build:api-extractor] Analysis will use the bundled TypeScript version 5.9.3
9
- ---- build finished (2.842s) ----
10
- ---- test started ----
11
- [test:jest] Using Jest version 29.5.0
12
- [test:jest]
13
- [test:jest] Run start. 1 test suite
14
- [test:jest] START lib/test/unit/transformers.test.js
15
- [test:jest] PASS lib/test/unit/transformers.test.js (duration: 2.076s, 23 passed, 0 failed)
16
- [test:jest]
17
- [test:jest] Tests finished:
18
- [test:jest] Successes: 23
19
- [test:jest] Failures: 0
20
- [test:jest] Total: 23
21
- ----------|---------|----------|---------|---------|-------------------
22
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
23
- ----------|---------|----------|---------|---------|-------------------
24
- All files | 100 | 100 | 100 | 100 |
25
- index.ts | 100 | 100 | 100 | 100 |
26
- ----------|---------|----------|---------|---------|-------------------
27
- ---- test finished (2.889s) ----
28
- -------------------- Finished (5.736s) --------------------
@@ -1,224 +0,0 @@
1
- body, html {
2
- margin:0; padding: 0;
3
- height: 100%;
4
- }
5
- body {
6
- font-family: Helvetica Neue, Helvetica, Arial;
7
- font-size: 14px;
8
- color:#333;
9
- }
10
- .small { font-size: 12px; }
11
- *, *:after, *:before {
12
- -webkit-box-sizing:border-box;
13
- -moz-box-sizing:border-box;
14
- box-sizing:border-box;
15
- }
16
- h1 { font-size: 20px; margin: 0;}
17
- h2 { font-size: 14px; }
18
- pre {
19
- font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20
- margin: 0;
21
- padding: 0;
22
- -moz-tab-size: 2;
23
- -o-tab-size: 2;
24
- tab-size: 2;
25
- }
26
- a { color:#0074D9; text-decoration:none; }
27
- a:hover { text-decoration:underline; }
28
- .strong { font-weight: bold; }
29
- .space-top1 { padding: 10px 0 0 0; }
30
- .pad2y { padding: 20px 0; }
31
- .pad1y { padding: 10px 0; }
32
- .pad2x { padding: 0 20px; }
33
- .pad2 { padding: 20px; }
34
- .pad1 { padding: 10px; }
35
- .space-left2 { padding-left:55px; }
36
- .space-right2 { padding-right:20px; }
37
- .center { text-align:center; }
38
- .clearfix { display:block; }
39
- .clearfix:after {
40
- content:'';
41
- display:block;
42
- height:0;
43
- clear:both;
44
- visibility:hidden;
45
- }
46
- .fl { float: left; }
47
- @media only screen and (max-width:640px) {
48
- .col3 { width:100%; max-width:100%; }
49
- .hide-mobile { display:none!important; }
50
- }
51
-
52
- .quiet {
53
- color: #7f7f7f;
54
- color: rgba(0,0,0,0.5);
55
- }
56
- .quiet a { opacity: 0.7; }
57
-
58
- .fraction {
59
- font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60
- font-size: 10px;
61
- color: #555;
62
- background: #E8E8E8;
63
- padding: 4px 5px;
64
- border-radius: 3px;
65
- vertical-align: middle;
66
- }
67
-
68
- div.path a:link, div.path a:visited { color: #333; }
69
- table.coverage {
70
- border-collapse: collapse;
71
- margin: 10px 0 0 0;
72
- padding: 0;
73
- }
74
-
75
- table.coverage td {
76
- margin: 0;
77
- padding: 0;
78
- vertical-align: top;
79
- }
80
- table.coverage td.line-count {
81
- text-align: right;
82
- padding: 0 5px 0 20px;
83
- }
84
- table.coverage td.line-coverage {
85
- text-align: right;
86
- padding-right: 10px;
87
- min-width:20px;
88
- }
89
-
90
- table.coverage td span.cline-any {
91
- display: inline-block;
92
- padding: 0 5px;
93
- width: 100%;
94
- }
95
- .missing-if-branch {
96
- display: inline-block;
97
- margin-right: 5px;
98
- border-radius: 3px;
99
- position: relative;
100
- padding: 0 4px;
101
- background: #333;
102
- color: yellow;
103
- }
104
-
105
- .skip-if-branch {
106
- display: none;
107
- margin-right: 10px;
108
- position: relative;
109
- padding: 0 4px;
110
- background: #ccc;
111
- color: white;
112
- }
113
- .missing-if-branch .typ, .skip-if-branch .typ {
114
- color: inherit !important;
115
- }
116
- .coverage-summary {
117
- border-collapse: collapse;
118
- width: 100%;
119
- }
120
- .coverage-summary tr { border-bottom: 1px solid #bbb; }
121
- .keyline-all { border: 1px solid #ddd; }
122
- .coverage-summary td, .coverage-summary th { padding: 10px; }
123
- .coverage-summary tbody { border: 1px solid #bbb; }
124
- .coverage-summary td { border-right: 1px solid #bbb; }
125
- .coverage-summary td:last-child { border-right: none; }
126
- .coverage-summary th {
127
- text-align: left;
128
- font-weight: normal;
129
- white-space: nowrap;
130
- }
131
- .coverage-summary th.file { border-right: none !important; }
132
- .coverage-summary th.pct { }
133
- .coverage-summary th.pic,
134
- .coverage-summary th.abs,
135
- .coverage-summary td.pct,
136
- .coverage-summary td.abs { text-align: right; }
137
- .coverage-summary td.file { white-space: nowrap; }
138
- .coverage-summary td.pic { min-width: 120px !important; }
139
- .coverage-summary tfoot td { }
140
-
141
- .coverage-summary .sorter {
142
- height: 10px;
143
- width: 7px;
144
- display: inline-block;
145
- margin-left: 0.5em;
146
- background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147
- }
148
- .coverage-summary .sorted .sorter {
149
- background-position: 0 -20px;
150
- }
151
- .coverage-summary .sorted-desc .sorter {
152
- background-position: 0 -10px;
153
- }
154
- .status-line { height: 10px; }
155
- /* yellow */
156
- .cbranch-no { background: yellow !important; color: #111; }
157
- /* dark red */
158
- .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159
- .low .chart { border:1px solid #C21F39 }
160
- .highlighted,
161
- .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162
- background: #C21F39 !important;
163
- }
164
- /* medium red */
165
- .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166
- /* light red */
167
- .low, .cline-no { background:#FCE1E5 }
168
- /* light green */
169
- .high, .cline-yes { background:rgb(230,245,208) }
170
- /* medium green */
171
- .cstat-yes { background:rgb(161,215,106) }
172
- /* dark green */
173
- .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174
- .high .chart { border:1px solid rgb(77,146,33) }
175
- /* dark yellow (gold) */
176
- .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177
- .medium .chart { border:1px solid #f9cd0b; }
178
- /* light yellow */
179
- .medium { background: #fff4c2; }
180
-
181
- .cstat-skip { background: #ddd; color: #111; }
182
- .fstat-skip { background: #ddd; color: #111 !important; }
183
- .cbranch-skip { background: #ddd !important; color: #111; }
184
-
185
- span.cline-neutral { background: #eaeaea; }
186
-
187
- .coverage-summary td.empty {
188
- opacity: .5;
189
- padding-top: 4px;
190
- padding-bottom: 4px;
191
- line-height: 1;
192
- color: #888;
193
- }
194
-
195
- .cover-fill, .cover-empty {
196
- display:inline-block;
197
- height: 12px;
198
- }
199
- .chart {
200
- line-height: 0;
201
- }
202
- .cover-empty {
203
- background: white;
204
- }
205
- .cover-full {
206
- border-right: none !important;
207
- }
208
- pre.prettyprint {
209
- border: none !important;
210
- padding: 0 !important;
211
- margin: 0 !important;
212
- }
213
- .com { color: #999 !important; }
214
- .ignore-none { color: #999; font-weight: normal; }
215
-
216
- .wrapper {
217
- min-height: 100%;
218
- height: auto !important;
219
- height: 100%;
220
- margin: 0 auto -48px;
221
- }
222
- .footer, .push {
223
- height: 48px;
224
- }
@@ -1,87 +0,0 @@
1
- /* eslint-disable */
2
- var jumpToCode = (function init() {
3
- // Classes of code we would like to highlight in the file view
4
- var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
-
6
- // Elements to highlight in the file listing view
7
- var fileListingElements = ['td.pct.low'];
8
-
9
- // We don't want to select elements that are direct descendants of another match
10
- var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
-
12
- // Selector that finds elements on the page to which we can jump
13
- var selector =
14
- fileListingElements.join(', ') +
15
- ', ' +
16
- notSelector +
17
- missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
-
19
- // The NodeList of matching elements
20
- var missingCoverageElements = document.querySelectorAll(selector);
21
-
22
- var currentIndex;
23
-
24
- function toggleClass(index) {
25
- missingCoverageElements
26
- .item(currentIndex)
27
- .classList.remove('highlighted');
28
- missingCoverageElements.item(index).classList.add('highlighted');
29
- }
30
-
31
- function makeCurrent(index) {
32
- toggleClass(index);
33
- currentIndex = index;
34
- missingCoverageElements.item(index).scrollIntoView({
35
- behavior: 'smooth',
36
- block: 'center',
37
- inline: 'center'
38
- });
39
- }
40
-
41
- function goToPrevious() {
42
- var nextIndex = 0;
43
- if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
- nextIndex = missingCoverageElements.length - 1;
45
- } else if (missingCoverageElements.length > 1) {
46
- nextIndex = currentIndex - 1;
47
- }
48
-
49
- makeCurrent(nextIndex);
50
- }
51
-
52
- function goToNext() {
53
- var nextIndex = 0;
54
-
55
- if (
56
- typeof currentIndex === 'number' &&
57
- currentIndex < missingCoverageElements.length - 1
58
- ) {
59
- nextIndex = currentIndex + 1;
60
- }
61
-
62
- makeCurrent(nextIndex);
63
- }
64
-
65
- return function jump(event) {
66
- if (
67
- document.getElementById('fileSearch') === document.activeElement &&
68
- document.activeElement != null
69
- ) {
70
- // if we're currently focused on the search input, we don't want to navigate
71
- return;
72
- }
73
-
74
- switch (event.which) {
75
- case 78: // n
76
- case 74: // j
77
- goToNext();
78
- break;
79
- case 66: // b
80
- case 75: // k
81
- case 80: // p
82
- goToPrevious();
83
- break;
84
- }
85
- };
86
- })();
87
- window.addEventListener('keydown', jumpToCode);
Binary file