@staging-apiplus/essentials 0.0.0-stage → 0.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,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # `@staging-apiplus/essentials`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ First-party QuickPage code package: **gallery** (code component) and **slider** / **tab** (logic). Source for the **System library** snapshot (`@staging-apiplus/essentials`).
4
+
5
+ ## Tooling dependencies
6
+
7
+ | Context | `@packages/qp-sdk` / `@packages/qp-cli` |
8
+ | --- | --- |
9
+ | **Monorepo root** `pnpm install` | `workspace:@packages/qp-*@^0.0.1` — links in-tree packages (no Verdaccio required) |
10
+ | **Registry-shaped** (same as external authors) | `make publish-qp-tooling-dev` with mock-registry up, then `pnpm install` in this folder — resolves via [`.npmrc`](../.npmrc) at `^0.0.1` |
11
+
12
+ No Node `imports` map to `packages/qp_sdk/src` — builds use published SDK layout like third-party packages.
13
+
14
+ ## Commands
15
+
16
+ ```bash
17
+ pnpm run dev # qp dev — playground + HMR (+ QuickPage Link dev for editor/preview)
18
+ pnpm run build # qp build → dist/ (also via make build-code-packages)
19
+ pnpm run validate # qp validate
20
+ pnpm run test:unit # schema + DOM helper tests
21
+ ```
22
+
23
+ ## Author documentation
24
+
25
+ Lifecycle (editor / preview / published), SDK APIs, and logic tiers — applies to **all** code packages:
26
+
27
+ **[Module author guide](../../docs/code-packages/guides/module-author.md)** — CE + `designTime` logic. In QuickPage, attach tab/slider via **Code → Logic → Apply** on wired chrome ([logic presets](../../docs/code-packages/guides/logic-presets.md)).
28
+
29
+ **Dev (Tilt + isolate):** [consolidated dev flow](../../docs/code-packages/guides/development.md#consolidated-dev-flow-canonical) — **Link dev** for HMR; **`qp publish`** to dev registry then **Refresh in editor** / reload staging.
30
+
31
+ Broader context: [code packages hub](../../docs/code-packages/README.md), [artifact scenarios (all envs)](../../docs/code-packages/reference/artifact-scenarios.md), [author quickstart](../../packages/qp_sdk/docs/author-quickstart.md).
@@ -0,0 +1,56 @@
1
+ //#region ../../packages/qp_sdk/src/define/define_logic_editor.ts
2
+ function e(e) {
3
+ return {
4
+ kind: "logic-editor",
5
+ editorPanel: e.editorPanel,
6
+ mount: e.mount ?? (() => {}),
7
+ onAction: e.onAction
8
+ };
9
+ }
10
+ //#endregion
11
+ //#region ../../packages/qp_sdk/src/editor/derive_logic_editor_panel.ts
12
+ function t(e, t, n) {
13
+ if (!e?.items) return [];
14
+ let r = e.activeIndexStateKey, i = [], a = n?.includeSettings ?? !0, o = n?.includeStates ?? !0;
15
+ if (e.items.label && e.items.content && t.labelRole) i.push({
16
+ type: "linked-pairs",
17
+ id: "manage-tabs",
18
+ label: e.items.add?.label ?? "Items",
19
+ triggerRole: t.labelRole,
20
+ panelRole: t.contentRole,
21
+ activeStateKey: r,
22
+ actions: {
23
+ reorder: "reorderTab",
24
+ delete: "removeTab",
25
+ add: "addTab",
26
+ setActive: "setActiveTab"
27
+ }
28
+ });
29
+ else if (e.items.content && t.contentRole) {
30
+ let a = n?.contentActions ?? {
31
+ reorder: "reorderItem",
32
+ remove: "removeItem",
33
+ add: "addItem",
34
+ setActive: "setActiveItem"
35
+ };
36
+ i.push({
37
+ type: "collection",
38
+ id: "content-items",
39
+ label: e.items.add?.label ?? "Items",
40
+ role: t.contentRole,
41
+ activeStateKey: r,
42
+ suggestClass: n?.suggestClass,
43
+ actions: a
44
+ });
45
+ }
46
+ return o && e.states && i.push({
47
+ type: "logic-states",
48
+ id: "logic-states",
49
+ label: "States"
50
+ }), a && i.push({
51
+ type: "settings",
52
+ source: "logic-schema"
53
+ }), i;
54
+ }
55
+ //#endregion
56
+ export { e as n, t };
@@ -0,0 +1,39 @@
1
+ import { t as e } from "./logic_role_kind-DV5olnbL.js";
2
+ //#region src/tab/editor/roles.ts
3
+ var t = {
4
+ Host: "tabs",
5
+ TabList: "tabList",
6
+ Tab: "tab",
7
+ PanelList: "panelList",
8
+ Panel: "panel"
9
+ };
10
+ t.TabList, e.Container, t.Tab, e.Repeatable, t.PanelList, e.Container, t.Panel, e.Repeatable;
11
+ //#endregion
12
+ //#region src/tab/editor/design_time.ts
13
+ var n = {
14
+ mode: "active-item",
15
+ activeIndexStateKey: "activeTabIndex",
16
+ items: {
17
+ label: { list: t.TabList },
18
+ content: {
19
+ list: t.PanelList,
20
+ hideInactive: !0
21
+ },
22
+ add: {
23
+ label: "Add tab",
24
+ name: "Tab {n}"
25
+ }
26
+ },
27
+ states: {
28
+ [t.Tab]: {
29
+ selected: {
30
+ marker: "aria-selected",
31
+ required: !0
32
+ },
33
+ hover: {}
34
+ },
35
+ [t.Panel]: { active: { automatic: !0 } }
36
+ }
37
+ };
38
+ //#endregion
39
+ export { t as n, n as t };
@@ -0,0 +1,47 @@
1
+ import { t as e } from "./logic_role_kind-DV5olnbL.js";
2
+ //#region src/slider/editor/roles.ts
3
+ var t = {
4
+ Host: "slider",
5
+ Wrapper: "wrapper",
6
+ Slide: "slide",
7
+ Pagination: "pagination",
8
+ PaginationDot: "paginationDot",
9
+ Prev: "prev",
10
+ Next: "next"
11
+ };
12
+ t.Wrapper, e.Container, t.Slide, e.Repeatable, t.Pagination, e.Control, t.PaginationDot, e.Repeatable, t.Prev, e.Control, t.Next, e.Control;
13
+ //#endregion
14
+ //#region src/slider/editor/design_time.ts
15
+ var n = {
16
+ mode: "active-item",
17
+ activeIndexStateKey: "activeSlideIndex",
18
+ items: {
19
+ content: {
20
+ list: t.Wrapper,
21
+ hideInactive: !0
22
+ },
23
+ markers: {
24
+ list: t.Pagination,
25
+ template: t.PaginationDot,
26
+ variables: ["slideIndex", "slideNumber"]
27
+ },
28
+ add: {
29
+ label: "Add slide",
30
+ name: "Slide {n}"
31
+ }
32
+ },
33
+ states: { [t.PaginationDot]: { selected: {
34
+ marker: "aria-current",
35
+ required: !0
36
+ } } },
37
+ controls: {
38
+ [t.Prev]: { disabled: { marker: "aria-disabled" } },
39
+ [t.Next]: { disabled: { marker: "aria-disabled" } }
40
+ },
41
+ chromeNavigation: {
42
+ prevRole: t.Prev,
43
+ nextRole: t.Next
44
+ }
45
+ };
46
+ //#endregion
47
+ export { t as n, n as t };
@@ -0,0 +1,7 @@
1
+ {
2
+ "quickpage": {
3
+ "id": "gallery",
4
+ "kind": "component",
5
+ "name": "gallery"
6
+ }
7
+ }