@transistorsoft/background-geolocation-types 5.0.0-beta.5 → 5.0.0-beta.6
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/assets/images/favicon.ico +0 -0
- package/assets/images/transistor-logo-black-150.png +0 -0
- package/assets/images/transistor-logo-bw.svg +79 -0
- package/assets/images/transistor-logo.svg +94 -0
- package/package.json +15 -12
- package/tools/typedoc-plugin-gitlink/index.cjs +162 -0
- package/tools/typedoc-plugin-mediaplayer/index.cjs +76 -0
- package/tools/typedoc-plugin-site/index.cjs +195 -0
- package/tsconfig.json +17 -0
- package/typedoc.json +28 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
|
4
|
+
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
|
5
|
+
]>
|
|
6
|
+
<svg version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
|
8
|
+
x="0px" y="0px" width="312px" height="136px" viewBox="-12.453 -22.492 312 136" enable-background="new -12.453 -22.492 312 136"
|
|
9
|
+
xml:space="preserve">
|
|
10
|
+
<defs>
|
|
11
|
+
</defs>
|
|
12
|
+
<path fill="#000000" d="M53.86,47.258h-1.59v-2.582h1.59v-2.796l3.209-1.184v3.98h3.779v2.582H57.07v6.024
|
|
13
|
+
c0,0.987,0.154,1.679,0.464,2.087c0.309,0.408,0.847,0.608,1.618,0.608c0.773,0,1.491-0.205,2.159-0.626v2.956
|
|
14
|
+
c-0.746,0.253-1.808,0.386-3.184,0.386c-1.373,0-2.425-0.391-3.161-1.168c-0.736-0.772-1.105-1.875-1.105-3.306V47.258L53.86,47.258
|
|
15
|
+
z M70.829,47.67c-0.575-0.376-1.202-0.565-1.89-0.565c-0.747,0-1.404,0.339-1.982,1.014c-0.579,0.679-0.869,1.503-0.869,2.481v7.835
|
|
16
|
+
H62.88V44.676h3.208v1.258c0.9-1.008,2.092-1.512,3.583-1.512c1.095,0,1.939,0.165,2.521,0.5L70.829,47.67L70.829,47.67z
|
|
17
|
+
M80.026,57.062c-0.293,0.479-0.802,0.867-1.526,1.173c-0.723,0.304-1.477,0.458-2.267,0.458c-1.482,0-2.644-0.374-3.494-1.115
|
|
18
|
+
c-0.847-0.74-1.271-1.792-1.271-3.152c0-1.59,0.6-2.84,1.792-3.74c1.198-0.897,2.895-1.344,5.095-1.344
|
|
19
|
+
c0.377,0,0.821,0.061,1.332,0.191c0-1.617-1.02-2.429-3.069-2.429c-1.205,0-2.218,0.203-3.029,0.605l-0.692-2.495
|
|
20
|
+
c1.104-0.53,2.415-0.793,3.941-0.793c2.101,0,3.635,0.478,4.612,1.429c0.974,0.956,1.464,2.766,1.464,5.429v2.94
|
|
21
|
+
c0,1.833,0.37,2.987,1.105,3.457c-0.269,0.463-0.562,0.75-0.886,0.854c-0.33,0.104-0.701,0.163-1.118,0.163
|
|
22
|
+
c-0.466,0-0.877-0.172-1.245-0.519C80.403,57.833,80.153,57.46,80.026,57.062L80.026,57.062z M79.716,51.959
|
|
23
|
+
c-0.549-0.109-0.956-0.168-1.232-0.168c-2.533,0-3.801,0.834-3.801,2.496c0,1.23,0.714,1.85,2.142,1.85
|
|
24
|
+
c1.931,0,2.891-0.964,2.891-2.895V51.959L79.716,51.959z M94.307,58.435v-7.949c0-1.175-0.224-2.031-0.675-2.569
|
|
25
|
+
c-0.448-0.539-1.184-0.812-2.2-0.812c-0.474,0-0.975,0.133-1.51,0.399c-0.533,0.262-0.956,0.597-1.253,0.987v9.943h-3.208V44.676
|
|
26
|
+
h2.31l0.591,1.285c0.873-1.027,2.162-1.539,3.864-1.539c1.639,0,2.927,0.491,3.874,1.468c0.949,0.983,1.416,2.351,1.416,4.104v8.44
|
|
27
|
+
H94.307L94.307,58.435z M99.212,57.548l1.144-2.556c0.96,0.762,2.043,1.145,3.248,1.145c1.25,0,1.878-0.446,1.878-1.338
|
|
28
|
+
c0-0.521-0.19-0.952-0.567-1.284c-0.376-0.334-1.108-0.728-2.197-1.185c-2.371-0.981-3.559-2.362-3.559-4.134
|
|
29
|
+
c0-1.188,0.455-2.118,1.364-2.779c0.907-0.667,2.068-0.995,3.48-0.995c1.43,0,2.776,0.321,4.035,0.961l-0.926,2.492
|
|
30
|
+
c-0.701-0.599-1.679-0.897-2.929-0.897c-1.121,0-1.683,0.443-1.683,1.334c0,0.351,0.183,0.669,0.551,0.95
|
|
31
|
+
c0.37,0.285,1.158,0.662,2.364,1.135c1.209,0.478,2.078,1.054,2.608,1.733c0.53,0.675,0.799,1.489,0.799,2.449
|
|
32
|
+
c0,1.276-0.475,2.281-1.421,3.014c-0.947,0.73-2.231,1.101-3.862,1.101c-0.917,0-1.649-0.076-2.202-0.229
|
|
33
|
+
C100.785,58.316,100.076,58.009,99.212,57.548L99.212,57.548z M112.984,39.344c0.512,0,0.95,0.185,1.314,0.547
|
|
34
|
+
c0.365,0.364,0.548,0.804,0.548,1.316s-0.183,0.956-0.548,1.32c-0.364,0.363-0.802,0.544-1.314,0.544
|
|
35
|
+
c-0.513,0-0.956-0.182-1.32-0.544c-0.364-0.364-0.544-0.807-0.544-1.32s0.18-0.952,0.544-1.316
|
|
36
|
+
C112.028,39.529,112.471,39.344,112.984,39.344L112.984,39.344z M111.325,58.435V47.311h-1.763v-2.635h5.013v13.759H111.325
|
|
37
|
+
L111.325,58.435z M116.539,57.548l1.144-2.556c0.961,0.762,2.044,1.145,3.25,1.145c1.248,0,1.876-0.446,1.876-1.338
|
|
38
|
+
c0-0.521-0.188-0.952-0.565-1.284c-0.378-0.334-1.109-0.728-2.197-1.185c-2.372-0.981-3.561-2.362-3.561-4.134
|
|
39
|
+
c0-1.188,0.457-2.118,1.363-2.779c0.907-0.667,2.069-0.995,3.481-0.995c1.428,0,2.774,0.321,4.033,0.961l-0.924,2.492
|
|
40
|
+
c-0.703-0.599-1.681-0.897-2.929-0.897c-1.123,0-1.685,0.443-1.685,1.334c0,0.351,0.185,0.669,0.553,0.95
|
|
41
|
+
c0.368,0.285,1.158,0.662,2.363,1.135c1.209,0.478,2.079,1.054,2.61,1.733c0.529,0.675,0.797,1.489,0.797,2.449
|
|
42
|
+
c0,1.276-0.474,2.281-1.421,3.014c-0.947,0.73-2.23,1.101-3.863,1.101c-0.915,0-1.647-0.076-2.2-0.229
|
|
43
|
+
C118.113,58.316,117.403,58.009,116.539,57.548L116.539,57.548z M128.279,47.258h-1.589v-2.582h1.589v-2.796l3.21-1.184v3.98h3.778
|
|
44
|
+
v2.582h-3.778v6.024c0,0.987,0.153,1.679,0.463,2.087c0.307,0.408,0.848,0.608,1.618,0.608c0.772,0,1.491-0.205,2.159-0.626v2.956
|
|
45
|
+
c-0.747,0.253-1.808,0.386-3.184,0.386c-1.373,0-2.426-0.391-3.161-1.168c-0.736-0.772-1.106-1.875-1.106-3.306V47.258
|
|
46
|
+
L128.279,47.258z M136.396,51.524c0-2.101,0.608-3.806,1.818-5.125c1.21-1.32,2.811-1.978,4.797-1.978
|
|
47
|
+
c2.092,0,3.714,0.631,4.872,1.898c1.152,1.266,1.731,3.003,1.731,5.204c0,2.191-0.588,3.932-1.766,5.226
|
|
48
|
+
c-1.176,1.295-2.788,1.943-4.837,1.943c-2.086,0-3.713-0.654-4.875-1.961C136.979,55.425,136.396,53.69,136.396,51.524
|
|
49
|
+
L136.396,51.524z M139.737,51.524c0,3.029,1.091,4.546,3.274,4.546c1.005,0,1.798-0.394,2.385-1.184
|
|
50
|
+
c0.583-0.785,0.877-1.907,0.877-3.362c0-2.989-1.088-4.485-3.262-4.485c-0.999,0-1.797,0.396-2.389,1.184
|
|
51
|
+
C140.035,49.012,139.737,50.112,139.737,51.524L139.737,51.524z M159.212,47.67c-0.574-0.376-1.2-0.565-1.89-0.565
|
|
52
|
+
c-0.745,0-1.403,0.339-1.981,1.014c-0.58,0.679-0.869,1.503-0.869,2.481v7.835h-3.208V44.676h3.208v1.258
|
|
53
|
+
c0.899-1.008,2.092-1.512,3.583-1.512c1.096,0,1.938,0.165,2.52,0.5L159.212,47.67L159.212,47.67z"/>
|
|
54
|
+
<path fill="#000000" d="M161.56,57.548l1.144-2.556c0.961,0.762,2.044,1.145,3.249,1.145c1.249,0,1.877-0.446,1.877-1.338
|
|
55
|
+
c0-0.521-0.188-0.952-0.566-1.284c-0.377-0.334-1.109-0.728-2.194-1.185c-2.374-0.981-3.561-2.362-3.561-4.134
|
|
56
|
+
c0-1.188,0.454-2.118,1.362-2.779c0.907-0.667,2.07-0.995,3.481-0.995c1.429,0,2.775,0.321,4.034,0.961l-0.927,2.492
|
|
57
|
+
c-0.7-0.599-1.679-0.897-2.929-0.897c-1.121,0-1.683,0.443-1.683,1.334c0,0.351,0.185,0.669,0.553,0.95
|
|
58
|
+
c0.368,0.285,1.157,0.662,2.363,1.135c1.209,0.478,2.077,1.054,2.607,1.733c0.532,0.675,0.799,1.489,0.799,2.449
|
|
59
|
+
c0,1.276-0.474,2.281-1.42,3.014c-0.947,0.73-2.232,1.101-3.863,1.101c-0.917,0-1.649-0.076-2.199-0.229
|
|
60
|
+
C163.134,58.316,162.423,58.009,161.56,57.548L161.56,57.548z M171.911,51.524c0-2.101,0.608-3.806,1.818-5.125
|
|
61
|
+
c1.211-1.32,2.811-1.978,4.797-1.978c2.092,0,3.714,0.631,4.871,1.898c1.153,1.266,1.731,3.003,1.731,5.204
|
|
62
|
+
c0,2.191-0.588,3.932-1.766,5.226c-1.175,1.295-2.788,1.943-4.837,1.943c-2.088,0-3.714-0.654-4.875-1.961
|
|
63
|
+
C172.493,55.425,171.911,53.69,171.911,51.524L171.911,51.524z M175.252,51.524c0,3.029,1.092,4.546,3.274,4.546
|
|
64
|
+
c1.005,0,1.798-0.394,2.386-1.184c0.583-0.785,0.877-1.907,0.877-3.362c0-2.989-1.087-4.485-3.263-4.485
|
|
65
|
+
c-0.999,0-1.797,0.396-2.389,1.184C175.55,49.012,175.252,50.112,175.252,51.524L175.252,51.524z M194.447,41.979
|
|
66
|
+
c-0.706-0.231-1.245-0.345-1.623-0.345c-0.604,0-1.122,0.262-1.547,0.785c-0.423,0.521-0.636,1.162-0.636,1.925
|
|
67
|
+
c0,0.113,0.005,0.223,0.014,0.333h2.854v2.648h-2.802v11.11h-3.21v-11.11h-2.003v-2.648h2.017c0.064-1.684,0.564-3.047,1.495-4.081
|
|
68
|
+
c0.931-1.04,2.131-1.558,3.604-1.558c0.758,0,1.688,0.168,2.784,0.5L194.447,41.979L194.447,41.979z M196.064,47.258h-1.591v-2.582
|
|
69
|
+
h1.591v-2.796l3.209-1.184v3.98h3.78v2.582h-3.78v6.024c0,0.987,0.153,1.679,0.465,2.087c0.308,0.408,0.846,0.608,1.618,0.608
|
|
70
|
+
c0.771,0,1.491-0.205,2.157-0.626v2.956c-0.747,0.253-1.807,0.386-3.184,0.386c-1.373,0-2.424-0.391-3.161-1.168
|
|
71
|
+
c-0.736-0.772-1.104-1.875-1.104-3.306V47.258L196.064,47.258z M218.596
|
|
72
|
+
"/>
|
|
73
|
+
<polygon fill="#000000" points="64.393,99.121 64.393,80.978 45.592,80.978 45.592,98.5 30.217,98.5 30.217,80.978 30.217,80.978
|
|
74
|
+
30.217,73.29 30.217,57.939 1.389,57.939 1.389,42.565 30.217,42.565 30.217,27.214 30.217,19.527 30.217,19.527 30.217,2.003
|
|
75
|
+
45.592,2.003 45.592,19.527 64.393,19.527 64.393,1.383 79.767,1.383 79.767,27.214 79.767,34.902 72.079,34.902 45.592,34.902
|
|
76
|
+
45.592,65.603 72.079,65.603 79.767,65.603 79.767,73.29 79.767,99.121 64.393,99.121 "/>
|
|
77
|
+
<image display="none" overflow="visible" width="261" height="100" id="L9A0LB_3_" xlink:href="40882050.png" >
|
|
78
|
+
</image>
|
|
79
|
+
</svg>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
|
4
|
+
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
|
5
|
+
]>
|
|
6
|
+
<svg version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
|
8
|
+
x="0px" y="0px" width="312px" height="136px" viewBox="-12.453 -22.492 312 136" enable-background="new -12.453 -22.492 312 136"
|
|
9
|
+
xml:space="preserve">
|
|
10
|
+
<defs>
|
|
11
|
+
</defs>
|
|
12
|
+
<path fill="#FFFFFF" d="M53.86,47.258h-1.59v-2.582h1.59v-2.796l3.209-1.184v3.98h3.779v2.582H57.07v6.024
|
|
13
|
+
c0,0.987,0.154,1.679,0.464,2.087c0.309,0.408,0.847,0.608,1.618,0.608c0.773,0,1.491-0.205,2.159-0.626v2.956
|
|
14
|
+
c-0.746,0.253-1.808,0.386-3.184,0.386c-1.373,0-2.425-0.391-3.161-1.168c-0.736-0.772-1.105-1.875-1.105-3.306V47.258L53.86,47.258
|
|
15
|
+
z M70.829,47.67c-0.575-0.376-1.202-0.565-1.89-0.565c-0.747,0-1.404,0.339-1.982,1.014c-0.579,0.679-0.869,1.503-0.869,2.481v7.835
|
|
16
|
+
H62.88V44.676h3.208v1.258c0.9-1.008,2.092-1.512,3.583-1.512c1.095,0,1.939,0.165,2.521,0.5L70.829,47.67L70.829,47.67z
|
|
17
|
+
M80.026,57.062c-0.293,0.479-0.802,0.867-1.526,1.173c-0.723,0.304-1.477,0.458-2.267,0.458c-1.482,0-2.644-0.374-3.494-1.115
|
|
18
|
+
c-0.847-0.74-1.271-1.792-1.271-3.152c0-1.59,0.6-2.84,1.792-3.74c1.198-0.897,2.895-1.344,5.095-1.344
|
|
19
|
+
c0.377,0,0.821,0.061,1.332,0.191c0-1.617-1.02-2.429-3.069-2.429c-1.205,0-2.218,0.203-3.029,0.605l-0.692-2.495
|
|
20
|
+
c1.104-0.53,2.415-0.793,3.941-0.793c2.101,0,3.635,0.478,4.612,1.429c0.974,0.956,1.464,2.766,1.464,5.429v2.94
|
|
21
|
+
c0,1.833,0.37,2.987,1.105,3.457c-0.269,0.463-0.562,0.75-0.886,0.854c-0.33,0.104-0.701,0.163-1.118,0.163
|
|
22
|
+
c-0.466,0-0.877-0.172-1.245-0.519C80.403,57.833,80.153,57.46,80.026,57.062L80.026,57.062z M79.716,51.959
|
|
23
|
+
c-0.549-0.109-0.956-0.168-1.232-0.168c-2.533,0-3.801,0.834-3.801,2.496c0,1.23,0.714,1.85,2.142,1.85
|
|
24
|
+
c1.931,0,2.891-0.964,2.891-2.895V51.959L79.716,51.959z M94.307,58.435v-7.949c0-1.175-0.224-2.031-0.675-2.569
|
|
25
|
+
c-0.448-0.539-1.184-0.812-2.2-0.812c-0.474,0-0.975,0.133-1.51,0.399c-0.533,0.262-0.956,0.597-1.253,0.987v9.943h-3.208V44.676
|
|
26
|
+
h2.31l0.591,1.285c0.873-1.027,2.162-1.539,3.864-1.539c1.639,0,2.927,0.491,3.874,1.468c0.949,0.983,1.416,2.351,1.416,4.104v8.44
|
|
27
|
+
H94.307L94.307,58.435z M99.212,57.548l1.144-2.556c0.96,0.762,2.043,1.145,3.248,1.145c1.25,0,1.878-0.446,1.878-1.338
|
|
28
|
+
c0-0.521-0.19-0.952-0.567-1.284c-0.376-0.334-1.108-0.728-2.197-1.185c-2.371-0.981-3.559-2.362-3.559-4.134
|
|
29
|
+
c0-1.188,0.455-2.118,1.364-2.779c0.907-0.667,2.068-0.995,3.48-0.995c1.43,0,2.776,0.321,4.035,0.961l-0.926,2.492
|
|
30
|
+
c-0.701-0.599-1.679-0.897-2.929-0.897c-1.121,0-1.683,0.443-1.683,1.334c0,0.351,0.183,0.669,0.551,0.95
|
|
31
|
+
c0.37,0.285,1.158,0.662,2.364,1.135c1.209,0.478,2.078,1.054,2.608,1.733c0.53,0.675,0.799,1.489,0.799,2.449
|
|
32
|
+
c0,1.276-0.475,2.281-1.421,3.014c-0.947,0.73-2.231,1.101-3.862,1.101c-0.917,0-1.649-0.076-2.202-0.229
|
|
33
|
+
C100.785,58.316,100.076,58.009,99.212,57.548L99.212,57.548z M112.984,39.344c0.512,0,0.95,0.185,1.314,0.547
|
|
34
|
+
c0.365,0.364,0.548,0.804,0.548,1.316s-0.183,0.956-0.548,1.32c-0.364,0.363-0.802,0.544-1.314,0.544
|
|
35
|
+
c-0.513,0-0.956-0.182-1.32-0.544c-0.364-0.364-0.544-0.807-0.544-1.32s0.18-0.952,0.544-1.316
|
|
36
|
+
C112.028,39.529,112.471,39.344,112.984,39.344L112.984,39.344z M111.325,58.435V47.311h-1.763v-2.635h5.013v13.759H111.325
|
|
37
|
+
L111.325,58.435z M116.539,57.548l1.144-2.556c0.961,0.762,2.044,1.145,3.25,1.145c1.248,0,1.876-0.446,1.876-1.338
|
|
38
|
+
c0-0.521-0.188-0.952-0.565-1.284c-0.378-0.334-1.109-0.728-2.197-1.185c-2.372-0.981-3.561-2.362-3.561-4.134
|
|
39
|
+
c0-1.188,0.457-2.118,1.363-2.779c0.907-0.667,2.069-0.995,3.481-0.995c1.428,0,2.774,0.321,4.033,0.961l-0.924,2.492
|
|
40
|
+
c-0.703-0.599-1.681-0.897-2.929-0.897c-1.123,0-1.685,0.443-1.685,1.334c0,0.351,0.185,0.669,0.553,0.95
|
|
41
|
+
c0.368,0.285,1.158,0.662,2.363,1.135c1.209,0.478,2.079,1.054,2.61,1.733c0.529,0.675,0.797,1.489,0.797,2.449
|
|
42
|
+
c0,1.276-0.474,2.281-1.421,3.014c-0.947,0.73-2.23,1.101-3.863,1.101c-0.915,0-1.647-0.076-2.2-0.229
|
|
43
|
+
C118.113,58.316,117.403,58.009,116.539,57.548L116.539,57.548z M128.279,47.258h-1.589v-2.582h1.589v-2.796l3.21-1.184v3.98h3.778
|
|
44
|
+
v2.582h-3.778v6.024c0,0.987,0.153,1.679,0.463,2.087c0.307,0.408,0.848,0.608,1.618,0.608c0.772,0,1.491-0.205,2.159-0.626v2.956
|
|
45
|
+
c-0.747,0.253-1.808,0.386-3.184,0.386c-1.373,0-2.426-0.391-3.161-1.168c-0.736-0.772-1.106-1.875-1.106-3.306V47.258
|
|
46
|
+
L128.279,47.258z M136.396,51.524c0-2.101,0.608-3.806,1.818-5.125c1.21-1.32,2.811-1.978,4.797-1.978
|
|
47
|
+
c2.092,0,3.714,0.631,4.872,1.898c1.152,1.266,1.731,3.003,1.731,5.204c0,2.191-0.588,3.932-1.766,5.226
|
|
48
|
+
c-1.176,1.295-2.788,1.943-4.837,1.943c-2.086,0-3.713-0.654-4.875-1.961C136.979,55.425,136.396,53.69,136.396,51.524
|
|
49
|
+
L136.396,51.524z M139.737,51.524c0,3.029,1.091,4.546,3.274,4.546c1.005,0,1.798-0.394,2.385-1.184
|
|
50
|
+
c0.583-0.785,0.877-1.907,0.877-3.362c0-2.989-1.088-4.485-3.262-4.485c-0.999,0-1.797,0.396-2.389,1.184
|
|
51
|
+
C140.035,49.012,139.737,50.112,139.737,51.524L139.737,51.524z M159.212,47.67c-0.574-0.376-1.2-0.565-1.89-0.565
|
|
52
|
+
c-0.745,0-1.403,0.339-1.981,1.014c-0.58,0.679-0.869,1.503-0.869,2.481v7.835h-3.208V44.676h3.208v1.258
|
|
53
|
+
c0.899-1.008,2.092-1.512,3.583-1.512c1.096,0,1.938,0.165,2.52,0.5L159.212,47.67L159.212,47.67z"/>
|
|
54
|
+
<path fill="#FEDD1E" d="M161.56,57.548l1.144-2.556c0.961,0.762,2.044,1.145,3.249,1.145c1.249,0,1.877-0.446,1.877-1.338
|
|
55
|
+
c0-0.521-0.188-0.952-0.566-1.284c-0.377-0.334-1.109-0.728-2.194-1.185c-2.374-0.981-3.561-2.362-3.561-4.134
|
|
56
|
+
c0-1.188,0.454-2.118,1.362-2.779c0.907-0.667,2.07-0.995,3.481-0.995c1.429,0,2.775,0.321,4.034,0.961l-0.927,2.492
|
|
57
|
+
c-0.7-0.599-1.679-0.897-2.929-0.897c-1.121,0-1.683,0.443-1.683,1.334c0,0.351,0.185,0.669,0.553,0.95
|
|
58
|
+
c0.368,0.285,1.157,0.662,2.363,1.135c1.209,0.478,2.077,1.054,2.607,1.733c0.532,0.675,0.799,1.489,0.799,2.449
|
|
59
|
+
c0,1.276-0.474,2.281-1.42,3.014c-0.947,0.73-2.232,1.101-3.863,1.101c-0.917,0-1.649-0.076-2.199-0.229
|
|
60
|
+
C163.134,58.316,162.423,58.009,161.56,57.548L161.56,57.548z M171.911,51.524c0-2.101,0.608-3.806,1.818-5.125
|
|
61
|
+
c1.211-1.32,2.811-1.978,4.797-1.978c2.092,0,3.714,0.631,4.871,1.898c1.153,1.266,1.731,3.003,1.731,5.204
|
|
62
|
+
c0,2.191-0.588,3.932-1.766,5.226c-1.175,1.295-2.788,1.943-4.837,1.943c-2.088,0-3.714-0.654-4.875-1.961
|
|
63
|
+
C172.493,55.425,171.911,53.69,171.911,51.524L171.911,51.524z M175.252,51.524c0,3.029,1.092,4.546,3.274,4.546
|
|
64
|
+
c1.005,0,1.798-0.394,2.386-1.184c0.583-0.785,0.877-1.907,0.877-3.362c0-2.989-1.087-4.485-3.263-4.485
|
|
65
|
+
c-0.999,0-1.797,0.396-2.389,1.184C175.55,49.012,175.252,50.112,175.252,51.524L175.252,51.524z M194.447,41.979
|
|
66
|
+
c-0.706-0.231-1.245-0.345-1.623-0.345c-0.604,0-1.122,0.262-1.547,0.785c-0.423,0.521-0.636,1.162-0.636,1.925
|
|
67
|
+
c0,0.113,0.005,0.223,0.014,0.333h2.854v2.648h-2.802v11.11h-3.21v-11.11h-2.003v-2.648h2.017c0.064-1.684,0.564-3.047,1.495-4.081
|
|
68
|
+
c0.931-1.04,2.131-1.558,3.604-1.558c0.758,0,1.688,0.168,2.784,0.5L194.447,41.979L194.447,41.979z M196.064,47.258h-1.591v-2.582
|
|
69
|
+
h1.591v-2.796l3.209-1.184v3.98h3.78v2.582h-3.78v6.024c0,0.987,0.153,1.679,0.465,2.087c0.308,0.408,0.846,0.608,1.618,0.608
|
|
70
|
+
c0.771,0,1.491-0.205,2.157-0.626v2.956c-0.747,0.253-1.807,0.386-3.184,0.386c-1.373,0-2.424-0.391-3.161-1.168
|
|
71
|
+
c-0.736-0.772-1.104-1.875-1.104-3.306V47.258L196.064,47.258z M218.596,58.693h-1.17l-3.777-8.453l-3.764,8.453h-1.181
|
|
72
|
+
l-5.19-14.018h3.381l2.757,8.207l3.366-8.207h1.157l3.482,8.26l2.977-8.26h3.161L218.596,58.693L218.596,58.693z M232.428,57.062
|
|
73
|
+
c-0.294,0.479-0.803,0.867-1.525,1.173c-0.724,0.304-1.478,0.458-2.267,0.458c-1.482,0-2.644-0.374-3.495-1.115
|
|
74
|
+
c-0.846-0.74-1.271-1.792-1.271-3.152c0-1.59,0.6-2.84,1.792-3.74c1.198-0.897,2.895-1.344,5.095-1.344
|
|
75
|
+
c0.376,0,0.821,0.061,1.332,0.191c0-1.617-1.02-2.429-3.066-2.429c-1.207,0-2.22,0.203-3.03,0.605l-0.692-2.495
|
|
76
|
+
c1.104-0.53,2.414-0.793,3.939-0.793c2.102,0,3.636,0.478,4.613,1.429c0.974,0.956,1.464,2.766,1.464,5.429v2.94
|
|
77
|
+
c0,1.833,0.369,2.987,1.105,3.457c-0.267,0.463-0.562,0.75-0.886,0.854c-0.329,0.104-0.7,0.163-1.118,0.163
|
|
78
|
+
c-0.465,0-0.877-0.172-1.245-0.519C232.805,57.833,232.555,57.46,232.428,57.062L232.428,57.062z M232.117,51.959
|
|
79
|
+
c-0.549-0.109-0.955-0.168-1.233-0.168c-2.533,0-3.801,0.834-3.801,2.496c0,1.23,0.715,1.85,2.145,1.85
|
|
80
|
+
c1.93,0,2.89-0.964,2.89-2.895V51.959L232.117,51.959z M245.81,47.67c-0.575-0.376-1.201-0.565-1.891-0.565
|
|
81
|
+
c-0.746,0-1.403,0.339-1.981,1.014c-0.579,0.679-0.869,1.503-0.869,2.481v7.835h-3.207V44.676h3.207v1.258
|
|
82
|
+
c0.9-1.008,2.092-1.512,3.583-1.512c1.096,0,1.937,0.165,2.521,0.5L245.81,47.67L245.81,47.67z M260.447,52.538h-9.826
|
|
83
|
+
c0.063,1.095,0.44,1.948,1.132,2.556c0.692,0.608,1.627,0.912,2.802,0.912c1.465,0,2.574-0.383,3.336-1.141l1.246,2.452
|
|
84
|
+
c-1.127,0.915-2.815,1.376-5.059,1.376c-2.097,0-3.758-0.619-4.978-1.848c-1.218-1.228-1.832-2.94-1.832-5.141
|
|
85
|
+
c0-2.167,0.672-3.925,2.013-5.267c1.34-1.346,2.946-2.017,4.822-2.017c1.994,0,3.595,0.593,4.806,1.785
|
|
86
|
+
c1.206,1.188,1.81,2.704,1.81,4.545C260.719,51.146,260.626,51.745,260.447,52.538L260.447,52.538z M250.736,50.121h6.756
|
|
87
|
+
c-0.219-2.009-1.333-3.017-3.337-3.017C252.323,47.104,251.184,48.112,250.736,50.121L250.736,50.121z"/>
|
|
88
|
+
<polygon fill="#FEDD1E" points="64.393,99.121 64.393,80.978 45.592,80.978 45.592,98.5 30.217,98.5 30.217,80.978 30.217,80.978
|
|
89
|
+
30.217,73.29 30.217,57.939 1.389,57.939 1.389,42.565 30.217,42.565 30.217,27.214 30.217,19.527 30.217,19.527 30.217,2.003
|
|
90
|
+
45.592,2.003 45.592,19.527 64.393,19.527 64.393,1.383 79.767,1.383 79.767,27.214 79.767,34.902 72.079,34.902 45.592,34.902
|
|
91
|
+
45.592,65.603 72.079,65.603 79.767,65.603 79.767,73.29 79.767,99.121 64.393,99.121 "/>
|
|
92
|
+
<image display="none" overflow="visible" width="261" height="100" id="L9A0LB_3_" xlink:href="40882050.png" >
|
|
93
|
+
</image>
|
|
94
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transistorsoft/background-geolocation-types",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.6",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Shared TypeScript type definitions and documentation for Transistor Software's Background Geolocation SDKs (React Native, Capacitor, Cordova)",
|
|
6
6
|
"author": "Transistor Software <info@transistorsoft.com>",
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
"url": "git+https://github.com/transistorsoft/background-geolocation.git",
|
|
12
12
|
"directory": "packages/background-geolocation-types"
|
|
13
13
|
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"tools",
|
|
17
|
+
"assets",
|
|
18
|
+
"typedoc.json",
|
|
19
|
+
"tsconfig.json"
|
|
20
|
+
],
|
|
14
21
|
"keywords": [
|
|
15
22
|
"typescript",
|
|
16
23
|
"types",
|
|
@@ -30,21 +37,17 @@
|
|
|
30
37
|
}
|
|
31
38
|
},
|
|
32
39
|
"sideEffects": false,
|
|
33
|
-
"files": [
|
|
34
|
-
"dist"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"clean": "rimraf dist",
|
|
38
|
-
"build": "tsc -p tsconfig.json",
|
|
39
|
-
"watch": "tsc -p tsconfig.json -w",
|
|
40
|
-
"prepare": "pnpm run build",
|
|
41
|
-
"docs": "typedoc --options typedoc.json"
|
|
42
|
-
},
|
|
43
40
|
"devDependencies": {
|
|
44
41
|
"@types/node": "^24.10.0",
|
|
45
42
|
"rimraf": "^5.0.0",
|
|
46
43
|
"typedoc": "^0.28.14",
|
|
47
44
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
48
45
|
"typescript": "^5.6.0"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"clean": "rimraf dist",
|
|
49
|
+
"build": "tsc -p tsconfig.json",
|
|
50
|
+
"watch": "tsc -p tsconfig.json -w",
|
|
51
|
+
"docs": "typedoc --options typedoc.json"
|
|
49
52
|
}
|
|
50
|
-
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// tools/typedoc-plugin-gitlink/index.cjs
|
|
2
|
+
/**
|
|
3
|
+
* TypeDoc plugin: gitlink
|
|
4
|
+
*
|
|
5
|
+
* Converts markdown links of the form [Label](github:<path>) into real GitHub links.
|
|
6
|
+
* Examples:
|
|
7
|
+
* [Philosophy of Operation](github:wiki/Philosophy-of-Operation)
|
|
8
|
+
* [README](github:blob/5.0.0-beta/README.md)
|
|
9
|
+
* [Issues](github:issues)
|
|
10
|
+
*
|
|
11
|
+
* Repo is inferred from package.json -> repository.url.
|
|
12
|
+
* Fallbacks:
|
|
13
|
+
* --pluginName react-native-background-geolocation
|
|
14
|
+
* --gitBase https://github.com/transistorsoft
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const { Converter } = require('typedoc');
|
|
18
|
+
const { ParameterType } = require('typedoc');
|
|
19
|
+
|
|
20
|
+
const GITHUB_LINK_RE = /\[([^\]]+)\]\(github:([^)]+)\)/gim;
|
|
21
|
+
|
|
22
|
+
function load(app) {
|
|
23
|
+
// Custom options to help in multi-repo docs setups
|
|
24
|
+
app.options.addDeclaration({
|
|
25
|
+
name: 'githubUser',
|
|
26
|
+
help: 'GitHub username or org (default: transistorsoft)',
|
|
27
|
+
type: ParameterType.String,
|
|
28
|
+
defaultValue: 'transistorsoft'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
app.converter.on(Converter.EVENT_RESOLVE_END, (ctx) => {
|
|
32
|
+
const project = ctx.project;
|
|
33
|
+
|
|
34
|
+
// 1) Determine repository base URL (https://github.com/<owner>/<repo>)
|
|
35
|
+
const repoBase = resolveRepoBase(app, project);
|
|
36
|
+
|
|
37
|
+
// Nothing to do if we can’t determine a repo
|
|
38
|
+
if (!repoBase) return;
|
|
39
|
+
|
|
40
|
+
// 2) Walk all reflections and rewrite their comments
|
|
41
|
+
for (const key in project.reflections) {
|
|
42
|
+
const refl = project.reflections[key];
|
|
43
|
+
if (!refl?.comment) continue;
|
|
44
|
+
|
|
45
|
+
// Replace in summary (shortText)
|
|
46
|
+
if (typeof refl.comment.shortText === 'string') {
|
|
47
|
+
refl.comment.shortText = rewriteGitLinks(refl.comment.shortText, repoBase);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Replace in main text body
|
|
51
|
+
if (typeof refl.comment.text === 'string') {
|
|
52
|
+
refl.comment.text = rewriteGitLinks(refl.comment.text, repoBase);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Replace in block tags @example, @remarks, etc
|
|
56
|
+
if (Array.isArray(refl.comment.blockTags)) {
|
|
57
|
+
for (const tag of refl.comment.blockTags) {
|
|
58
|
+
if (typeof tag.content === 'string') {
|
|
59
|
+
tag.content = rewriteGitLinks(tag.content, repoBase);
|
|
60
|
+
} else if (Array.isArray(tag.content)) {
|
|
61
|
+
// TypeDoc v0.28 typically stores as CommentDisplayPart[]
|
|
62
|
+
tag.content = tag.content.map((part) => {
|
|
63
|
+
if (part?.kind === 'text' && typeof part.text === 'string') {
|
|
64
|
+
return { ...part, text: rewriteGitLinks(part.text, repoBase) };
|
|
65
|
+
}
|
|
66
|
+
return part;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Build the repo base URL from package.json repository or from --pluginName/--githubUser.
|
|
77
|
+
* Returns a string like "https://github.com/transistorsoft/react-native-background-geolocation"
|
|
78
|
+
*/
|
|
79
|
+
function resolveRepoBase(app, project) {
|
|
80
|
+
const githubUser = app.options.getValue('githubUser');
|
|
81
|
+
const pluginName = app.options.getValue('name');
|
|
82
|
+
|
|
83
|
+
// Prefer package.json repository.url if available
|
|
84
|
+
let repoUrl =
|
|
85
|
+
project?.packageInfo?.repository?.url ||
|
|
86
|
+
project?.packageInfo?.repository ||
|
|
87
|
+
'';
|
|
88
|
+
|
|
89
|
+
// Normalize typical git urls: git+https, ssh, ending .git, etc.
|
|
90
|
+
repoUrl = normalizeRepoUrl(repoUrl);
|
|
91
|
+
|
|
92
|
+
if (repoUrl) {
|
|
93
|
+
return repoUrl;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (pluginName && githubUser) {
|
|
97
|
+
return `https://github.com/${githubUser}/${pluginName}`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function normalizeRepoUrl(url) {
|
|
104
|
+
if (!url || typeof url !== 'string') return '';
|
|
105
|
+
|
|
106
|
+
// Examples:
|
|
107
|
+
// git+https://github.com/transistorsoft/react-native-background-geolocation.git
|
|
108
|
+
// https://github.com/transistorsoft/react-native-background-geolocation.git
|
|
109
|
+
// git@github.com:transistorsoft/react-native-background-geolocation.git
|
|
110
|
+
// https://github.com/transistorsoft/react-native-background-geolocation
|
|
111
|
+
|
|
112
|
+
// Convert SSH to https
|
|
113
|
+
const sshMatch = url.match(/^git@([^:]+):(.+?)(\.git)?$/i);
|
|
114
|
+
if (sshMatch) {
|
|
115
|
+
return `https://${sshMatch[1]}/${sshMatch[2]}`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Strip leading git+ and trailing .git
|
|
119
|
+
let cleaned = url.replace(/^git\+/, '').replace(/\.git$/i, '');
|
|
120
|
+
|
|
121
|
+
// If it’s a GitHub URL, leave as-is
|
|
122
|
+
if (/^https?:\/\/github\.com\//i.test(cleaned)) {
|
|
123
|
+
return cleaned;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Not a recognized https GitHub URL
|
|
127
|
+
return '';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function stripTrailingSlash(s) {
|
|
131
|
+
return s.endsWith('/') ? s.slice(0, -1) : s;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Rewrite [Label](github:<path>) to a real GitHub URL.
|
|
136
|
+
* Supports:
|
|
137
|
+
* - wiki/... -> <repoBase>/wiki/...
|
|
138
|
+
* - blob/... -> <repoBase>/blob/...
|
|
139
|
+
* - tree/... -> <repoBase>/tree/...
|
|
140
|
+
* - issues[...]/... -> <repoBase>/issues...
|
|
141
|
+
* - pulls/... -> <repoBase>/pulls/...
|
|
142
|
+
* - anything else -> <repoBase>/<path>
|
|
143
|
+
*/
|
|
144
|
+
function rewriteGitLinks(text, repoBase) {
|
|
145
|
+
return text.replace(GITHUB_LINK_RE, (_m, label, path) => {
|
|
146
|
+
const p = String(path).replace(/^\/+/, ''); // trim leading slashes
|
|
147
|
+
let target = `${repoBase}`;
|
|
148
|
+
|
|
149
|
+
if (/^wiki\//i.test(p)) {
|
|
150
|
+
target += `/${p}`;
|
|
151
|
+
} else if (/^(blob|tree|issues|pulls|compare|actions|releases)\b/i.test(p)) {
|
|
152
|
+
target += `/${p}`;
|
|
153
|
+
} else {
|
|
154
|
+
// default: append as-is
|
|
155
|
+
target += `/${p}`;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return `[${label}](${target})`;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
module.exports = { load };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const { Converter } = require('typedoc');
|
|
2
|
+
|
|
3
|
+
const MEDIA_PLAYER_PATTERN =
|
|
4
|
+
/<mediaplayer:\s?((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9.\-]+)((?:\/[\+~%\/.\w\-_]*)?\??(?:[\-\+=&;%@.\w_]*)#?(?:[.!\/\\\w]*))?)>/gim;
|
|
5
|
+
|
|
6
|
+
// IMPORTANT: single line, no newlines
|
|
7
|
+
const REPLACEMENT_HTML =
|
|
8
|
+
'<video controls name="media" height="32" width="220"><source src="$1" /></video>';
|
|
9
|
+
|
|
10
|
+
function replaceMediaTagsInText(text) {
|
|
11
|
+
if (typeof text !== 'string') return text;
|
|
12
|
+
return text.replace(MEDIA_PLAYER_PATTERN, REPLACEMENT_HTML);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function replaceMediaTagsInParts(parts) {
|
|
16
|
+
if (!Array.isArray(parts)) return parts;
|
|
17
|
+
return parts.map((part) => {
|
|
18
|
+
if (!part || typeof part.text !== 'string') return part;
|
|
19
|
+
const nextText = replaceMediaTagsInText(part.text);
|
|
20
|
+
if (nextText === part.text) return part;
|
|
21
|
+
return { ...part, text: nextText };
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function rewriteMediaTagsInComment(comment) {
|
|
26
|
+
if (!comment) return;
|
|
27
|
+
|
|
28
|
+
// TypeDoc >= 0.28: summary & blockTags with CommentDisplayPart[]
|
|
29
|
+
if (Array.isArray(comment.summary)) {
|
|
30
|
+
comment.summary = replaceMediaTagsInParts(comment.summary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (Array.isArray(comment.blockTags)) {
|
|
34
|
+
for (const tag of comment.blockTags) {
|
|
35
|
+
if (!tag) continue;
|
|
36
|
+
|
|
37
|
+
if (Array.isArray(tag.content)) {
|
|
38
|
+
tag.content = replaceMediaTagsInParts(tag.content);
|
|
39
|
+
} else if (typeof tag.content === 'string') {
|
|
40
|
+
tag.content = replaceMediaTagsInText(tag.content);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Legacy API compatibility: shortText / text / tags
|
|
46
|
+
if (typeof comment.shortText === 'string') {
|
|
47
|
+
comment.shortText = replaceMediaTagsInText(comment.shortText);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (typeof comment.text === 'string') {
|
|
51
|
+
comment.text = replaceMediaTagsInText(comment.text);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (Array.isArray(comment.tags)) {
|
|
55
|
+
for (const tag of comment.tags) {
|
|
56
|
+
if (tag && typeof tag.text === 'string') {
|
|
57
|
+
tag.text = replaceMediaTagsInText(tag.text);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function load(app) {
|
|
64
|
+
app.converter.on(Converter.EVENT_RESOLVE_END, (ctx) => {
|
|
65
|
+
const project = ctx.project;
|
|
66
|
+
if (!project?.reflections) return;
|
|
67
|
+
|
|
68
|
+
for (const key in project.reflections) {
|
|
69
|
+
const refl = project.reflections[key];
|
|
70
|
+
if (!refl?.comment) continue;
|
|
71
|
+
rewriteMediaTagsInComment(refl.comment);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
module.exports = { load };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeDoc plugin: site helpers
|
|
3
|
+
*
|
|
4
|
+
* This plugin performs post-processing on generated TypeDoc comments in order to
|
|
5
|
+
* support simple "site" template tags that keep documentation DRY and
|
|
6
|
+
* package-agnostic.
|
|
7
|
+
*
|
|
8
|
+
* Currently supported template variables (used inside comments):
|
|
9
|
+
*
|
|
10
|
+
* - `{{pluginName}}`
|
|
11
|
+
* - Resolved from:
|
|
12
|
+
* 1. TypeDoc's built-in `--name` option (preferred)
|
|
13
|
+
* 2. `project.packageInfo.name` (from package.json)
|
|
14
|
+
* 3. `project.name`
|
|
15
|
+
* 4. `process.env.DOCS_PLUGIN_NAME` or `process.env.npm_package_name`
|
|
16
|
+
* - Typical usage: keep import examples consistent across packages.
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* // In a TypeDoc comment
|
|
20
|
+
* import BackgroundGeolocation from '{{pluginName}}';
|
|
21
|
+
*
|
|
22
|
+
* // Rendered for react-native-background-geolocation
|
|
23
|
+
* import BackgroundGeolocation from 'react-native-background-geolocation';
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* - `{{repoUrl}}`
|
|
27
|
+
* - Resolved from:
|
|
28
|
+
* 1. `package.json` `repository` field (string or `{ url: string }`)
|
|
29
|
+
* 2. First `http(s)` URL found in the project readme
|
|
30
|
+
* 3. `process.env.DOCS_REPO_URL`
|
|
31
|
+
* - Typical usage: link to the current repo without hard-coding URLs.
|
|
32
|
+
*
|
|
33
|
+
* ```md
|
|
34
|
+
* For more information, see the repository: {{repoUrl}}.
|
|
35
|
+
*
|
|
36
|
+
* // Rendered
|
|
37
|
+
* For more information, see the repository: https://github.com/transistorsoft/react-native-background-geolocation
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* Integration details:
|
|
41
|
+
*
|
|
42
|
+
* - Hooks into `Converter.EVENT_RESOLVE_END`.
|
|
43
|
+
* - Walks every reflection comment and replaces template variables in:
|
|
44
|
+
* - Legacy `shortText` / `text` fields
|
|
45
|
+
* - `summary: CommentDisplayPart[]`
|
|
46
|
+
* - `blockTags[].content` (eg: `@example`, `@remarks`, etc.)
|
|
47
|
+
* - Safe no-op if `pluginName` or `repoUrl` cannot be resolved.
|
|
48
|
+
*
|
|
49
|
+
* Usage:
|
|
50
|
+
*
|
|
51
|
+
* - Add this plugin to your TypeDoc configuration (typedoc.json):
|
|
52
|
+
*
|
|
53
|
+
* ```json
|
|
54
|
+
* {
|
|
55
|
+
* "plugin": [
|
|
56
|
+
* "./tools/typedoc-plugin-site"
|
|
57
|
+
* ],
|
|
58
|
+
* "name": "react-native-background-geolocation"
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* - In your comments, use the template variables where appropriate:
|
|
63
|
+
*
|
|
64
|
+
* ```ts
|
|
65
|
+
* * @example
|
|
66
|
+
* * ```ts
|
|
67
|
+
* * import BackgroundGeolocation from '{{pluginName}}';
|
|
68
|
+
* * ```
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
const { Converter } = require('typedoc');
|
|
73
|
+
|
|
74
|
+
function safeGetOption(app, key) {
|
|
75
|
+
try {
|
|
76
|
+
return app.options.getValue(key);
|
|
77
|
+
} catch {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function resolvePluginName(app, project) {
|
|
83
|
+
// 1) Prefer TypeDoc's built-in --name (you already set this)
|
|
84
|
+
const nameOpt = safeGetOption(app, 'name');
|
|
85
|
+
if (nameOpt) return nameOpt;
|
|
86
|
+
|
|
87
|
+
// 2) Fallbacks from package.json / project
|
|
88
|
+
if (project?.packageInfo?.name) return project.packageInfo.name;
|
|
89
|
+
if (project?.name) return project.name;
|
|
90
|
+
|
|
91
|
+
// 3) Env fallback (optional)
|
|
92
|
+
if (process.env.DOCS_PLUGIN_NAME) return process.env.DOCS_PLUGIN_NAME;
|
|
93
|
+
if (process.env.npm_package_name) return process.env.npm_package_name;
|
|
94
|
+
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function resolveRepoUrl(app, project, pluginName) {
|
|
99
|
+
// Try to read the same custom option used by typedoc-plugin-gitlink.
|
|
100
|
+
// If not set, you can either:
|
|
101
|
+
// - fall back to a default (eg: 'transistorsoft'), or
|
|
102
|
+
// - require DOCS_REPO_URL to be set.
|
|
103
|
+
//
|
|
104
|
+
// Here we:
|
|
105
|
+
// 1) prefer --githubUser
|
|
106
|
+
// 2) then DOCS_GITHUB_USER
|
|
107
|
+
// 3) finally fall back to 'transistorsoft' (easy default for your org)
|
|
108
|
+
const githubUser =
|
|
109
|
+
safeGetOption(app, 'githubUser') ||
|
|
110
|
+
process.env.DOCS_GITHUB_USER ||
|
|
111
|
+
'transistorsoft';
|
|
112
|
+
|
|
113
|
+
if (pluginName && githubUser) {
|
|
114
|
+
return `https://github.com/${githubUser}/${pluginName}`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Absolute last-chance escape hatch:
|
|
118
|
+
return process.env.DOCS_REPO_URL || null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function replaceTemplateVars(text, pluginName, repoUrl) {
|
|
122
|
+
if (!text || typeof text !== 'string') return text;
|
|
123
|
+
|
|
124
|
+
// Debug helper
|
|
125
|
+
if (/{{\s*pluginName\s*}}/g.test(text)) {
|
|
126
|
+
console.log('*** Replacing {{pluginName}} with "', pluginName, '"');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
let out = text.replace(/{{\s*pluginName\s*}}/g, pluginName);
|
|
130
|
+
out = out.replace(/{{\s*repoUrl\s*}}/g, repoUrl);
|
|
131
|
+
return out;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function applyPluginNameToComment(comment, pluginName, repoUrl) {
|
|
135
|
+
if (!comment) return;
|
|
136
|
+
|
|
137
|
+
// ---- Old-style string fields (pre-0.28) ----
|
|
138
|
+
if (typeof comment.shortText === 'string') {
|
|
139
|
+
comment.shortText = replaceTemplateVars(comment.shortText, pluginName, repoUrl);
|
|
140
|
+
}
|
|
141
|
+
if (typeof comment.text === 'string') {
|
|
142
|
+
comment.text = replaceTemplateVars(comment.text, pluginName, repoUrl);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ---- New-style fields: summary is CommentDisplayPart[] ----
|
|
146
|
+
if (Array.isArray(comment.summary)) {
|
|
147
|
+
comment.summary = comment.summary.map((part) => {
|
|
148
|
+
if (part && typeof part.text === 'string') {
|
|
149
|
+
return { ...part, text: replaceTemplateVars(part.text, pluginName, repoUrl) };
|
|
150
|
+
}
|
|
151
|
+
return part;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ---- New-style block tags (@example, @remarks, etc) ----
|
|
156
|
+
if (Array.isArray(comment.blockTags)) {
|
|
157
|
+
comment.blockTags = comment.blockTags.map((tag) => {
|
|
158
|
+
// TypeDoc 0.28+: content is CommentDisplayPart[]
|
|
159
|
+
if (Array.isArray(tag.content)) {
|
|
160
|
+
tag.content = tag.content.map((part) => {
|
|
161
|
+
if (part && typeof part.text === 'string') {
|
|
162
|
+
return { ...part, text: replaceTemplateVars(part.text, pluginName, repoUrl) };
|
|
163
|
+
}
|
|
164
|
+
return part;
|
|
165
|
+
});
|
|
166
|
+
} else if (typeof tag.content === 'string') {
|
|
167
|
+
// Older shapes
|
|
168
|
+
tag.content = replaceTemplateVars(tag.content, pluginName, repoUrl);
|
|
169
|
+
}
|
|
170
|
+
return tag;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function load(app) {
|
|
176
|
+
app.converter.on(Converter.EVENT_RESOLVE_END, (ctx) => {
|
|
177
|
+
const project = ctx.project;
|
|
178
|
+
const pluginName = resolvePluginName(app, project);
|
|
179
|
+
const repoUrl = resolveRepoUrl(app, project, pluginName);
|
|
180
|
+
|
|
181
|
+
if (!pluginName) {
|
|
182
|
+
console.warn('[typedoc-plugin-site] pluginName could not be resolved');
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const reflections = project?.reflections || {};
|
|
187
|
+
for (const id in reflections) {
|
|
188
|
+
const refl = reflections[id];
|
|
189
|
+
if (!refl || !refl.comment) continue;
|
|
190
|
+
applyPluginNameToComment(refl.comment, pluginName, repoUrl);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
module.exports = { load };
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "src",
|
|
4
|
+
"outDir": "dist",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"emitDeclarationOnly": false,
|
|
7
|
+
"stripInternal": false,
|
|
8
|
+
"removeComments": true,
|
|
9
|
+
"target": "ES2018",
|
|
10
|
+
"module": "CommonJS",
|
|
11
|
+
"moduleResolution": "Node",
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"types": ["node"]
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*"]
|
|
17
|
+
}
|
package/typedoc.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://typedoc.org/schema.json",
|
|
3
|
+
"entryPoints": ["src/docs-entry.ts"],
|
|
4
|
+
"name": "react-native-background-geolocation",
|
|
5
|
+
"favicon": "./assets/images/favicon.ico",
|
|
6
|
+
"githubUser": "transistorsoft",
|
|
7
|
+
"out": "docs",
|
|
8
|
+
"readme": "none",
|
|
9
|
+
"highlightLanguages": ["ts", "js", "json", "xml", "bash", "console", "erb", "java"],
|
|
10
|
+
"disableSources": true,
|
|
11
|
+
"includeVersion": true,
|
|
12
|
+
"sort": ["source-order"],
|
|
13
|
+
"categoryOrder": ["Primary API", "Config", "Events", "Data", "Logger", "Device", "*"],
|
|
14
|
+
"categorizeByGroup": false,
|
|
15
|
+
"useFirstParagraphOfCommentAsSummary": true,
|
|
16
|
+
"excludeInternal": true,
|
|
17
|
+
"excludePrivate": true,
|
|
18
|
+
"excludeExternals": false,
|
|
19
|
+
"excludeProtected": true,
|
|
20
|
+
"gitRevision": "main",
|
|
21
|
+
"logLevel": "Info",
|
|
22
|
+
"watch": true,
|
|
23
|
+
"plugin": [
|
|
24
|
+
"./tools/typedoc-plugin-gitlink/index.cjs",
|
|
25
|
+
"./tools/typedoc-plugin-mediaplayer/index.cjs",
|
|
26
|
+
"./tools/typedoc-plugin-site/index.cjs"
|
|
27
|
+
]
|
|
28
|
+
}
|