@phun-ky/speccer 5.0.0 โ†’ 6.0.2

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # speccer
2
2
 
3
- ![npm version](https://img.shields.io/npm/v/@phun-ky/speccer) ![issues](https://img.shields.io/github/issues/phun-ky/speccer) ![license](https://img.shields.io/npm/l/@phun-ky/speccer) ![size](https://img.shields.io/bundlephobia/min/@phun-ky/speccer)
3
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](http://makeapullrequest.com) [![SemVer 2.0](https://img.shields.io/badge/SemVer-2.0-green.svg)](http://semver.org/spec/v2.0.0.html) ![npm version](https://img.shields.io/npm/v/@phun-ky/speccer) ![issues](https://img.shields.io/github/issues/phun-ky/speccer) ![license](https://img.shields.io/npm/l/@phun-ky/speccer) ![size](https://img.shields.io/bundlephobia/min/@phun-ky/speccer)
4
4
 
5
- > A script to show specifications on components in your design system documentation
5
+ > A zero dependency package to show specifications on components in your design system documentation
6
6
 
7
7
  Speccer was created to make it easier to document components in a design system.
8
8
 
@@ -149,7 +149,7 @@ If you're importing speccer instead of with a script tag, you can use the follow
149
149
  import { dissect } from '@phun-ky/speccer';
150
150
 
151
151
  let dissectElementObserver = new IntersectionObserver((entries, observer) => {
152
- entries.forEach(entry => {
152
+ entries.forEach((entry) => {
153
153
  const targets = entry.target.querySelectorAll('[data-anatomy]');
154
154
  if (entry.intersectionRatio > 0) {
155
155
  targets.forEach(dissect.element);
@@ -158,7 +158,7 @@ let dissectElementObserver = new IntersectionObserver((entries, observer) => {
158
158
  });
159
159
  });
160
160
 
161
- document.querySelectorAll('[data-anatomy-section]').forEach(el => {
161
+ document.querySelectorAll('[data-anatomy-section]').forEach((el) => {
162
162
  dissectElementObserver.observe(el);
163
163
  });
164
164
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phun-ky/speccer",
3
- "version": "5.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "A script to annotate, show spacing specs and to display typography information in documentation/website on HTML elements",
5
5
  "main": "speccer.js",
6
6
  "publishConfig": {
@@ -10,7 +10,7 @@
10
10
  "test": "echo \"Error: no test specified\" && exit 1",
11
11
  "rollup": "rollup -c",
12
12
  "rollup:dev": "npm run clean && rollup -c -w",
13
- "clean": "rm -rf ./speccer.css ./speccer.min.css ./speccer.js",
13
+ "clean": "rm -rf dist/ dts/ ./speccer.css ./speccer.min.css ./speccer.js",
14
14
  "build": "npm run clean && npm run rollup && npm run stylus && npm run postcss",
15
15
  "styles": "npm run stylus && npm run postcss",
16
16
  "stylus": "rm -rf ./speccer.css && stylus ./src/styles/index.styl -o ./speccer.css",
@@ -19,6 +19,12 @@
19
19
  "commit": "npx git-cz",
20
20
  "release": "npx standard-version"
21
21
  },
22
+ "files": [
23
+ "/speccer.js",
24
+ "/speccer.js.map",
25
+ "/speccer.min.css",
26
+ "/speccer.css"
27
+ ],
22
28
  "standard-version": {
23
29
  "scripts": {
24
30
  "prerelease": "npm run build",
@@ -122,7 +128,14 @@
122
128
  "prettier": "^2.4.1",
123
129
  "prettier-eslint": "^13.0.0",
124
130
  "rollup": "^2.39.0",
131
+ "@typescript-eslint/eslint-plugin": "^5.7.0",
132
+ "@typescript-eslint/parser": "^5.7.0",
133
+ "stylus": "^0.56.0",
134
+ "rollup-plugin-dts": "^4.0.1",
125
135
  "rollup-plugin-terser": "^7.0.2",
126
- "stylus": "^0.56.0"
136
+ "rollup-plugin-typescript2": "^0.31.1",
137
+ "tslib": "^2.3.1",
138
+ "typescript": "^4.5.4",
139
+ "network-information-types": "^0.1.0"
127
140
  }
128
141
  }
package/speccer.css CHANGED
@@ -334,13 +334,6 @@
334
334
  .ph.speccer.spacing:hover {
335
335
  border: var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);
336
336
  }
337
- .is-specced:hover ~ .ph.speccer.spacing.margin {
338
- background-color: var(--ph-speccer-color-margin-hover);
339
- }
340
- .is-specced:hover ~ .ph.speccer.spacing.padding {
341
- background-color: var(--ph-speccer-color-padding-hover);
342
- color: var(--ph-speccer-color-text-light);
343
- }
344
337
  .ph.speccer.spacing.margin {
345
338
  background-color: var(--ph-speccer-color-margin);
346
339
  color: var(--ph-speccer-color-text-dark);
@@ -440,15 +433,14 @@
440
433
  .ph.speccer.typography {
441
434
  background-color: var(--ph-speccer-typography-background-color);
442
435
  color: var(--ph-speccer-typography-color-text);
443
- font-size: 12px;
444
- padding: 8px 24px;
436
+ font-size: 10px;
437
+ padding: 8px;
445
438
  max-width: none;
446
439
  width: auto;
447
440
  display: block;
448
441
  text-align: left;
449
442
  line-height: 140%;
450
443
  border: var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color);
451
- min-width: 320px;
452
444
  }
453
445
  .ph.speccer.typography:hover {
454
446
  border: var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color);
@@ -462,14 +454,14 @@
462
454
  top: 50%;
463
455
  transform: translateY(-50%);
464
456
  height: var(--ph-speccer-line-width);
465
- width: 48px;
457
+ width: var(--ph-speccer-pin-space);
466
458
  }
467
459
  .ph.speccer.typography.left:after {
468
460
  left: 100%;
469
461
  top: 50%;
470
462
  transform: translateY(-50%);
471
463
  height: var(--ph-speccer-line-width);
472
- width: 48px;
464
+ width: var(--ph-speccer-pin-space);
473
465
  }
474
466
  .ph.speccer.typography.right:after {
475
467
  left: auto;
@@ -477,14 +469,14 @@
477
469
  top: 50%;
478
470
  transform: translateY(-50%);
479
471
  height: var(--ph-speccer-line-width);
480
- width: 48px;
472
+ width: var(--ph-speccer-pin-space);
481
473
  }
482
474
  .ph.speccer.typography.top:after {
483
475
  left: 50%;
484
476
  right: auto;
485
477
  top: 100%;
486
478
  transform: translateX(-50%);
487
- height: 48px;
479
+ height: var(--ph-speccer-pin-space);
488
480
  width: var(--ph-speccer-line-width);
489
481
  }
490
482
  .ph.speccer.typography.bottom:after {
@@ -493,7 +485,7 @@
493
485
  top: auto;
494
486
  bottom: 100%;
495
487
  transform: translateX(-50%);
496
- height: 48px;
488
+ height: var(--ph-speccer-pin-space);
497
489
  width: var(--ph-speccer-line-width);
498
490
  }
499
491
  .ph.speccer.typography .speccer-styles {
@@ -502,15 +494,15 @@
502
494
  padding: 0;
503
495
  margin: 0;
504
496
  line-height: 140%;
505
- padding-left: 1rem;
506
- font-size: 12px;
497
+ padding-left: 8px;
498
+ font-size: 10px;
507
499
  }
508
500
  .ph.speccer.typography .speccer-styles .property {
509
501
  font-weight: normal;
510
502
  color: var(--ph-speccer-typography-color-property);
511
503
  text-align: left;
512
504
  padding: 0;
513
- font-size: 12px;
505
+ font-size: 10px;
514
506
  margin: 0;
515
507
  }
516
508
  .ph.speccer.typography .speccer-styles > li {
@@ -518,7 +510,7 @@
518
510
  color: var(--ph-speccer-typography-color-value);
519
511
  text-align: left;
520
512
  padding: 0;
521
- font-size: 12px;
513
+ font-size: 10px;
522
514
  margin: 0;
523
515
  list-style: none;
524
516
  border: none;
package/speccer.js CHANGED
@@ -1 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).speccer={})}(this,(function(t){"use strict";const e=(t,e)=>t.insertAdjacentElement("afterend",e),n=(t,e=document)=>{[].forEach.call(e.querySelectorAll(t),(function(t){t.remove()}))},i=(t,e,n="noop")=>{t&&(!e||e&&0===e.length||e.trim().split(" ").filter((t=>t!==n)).forEach((e=>t.classList.add(e))))},o=t=>parseInt(t,10),p=t=>{const e=parseFloat(t);return e>=0&&e<1||e<=0&&e>-1?0:e},s=()=>new Promise(requestAnimationFrame),a=async(t,e)=>{t&&(!e||e&&0===e.length&&e.constructor===String||e&&0===e.length&&e.constructor===Array||e&&0===Object.keys(e).length&&e.constructor===Object||(await s(),"string"==typeof e||Array.isArray(e)?e.forEach((e=>t.style[e.key]=e.value)):Object.keys(e).forEach((n=>t.style[n]=e[n]))))},l=async t=>(await s(),window.getComputedStyle?getComputedStyle(t,null):t.currentStyle),r=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"],d=["TR","TH","TD","TBODY","THEAD","TFOOT"],c=(t="",e="span")=>{const n=document.createElement(e),o=document.createTextNode(t);return n.appendChild(o),n.setAttribute("title",t+"px"),i(n,"ph speccer spacing"),n},h=async t=>{const n={},s=await l(t);if("none"===s.display||"hidden"===s.visibility)return;t.classList.add("is-specced");if("static"===l(t.parentElement).position&&window.requestAnimationFrame((()=>{t.parentElement.style.position="relative"})),n.styles=(t=>{const{marginTop:e,marginBottom:n,marginLeft:i,marginRight:o,paddingTop:p,paddingBottom:s,paddingLeft:a,paddingRight:l}=t;return{marginTop:e,marginBottom:n,marginLeft:i,marginRight:o,paddingTop:p,paddingBottom:s,paddingLeft:a,paddingRight:l}})(s),n.rect=t.getBoundingClientRect(),"0px"!==n.styles.marginTop){const s=c(o(n.styles.marginTop));i(s,"margin top"),a(s,{height:n.styles.marginTop,width:n.rect.width+"px",left:p(n.rect.x-t.parentElement.getBoundingClientRect().x)+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y-parseInt(n.styles.marginTop,10))+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.marginRight){const s=c(o(n.styles.marginRight));i(s,"margin right"),a(s,{height:n.rect.height+"px",width:n.styles.marginRight,left:p(n.rect.x-t.parentElement.getBoundingClientRect().x+parseInt(n.rect.width,10))+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y)+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.marginBottom){const s=c(o(n.styles.marginBottom));i(s,"margin bottom"),a(s,{height:n.styles.marginBottom,width:n.rect.width+"px",left:p(n.rect.x-t.parentElement.getBoundingClientRect().x)+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y+parseInt(n.rect.height,10))+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.marginLeft){const s=c(o(n.styles.marginLeft));i(s,"margin left"),a(s,{height:n.rect.height+"px",width:n.styles.marginLeft,left:p(n.rect.x-t.parentElement.getBoundingClientRect().x-parseInt(n.styles.marginLeft,10))+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y)+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.paddingTop){const s=c(o(n.styles.paddingTop));i(s,"padding top"),a(s,{height:n.styles.paddingTop,width:n.rect.width+"px",left:p(n.rect.x-t.parentElement.getBoundingClientRect().x)+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y)+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.paddingBottom){const s=c(o(n.styles.paddingBottom));i(s,"padding bottom"),a(s,{height:n.styles.paddingBottom,width:n.rect.width+"px",left:p(n.rect.x-t.parentElement.getBoundingClientRect().x)+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y+(parseInt(n.rect.height,10)-parseInt(n.styles.paddingBottom,10)))+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.paddingRight){const s=c(o(n.styles.paddingRight));i(s,"padding right"),a(s,{height:n.rect.height+"px",width:n.styles.paddingRight,left:p(n.rect.x-t.parentElement.getBoundingClientRect().x+(parseInt(n.rect.width,10)-parseInt(n.styles.paddingRight,10)))+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y)+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}if("0px"!==n.styles.paddingLeft){const s=c(o(n.styles.paddingLeft));i(s,"padding left"),a(s,{height:n.rect.height+"px",width:n.styles.paddingLeft,left:p(n.rect.x-t.parentElement.getBoundingClientRect().x)+"px",top:p(n.rect.y-t.parentElement.getBoundingClientRect().y)+"px"}),d.indexOf(t.nodeName)>=0?e(t.closest("table"),s):e(t,s)}};const g=(t="",e,n="span")=>{const o=document.createElement(n),p=document.createTextNode(t);return-1===e.indexOf("full")&&-1===e.indexOf("enclose")?o.appendChild(p):-1===e.indexOf("full")&&-1===e.indexOf("enclose")||o.setAttribute("data-dissection-counter",t),i(o,`ph speccer dissection ${e}`),o},f=(t,n)=>{const i=t.getBoundingClientRect(),o=t.getAttribute("data-anatomy"),p=g(r[n],o),s=d.indexOf(t.nodeName)>=0;let c=0,h=0;if(s){const n=t.closest("table"),i=l(n.parentElement);e(n,p);const o=n.getBoundingClientRect();c=o.top-parseInt(i.getPropertyValue("padding-top"),10),h=o.left-parseInt(i.getPropertyValue("padding-left"),10)}else e(t,p);const f=t.offsetLeft,x=t.offsetTop,m=p.getBoundingClientRect(),u=(s?i.left-h:f)-m.width-48+"px",y=(s?i.top-c:x)+i.height/2-m.height/2+"px",w=(s?i.left-h:f)+i.width+48+"px",O=(s?i.top-c:x)+i.height/2-m.height/2+"px",b=(s?i.left-h:f)+i.width/2-m.width/2+"px",E=(s?i.top-c:x)-m.height-48+"px",R=(s?i.left-h:f)+i.width/2-m.width/2+"px",B=(s?i.top-c:x)+i.height+48+"px";let C={};C=-1!==o.indexOf("outline")?-1!==o.indexOf("left")?-1!==o.indexOf("full")?{left:f-8+"px",top:x+-1+"px",height:i.height+"px"}:-1!==o.indexOf("enclose")?{left:f-1+"px",top:x+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:u,top:y}:-1!==o.indexOf("right")?-1!==o.indexOf("full")?{left:f+i.width+"px",top:x+-1+"px",height:i.height+"px"}:-1!==o.indexOf("enclose")?{left:f+-1+"px",top:x+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:w,top:O}:-1!==o.indexOf("top")?-1!==o.indexOf("full")?{top:x+-8+"px",left:f+-1+"px",width:i.width+"px"}:-1!==o.indexOf("enclose")?{top:x+-1+"px",left:f+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:b,top:E}:-1!==o.indexOf("bottom")?-1!==o.indexOf("full")?{top:x+i.height+"px",left:f+-1+"px",width:i.width+"px"}:-1!==o.indexOf("enclose")?{top:x+-1+"px",left:f+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:R,top:B}:-1!==o.indexOf("full")?{left:f+i.width+"px",top:x+"px",height:i.height+"px"}:-1!==o.indexOf("enclose")?{left:f+i.width+"px",top:x+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:u,top:y}:-1!==o.indexOf("full")?{left:f-8+"px",top:x+-1+"px",height:i.height+"px"}:-1!==o.indexOf("enclose")?{left:f-1+"px",top:x+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:u,top:y},a(p,C)};const x=(t="",e="",n="span")=>{const o=document.createElement(n);return o.setAttribute("title",t+"px"),o.setAttribute("data-measure",parseInt(t,10)+"px"),i(o,`ph speccer measure ${e}`),o},m=t=>{if(!t)return;const n=t.getBoundingClientRect(),i=t.getAttribute("data-speccer-measure");if(""===i)return;const o=t.offsetTop,p=t.offsetLeft;if(-1!==i.indexOf("width"))if(-1!==i.indexOf("bottom")){const i=x(n.width,"width bottom");d.indexOf(t.nodeName)>=0?e(t.closest("table"),i):e(t,i),a(i,{left:p+"px",top:o+n.height+1+"px",width:n.width+"px"})}else{const i=x(n.width,"width top");d.indexOf(t.nodeName)>=0?e(t.closest("table"),i):e(t,i);const s=i.getBoundingClientRect();a(i,{left:p+"px",top:o-s.height+1+"px",width:n.width+"px"})}else if(-1!==i.indexOf("height"))if(-1!==i.indexOf("right")){const i=x(n.height,"height right");d.indexOf(t.nodeName)>=0?e(t.closest("table"),i):e(t,i),a(i,{left:p+n.width+"px",top:o+"px",height:n.height+"px"})}else{const i=x(n.height,"height left");d.indexOf(t.nodeName)>=0?e(t.closest("table"),i):e(t,i);const s=i.getBoundingClientRect();a(i,{left:p-s.width+"px",top:o+"px",height:n.height+"px"})}};const u=t=>parseFloat(t).toFixed(3),y=(t,e)=>{const n=document.createElement("div");return n.innerHTML=t,i(n,`ph speccer typography ${e}`),n},w=async t=>{const n=t.getAttribute("data-speccer-typography"),i=await l(t);if("none"===i.display||"hidden"===i.visibility)return;t.classList.add("is-specced");"static"===l(t.parentElement).position&&window.requestAnimationFrame((()=>{t.parentElement.style.position="relative"}));const o=(t=>{const{lineHeight:e,letterSpacing:n,fontFamily:i,fontSize:o,fontStyle:p,fontVariationSettings:s,fontWeight:a}=t;return{lineHeight:e,letterSpacing:n,fontFamily:i,fontSize:o,fontStyle:p,fontVariationSettings:s,fontWeight:a}})(i),p=t.getBoundingClientRect(),s=`\n font-styles: {<ul class="speccer-styles"> <li><span class="property">font-family:</span> ${o.fontFamily};</li> <li><span class="property">font-size:</span> ${o.fontSize} / ${parseInt(o.fontSize,10)/16}rem;</li> <li><span class="property">font-weight:</span> ${o.fontWeight};</li> <li><span class="property">font-variation-settings:</span> ${o.fontVariationSettings};</li> <li><span class="property">line-height:</span> ${o.lineHeight} / ${parseInt(o.lineHeight,10)/16}rem;</li> <li><span class="property">letter-spacing:</span> ${o.letterSpacing};</li> <li><span class="property">font-style:</span> ${o.fontStyle};</li></ul>}`,r=y(s,n);let c=0,h=0;const g=d.indexOf(t.nodeName)>=0;if(g){const n=t.parentElement,i=window.getComputedStyle(n.parentElement);e(n,r),c=n.getBoundingClientRect().top-parseInt(i.getPropertyValue("padding-top"),10),h=n.getBoundingClientRect().left-parseInt(i.getPropertyValue("padding-left"),10)}else e(t,r);const f=r.getBoundingClientRect(),x=(g?f.left-h:t.offsetLeft)-f.width-48+"px",m=u((g?f.top-c:t.offsetTop)-f.height/2+p.height/2)+"px",w=(g?f.left-h:t.offsetLeft)+p.width+48+"px",O=u((g?f.top-c:t.offsetTop)-f.height/2+p.height/2)+"px",b=u((g?f.left-h:t.offsetLeft)-f.width/2+p.width/2)+"px",E=(g?f.top-c:t.offsetTop)-f.height-48+"px",R=u((g?f.left-h:t.offsetLeft)-f.width/2+p.width/2)+"px",B=(g?f.top-c:t.offsetTop)+p.height+48+"px";let C={left:x,top:m};-1!==n.indexOf("right")?C={left:w,top:O}:-1!==n.indexOf("top")?C={left:b,top:E}:-1!==n.indexOf("bottom")&&(C={left:R,top:B}),a(r,C)};const O=t=>{const e=(n=()=>{t()},i=300,function(){var t=this,e=arguments,s=function(){p=null,o||n.apply(t,e)},a=o&&!p;clearTimeout(p),p=setTimeout(s,i),a&&n.apply(t,e)});var n,i,o,p;window.removeEventListener("resize",e),window.addEventListener("resize",e)},b=t=>{"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()},E=()=>{n(".speccer"),n(".dissection");const t=document.querySelectorAll("[data-speccer],[data-speccer] *:not(td)"),e=document.querySelectorAll("[data-speccer-measure]"),i=document.querySelectorAll("[data-speccer-typography]"),o=document.querySelectorAll("[data-anatomy-section] [data-anatomy]");t.forEach(h),e.forEach(m),i.forEach(w),o.forEach(f)},R=Object.freeze({__proto__:null,create:c,element:h}),B=Object.freeze({__proto__:null,create:g,element:f}),C=Object.freeze({__proto__:null,element:m}),A=Object.freeze({__proto__:null,create:y,element:w});(t=>{const e=document.currentScript;if(e){const n=e.getAttribute("src");-1===n.indexOf("speccer.js")&&-1===n.indexOf("JaXpOK.js")||(e.hasAttribute("data-manual")?(t=>{window.speccer=t})(t):e.hasAttribute("data-instant")?t():e.hasAttribute("data-dom")?b(t):e.hasAttribute("data-lazy")?(()=>{const t=new IntersectionObserver(((t,e)=>{t.forEach((t=>{t.intersectionRatio>0&&(h(t.target),e.unobserve(t.target))}))}));document.querySelectorAll("[data-speccer],[data-speccer] *:not(td)").forEach((e=>{t.observe(e)}));const e=new IntersectionObserver(((t,e)=>{t.forEach((t=>{t.intersectionRatio>0&&(m(t.target),e.unobserve(t.target))}))}));document.querySelectorAll("[data-speccer-measure]").forEach((t=>{e.observe(t)}));const n=new IntersectionObserver(((t,e)=>{t.forEach((t=>{const n=t.target.querySelectorAll("[data-anatomy]");t.intersectionRatio>0&&(n.forEach(f),e.unobserve(t.target))}))}));document.querySelectorAll("[data-anatomy-section]").forEach((t=>{n.observe(t)}))})():b(t),e.hasAttribute("data-manual")||e.hasAttribute("data-lazy")||O(t))}})(E),t.default=E,t.dissect=B,t.measure=C,t.spacing=R,t.typography=A,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).speccer={})}(this,(function(t){"use strict";const e=(t,e,n="noop")=>{t&&(!e||e&&0===e.length||e.trim().split(" ").filter((t=>t!==n)).forEach((e=>t.classList.add(e))))},n=(t,e)=>`${t} ${Object.keys(e).filter((t=>e[t])).join(" ")}`.trim(),i=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"],o=t=>parseInt(t,10),p=t=>o(getComputedStyle(t).getPropertyValue("--ph-speccer-pin-space"))||48,a=()=>new Promise(requestAnimationFrame),l=async(t,e)=>{!t||!e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||Array.isArray(e)&&0===e.length||0===Object.keys(e).length&&e.constructor===Object||(await a(),Array.isArray(e)?e.forEach((e=>t.style[e.key]=e.value)):Object.keys(e).forEach((n=>t.style[n]=e[n])))},s=async t=>(await a(),getComputedStyle(t,null)),d=(t,e,n)=>t-e.width/2+n.width/2,r=(t,e,n)=>t-e.height/2+n.height/2,c=async t=>{await a();const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},h=(t="",n="span")=>{const i=document.createElement(n),o=document.createTextNode(t+"");return i.appendChild(o),i.setAttribute("title",t+"px"),e(i,"ph speccer spacing"),i},f=async t=>{const n={},i=await s(t);if("none"===i.display||"hidden"===i.visibility||!t.parentElement)return;t.classList.add("is-specced"),n.styles=(t=>{const{marginTop:e,marginBottom:n,marginLeft:i,marginRight:o,paddingTop:p,paddingBottom:a,paddingLeft:l,paddingRight:s}=t;return{marginTop:e,marginBottom:n,marginLeft:i,marginRight:o,paddingTop:p,paddingBottom:a,paddingLeft:l,paddingRight:s}})(i);const p=t.getBoundingClientRect(),a=await c(t);if("0px"!==n.styles.marginTop){const t=h(o(n.styles.marginTop));document.body.appendChild(t),e(t,"margin top"),l(t,{height:n.styles.marginTop,width:p.width+"px",left:a.left+"px",top:a.top-parseInt(n.styles.marginTop,10)+"px"})}if("0px"!==n.styles.marginRight){const t=h(o(n.styles.marginRight));e(t,"margin right"),l(t,{height:p.height+"px",width:n.styles.marginRight,left:a.left+parseInt(p.width+"",10)+"px",top:a.top+"px"}),document.body.appendChild(t)}if("0px"!==n.styles.marginBottom){const t=h(o(n.styles.marginBottom));e(t,"margin bottom"),l(t,{height:n.styles.marginBottom,width:p.width+"px",left:a.left+"px",top:a.top+parseInt(p.height+"",10)+"px"}),document.body.appendChild(t)}if("0px"!==n.styles.marginLeft){const t=h(o(n.styles.marginLeft));e(t,"margin left"),l(t,{height:p.height+"px",width:n.styles.marginLeft,left:a.left-parseInt(n.styles.marginLeft,10)+"px",top:a.top+"px"}),document.body.appendChild(t)}if("0px"!==n.styles.paddingTop){const t=h(o(n.styles.paddingTop));e(t,"padding top"),l(t,{height:n.styles.paddingTop,width:p.width+"px",left:a.left+"px",top:a.top+"px"}),document.body.appendChild(t)}if("0px"!==n.styles.paddingBottom){const t=h(o(n.styles.paddingBottom));e(t,"padding bottom"),l(t,{height:n.styles.paddingBottom,width:p.width+"px",left:a.left+"px",top:a.top+(parseInt(p.height+"",10)-parseInt(n.styles.paddingBottom,10))+"px"}),document.body.appendChild(t)}if("0px"!==n.styles.paddingRight){const t=h(o(n.styles.paddingRight));e(t,"padding right"),l(t,{height:p.height+"px",width:n.styles.paddingRight,left:a.left+(parseInt(p.width+"",10)-parseInt(n.styles.paddingRight,10))+"px",top:a.top+"px"}),document.body.appendChild(t)}if("0px"!==n.styles.paddingLeft){const t=h(o(n.styles.paddingLeft));e(t,"padding left"),l(t,{height:p.height+"px",width:n.styles.paddingLeft,left:a.left+"px",top:a.top+"px"}),document.body.appendChild(t)}};var g,u,x=Object.freeze({__proto__:null,create:h,element:f});!function(t){t.Empty="",t.Left="left",t.Right="right",t.Bottom="bottom",t.Top="top"}(g||(g={})),function(t){t.Outline="outline",t.Enclose="enclose",t.Full="full",t.Left="left",t.Right="right",t.Bottom="bottom",t.Top="top"}(u||(u={}));const m=(t,e=3)=>parseFloat(t+"").toFixed(e),y=(t="",i,o="span")=>{const p=document.createElement(o),a=document.createTextNode(t),l={};null!==i&&""!==i&&(l[i]=!0),-1===i.indexOf(u.Full)&&-1===i.indexOf(u.Enclose)?p.appendChild(a):-1===i.indexOf(u.Full)&&-1===i.indexOf(u.Enclose)||p.setAttribute("data-dissection-counter",t);const s=n("ph speccer dissection",l);return e(p,s),p},w=async(t,e)=>{if(!t)return;const n=t.getAttribute("data-anatomy")||"";if(!n||""===n)return;const o=y(i[e],n);document.body.appendChild(o);const a=await(async(t,e,n)=>{const i=e.getBoundingClientRect(),o=n.getBoundingClientRect(),a=p(n),l=await c(e),s=l.left-o.width-a+"px",h=m(r(l.top,o,i))+"px",f=l.left+i.width+a+"px",g=m(r(l.top,o,i))+"px",x=m(d(l.left,o,i))+"px",y=l.top-o.height-a+"px",w=m(d(l.left,o,i))+"px",b=l.top+i.height+a+"px";let O={};return O=-1!==t.indexOf(u.Outline)?-1!==t.indexOf(u.Left)?-1!==t.indexOf(u.Full)?{left:l.left-8+"px",top:l.top+-1+"px",height:i.height+"px"}:-1!==t.indexOf(u.Enclose)?{left:l.left-1+"px",top:l.top+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:s,top:h}:-1!==t.indexOf(u.Right)?-1!==t.indexOf(u.Full)?{left:l.left+i.width+"px",top:l.top+-1+"px",height:i.height+"px"}:-1!==t.indexOf(u.Enclose)?{left:l.left+-1+"px",top:l.top+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:f,top:g}:-1!==t.indexOf(u.Top)?-1!==t.indexOf(u.Full)?{top:l.top+-8+"px",left:l.left+-1+"px",width:i.width+"px"}:-1!==t.indexOf(u.Enclose)?{top:l.top+-1+"px",left:l.left+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:x,top:y}:-1!==t.indexOf(u.Bottom)?-1!==t.indexOf(u.Full)?{top:l.top+i.height+"px",left:l.left+-1+"px",width:i.width+"px"}:-1!==t.indexOf(u.Enclose)?{top:l.top+-1+"px",left:l.left+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:w,top:b}:-1!==t.indexOf(u.Full)?{left:l.left+i.width+"px",top:l.top+"px",height:i.height+"px"}:-1!==t.indexOf(u.Enclose)?{left:l.left+i.width+"px",top:l.top+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:s,top:h}:-1!==t.indexOf(u.Full)?{left:l.left-8+"px",top:l.top+-1+"px",height:i.height+"px"}:-1!==t.indexOf(u.Enclose)?{left:l.left-1+"px",top:l.top+-1+"px",height:i.height+"px",width:i.width+"px"}:{left:s,top:h},O})(n,t,o);l(o,a)};const b=(t="",n="",i="span")=>{const o=document.createElement(i);return o.setAttribute("title",t+"px"),o.setAttribute("data-measure",parseInt(t+"",10)+"px"),e(o,`ph speccer measure ${n}`),o},O=t=>{if(!t)return;const e=t.getBoundingClientRect(),n=t.getAttribute("data-speccer-measure");if(""===n||!n)return;const i=t.getBoundingClientRect(),o=i.top+window.pageYOffset,p=i.left+window.pageXOffset;if(-1!==n.indexOf("width"))if(-1!==n.indexOf("bottom")){const t=b(e.width,"width bottom");document.body.appendChild(t),l(t,{left:p+"px",top:o+e.height+1+"px",width:e.width+"px"})}else{const t=b(e.width,"width top");document.body.appendChild(t);const n=t.getBoundingClientRect();l(t,{left:p+"px",top:o-n.height+1+"px",width:e.width+"px"})}else if(-1!==n.indexOf("height"))if(-1!==n.indexOf("right")){const t=b(e.height,"height right");document.body.appendChild(t),l(t,{left:p+e.width+"px",top:o+"px",height:e.height+"px"})}else{const t=b(e.height,"height left");document.body.appendChild(t);const n=t.getBoundingClientRect();l(t,{left:p-n.width+"px",top:o+"px",height:e.height+"px"})}};const E=(t,i)=>{const o=document.createElement("div"),p={};null!==i&&""!==i&&(p[i]=!0);const a=n("ph speccer typography",p);return o.innerHTML=t,e(o,a),o};const C=t=>{const e=()=>function(t,e,n){let i;return function(){const o=this,p=arguments,a=function(){i=null,n||t.apply(o,p)},l=n&&!i;i&&clearTimeout(i),i=setTimeout(a,e),l&&t.apply(o,p)}}((()=>{t()}),300);window.removeEventListener("resize",e),window.addEventListener("resize",e)},A=t=>{"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{t()})):t()},R=x,S=Object.freeze({__proto__:null,create:y,element:w}),B=Object.freeze({__proto__:null,element:O}),L=Object.freeze({__proto__:null,create:E,element:async t=>{if(!t)return;const e=t.getAttribute("data-speccer-typography"),n=await s(t);if("none"===n.display||"hidden"===n.visibility||!t.parentElement)return;t.classList.add("is-specced");const i=await(async t=>{const e=(t=>{const{lineHeight:e,letterSpacing:n,fontFamily:i,fontSize:o,fontStyle:p,fontVariationSettings:a,fontWeight:l}=t;return{lineHeight:e,letterSpacing:n,fontFamily:i,fontSize:o,fontStyle:p,fontVariationSettings:a,fontWeight:l}})(await s(t));return`\nfont-styles: {<ul class="speccer-styles"> <li><span class="property">font-family:</span> ${e.fontFamily};</li> <li><span class="property">font-size:</span> ${e.fontSize} / ${parseInt(e.fontSize,10)/16}rem;</li> <li><span class="property">font-weight:</span> ${e.fontWeight};</li> <li><span class="property">font-variation-settings:</span> ${e.fontVariationSettings};</li> <li><span class="property">line-height:</span> ${e.lineHeight} / ${parseInt(e.lineHeight,10)/16}rem;</li> <li><span class="property">letter-spacing:</span> ${e.letterSpacing};</li> <li><span class="property">font-style:</span> ${e.fontStyle};</li></ul>}`})(t),o=E(i,e);document.body.appendChild(o);const a=await(async(t,e,n)=>{const i=e.getBoundingClientRect(),o=p(n),a=n.getBoundingClientRect(),l=await c(e),s=l.left-a.width-o+"px",h=m(r(l.top,a,i))+"px",f=l.left+i.width+o+"px",u=m(r(l.top,a,i))+"px",x=m(d(l.left,a,i))+"px",y=l.top-a.height-o+"px",w=m(d(l.left,a,i))+"px",b=l.top+i.height+o+"px";let O={left:s,top:h};return t&&-1!==t.indexOf(g.Right)?O={left:f,top:u}:t&&-1!==t.indexOf(g.Top)?O={left:x,top:y}:t&&-1!==t.indexOf(g.Bottom)&&(O={left:w,top:b}),O})(e,t,o);l(o,a)}}),T=()=>{((t,e=document)=>{[].forEach.call(e.querySelectorAll(t),(function(t){t.remove()}))})(".speccer");const t=document.querySelectorAll("[data-speccer],[data-speccer] *:not(td):not(tr):not(th):not(tfoot):not(thead):not(tbody)"),e=document.querySelectorAll("[data-speccer-measure]"),n=document.querySelectorAll("[data-speccer-typography]"),i=document.querySelectorAll("[data-anatomy-section] [data-anatomy]");t.forEach(R.element),e.forEach(B.element),n.forEach(L.element),i.forEach(S.element)};(t=>{const e=document.currentScript;if(e){const n=e.getAttribute("src");!n||-1===n.indexOf("speccer.js")&&-1===n.indexOf("JaXpOK.js")||(e.hasAttribute("data-manual")?(t=>{window.speccer=t})(t):e.hasAttribute("data-instant")?t():e.hasAttribute("data-dom")?A(t):e.hasAttribute("data-lazy")?(()=>{const t=new IntersectionObserver(((t,e)=>{t.forEach((t=>{t.intersectionRatio>0&&(f(t.target),e.unobserve(t.target))}))}));document.querySelectorAll("[data-speccer],[data-speccer] *:not(td)").forEach((e=>{t.observe(e)}));const e=new IntersectionObserver(((t,e)=>{t.forEach((t=>{t.intersectionRatio>0&&(O(t.target),e.unobserve(t.target))}))}));document.querySelectorAll("[data-speccer-measure]").forEach((t=>{e.observe(t)}));const n=new IntersectionObserver(((t,e)=>{t.forEach((t=>{const n=t.target.querySelectorAll("[data-anatomy]");t.intersectionRatio>0&&(n.forEach(w),e.unobserve(t.target))}))}));document.querySelectorAll("[data-anatomy-section]").forEach((t=>{n.observe(t)}))})():A(t),e.hasAttribute("data-manual")||e.hasAttribute("data-lazy")||C(t))}})(T),t.default=T,t.dissect=S,t.measure=B,t.spacing=R,t.typography=L,Object.defineProperty(t,"__esModule",{value:!0})}));
2
+ //# sourceMappingURL=speccer.js.map
package/speccer.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"speccer.js","sources":["src/lib/node.ts","src/lib/classnames.ts","src/lib/constants.ts","src/lib/css.ts","src/lib/debounce.ts","src/lib/styles.ts","src/lib/position.ts","src/tasks/spec.ts","src/enums/area.ts","src/lib/number.ts","src/tasks/dissect.ts","src/helpers/dissect/styles.ts","src/tasks/measure.ts","src/helpers/typography/position.ts","src/tasks/typography.ts","src/lib/resize.ts","src/browser.ts","src/index.ts","src/helpers/typography/template.ts"],"sourcesContent":["export const after = (el: HTMLElement | null, newSibling: HTMLElement) =>\n el && el.insertAdjacentElement('afterend', newSibling);\n\nexport const removeAll = (selector: string, el: Document = document) => {\n [].forEach.call(el.querySelectorAll(selector), function (e: HTMLElement) {\n e.remove();\n });\n};\n","/* eslint no-console:0 */\n'use strict';\n\nexport const set = (el: HTMLElement, cls: string, avoid = 'noop') => {\n if (!el) return;\n\n if (!cls || (cls && cls.length === 0)) return;\n\n cls\n .trim()\n .split(' ')\n .filter((cl) => cl !== avoid)\n .forEach((cl) => el.classList.add(cl));\n};\n\nexport const toggle = (el: HTMLElement, cls: string, avoid = 'noop') => {\n if (!el) return;\n\n if (!cls || (cls && cls.length === 0)) return;\n\n cls\n .trim()\n .split(' ')\n .filter((cl) => cl !== avoid)\n .forEach((cl) => el.classList.toggle(cl));\n};\n\nexport const remove = (el: HTMLElement, cls: string, avoid = 'noop') => {\n if (!el) return;\n\n if (!cls || (cls && cls.length === 0)) return;\n\n cls\n .trim()\n .split(' ')\n .filter((cl) => cl !== avoid)\n .forEach((cl) => el.classList.remove(cl));\n};\n\nexport const cx = (cls: string, cls_obj: {}): string =>\n `${cls} ${Object.keys(cls_obj)\n .filter((classname) => cls_obj[classname])\n .join(' ')}`.trim();\n","/* eslint no-console:0 */\n'use strict';\n\nexport const SPECCER_LITERALS = [...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'];\n\nexport const SPECCER_TAGS_TO_AVOID = ['TR', 'TH', 'TD', 'TBODY', 'THEAD', 'TFOOT'];\n\nexport const SPECCER_DEFAULT_PIN_SPACE = 48;\n","/* eslint no-console:0 */\n'use strict';\nimport { SPECCER_DEFAULT_PIN_SPACE } from './constants';\nimport { SpacingCSSPropertiesType, TypographyCSSPropertiesType } from '../types/css';\n\nexport const getNumberValue = (value: string): number => parseInt(value, 10);\n\nexport const normalizeNumberValue = (value: string | number): number => {\n const _value = parseFloat(value + '');\n\n return (_value >= 0 && _value < 1) || (_value <= 0 && _value > -1) ? 0 : _value;\n};\n\nexport const getSpacing = (style: SpacingCSSPropertiesType): SpacingCSSPropertiesType => {\n const { marginTop, marginBottom, marginLeft, marginRight, paddingTop, paddingBottom, paddingLeft, paddingRight } =\n style;\n\n return {\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight\n };\n};\n\nexport const getTypography = (style: TypographyCSSPropertiesType): TypographyCSSPropertiesType => {\n const { lineHeight, letterSpacing, fontFamily, fontSize, fontStyle, fontVariationSettings, fontWeight } = style;\n\n return {\n lineHeight,\n letterSpacing,\n fontFamily,\n fontSize,\n fontStyle,\n fontVariationSettings,\n fontWeight\n };\n};\n\nexport const pinSpace = (el: HTMLElement): number =>\n getNumberValue(getComputedStyle(el).getPropertyValue('--ph-speccer-pin-space')) || SPECCER_DEFAULT_PIN_SPACE;\n","/* eslint no-console:0 */\n'use strict';\n\nexport const waitForFrame = () => new Promise(requestAnimationFrame);\n\nconst debounce = function (func: Function, wait: number, immediate?: boolean): Function {\n let timeout: null | ReturnType<typeof setTimeout>;\n\n return function (this: any) {\n const context = this;\n const args = arguments;\n const later = function () {\n timeout = null;\n\n if (!immediate) func.apply(context, args);\n };\n const callNow = immediate && !timeout;\n\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(later, wait);\n\n if (callNow) func.apply(context, args);\n };\n};\n\nexport default debounce;\n","/* eslint no-console:0 */\n'use strict';\nimport { waitForFrame } from './debounce';\n\nexport const add = async (el: HTMLElement, styles: [] | object) => {\n if (\n !el ||\n !styles ||\n typeof styles === 'string' ||\n typeof styles === 'number' ||\n typeof styles === 'boolean' ||\n (Array.isArray(styles) && styles.length === 0) ||\n (Object.keys(styles).length === 0 && styles.constructor === Object)\n ) {\n return;\n }\n\n await waitForFrame();\n\n if (Array.isArray(styles)) {\n styles.forEach((style: { key: string; value: string }) => (el.style[style.key] = style.value));\n } else {\n Object.keys(styles).forEach((key) => (el.style[key] = styles[key]));\n }\n};\n\nexport const get = async (el: HTMLElement): Promise<CSSStyleDeclaration> => {\n await waitForFrame();\n\n return getComputedStyle(el, null);\n};\n","import { waitForFrame } from './debounce';\n\nexport const get_horizontal_center_of_els = (modifier: number, startRect: DOMRect, targetRect: DOMRect): number =>\n modifier - startRect.width / 2 + targetRect.width / 2;\n\nexport const get_vertical_center_of_els = (modifier: number, startRect: DOMRect, targetRect: DOMRect): number =>\n modifier - startRect.height / 2 + targetRect.height / 2;\n\nexport const offset = async (targetEl: HTMLElement): Promise<{ left: number; top: number }> => {\n await waitForFrame();\n\n const _target_rect = targetEl.getBoundingClientRect();\n const _el_offset_top = _target_rect.top + window.pageYOffset;\n const _el_offset_left = _target_rect.left + window.pageXOffset;\n\n return {\n top: _el_offset_top,\n left: _el_offset_left\n };\n};\n","/* eslint no-console:0 */\n'use strict';\n\nimport * as classnames from '../lib/classnames';\nimport * as css from '../lib/css';\nimport * as styles from '../lib/styles';\nimport { offset } from '../lib/position';\nimport { SpeccerElType } from '../types/speccer';\n\nexport const create = (text: string | number = '', tag = 'span') => {\n const _el = document.createElement(tag);\n const _text_content = document.createTextNode(text + '');\n\n _el.appendChild(_text_content);\n _el.setAttribute('title', text + 'px');\n classnames.set(_el, 'ph speccer spacing');\n\n return _el;\n};\n\nexport const element = async (targetEl: HTMLElement) => {\n const _speccer_el: SpeccerElType = {};\n const _el_style = await styles.get(targetEl);\n\n if (_el_style.display === 'none' || _el_style.visibility === 'hidden' || !targetEl.parentElement) {\n return;\n }\n\n targetEl.classList.add('is-specced');\n\n _speccer_el.styles = css.getSpacing(_el_style);\n\n const _target_rect = targetEl.getBoundingClientRect();\n const _el_offset = await offset(targetEl);\n\n if (_speccer_el.styles['marginTop'] !== '0px') {\n const _speccer_margin_top_el = create(css.getNumberValue(_speccer_el.styles.marginTop));\n\n document.body.appendChild(_speccer_margin_top_el);\n\n classnames.set(_speccer_margin_top_el, 'margin top');\n styles.add(_speccer_margin_top_el, {\n height: _speccer_el.styles.marginTop,\n width: _target_rect.width + 'px',\n left: _el_offset.left + 'px',\n top: _el_offset.top - parseInt(_speccer_el.styles.marginTop, 10) + 'px'\n });\n }\n\n if (_speccer_el.styles['marginRight'] !== '0px') {\n const _speccer_margin_right_el = create(css.getNumberValue(_speccer_el.styles.marginRight));\n\n classnames.set(_speccer_margin_right_el, 'margin right');\n\n styles.add(_speccer_margin_right_el, {\n height: _target_rect.height + 'px',\n width: _speccer_el.styles.marginRight,\n left: _el_offset.left + parseInt(_target_rect.width + '', 10) + 'px',\n top: _el_offset.top + 'px'\n });\n\n document.body.appendChild(_speccer_margin_right_el);\n }\n\n if (_speccer_el.styles['marginBottom'] !== '0px') {\n const _speccer_margin_bottom_el = create(css.getNumberValue(_speccer_el.styles.marginBottom));\n\n classnames.set(_speccer_margin_bottom_el, 'margin bottom');\n\n styles.add(_speccer_margin_bottom_el, {\n height: _speccer_el.styles.marginBottom,\n width: _target_rect.width + 'px',\n left: _el_offset.left + 'px',\n top: _el_offset.top + parseInt(_target_rect.height + '', 10) + 'px'\n });\n\n document.body.appendChild(_speccer_margin_bottom_el);\n }\n\n if (_speccer_el.styles['marginLeft'] !== '0px') {\n const _speccer_margin_left_el = create(css.getNumberValue(_speccer_el.styles.marginLeft));\n\n classnames.set(_speccer_margin_left_el, 'margin left');\n\n styles.add(_speccer_margin_left_el, {\n height: _target_rect.height + 'px',\n width: _speccer_el.styles.marginLeft,\n left: _el_offset.left - parseInt(_speccer_el.styles.marginLeft, 10) + 'px',\n top: _el_offset.top + 'px'\n });\n\n document.body.appendChild(_speccer_margin_left_el);\n }\n\n if (_speccer_el.styles['paddingTop'] !== '0px') {\n const _speccer_padding_top_el = create(css.getNumberValue(_speccer_el.styles.paddingTop));\n\n classnames.set(_speccer_padding_top_el, 'padding top');\n\n styles.add(_speccer_padding_top_el, {\n height: _speccer_el.styles.paddingTop,\n width: _target_rect.width + 'px',\n left: _el_offset.left + 'px',\n top: _el_offset.top + 'px'\n });\n\n document.body.appendChild(_speccer_padding_top_el);\n }\n\n if (_speccer_el.styles['paddingBottom'] !== '0px') {\n const _speccer_padding_bottom_el = create(css.getNumberValue(_speccer_el.styles.paddingBottom));\n\n classnames.set(_speccer_padding_bottom_el, 'padding bottom');\n\n styles.add(_speccer_padding_bottom_el, {\n height: _speccer_el.styles.paddingBottom,\n width: _target_rect.width + 'px',\n left: _el_offset.left + 'px',\n top:\n _el_offset.top +\n (parseInt(_target_rect.height + '', 10) - parseInt(_speccer_el.styles.paddingBottom, 10)) +\n 'px'\n });\n\n document.body.appendChild(_speccer_padding_bottom_el);\n }\n\n if (_speccer_el.styles['paddingRight'] !== '0px') {\n const _speccer_padding_right_el = create(css.getNumberValue(_speccer_el.styles.paddingRight));\n\n classnames.set(_speccer_padding_right_el, 'padding right');\n\n styles.add(_speccer_padding_right_el, {\n height: _target_rect.height + 'px',\n width: _speccer_el.styles.paddingRight,\n left:\n _el_offset.left +\n (parseInt(_target_rect.width + '', 10) - parseInt(_speccer_el.styles.paddingRight, 10)) +\n 'px',\n top: _el_offset.top + 'px'\n });\n\n document.body.appendChild(_speccer_padding_right_el);\n }\n\n if (_speccer_el.styles['paddingLeft'] !== '0px') {\n const _speccer_padding_left_el = create(css.getNumberValue(_speccer_el.styles.paddingLeft));\n\n classnames.set(_speccer_padding_left_el, 'padding left');\n\n styles.add(_speccer_padding_left_el, {\n height: _target_rect.height + 'px',\n width: _speccer_el.styles.paddingLeft,\n left: _el_offset.left + 'px',\n top: _el_offset.top + 'px'\n });\n\n document.body.appendChild(_speccer_padding_left_el);\n }\n};\n","export enum SpeccerAreaEnum {\n Empty = '',\n Left = 'left',\n Right = 'right',\n Bottom = 'bottom',\n Top = 'top',\n}\n\nexport enum DissectAreaEnum {\n Outline = 'outline',\n Enclose = 'enclose',\n Full = 'full',\n Left = 'left',\n Right = 'right',\n Bottom = 'bottom',\n Top = 'top',\n}\n","/* eslint no-console:0 */\n'use strict';\n\nexport const decimal = (number: string | number, decimals = 3): string => parseFloat(number + '').toFixed(decimals);\n","/* eslint no-console:0 */\n'use strict';\n\nimport * as styles from '../lib/styles';\nimport * as classnames from '../lib/classnames';\nimport { DissectAreaEnum } from '../enums/area';\nimport * as helpers from '../helpers/dissect';\nimport { SPECCER_LITERALS } from '../lib/constants';\n\nexport const create = (textContent = '', area: string, n = 'span') => {\n const _el = document.createElement(n);\n const _text_node = document.createTextNode(textContent);\n const _extra_class_names = {};\n\n if (area !== null && area !== '') {\n _extra_class_names[area] = true;\n }\n\n if (area.indexOf(DissectAreaEnum.Full) === -1 && area.indexOf(DissectAreaEnum.Enclose) === -1) {\n _el.appendChild(_text_node);\n } else if (area.indexOf(DissectAreaEnum.Full) !== -1 || area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _el.setAttribute('data-dissection-counter', textContent);\n }\n\n const _class_names = classnames.cx('ph speccer dissection', _extra_class_names);\n\n classnames.set(_el, _class_names);\n\n return _el;\n};\n\nexport const element = async (el: HTMLElement, dissectIndex: number) => {\n if (!el) return;\n\n const _area: string | null = el.getAttribute('data-anatomy') || '';\n\n if (!_area || _area === '') return;\n\n const _dissection_el = create(SPECCER_LITERALS[dissectIndex], _area);\n\n document.body.appendChild(_dissection_el);\n\n const _dissection_styles = await helpers.styles(_area, el, _dissection_el);\n\n styles.add(_dissection_el, _dissection_styles);\n};\n","import * as css from '../../lib/css';\nimport * as number from '../../lib/number';\nimport { get_horizontal_center_of_els, get_vertical_center_of_els, offset } from '../../lib/position';\nimport { DissectAreaEnum } from '../../enums/area';\n\nexport const styles = async (area: string, targetEl: HTMLElement, dissectionEl: HTMLElement) => {\n const _target_rect = targetEl.getBoundingClientRect();\n const _dissection_el_rect = dissectionEl.getBoundingClientRect();\n const SPECCER_PIN_SPACE = css.pinSpace(dissectionEl);\n const _el_offset = await offset(targetEl);\n const _left_layout_position_left = _el_offset.left - _dissection_el_rect.width - SPECCER_PIN_SPACE + 'px';\n const _left_layout_position_top =\n number.decimal(get_vertical_center_of_els(_el_offset.top, _dissection_el_rect, _target_rect)) + 'px';\n const _right_layout_position_left = _el_offset.left + _target_rect.width + SPECCER_PIN_SPACE + 'px';\n const _right_layout_position_top =\n number.decimal(get_vertical_center_of_els(_el_offset.top, _dissection_el_rect, _target_rect)) + 'px';\n const _top_layout_position_left =\n number.decimal(get_horizontal_center_of_els(_el_offset.left, _dissection_el_rect, _target_rect)) + 'px';\n const _top_layout_position_top = _el_offset.top - _dissection_el_rect.height - SPECCER_PIN_SPACE + 'px';\n const _bottom_layout_position_left =\n number.decimal(get_horizontal_center_of_els(_el_offset.left, _dissection_el_rect, _target_rect)) + 'px';\n const _bottom_layout_position_top = _el_offset.top + _target_rect.height + SPECCER_PIN_SPACE + 'px';\n\n let _dissection_styles = {};\n\n if (area.indexOf(DissectAreaEnum.Outline) !== -1) {\n if (area.indexOf(DissectAreaEnum.Left) !== -1) {\n if (area.indexOf(DissectAreaEnum.Full) !== -1) {\n _dissection_styles = {\n left: _el_offset.left - 8 + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px'\n };\n } else if (area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _dissection_styles = {\n left: _el_offset.left - 1 + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px',\n width: _target_rect.width + 'px'\n };\n } else {\n _dissection_styles = {\n left: _left_layout_position_left,\n top: _left_layout_position_top\n };\n }\n } else if (area.indexOf(DissectAreaEnum.Right) !== -1) {\n if (area.indexOf(DissectAreaEnum.Full) !== -1) {\n _dissection_styles = {\n left: _el_offset.left + _target_rect.width + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px'\n };\n } else if (area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _dissection_styles = {\n left: _el_offset.left + -1 + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px',\n width: _target_rect.width + 'px'\n };\n } else {\n _dissection_styles = {\n left: _right_layout_position_left,\n top: _right_layout_position_top\n };\n }\n } else if (area.indexOf(DissectAreaEnum.Top) !== -1) {\n if (area.indexOf(DissectAreaEnum.Full) !== -1) {\n _dissection_styles = {\n top: _el_offset.top + -8 + 'px',\n left: _el_offset.left + -1 + 'px',\n width: _target_rect.width + 'px'\n };\n } else if (area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _dissection_styles = {\n top: _el_offset.top + -1 + 'px',\n left: _el_offset.left + -1 + 'px',\n height: _target_rect.height + 'px',\n width: _target_rect.width + 'px'\n };\n } else {\n _dissection_styles = {\n left: _top_layout_position_left,\n top: _top_layout_position_top\n };\n }\n } else if (area.indexOf(DissectAreaEnum.Bottom) !== -1) {\n if (area.indexOf(DissectAreaEnum.Full) !== -1) {\n _dissection_styles = {\n top: _el_offset.top + _target_rect.height + 'px',\n left: _el_offset.left + -1 + 'px',\n width: _target_rect.width + 'px'\n };\n } else if (area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _dissection_styles = {\n top: _el_offset.top + -1 + 'px',\n left: _el_offset.left + -1 + 'px',\n height: _target_rect.height + 'px',\n width: _target_rect.width + 'px'\n };\n } else {\n _dissection_styles = {\n left: _bottom_layout_position_left,\n top: _bottom_layout_position_top\n };\n }\n } else {\n if (area.indexOf(DissectAreaEnum.Full) !== -1) {\n _dissection_styles = {\n left: _el_offset.left + _target_rect.width + 'px',\n top: _el_offset.top + 'px',\n height: _target_rect.height + 'px'\n };\n } else if (area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _dissection_styles = {\n left: _el_offset.left + _target_rect.width + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px',\n width: _target_rect.width + 'px'\n };\n } else {\n _dissection_styles = {\n left: _left_layout_position_left,\n top: _left_layout_position_top\n };\n }\n }\n } else {\n if (area.indexOf(DissectAreaEnum.Full) !== -1) {\n _dissection_styles = {\n left: _el_offset.left - 8 + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px'\n };\n } else if (area.indexOf(DissectAreaEnum.Enclose) !== -1) {\n _dissection_styles = {\n left: _el_offset.left - 1 + 'px',\n top: _el_offset.top + -1 + 'px',\n height: _target_rect.height + 'px',\n width: _target_rect.width + 'px'\n };\n } else {\n _dissection_styles = {\n left: _left_layout_position_left,\n top: _left_layout_position_top\n };\n }\n }\n\n return _dissection_styles;\n};\n","/* eslint no-console:0 */\n'use strict';\n\nimport * as classnames from '../lib/classnames';\nimport * as styles from '../lib/styles';\n\nconst create = (text: string | number = '', area: string | null = '', tag = 'span') => {\n const _el = document.createElement(tag);\n\n _el.setAttribute('title', text + 'px');\n _el.setAttribute('data-measure', parseInt(text + '', 10) + 'px');\n\n classnames.set(_el, `ph speccer measure ${area}`);\n\n return _el;\n};\n\nexport const element = (el: HTMLElement) => {\n if (!el) return;\n\n const _el_rect = el.getBoundingClientRect();\n const _area: string | null = el.getAttribute('data-speccer-measure');\n\n if (_area === '' || !_area) {\n return;\n }\n\n const _target_rect = el.getBoundingClientRect();\n const _el_offset_top = _target_rect.top + window.pageYOffset;\n const _el_offset_left = _target_rect.left + window.pageXOffset;\n\n if (_area.indexOf('width') !== -1) {\n if (_area.indexOf('bottom') !== -1) {\n const _measure_el = create(_el_rect.width, 'width bottom');\n\n document.body.appendChild(_measure_el);\n\n styles.add(_measure_el, {\n left: _el_offset_left + 'px',\n top: _el_offset_top + _el_rect.height + 1 + 'px',\n width: _el_rect.width + 'px'\n });\n } else {\n const _measure_el = create(_el_rect.width, 'width top');\n\n document.body.appendChild(_measure_el);\n\n const _measure_rect = _measure_el.getBoundingClientRect();\n\n styles.add(_measure_el, {\n left: _el_offset_left + 'px',\n top: _el_offset_top - _measure_rect.height + 1 + 'px',\n width: _el_rect.width + 'px'\n });\n }\n } else if (_area.indexOf('height') !== -1) {\n if (_area.indexOf('right') !== -1) {\n const _measure_el = create(_el_rect.height, 'height right');\n\n document.body.appendChild(_measure_el);\n\n styles.add(_measure_el, {\n left: _el_offset_left + _el_rect.width + 'px',\n top: _el_offset_top + 'px',\n height: _el_rect.height + 'px'\n });\n } else {\n const _measure_el = create(_el_rect.height, 'height left');\n\n document.body.appendChild(_measure_el);\n\n const _measure_rect = _measure_el.getBoundingClientRect();\n\n styles.add(_measure_el, {\n left: _el_offset_left - _measure_rect.width + 'px',\n top: _el_offset_top + 'px',\n height: _el_rect.height + 'px'\n });\n }\n }\n};\n","import * as css from '../../lib/css';\nimport * as number from '../../lib/number';\nimport { get_horizontal_center_of_els, get_vertical_center_of_els, offset } from '../../lib/position';\nimport { SpeccerAreaEnum } from '../../enums/area';\n\nexport const position = async (area: string | null, targetEl: HTMLElement, speccerEl: HTMLElement) => {\n const _target_rect = targetEl.getBoundingClientRect();\n const SPECCER_PIN_SPACE = css.pinSpace(speccerEl);\n const _speccer_el_rect = speccerEl.getBoundingClientRect();\n const _el_offset = await offset(targetEl);\n const _left_layout_position_left = _el_offset.left - _speccer_el_rect.width - SPECCER_PIN_SPACE + 'px';\n const _left_layout_position_top =\n number.decimal(get_vertical_center_of_els(_el_offset.top, _speccer_el_rect, _target_rect)) + 'px';\n const _right_layout_position_left = _el_offset.left + _target_rect.width + SPECCER_PIN_SPACE + 'px';\n const _right_layout_position_top =\n number.decimal(get_vertical_center_of_els(_el_offset.top, _speccer_el_rect, _target_rect)) + 'px';\n const _top_layout_position_left =\n number.decimal(get_horizontal_center_of_els(_el_offset.left, _speccer_el_rect, _target_rect)) + 'px';\n const _top_layout_position_top = _el_offset.top - _speccer_el_rect.height - SPECCER_PIN_SPACE + 'px';\n const _bottom_layout_position_left =\n number.decimal(get_horizontal_center_of_els(_el_offset.left, _speccer_el_rect, _target_rect)) + 'px';\n const _bottom_layout_position_top = _el_offset.top + _target_rect.height + SPECCER_PIN_SPACE + 'px';\n\n let _position = {\n left: _left_layout_position_left,\n top: _left_layout_position_top\n };\n\n if (area && area.indexOf(SpeccerAreaEnum.Right) !== -1) {\n _position = {\n left: _right_layout_position_left,\n top: _right_layout_position_top\n };\n } else if (area && area.indexOf(SpeccerAreaEnum.Top) !== -1) {\n _position = {\n left: _top_layout_position_left,\n top: _top_layout_position_top\n };\n } else if (area && area.indexOf(SpeccerAreaEnum.Bottom) !== -1) {\n _position = {\n left: _bottom_layout_position_left,\n top: _bottom_layout_position_top\n };\n }\n\n return _position;\n};\n","/* eslint no-console:0 */\n'use strict';\n\nimport * as classnames from '../lib/classnames';\nimport * as styles from '../lib/styles';\nimport * as helpers from '../helpers/typography';\n\nexport const create = (html: string, area: string | null) => {\n const _el = document.createElement('div');\n const _extra_class_names = {};\n\n if (area !== null && area !== '') {\n _extra_class_names[area] = true;\n }\n\n const _class_names = classnames.cx('ph speccer typography', _extra_class_names);\n\n _el.innerHTML = html;\n\n classnames.set(_el, _class_names);\n\n return _el;\n};\n\nexport const element = async (el: HTMLElement) => {\n if (!el) return;\n\n const _area: string | null = el.getAttribute('data-speccer-typography');\n const _el_style = await styles.get(el);\n\n if (_el_style.display === 'none' || _el_style.visibility === 'hidden' || !el.parentElement) {\n return;\n }\n\n el.classList.add('is-specced');\n\n const _html = await helpers.template(el);\n const _speccer_el = create(_html, _area);\n\n document.body.appendChild(_speccer_el);\n\n const _position = await helpers.position(_area, el, _speccer_el);\n\n styles.add(_speccer_el, _position);\n};\n","/* eslint no-console:0 */\n'use strict';\n\nimport debounce from './debounce';\n\nexport const activate = (speccer: Function) => {\n const speccerEventFunc = () =>\n debounce(() => {\n speccer();\n }, 300);\n\n window.removeEventListener('resize', speccerEventFunc);\n window.addEventListener('resize', speccerEventFunc);\n};\n","/* eslint no-console:0 */\n'use strict';\n\nimport * as resize from './lib/resize';\nimport * as spec from './tasks/spec';\nimport * as measure from './tasks/measure';\nimport * as dissect from './tasks/dissect';\n\nexport const dom = (speccer: Function) => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => {\n speccer();\n });\n } else {\n // `DOMContentLoaded` already fired\n speccer();\n }\n};\n\nexport const lazy = () => {\n const _spec_observer = new IntersectionObserver((els, observer) => {\n els.forEach((el: IntersectionObserverEntry) => {\n if (el.intersectionRatio > 0) {\n spec.element(el.target as HTMLElement);\n observer.unobserve(el.target);\n }\n });\n });\n\n document.querySelectorAll('[data-speccer],[data-speccer] *:not(td)').forEach((el) => {\n _spec_observer.observe(el);\n });\n\n const _measure_observer = new IntersectionObserver((els, observer) => {\n els.forEach((el) => {\n if (el.intersectionRatio > 0) {\n measure.element(el.target as HTMLElement);\n observer.unobserve(el.target);\n }\n });\n });\n\n document.querySelectorAll('[data-speccer-measure]').forEach((el) => {\n _measure_observer.observe(el);\n });\n\n const _dissect_observer = new IntersectionObserver((els, observer) => {\n els.forEach((el) => {\n const targets = el.target.querySelectorAll('[data-anatomy]');\n\n if (el.intersectionRatio > 0) {\n targets.forEach(dissect.element);\n observer.unobserve(el.target);\n }\n });\n });\n\n document.querySelectorAll('[data-anatomy-section]').forEach((el) => {\n _dissect_observer.observe(el);\n });\n};\n\nexport const manual = (speccer: Function) => {\n window.speccer = speccer;\n};\n\nexport const activate = (speccer: Function) => {\n const _script = document.currentScript;\n\n if (_script) {\n const _speccer_script_src = _script.getAttribute('src');\n\n if (\n _speccer_script_src &&\n (_speccer_script_src.indexOf('speccer.js') !== -1 ||\n // for codepen\n _speccer_script_src.indexOf('JaXpOK.js') !== -1)\n ) {\n if (_script.hasAttribute('data-manual')) {\n manual(speccer);\n } else if (_script.hasAttribute('data-instant')) {\n speccer();\n } else if (_script.hasAttribute('data-dom')) {\n dom(speccer);\n } else if (_script.hasAttribute('data-lazy')) {\n lazy();\n } else {\n dom(speccer);\n }\n\n if (!_script.hasAttribute('data-manual') && !_script.hasAttribute('data-lazy')) {\n resize.activate(speccer);\n }\n }\n }\n};\n","/* eslint no-console:0 */\n'use strict';\n\nimport './interfaces/global';\nimport * as __node from './lib/node';\nimport * as __spacing from './tasks/spec';\nimport * as __dissect from './tasks/dissect';\nimport * as __measure from './tasks/measure';\nimport * as __typography from './tasks/typography';\nimport * as __browser from './browser';\n\nexport const spacing = __spacing;\n\nexport const dissect = __dissect;\n\nexport const measure = __measure;\n\nexport const typography = __typography;\n\nconst speccer = () => {\n __node.removeAll('.speccer');\n\n const _els_to_be_specced = document.querySelectorAll(\n '[data-speccer],[data-speccer] *:not(td):not(tr):not(th):not(tfoot):not(thead):not(tbody)'\n );\n const _els_to_be_measured = document.querySelectorAll('[data-speccer-measure]');\n const _els_to_be_typography_specced = document.querySelectorAll('[data-speccer-typography]');\n const _els_to_be_dissected = document.querySelectorAll('[data-anatomy-section] [data-anatomy]');\n\n _els_to_be_specced.forEach(spacing.element);\n _els_to_be_measured.forEach(measure.element);\n _els_to_be_typography_specced.forEach(typography.element);\n _els_to_be_dissected.forEach(dissect.element);\n};\n\nexport default speccer;\n\n__browser.activate(speccer);\n","import * as css from '../../lib/css';\nimport * as styles from '../../lib/styles';\n\nexport const template = async (targetEl: HTMLElement): Promise<string> => {\n const _target_styles = await styles.get(targetEl);\n const _styles = css.getTypography(_target_styles);\n\n return (\n `\n` +\n 'font-styles: {' +\n '<ul class=\"speccer-styles\">' +\n ` <li><span class=\"property\">font-family:</span> ${_styles['fontFamily']};</li>` +\n ` <li><span class=\"property\">font-size:</span> ${_styles['fontSize']} / ${\n parseInt(_styles['fontSize'], 10) / 16\n }rem;</li>` +\n ` <li><span class=\"property\">font-weight:</span> ${_styles['fontWeight']};</li>` +\n ` <li><span class=\"property\">font-variation-settings:</span> ${_styles['fontVariationSettings']};</li>` +\n ` <li><span class=\"property\">line-height:</span> ${_styles['lineHeight']} / ${\n parseInt(_styles['lineHeight'], 10) / 16\n }rem;</li>` +\n ` <li><span class=\"property\">letter-spacing:</span> ${_styles['letterSpacing']};</li>` +\n ` <li><span class=\"property\">font-style:</span> ${_styles['fontStyle']};</li>` +\n '</ul>' +\n '}'\n );\n};\n"],"names":["set","el","cls","avoid","length","trim","split","filter","cl","forEach","classList","add","cx","cls_obj","Object","keys","classname","join","SPECCER_LITERALS","getNumberValue","value","parseInt","pinSpace","getComputedStyle","getPropertyValue","waitForFrame","Promise","requestAnimationFrame","async","styles","Array","isArray","constructor","style","key","get","get_horizontal_center_of_els","modifier","startRect","targetRect","width","get_vertical_center_of_els","height","offset","targetEl","_target_rect","getBoundingClientRect","top","window","pageYOffset","left","pageXOffset","create","text","tag","_el","document","createElement","_text_content","createTextNode","appendChild","setAttribute","classnames.set","element","_speccer_el","_el_style","styles.get","display","visibility","parentElement","marginTop","marginBottom","marginLeft","marginRight","paddingTop","paddingBottom","paddingLeft","paddingRight","css.getSpacing","_el_offset","_speccer_margin_top_el","css.getNumberValue","body","styles.add","_speccer_margin_right_el","_speccer_margin_bottom_el","_speccer_margin_left_el","_speccer_padding_top_el","_speccer_padding_bottom_el","_speccer_padding_right_el","_speccer_padding_left_el","SpeccerAreaEnum","DissectAreaEnum","decimal","number","decimals","parseFloat","toFixed","textContent","area","n","_text_node","_extra_class_names","indexOf","Full","Enclose","_class_names","classnames.cx","dissectIndex","_area","getAttribute","_dissection_el","_dissection_styles","dissectionEl","_dissection_el_rect","SPECCER_PIN_SPACE","css.pinSpace","_left_layout_position_left","_left_layout_position_top","number.decimal","_right_layout_position_left","_right_layout_position_top","_top_layout_position_left","_top_layout_position_top","_bottom_layout_position_left","_bottom_layout_position_top","Outline","Left","Right","Top","Bottom","helpers.styles","_el_rect","_el_offset_top","_el_offset_left","_measure_el","_measure_rect","html","innerHTML","activate","speccer","speccerEventFunc","func","wait","immediate","timeout","context","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","debounce","removeEventListener","addEventListener","dom","readyState","spacing","__spacing","dissect","measure","typography","_html","_styles","lineHeight","letterSpacing","fontFamily","fontSize","fontStyle","fontVariationSettings","fontWeight","css.getTypography","helpers.template","_position","speccerEl","_speccer_el_rect","helpers.position","selector","call","querySelectorAll","e","remove","__node.removeAll","_els_to_be_specced","_els_to_be_measured","_els_to_be_typography_specced","_els_to_be_dissected","_script","currentScript","_speccer_script_src","hasAttribute","manual","_spec_observer","IntersectionObserver","els","observer","intersectionRatio","spec.element","target","unobserve","observe","_measure_observer","measure.element","_dissect_observer","targets","dissect.element","lazy","resize.activate"],"mappings":"+OAGO,MCAMA,EAAM,CAACC,EAAiBC,EAAaC,EAAQ,UACnDF,KAEAC,GAAQA,GAAsB,IAAfA,EAAIE,QAExBF,EACGG,OACAC,MAAM,KACNC,QAAQC,GAAOA,IAAOL,IACtBM,SAASD,GAAOP,EAAGS,UAAUC,IAAIH,OA2BzBI,EAAK,CAACV,EAAaW,IAC9B,GAAGX,KAAOY,OAAOC,KAAKF,GACnBN,QAAQS,GAAcH,EAAQG,KAC9BC,KAAK,OAAOZ,OCvCJa,EAAmB,IAAI,8BCEvBC,EAAkBC,GAA0BC,SAASD,EAAO,IAsC5DE,EAAYrB,GACvBkB,EAAeI,iBAAiBtB,GAAIuB,iBAAiB,4BDrCd,GEJ5BC,EAAe,IAAM,IAAIC,QAAQC,uBCCjChB,EAAMiB,MAAO3B,EAAiB4B,MAEtC5B,IACA4B,GACiB,iBAAXA,GACW,iBAAXA,GACW,kBAAXA,GACNC,MAAMC,QAAQF,IAA6B,IAAlBA,EAAOzB,QACD,IAA/BU,OAAOC,KAAKc,GAAQzB,QAAgByB,EAAOG,cAAgBlB,eAKxDW,IAEFK,MAAMC,QAAQF,GAChBA,EAAOpB,SAASwB,GAA2ChC,EAAGgC,MAAMA,EAAMC,KAAOD,EAAMb,QAEvFN,OAAOC,KAAKc,GAAQpB,SAASyB,GAASjC,EAAGgC,MAAMC,GAAOL,EAAOK,OAIpDC,EAAMP,MA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IACzBQ,EAAQtM,QAAQuM,GAChBV,EAASI,UAAUzM,EAAGwM,eAK5BjJ,SAAS8H,iBAAiB,0BAA0B7K,SAASR,IAC3D6M,EAAkBH,QAAQ1M,OA2BtBgN,GAEAnD,EAAIlB,GAGDkD,EAAQG,aAAa,gBAAmBH,EAAQG,aAAa,cAChEiB,EAAgBtE,OCtDLA"}
package/speccer.min.css CHANGED
@@ -1 +1 @@
1
- .ph.speccer{--ph-speccer-color-padding:#db6fff66;--ph-speccer-color-padding-hover:#db6fff;--ph-speccer-color-margin:#fff76f66;--ph-speccer-color-margin-hover:#fff76f;--ph-speccer-color-text-light:#fff;--ph-speccer-color-text-dark:#333;--ph-speccer-color-contrast:#ff3aa8;--ph-speccer-spacing-color:var(--ph-speccer-color-contrast);--ph-speccer-measure-color:red;--ph-speccer-pin-color:var(--ph-speccer-color-contrast);--ph-speccer-typography-background-color:#fff;--ph-speccer-typography-color-property:#3f85f2;--ph-speccer-typography-color-text:#57575b;--ph-speccer-typography-color-value:var(--ph-speccer-color-contrast);--ph-speccer-depth-opacity-400:0.4;--ph-speccer-font-family:"Menlo for Powerline","Menlo Regular for Powerline","DejaVu Sans Mono",Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;--ph-speccer-font-size:12px;--ph-speccer-line-height:12px;--ph-speccer-pin-size:24px;--ph-speccer-pin-space:48px;--ph-speccer-line-width:1px;--ph-speccer-line-width-negative:-1px;--ph-speccer-measure-size:8px}.ph.speccer,.ph.speccer:after,.ph.speccer:before{box-sizing:border-box;font-family:var(--ph-speccer-font-family)!important;font-size:12px;line-height:12px;pointer-events:none;user-select:none;z-index:99999}.ph.speccer,.ph.speccer.dissection,.ph.speccer:after,.ph.speccer:before{align-items:center;display:flex;justify-content:center;position:absolute}.ph.speccer.dissection{background-color:var(--ph-speccer-pin-color);border-radius:100%;box-sizing:initial;color:var(--ph-speccer-color-text-light);font-family:sans-serif;font-size:16px;font-weight:400;height:var(--ph-speccer-pin-size);line-height:150%;width:var(--ph-speccer-pin-size);z-index:100000}.ph.speccer.dissection:after{background-color:var(--ph-speccer-pin-color);content:"";height:var(--ph-speccer-pin-space);position:absolute;top:100%;width:var(--ph-speccer-line-width);z-index:99999}.ph.speccer.dissection.outline.left:after{height:var(--ph-speccer-line-width);left:100%;top:50%;width:var(--ph-speccer-pin-space)}.ph.speccer.dissection.outline.right:after{height:var(--ph-speccer-line-width);right:100%;top:50%;width:var(--ph-speccer-pin-space)}.ph.speccer.dissection.outline.enclose{background-color:initial;border:var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color);border-radius:0;color:var(--ph-speccer-measure-color)}.ph.speccer.dissection.outline.enclose.right:after{left:calc(100% + var(--ph-speccer-pin-space) + var(--ph-speccer-line-width));right:auto}.ph.speccer.dissection.outline.enclose.right:before{left:100%;right:auto}.ph.speccer.dissection.outline.enclose.left:after{left:calc(var(--ph-speccer-line-width-negative) - var(--ph-speccer-pin-size) - var(--ph-speccer-pin-space));right:auto}.ph.speccer.dissection.outline.enclose.left:before{left:auto;right:100%}.ph.speccer.dissection.outline.enclose.top:after{bottom:auto;top:calc(var(--ph-speccer-line-width-negative) - var(--ph-speccer-pin-size) - var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.enclose.top:before{bottom:100%;top:auto}.ph.speccer.dissection.outline.enclose.bottom:after{bottom:auto;top:calc(100% + var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))}.ph.speccer.dissection.outline.enclose.bottom:before{bottom:auto;top:100%}.ph.speccer.dissection.outline.full{background-color:initial;border:var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color);border-radius:0;color:var(--ph-speccer-measure-color)}.ph.speccer.dissection.outline.full.right{border-left:none}.ph.speccer.dissection.outline.full.right:after{left:calc(8px + var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.right:before{left:100%}.ph.speccer.dissection.outline.full.left{border-right:none}.ph.speccer.dissection.outline.full.left:after{left:calc(-8px - var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.left:before{right:100%}.ph.speccer.dissection.outline.full.top{border-bottom:none}.ph.speccer.dissection.outline.full.top:after{top:calc(-8px - var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.top:before{bottom:100%}.ph.speccer.dissection.outline.full.bottom{border-top:none}.ph.speccer.dissection.outline.full.bottom:after{top:calc(8px + var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.bottom:before{top:100%}.ph.speccer.dissection.outline.bottom:after{height:var(--ph-speccer-pin-space);right:50%;top:calc(-100% - var(--ph-speccer-pin-space)/2);width:var(--ph-speccer-line-width)}.ph.speccer.dissection.outline.top:after,.ph.speccer.dissection.outline:after{height:var(--ph-speccer-pin-space);right:50%;top:100%;width:var(--ph-speccer-line-width)}[data-anatomy-section]{counter-reset:type}.ph.speccer.dissection.outline.full.left,.ph.speccer.dissection.outline.full.right{width:8px}.ph.speccer.dissection.outline.full.bottom,.ph.speccer.dissection.outline.full.top{height:8px}.ph.speccer.dissection.outline.full.bottom:after,.ph.speccer.dissection.outline.full.left:after,.ph.speccer.dissection.outline.full.right:after,.ph.speccer.dissection.outline.full.top:after{align-items:center;background-color:var(--ph-speccer-pin-color);border-radius:100%;color:var(--ph-speccer-color-text-light);content:attr(data-dissection-counter);display:flex;font-size:16px;height:var(--ph-speccer-pin-size);justify-content:center;line-height:150%;position:absolute;width:var(--ph-speccer-pin-size);z-index:100000}.ph.speccer.dissection.outline.full.left:after,.ph.speccer.dissection.outline.full.right:after{top:50%;transform:translateY(-50%)}.ph.speccer.dissection.outline.full.bottom:after,.ph.speccer.dissection.outline.full.top:after{left:50%;transform:translateX(-50%)}.ph.speccer.dissection.outline.full.bottom:before,.ph.speccer.dissection.outline.full.left:before,.ph.speccer.dissection.outline.full.right:before,.ph.speccer.dissection.outline.full.top:before{background-color:var(--ph-speccer-pin-color);content:"";display:block;position:absolute;z-index:100000}.ph.speccer.dissection.outline.full.left:before,.ph.speccer.dissection.outline.full.right:before{height:var(--ph-speccer-line-width);top:50%;transform:translateY(-50%);width:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))}.ph.speccer.dissection.outline.full.bottom:before,.ph.speccer.dissection.outline.full.top:before{height:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width));left:50%;transform:translateX(-50%);width:var(--ph-speccer-line-width)}.ph.speccer.dissection.outline.enclose.left,.ph.speccer.dissection.outline.enclose.right{width:8px}.ph.speccer.dissection.outline.enclose.bottom,.ph.speccer.dissection.outline.enclose.top{height:8px}.ph.speccer.dissection.outline.enclose.bottom:after,.ph.speccer.dissection.outline.enclose.left:after,.ph.speccer.dissection.outline.enclose.right:after,.ph.speccer.dissection.outline.enclose.top:after{align-items:center;background-color:var(--ph-speccer-pin-color);border-radius:100%;color:var(--ph-speccer-color-text-light);content:attr(data-dissection-counter);display:flex;font-size:16px;height:var(--ph-speccer-pin-size);justify-content:center;line-height:150%;position:absolute;width:var(--ph-speccer-pin-size);z-index:100000}.ph.speccer.dissection.outline.enclose.left:after,.ph.speccer.dissection.outline.enclose.right:after{top:50%;transform:translateY(-50%)}.ph.speccer.dissection.outline.enclose.bottom:after,.ph.speccer.dissection.outline.enclose.top:after{left:50%;transform:translateX(-50%)}.ph.speccer.dissection.outline.enclose.bottom:before,.ph.speccer.dissection.outline.enclose.left:before,.ph.speccer.dissection.outline.enclose.right:before,.ph.speccer.dissection.outline.enclose.top:before{background-color:var(--ph-speccer-pin-color);content:"";display:block;position:absolute;z-index:100000}.ph.speccer.dissection.outline.enclose.left:before,.ph.speccer.dissection.outline.enclose.right:before{height:var(--ph-speccer-line-width);top:50%;transform:translateY(-50%);width:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))}.ph.speccer.dissection.outline.enclose.bottom:before,.ph.speccer.dissection.outline.enclose.top:before{height:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width));left:50%;transform:translateX(-50%);width:var(--ph-speccer-line-width)}.ph.speccer.spacing{border:var(--ph-speccer-line-width) solid #0000;pointer-events:auto;transition:none}.ph.speccer.spacing:hover{border:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)}.is-specced:hover~.ph.speccer.spacing.margin{background-color:var(--ph-speccer-color-margin-hover)}.is-specced:hover~.ph.speccer.spacing.padding{background-color:var(--ph-speccer-color-padding-hover);color:var(--ph-speccer-color-text-light)}.ph.speccer.spacing.margin{background-color:var(--ph-speccer-color-margin);color:var(--ph-speccer-color-text-dark)}.ph.speccer.spacing.padding{background-color:var(--ph-speccer-color-padding);color:var(--ph-speccer-spacing-color)}.ph.speccer.spacing.margin.bottom:after,.ph.speccer.spacing.margin.top:after{border-bottom:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:100%;left:40%;position:absolute;transition:none;width:9px}.ph.speccer.spacing.margin.bottom:before,.ph.speccer.spacing.margin.top:before{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:100%;left:40%;margin-left:4px;position:absolute;transition:none;width:0}.ph.speccer.spacing.margin.left:after,.ph.speccer.spacing.margin.right:after{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);border-right:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:9px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.spacing.margin.left:before,.ph.speccer.spacing.margin.right:before{border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:0;margin-top:4px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.spacing.padding.bottom:after,.ph.speccer.spacing.padding.top:after{border-bottom:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:100%;left:40%;position:absolute;transition:none;width:9px}.ph.speccer.spacing.padding.bottom:before,.ph.speccer.spacing.padding.top:before{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:100%;left:40%;margin-left:4px;position:absolute;transition:none;width:0}.ph.speccer.spacing.padding.left:after,.ph.speccer.spacing.padding.right:after{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);border-right:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:9px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.spacing.padding.left:before,.ph.speccer.spacing.padding.right:before{border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:0;margin-top:4px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.typography{background-color:var(--ph-speccer-typography-background-color);color:var(--ph-speccer-typography-color-text);display:block;font-size:12px;line-height:140%;max-width:none;min-width:320px;padding:8px 24px;text-align:left;width:auto}.ph.speccer.typography,.ph.speccer.typography:hover{border:var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color)}.ph.speccer.typography:after{background-color:var(--ph-speccer-pin-color);content:"";display:block;position:absolute}.ph.speccer.typography.left:after,.ph.speccer.typography:after{height:var(--ph-speccer-line-width);left:100%;top:50%;transform:translateY(-50%);width:48px}.ph.speccer.typography.right:after{height:var(--ph-speccer-line-width);left:auto;right:100%;top:50%;transform:translateY(-50%);width:48px}.ph.speccer.typography.top:after{top:100%}.ph.speccer.typography.bottom:after,.ph.speccer.typography.top:after{height:48px;left:50%;right:auto;transform:translateX(-50%);width:var(--ph-speccer-line-width)}.ph.speccer.typography.bottom:after{bottom:100%;top:auto}.ph.speccer.typography .speccer-styles{font-size:12px;line-height:140%;list-style:none;margin:0;padding:0 0 0 1rem;width:100%}.ph.speccer.typography .speccer-styles .property{color:var(--ph-speccer-typography-color-property);font-size:12px;font-weight:400;margin:0;padding:0;text-align:left}.ph.speccer.typography .speccer-styles>li{border:none;color:var(--ph-speccer-typography-color-value);font-size:12px;font-weight:400;list-style:none;margin:0;padding:0;text-align:left}.ph.speccer.measure.width{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-bottom:none;color:var(--ph-speccer-measure-color);height:var(--ph-speccer-measure-size)}.ph.speccer.measure.width:after{content:attr(data-measure);position:absolute;top:calc(-100% - 10px)}.ph.speccer.measure.width.bottom{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-top:none;color:var(--ph-speccer-measure-color)}.ph.speccer.measure.width.bottom:after{content:attr(data-measure);position:absolute;top:calc(100% + 5px)}.ph.speccer.measure.width.top{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-bottom:none;color:var(--ph-speccer-measure-color)}.ph.speccer.measure.width.top:after{bottom:calc(100% + 5px);content:attr(data-measure);position:absolute}.ph.speccer.measure.height.left{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-right:none;color:var(--ph-speccer-measure-color);width:var(--ph-speccer-measure-size)}.ph.speccer.measure.height.left:after{content:attr(data-measure);left:calc(-100% - 20px - var(--ph-speccer-line-width));position:absolute;top:50%;transform:translateY(-50%) rotate(-90deg)}.ph.speccer.measure.height.right{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-left:none;color:var(--ph-speccer-measure-color);width:var(--ph-speccer-measure-size)}.ph.speccer.measure.height.right:after{content:attr(data-measure);left:calc(100% - var(--ph-speccer-measure-size));position:absolute;top:50%;transform:translateY(-50%) rotate(90deg)}
1
+ .ph.speccer{--ph-speccer-color-padding:#db6fff66;--ph-speccer-color-padding-hover:#db6fff;--ph-speccer-color-margin:#fff76f66;--ph-speccer-color-margin-hover:#fff76f;--ph-speccer-color-text-light:#fff;--ph-speccer-color-text-dark:#333;--ph-speccer-color-contrast:#ff3aa8;--ph-speccer-spacing-color:var(--ph-speccer-color-contrast);--ph-speccer-measure-color:red;--ph-speccer-pin-color:var(--ph-speccer-color-contrast);--ph-speccer-typography-background-color:#fff;--ph-speccer-typography-color-property:#3f85f2;--ph-speccer-typography-color-text:#57575b;--ph-speccer-typography-color-value:var(--ph-speccer-color-contrast);--ph-speccer-depth-opacity-400:0.4;--ph-speccer-font-family:"Menlo for Powerline","Menlo Regular for Powerline","DejaVu Sans Mono",Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;--ph-speccer-font-size:12px;--ph-speccer-line-height:12px;--ph-speccer-pin-size:24px;--ph-speccer-pin-space:48px;--ph-speccer-line-width:1px;--ph-speccer-line-width-negative:-1px;--ph-speccer-measure-size:8px}.ph.speccer,.ph.speccer:after,.ph.speccer:before{box-sizing:border-box;font-family:var(--ph-speccer-font-family)!important;font-size:12px;line-height:12px;pointer-events:none;user-select:none;z-index:99999}.ph.speccer,.ph.speccer.dissection,.ph.speccer:after,.ph.speccer:before{align-items:center;display:flex;justify-content:center;position:absolute}.ph.speccer.dissection{background-color:var(--ph-speccer-pin-color);border-radius:100%;box-sizing:initial;color:var(--ph-speccer-color-text-light);font-family:sans-serif;font-size:16px;font-weight:400;height:var(--ph-speccer-pin-size);line-height:150%;width:var(--ph-speccer-pin-size);z-index:100000}.ph.speccer.dissection:after{background-color:var(--ph-speccer-pin-color);content:"";height:var(--ph-speccer-pin-space);position:absolute;top:100%;width:var(--ph-speccer-line-width);z-index:99999}.ph.speccer.dissection.outline.left:after{height:var(--ph-speccer-line-width);left:100%;top:50%;width:var(--ph-speccer-pin-space)}.ph.speccer.dissection.outline.right:after{height:var(--ph-speccer-line-width);right:100%;top:50%;width:var(--ph-speccer-pin-space)}.ph.speccer.dissection.outline.enclose{background-color:initial;border:var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color);border-radius:0;color:var(--ph-speccer-measure-color)}.ph.speccer.dissection.outline.enclose.right:after{left:calc(100% + var(--ph-speccer-pin-space) + var(--ph-speccer-line-width));right:auto}.ph.speccer.dissection.outline.enclose.right:before{left:100%;right:auto}.ph.speccer.dissection.outline.enclose.left:after{left:calc(var(--ph-speccer-line-width-negative) - var(--ph-speccer-pin-size) - var(--ph-speccer-pin-space));right:auto}.ph.speccer.dissection.outline.enclose.left:before{left:auto;right:100%}.ph.speccer.dissection.outline.enclose.top:after{bottom:auto;top:calc(var(--ph-speccer-line-width-negative) - var(--ph-speccer-pin-size) - var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.enclose.top:before{bottom:100%;top:auto}.ph.speccer.dissection.outline.enclose.bottom:after{bottom:auto;top:calc(100% + var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))}.ph.speccer.dissection.outline.enclose.bottom:before{bottom:auto;top:100%}.ph.speccer.dissection.outline.full{background-color:initial;border:var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color);border-radius:0;color:var(--ph-speccer-measure-color)}.ph.speccer.dissection.outline.full.right{border-left:none}.ph.speccer.dissection.outline.full.right:after{left:calc(8px + var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.right:before{left:100%}.ph.speccer.dissection.outline.full.left{border-right:none}.ph.speccer.dissection.outline.full.left:after{left:calc(-8px - var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.left:before{right:100%}.ph.speccer.dissection.outline.full.top{border-bottom:none}.ph.speccer.dissection.outline.full.top:after{top:calc(-8px - var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.top:before{bottom:100%}.ph.speccer.dissection.outline.full.bottom{border-top:none}.ph.speccer.dissection.outline.full.bottom:after{top:calc(8px + var(--ph-speccer-pin-space))}.ph.speccer.dissection.outline.full.bottom:before{top:100%}.ph.speccer.dissection.outline.bottom:after{height:var(--ph-speccer-pin-space);right:50%;top:calc(-100% - var(--ph-speccer-pin-space)/2);width:var(--ph-speccer-line-width)}.ph.speccer.dissection.outline.top:after,.ph.speccer.dissection.outline:after{height:var(--ph-speccer-pin-space);right:50%;top:100%;width:var(--ph-speccer-line-width)}[data-anatomy-section]{counter-reset:type}.ph.speccer.dissection.outline.full.left,.ph.speccer.dissection.outline.full.right{width:8px}.ph.speccer.dissection.outline.full.bottom,.ph.speccer.dissection.outline.full.top{height:8px}.ph.speccer.dissection.outline.full.bottom:after,.ph.speccer.dissection.outline.full.left:after,.ph.speccer.dissection.outline.full.right:after,.ph.speccer.dissection.outline.full.top:after{align-items:center;background-color:var(--ph-speccer-pin-color);border-radius:100%;color:var(--ph-speccer-color-text-light);content:attr(data-dissection-counter);display:flex;font-size:16px;height:var(--ph-speccer-pin-size);justify-content:center;line-height:150%;position:absolute;width:var(--ph-speccer-pin-size);z-index:100000}.ph.speccer.dissection.outline.full.left:after,.ph.speccer.dissection.outline.full.right:after{top:50%;transform:translateY(-50%)}.ph.speccer.dissection.outline.full.bottom:after,.ph.speccer.dissection.outline.full.top:after{left:50%;transform:translateX(-50%)}.ph.speccer.dissection.outline.full.bottom:before,.ph.speccer.dissection.outline.full.left:before,.ph.speccer.dissection.outline.full.right:before,.ph.speccer.dissection.outline.full.top:before{background-color:var(--ph-speccer-pin-color);content:"";display:block;position:absolute;z-index:100000}.ph.speccer.dissection.outline.full.left:before,.ph.speccer.dissection.outline.full.right:before{height:var(--ph-speccer-line-width);top:50%;transform:translateY(-50%);width:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))}.ph.speccer.dissection.outline.full.bottom:before,.ph.speccer.dissection.outline.full.top:before{height:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width));left:50%;transform:translateX(-50%);width:var(--ph-speccer-line-width)}.ph.speccer.dissection.outline.enclose.left,.ph.speccer.dissection.outline.enclose.right{width:8px}.ph.speccer.dissection.outline.enclose.bottom,.ph.speccer.dissection.outline.enclose.top{height:8px}.ph.speccer.dissection.outline.enclose.bottom:after,.ph.speccer.dissection.outline.enclose.left:after,.ph.speccer.dissection.outline.enclose.right:after,.ph.speccer.dissection.outline.enclose.top:after{align-items:center;background-color:var(--ph-speccer-pin-color);border-radius:100%;color:var(--ph-speccer-color-text-light);content:attr(data-dissection-counter);display:flex;font-size:16px;height:var(--ph-speccer-pin-size);justify-content:center;line-height:150%;position:absolute;width:var(--ph-speccer-pin-size);z-index:100000}.ph.speccer.dissection.outline.enclose.left:after,.ph.speccer.dissection.outline.enclose.right:after{top:50%;transform:translateY(-50%)}.ph.speccer.dissection.outline.enclose.bottom:after,.ph.speccer.dissection.outline.enclose.top:after{left:50%;transform:translateX(-50%)}.ph.speccer.dissection.outline.enclose.bottom:before,.ph.speccer.dissection.outline.enclose.left:before,.ph.speccer.dissection.outline.enclose.right:before,.ph.speccer.dissection.outline.enclose.top:before{background-color:var(--ph-speccer-pin-color);content:"";display:block;position:absolute;z-index:100000}.ph.speccer.dissection.outline.enclose.left:before,.ph.speccer.dissection.outline.enclose.right:before{height:var(--ph-speccer-line-width);top:50%;transform:translateY(-50%);width:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))}.ph.speccer.dissection.outline.enclose.bottom:before,.ph.speccer.dissection.outline.enclose.top:before{height:calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width));left:50%;transform:translateX(-50%);width:var(--ph-speccer-line-width)}.ph.speccer.spacing{border:var(--ph-speccer-line-width) solid #0000;pointer-events:auto;transition:none}.ph.speccer.spacing:hover{border:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)}.ph.speccer.spacing.margin{background-color:var(--ph-speccer-color-margin);color:var(--ph-speccer-color-text-dark)}.ph.speccer.spacing.padding{background-color:var(--ph-speccer-color-padding);color:var(--ph-speccer-spacing-color)}.ph.speccer.spacing.margin.bottom:after,.ph.speccer.spacing.margin.top:after{border-bottom:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:100%;left:40%;position:absolute;transition:none;width:9px}.ph.speccer.spacing.margin.bottom:before,.ph.speccer.spacing.margin.top:before{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:100%;left:40%;margin-left:4px;position:absolute;transition:none;width:0}.ph.speccer.spacing.margin.left:after,.ph.speccer.spacing.margin.right:after{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);border-right:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:9px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.spacing.margin.left:before,.ph.speccer.spacing.margin.right:before{border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark);content:"";height:0;margin-top:4px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.spacing.padding.bottom:after,.ph.speccer.spacing.padding.top:after{border-bottom:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:100%;left:40%;position:absolute;transition:none;width:9px}.ph.speccer.spacing.padding.bottom:before,.ph.speccer.spacing.padding.top:before{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:100%;left:40%;margin-left:4px;position:absolute;transition:none;width:0}.ph.speccer.spacing.padding.left:after,.ph.speccer.spacing.padding.right:after{border-left:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);border-right:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:9px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.spacing.padding.left:before,.ph.speccer.spacing.padding.right:before{border-top:var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color);content:"";height:0;margin-top:4px;position:absolute;top:10%;transition:none;width:100%}.ph.speccer.typography{background-color:var(--ph-speccer-typography-background-color);color:var(--ph-speccer-typography-color-text);display:block;font-size:10px;line-height:140%;max-width:none;padding:8px;text-align:left;width:auto}.ph.speccer.typography,.ph.speccer.typography:hover{border:var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color)}.ph.speccer.typography:after{background-color:var(--ph-speccer-pin-color);content:"";display:block;position:absolute}.ph.speccer.typography.left:after,.ph.speccer.typography:after{left:100%}.ph.speccer.typography.left:after,.ph.speccer.typography.right:after,.ph.speccer.typography:after{height:var(--ph-speccer-line-width);top:50%;transform:translateY(-50%);width:var(--ph-speccer-pin-space)}.ph.speccer.typography.right:after{left:auto;right:100%}.ph.speccer.typography.top:after{top:100%}.ph.speccer.typography.bottom:after,.ph.speccer.typography.top:after{height:var(--ph-speccer-pin-space);left:50%;right:auto;transform:translateX(-50%);width:var(--ph-speccer-line-width)}.ph.speccer.typography.bottom:after{bottom:100%;top:auto}.ph.speccer.typography .speccer-styles{font-size:10px;line-height:140%;list-style:none;margin:0;padding:0 0 0 8px;width:100%}.ph.speccer.typography .speccer-styles .property{color:var(--ph-speccer-typography-color-property);font-size:10px;font-weight:400;margin:0;padding:0;text-align:left}.ph.speccer.typography .speccer-styles>li{border:none;color:var(--ph-speccer-typography-color-value);font-size:10px;font-weight:400;list-style:none;margin:0;padding:0;text-align:left}.ph.speccer.measure.width{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-bottom:none;color:var(--ph-speccer-measure-color);height:var(--ph-speccer-measure-size)}.ph.speccer.measure.width:after{content:attr(data-measure);position:absolute;top:calc(-100% - 10px)}.ph.speccer.measure.width.bottom{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-top:none;color:var(--ph-speccer-measure-color)}.ph.speccer.measure.width.bottom:after{content:attr(data-measure);position:absolute;top:calc(100% + 5px)}.ph.speccer.measure.width.top{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-bottom:none;color:var(--ph-speccer-measure-color)}.ph.speccer.measure.width.top:after{bottom:calc(100% + 5px);content:attr(data-measure);position:absolute}.ph.speccer.measure.height.left{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-right:none;color:var(--ph-speccer-measure-color);width:var(--ph-speccer-measure-size)}.ph.speccer.measure.height.left:after{content:attr(data-measure);left:calc(-100% - 20px - var(--ph-speccer-line-width));position:absolute;top:50%;transform:translateY(-50%) rotate(-90deg)}.ph.speccer.measure.height.right{border:var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color);border-left:none;color:var(--ph-speccer-measure-color);width:var(--ph-speccer-measure-size)}.ph.speccer.measure.height.right:after{content:attr(data-measure);left:calc(100% - var(--ph-speccer-measure-size));position:absolute;top:50%;transform:translateY(-50%) rotate(90deg)}
package/CHANGELOG.md DELETED
@@ -1,59 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ## [5.0.0](https://github.com/phun-ky/speccer/compare/v4.3.2...v5.0.0) (2022-02-22)
6
-
7
-
8
- ### โš  BREAKING CHANGES
9
-
10
- * ๐Ÿงจ Speccer is not supporting older browsers any more, to cut down on
11
- maintenance. Babel is now removed, but you can still polyfill or use
12
- babel for your own needs if you import the source files instead of the
13
- build files.
14
-
15
- ### Tasks
16
-
17
- * ๐Ÿค– Remove babel, do not support older browsers anymore ([9ed11c0](https://github.com/phun-ky/speccer/commit/9ed11c06da3d1ac1b80d4cbbc6859146c596cd6f))
18
-
19
- ### [4.3.2](https://github.com/phun-ky/speccer/compare/v4.3.1...v4.3.2) (2022-02-22)
20
-
21
-
22
- ### Bug
23
-
24
- * And supply the minified version.. ([8cfb69a](https://github.com/phun-ky/speccer/commit/8cfb69a5dc86f1e9c9ccea3f890781a3961a0a7f))
25
-
26
- ### [4.3.1](https://github.com/phun-ky/speccer/compare/v4.3.0...v4.3.1) (2022-02-22)
27
-
28
-
29
- ### Bug
30
-
31
- * Use named exports ([7a4535e](https://github.com/phun-ky/speccer/commit/7a4535e65c04b33365258323376d6710fcb813c3))
32
-
33
- ## [4.3.0](https://github.com/phun-ky/speccer/compare/v4.2.1...v4.3.0) (2022-02-22)
34
-
35
-
36
- ### Feature
37
-
38
- * ๐ŸŽธ Expose API a bit more ([093b465](https://github.com/phun-ky/speccer/commit/093b465653c32ec77fec6bb1d9d9e3adfd59809f))
39
-
40
-
41
- ### Documentation
42
-
43
- * โœ๏ธ Move images into assets ([2291b31](https://github.com/phun-ky/speccer/commit/2291b31d768a16f202f2ffed453cfc22f3027e67))
44
- * โœ๏ธ Update documentation ([ec0807e](https://github.com/phun-ky/speccer/commit/ec0807e8c5d9c7eeaa807b80d7c432bee24d59d4))
45
-
46
- ### [4.2.1](https://github.com/phun-ky/speccer/compare/v4.2.0...v4.2.1) (2022-02-22)
47
-
48
- ## [4.2.0](https://github.com/phun-ky/speccer/compare/v4.1.0...v4.2.0) (2022-02-22)
49
-
50
-
51
- ### Features
52
-
53
- * Use CSS variables ([21c3eb3](https://github.com/phun-ky/speccer/commit/21c3eb3f173ee96b0bf452bae44f76155fcf3cdf))
54
-
55
- ## [4.1.0](https://github.com/phun-ky/speccer/compare/v4.0.0...v4.1.0) (2022-02-22)
56
-
57
- ### Features
58
-
59
- - Add release script ([4cb72cb](https://github.com/phun-ky/speccer/commit/4cb72cbea7dd1d6bcb8f1102384b14eecaa9eef0))
package/src/browser.js DELETED
@@ -1,93 +0,0 @@
1
- /* eslint no-console:0 */
2
- 'use strict';
3
-
4
- import * as resize from './lib/resize';
5
- import * as spec from './spec';
6
- import * as measure from './measure';
7
- import * as dissect from './dissect';
8
-
9
- export const dom = (speccer) => {
10
- if (document.readyState === 'loading') {
11
- document.addEventListener('DOMContentLoaded', speccer);
12
- } else {
13
- // `DOMContentLoaded` already fired
14
- speccer();
15
- }
16
- };
17
-
18
- export const lazy = () => {
19
- const _spec_observer = new IntersectionObserver((els, observer) => {
20
- els.forEach((el) => {
21
- if (el.intersectionRatio > 0) {
22
- spec.element(el.target);
23
- observer.unobserve(el.target);
24
- }
25
- });
26
- });
27
-
28
- document.querySelectorAll('[data-speccer],[data-speccer] *:not(td)').forEach((el) => {
29
- _spec_observer.observe(el);
30
- });
31
-
32
- const _measure_observer = new IntersectionObserver((els, observer) => {
33
- els.forEach((el) => {
34
- if (el.intersectionRatio > 0) {
35
- measure.element(el.target);
36
- observer.unobserve(el.target);
37
- }
38
- });
39
- });
40
-
41
- document.querySelectorAll('[data-speccer-measure]').forEach((el) => {
42
- _measure_observer.observe(el);
43
- });
44
-
45
- const _dissect_observer = new IntersectionObserver((els, observer) => {
46
- els.forEach((el) => {
47
- const targets = el.target.querySelectorAll('[data-anatomy]');
48
-
49
- if (el.intersectionRatio > 0) {
50
- targets.forEach(dissect.element);
51
- observer.unobserve(el.target);
52
- }
53
- });
54
- });
55
-
56
- document.querySelectorAll('[data-anatomy-section]').forEach((el) => {
57
- _dissect_observer.observe(el);
58
- });
59
- };
60
-
61
- export const manual = (speccer) => {
62
- window.speccer = speccer;
63
- };
64
-
65
- export const activate = (speccer) => {
66
- const _script = document.currentScript;
67
-
68
- if (_script) {
69
- const _speccer_script_src = _script.getAttribute('src');
70
-
71
- if (
72
- _speccer_script_src.indexOf('speccer.js') !== -1 ||
73
- // for codepen
74
- _speccer_script_src.indexOf('JaXpOK.js') !== -1
75
- ) {
76
- if (_script.hasAttribute('data-manual')) {
77
- manual(speccer);
78
- } else if (_script.hasAttribute('data-instant')) {
79
- speccer();
80
- } else if (_script.hasAttribute('data-dom')) {
81
- dom(speccer);
82
- } else if (_script.hasAttribute('data-lazy')) {
83
- lazy();
84
- } else {
85
- dom(speccer);
86
- }
87
-
88
- if (!_script.hasAttribute('data-manual') && !_script.hasAttribute('data-lazy')) {
89
- resize.activate(speccer);
90
- }
91
- }
92
- }
93
- };