@unisim/sdk 0.1.2 → 0.1.4

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.
@@ -0,0 +1,18 @@
1
+ export interface UniversalBarProps {
2
+ /** Height in px — default 4 */
3
+ height?: number;
4
+ /** Center colour of the gradient — default UNISIM orange */
5
+ color?: string;
6
+ /** Pulse animation (default true). Respects user `prefers-reduced-motion` automatically. */
7
+ animated?: boolean;
8
+ }
9
+ /**
10
+ * The Universal Suite "brand strip" — a thin gradient bar that sits at the top
11
+ * of every product's app shell for cross-suite visual consistency.
12
+ *
13
+ * Matches the design used on unisim.co.uk: 4px tall, transparent → orange →
14
+ * transparent gradient, with a subtle 2.4s opacity pulse. Edges fade to
15
+ * transparent so it works on both light and dark page backgrounds.
16
+ */
17
+ export declare function UniversalBar({ height, color, animated, }?: UniversalBarProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=UniversalBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UniversalBar.d.ts","sourceRoot":"","sources":["../src/UniversalBar.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAU,EACV,KAAiB,EACjB,QAAe,GAChB,GAAE,iBAAsB,2CA4BxB"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from 'react';
3
+ /**
4
+ * The Universal Suite "brand strip" — a thin gradient bar that sits at the top
5
+ * of every product's app shell for cross-suite visual consistency.
6
+ *
7
+ * Matches the design used on unisim.co.uk: 4px tall, transparent → orange →
8
+ * transparent gradient, with a subtle 2.4s opacity pulse. Edges fade to
9
+ * transparent so it works on both light and dark page backgrounds.
10
+ */
11
+ export function UniversalBar({ height = 4, color = '#e05504', animated = true, } = {}) {
12
+ const ref = useRef(null);
13
+ useEffect(() => {
14
+ if (!animated || !ref.current)
15
+ return;
16
+ // Skip animation if the user prefers reduced motion
17
+ const reduced = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
18
+ if (reduced)
19
+ return;
20
+ const animation = ref.current.animate([{ opacity: 1 }, { opacity: 0.35 }, { opacity: 1 }], { duration: 2400, iterations: Infinity, easing: 'ease-in-out' });
21
+ return () => animation.cancel();
22
+ }, [animated]);
23
+ return (_jsx("div", { ref: ref, "aria-hidden": "true", style: {
24
+ height: `${height}px`,
25
+ background: `linear-gradient(90deg, transparent 0%, ${color} 50%, transparent 100%)`,
26
+ flexShrink: 0,
27
+ width: '100%',
28
+ } }));
29
+ }
30
+ //# sourceMappingURL=UniversalBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UniversalBar.js","sourceRoot":"","sources":["../src/UniversalBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAWzC;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,MAAM,GAAG,CAAC,EACV,KAAK,GAAG,SAAS,EACjB,QAAQ,GAAG,IAAI,MACM,EAAE;IACvB,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,OAAO;YAAE,OAAM;QACrC,oDAAoD;QACpD,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAC,OAAO,CAAA;QAC/E,IAAI,OAAO;YAAE,OAAM;QAEnB,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CACnC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EACnD,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,CAChE,CAAA;QACD,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,CAAA;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,CACL,cACE,GAAG,EAAE,GAAG,iBACI,MAAM,EAClB,KAAK,EAAE;YACL,MAAM,EAAE,GAAG,MAAM,IAAI;YACrB,UAAU,EAAE,0CAA0C,KAAK,yBAAyB;YACpF,UAAU,EAAE,CAAC;YACb,KAAK,EAAE,MAAM;SACd,GACD,CACH,CAAA;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { useChangelog } from './changelog.js';
8
8
  export type { UseChangelogOptions, UseChangelogResult } from './changelog.js';
9
9
  export { track, useUsageTracker } from './usage.js';
10
10
  export { useOrgBranding } from './branding.js';
11
+ export { UniversalBar } from './UniversalBar.js';
12
+ export type { UniversalBarProps } from './UniversalBar.js';
11
13
  export { useOrgMembers, useOrgSeats, useAuditLog, assignSeat, revokeSeat, reassignSeat, } from './admin.js';
12
14
  export type { UseOrgMembersResult, UseOrgSeatsResult, UseAuditLogOptions, } from './admin.js';
13
15
  export type { ProductCode, SubTier, OrgRole, SeatStatus, AccessSource, Profile, Organisation, OrgBranding, OrgMember, Subscription, Seat, SeatPool, ChangelogEntry, ChangelogRelease, ChangelogFeed, AuditLogEntry, } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC/D,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AA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CAAA;AAE5D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAE7E,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACP,UAAU,EACV,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,WAAW,EACX,SAAS,EACT,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -6,5 +6,6 @@ export { useHasAccess, useHasFeature, useSeat } from './access.js';
6
6
  export { useChangelog } from './changelog.js';
7
7
  export { track, useUsageTracker } from './usage.js';
8
8
  export { useOrgBranding } from './branding.js';
9
+ export { UniversalBar } from './UniversalBar.js';
9
10
  export { useOrgMembers, useOrgSeats, useAuditLog, assignSeat, revokeSeat, reassignSeat, } from './admin.js';
10
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,0FAA0F;AAE1F,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,0FAA0F;AAE1F,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisim/sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Shared React SDK for the Universal Suite — auth, entitlements, usage telemetry, changelog, org admin.",
5
5
  "homepage": "https://github.com/universal-simulation-ltd/universal-platform/tree/main/packages/sdk#readme",
6
6
  "repository": {