@operato/context 10.29.8 → 10.29.12

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/context",
3
3
  "description": "Webcomponent context following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "10.29.8",
5
+ "version": "10.29.12",
6
6
  "type": "module",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
@@ -67,11 +67,11 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@material/web": "^2.0.0",
70
- "@operato/help": "^10.29.8",
71
- "@operato/input": "^10.29.1",
72
- "@operato/layout": "^10.29.7",
73
- "@operato/shell": "^10.29.5",
74
- "@operato/styles": "^10.29.1",
70
+ "@operato/help": "^10.29.12",
71
+ "@operato/input": "^10.29.12",
72
+ "@operato/layout": "^10.29.12",
73
+ "@operato/shell": "^10.29.12",
74
+ "@operato/styles": "^10.29.12",
75
75
  "@operato/utils": "^10.29.1",
76
76
  "lit": "^3.1.2",
77
77
  "lodash-es": "^4.17.21"
@@ -108,5 +108,5 @@
108
108
  "prettier --write"
109
109
  ]
110
110
  },
111
- "gitHead": "7afbba99cf2119ccb709b6cb0cff8b58d447ef88"
111
+ "gitHead": "4b1143cd83d04bfa10a0af557ae71979f6267eed"
112
112
  }
@@ -34,7 +34,11 @@ class WorkScreen extends LitElement {
34
34
  customElements.define('test-work-screen', WorkScreen)
35
35
 
36
36
  describe('page frames', () => {
37
- it('document: one column 1080px wide at most, 18/20/40 padding, sections 24px apart, the page scrolls', async () => {
37
+ /*
38
+ * 2026-10-05: the column fills the window between two equal gutters (user decision: fill the page,
39
+ * responsive). It used to stop at 1080px on the left and leave the right side empty.
40
+ */
41
+ it('document: the column fills the window, 16 top / 16 gutters / 40 bottom, sections 24px apart, the page scrolls', async () => {
38
42
  const host = await fixture<HTMLElement>(html`<div style="width: 1600px; height: 600px"><test-document-screen></test-document-screen></div>`)
39
43
  const screen = host.querySelector('test-document-screen') as DocumentScreen
40
44
  await screen.updateComplete
@@ -42,13 +46,13 @@ describe('page frames', () => {
42
46
  const [first, second] = Array.from(screen.shadowRoot!.querySelectorAll('.page-section'))
43
47
  const style = getComputedStyle(page)
44
48
 
45
- expect(Math.round(page.getBoundingClientRect().width)).to.equal(1080)
46
- expect([style.paddingTop, style.paddingRight, style.paddingBottom, style.paddingLeft]).to.deep.equal(['18px', '20px', '40px', '20px'])
49
+ expect(Math.round(page.getBoundingClientRect().width)).to.equal(1600)
50
+ expect([style.paddingTop, style.paddingRight, style.paddingBottom, style.paddingLeft]).to.deep.equal(['16px', '16px', '40px', '16px'])
47
51
  expect(Math.round(second.getBoundingClientRect().top - first.getBoundingClientRect().bottom)).to.equal(24)
48
52
  expect(getComputedStyle(screen).overflowY).to.equal('auto')
49
53
 
50
54
  const actions = screen.shadowRoot!.querySelector('.page-section-actions') as HTMLElement
51
- expect(Math.round(actions.getBoundingClientRect().right)).to.equal(Math.round(page.getBoundingClientRect().right) - 20)
55
+ expect(Math.round(actions.getBoundingClientRect().right)).to.equal(Math.round(page.getBoundingClientRect().right) - 16)
52
56
  })
53
57
 
54
58
  it('work surface: the content fills and scrolls inside itself, the page does not scroll', async () => {
@@ -41,3 +41,22 @@ describe('ox-page-title-bar description', () => {
41
41
  expect(el.shadowRoot!.querySelector('[description]') === null).to.equal(true)
42
42
  })
43
43
  })
44
+
45
+ describe('ox-page-title-bar gutter', () => {
46
+ /*
47
+ * The title's first letter stands on the same line as the page's first letter: the bar's left
48
+ * padding plus the title box's own 4px equals the page gutter. It used to be 0 + 4, and on a
49
+ * document screen the title (x214) and the content (x229) were 15px apart (2026-10-05, :4000).
50
+ */
51
+ it('puts the title text at the page gutter', async () => {
52
+ const host = await fixture<HTMLElement>(html`<div style="--ui-gutter: 16px; --spacing-small: 4px; --spacing-medium: 8px"><ox-page-title-bar></ox-page-title-bar></div>`)
53
+ store.dispatch({ type: 'UPDATE_CONTEXT', context: { title: 'maintenance' } } as any)
54
+ const el = host.querySelector('ox-page-title-bar') as HTMLElement & { updateComplete: Promise<unknown> }
55
+ await el.updateComplete
56
+ await el.updateComplete
57
+ const titler = el.shadowRoot!.querySelector('[titler]') as HTMLElement
58
+ const offset = titler.getBoundingClientRect().left + parseFloat(getComputedStyle(titler).paddingLeft) - el.getBoundingClientRect().left
59
+
60
+ expect(Math.round(offset)).to.equal(16)
61
+ })
62
+ })