@activecollab/components 2.0.415 → 2.0.416
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/dist/cjs/components/PortableText/Styles.js +20 -2
- package/dist/cjs/components/PortableText/Styles.js.map +1 -1
- package/dist/cjs/components/PortableText/renderers.js +10 -4
- package/dist/cjs/components/PortableText/renderers.js.map +1 -1
- package/dist/cjs/components/PortableText/types.js +21 -2
- package/dist/cjs/components/PortableText/types.js.map +1 -1
- package/dist/cjs/components/PortableText/types.test.js +120 -0
- package/dist/cjs/components/PortableText/types.test.js.map +1 -1
- package/dist/cjs/presentation/shared/FeatureAvailability.js +217 -0
- package/dist/cjs/presentation/shared/FeatureAvailability.js.map +1 -0
- package/dist/cjs/presentation/shared/index.js +16 -1
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/esm/components/PortableText/Styles.d.ts +19 -1
- package/dist/esm/components/PortableText/Styles.d.ts.map +1 -1
- package/dist/esm/components/PortableText/Styles.js +20 -2
- package/dist/esm/components/PortableText/Styles.js.map +1 -1
- package/dist/esm/components/PortableText/renderers.d.ts.map +1 -1
- package/dist/esm/components/PortableText/renderers.js +10 -4
- package/dist/esm/components/PortableText/renderers.js.map +1 -1
- package/dist/esm/components/PortableText/types.d.ts +6 -1
- package/dist/esm/components/PortableText/types.d.ts.map +1 -1
- package/dist/esm/components/PortableText/types.js +17 -2
- package/dist/esm/components/PortableText/types.js.map +1 -1
- package/dist/esm/components/PortableText/types.test.js +120 -0
- package/dist/esm/components/PortableText/types.test.js.map +1 -1
- package/dist/esm/presentation/shared/FeatureAvailability.d.ts +52 -0
- package/dist/esm/presentation/shared/FeatureAvailability.d.ts.map +1 -0
- package/dist/esm/presentation/shared/FeatureAvailability.js +203 -0
- package/dist/esm/presentation/shared/FeatureAvailability.js.map +1 -0
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/index.js +51 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,4 +23,5 @@ export { UserMenu } from "./UserMenu";
|
|
|
23
23
|
export { TwoFactorShield } from "./TwoFactorShield";
|
|
24
24
|
export { BackupCodesDialogs, CreateLoginCodeDialogs } from "./TwoFactorDialogs";
|
|
25
25
|
export { SettingsHeader, SettingsContent, StyledSettingRow, RowText, SettingRow } from "./settings";
|
|
26
|
+
export { FeatureAvailability, DEFAULT_FEATURE_AVAILABILITY } from "./FeatureAvailability";
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["MainLogo","RoundAvatar","PresentationShell","StyledPagePaper","PageHeader","ProjectPageHeader","TabHeader","FloatingControls","MessageDialog","DocLinkContext","messageComponents","HelpAndSupportMenu","LinkingCommandsButton","LinkBranchOrPullRequestDialog","ConnectRepositoryDialog","RepositorySelect","buildRepoOptions","CONNECTIONS","PROJECT_REPOSITORIES","CONNECTABLE_REPOSITORIES","WebhookLogsDialog","WEBHOOK_CONNECTIONS","WEBHOOK_REPOSITORIES","SourceCodeSection","IssueRow","CodeRow","Spine","HistoryDialog","CompletedHeader","SuggestSubtasksButton","TaskOptionsMenu","TaskListOptionsMenu","UserMenu","TwoFactorShield","BackupCodesDialogs","CreateLoginCodeDialogs","SettingsHeader","SettingsContent","StyledSettingRow","RowText","SettingRow"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,SAASA,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,qBAAqB;AAExE,SAASC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,QAAQ,WAAW;AAMpE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SACEC,aAAa,EACbC,cAAc,EACdC,iBAAiB,QACZ,iBAAiB;AAMxB,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,6BAA6B,QAAQ,iCAAiC;AAE/E,SACEC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,EACXC,oBAAoB,EACpBC,wBAAwB,QACnB,2BAA2B;AAQlC,SACEC,iBAAiB,EACjBC,mBAAmB,EACnBC,oBAAoB,QACf,qBAAqB;AAO5B,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,OAAO,EACPC,KAAK,EACLC,aAAa,EACbC,eAAe,QACV,qBAAqB;AAU5B,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,mBAAmB;AAKxE,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,kBAAkB,EAAEC,sBAAsB,QAAQ,oBAAoB;AAK/E,SACEC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,OAAO,EACPC,UAAU,QACL,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["MainLogo","RoundAvatar","PresentationShell","StyledPagePaper","PageHeader","ProjectPageHeader","TabHeader","FloatingControls","MessageDialog","DocLinkContext","messageComponents","HelpAndSupportMenu","LinkingCommandsButton","LinkBranchOrPullRequestDialog","ConnectRepositoryDialog","RepositorySelect","buildRepoOptions","CONNECTIONS","PROJECT_REPOSITORIES","CONNECTABLE_REPOSITORIES","WebhookLogsDialog","WEBHOOK_CONNECTIONS","WEBHOOK_REPOSITORIES","SourceCodeSection","IssueRow","CodeRow","Spine","HistoryDialog","CompletedHeader","SuggestSubtasksButton","TaskOptionsMenu","TaskListOptionsMenu","UserMenu","TwoFactorShield","BackupCodesDialogs","CreateLoginCodeDialogs","SettingsHeader","SettingsContent","StyledSettingRow","RowText","SettingRow","FeatureAvailability","DEFAULT_FEATURE_AVAILABILITY"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\nexport {\n FeatureAvailability,\n DEFAULT_FEATURE_AVAILABILITY,\n} from \"./FeatureAvailability\";\nexport type {\n FeatureAvailabilityProps,\n AvailabilityRow,\n AvailabilityMark,\n AvailabilityStatus,\n} from \"./FeatureAvailability\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,SAASA,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,qBAAqB;AAExE,SAASC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,QAAQ,WAAW;AAMpE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SACEC,aAAa,EACbC,cAAc,EACdC,iBAAiB,QACZ,iBAAiB;AAMxB,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,6BAA6B,QAAQ,iCAAiC;AAE/E,SACEC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,EACXC,oBAAoB,EACpBC,wBAAwB,QACnB,2BAA2B;AAQlC,SACEC,iBAAiB,EACjBC,mBAAmB,EACnBC,oBAAoB,QACf,qBAAqB;AAO5B,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,OAAO,EACPC,KAAK,EACLC,aAAa,EACbC,eAAe,QACV,qBAAqB;AAU5B,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,mBAAmB;AAKxE,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,kBAAkB,EAAEC,sBAAsB,QAAQ,oBAAoB;AAK/E,SACEC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,OAAO,EACPC,UAAU,QACL,YAAY;AAEnB,SACEC,mBAAmB,EACnBC,4BAA4B,QACvB,uBAAuB","ignoreList":[]}
|
package/dist/index.js
CHANGED
|
@@ -25321,11 +25321,29 @@
|
|
|
25321
25321
|
})(["margin:0;border:none;border-top:1px solid var(--border-primary);"]);
|
|
25322
25322
|
StyledDivider.displayName = "StyledDivider";
|
|
25323
25323
|
|
|
25324
|
-
/**
|
|
25324
|
+
/**
|
|
25325
|
+
* The default `list` block; rendered as ul or ol through the `as` prop, and
|
|
25326
|
+
* tagged `data-portable-list` so the depth rules below scope to design-system
|
|
25327
|
+
* lists — a stray `<ul>`/`<ol>` from an injected renderer is left untouched.
|
|
25328
|
+
*
|
|
25329
|
+
* Nesting works structurally: each level is its own StyledList inside a parent
|
|
25330
|
+
* `<li>`, so it re-applies its own `padding-left` (indentation compounds) and,
|
|
25331
|
+
* for ordered levels, restarts numbering. A nested list carries no vertical
|
|
25332
|
+
* margin, so it hugs the item it belongs to.
|
|
25333
|
+
*
|
|
25334
|
+
* Both bullet and numbered levels change their marker by nesting depth, so
|
|
25335
|
+
* levels stay distinct even where the two interleave:
|
|
25336
|
+
* bullets disc → circle → square → (disc)
|
|
25337
|
+
* numbers decimal → lower-alpha → lower-roman → (upper-alpha)
|
|
25338
|
+
* Depth is counted from the list ancestors themselves (not per-tag), so an
|
|
25339
|
+
* intervening `<ol>` never throws off a `<ul>`'s depth and vice-versa. The
|
|
25340
|
+
* rules are ordered shallow-to-deep; a deeper rule is more specific, so it
|
|
25341
|
+
* wins the cascade for the levels it applies to.
|
|
25342
|
+
*/
|
|
25325
25343
|
var StyledList$1 = styled__default["default"].ul.withConfig({
|
|
25326
25344
|
displayName: "Styles__StyledList",
|
|
25327
25345
|
componentId: "sc-1fss4z4-5"
|
|
25328
|
-
})(["margin:0;padding-left:", ";list-style:", " outside;li + li{margin-top:", ";}"], "1.25rem", function (_ref) {
|
|
25346
|
+
})(["margin:0;padding-left:", ";list-style:", " outside;li + li{margin-top:", ";}& ul[data-portable-list]{list-style-type:circle;}& ol[data-portable-list]{list-style-type:lower-alpha;}& [data-portable-list] ul[data-portable-list]{list-style-type:square;}& [data-portable-list] ol[data-portable-list]{list-style-type:lower-roman;}& [data-portable-list] [data-portable-list] ul[data-portable-list]{list-style-type:disc;}& [data-portable-list] [data-portable-list] ol[data-portable-list]{list-style-type:upper-alpha;}"], "1.25rem", function (_ref) {
|
|
25329
25347
|
var $ordered = _ref.$ordered;
|
|
25330
25348
|
return $ordered ? "decimal" : "disc";
|
|
25331
25349
|
}, SPACE.xs);
|
|
@@ -25360,6 +25378,12 @@
|
|
|
25360
25378
|
|
|
25361
25379
|
/** 1 maps to Title1, 2 to Title2, 3 to Header2 typography. */
|
|
25362
25380
|
|
|
25381
|
+
/**
|
|
25382
|
+
* A list item's children are its own spans first, then any nested `list`
|
|
25383
|
+
* block(s) — the shape that carries multi-level lists. A spans-only item (no
|
|
25384
|
+
* nested list) is the common, flat case and stays valid unchanged.
|
|
25385
|
+
*/
|
|
25386
|
+
|
|
25363
25387
|
/** Screenshots render framed (border, no shadow); illustrations render flat. */
|
|
25364
25388
|
|
|
25365
25389
|
/**
|
|
@@ -25458,10 +25482,23 @@
|
|
|
25458
25482
|
switch (value.type) {
|
|
25459
25483
|
case "paragraph":
|
|
25460
25484
|
case "heading":
|
|
25461
|
-
case "list-item":
|
|
25462
25485
|
return Array.isArray(value.children) && value.children.every(isPortableTextSpan);
|
|
25486
|
+
case "list-item":
|
|
25487
|
+
// The item's spans, plus optional nested `list` block(s). Widened only
|
|
25488
|
+
// for nested lists: any other block child (a stray paragraph, an object)
|
|
25489
|
+
// still fails, so a serializer bug is caught here, not at render.
|
|
25490
|
+
return Array.isArray(value.children) && value.children.every(function (child) {
|
|
25491
|
+
return isPortableTextSpan(child) || _isPortableTextBlock(child) && child.type === "list";
|
|
25492
|
+
});
|
|
25463
25493
|
case "list":
|
|
25464
|
-
|
|
25494
|
+
// A list holds `list-item`s only. A sublist emitted as a sibling of the
|
|
25495
|
+
// items (the classic half-implemented-nesting bug) renders invalid HTML
|
|
25496
|
+
// — <ul> with a direct <ul> child — so it fails here, not at render.
|
|
25497
|
+
// `list-item` is validated but sits outside the PortableTextBlock union,
|
|
25498
|
+
// so the discriminator is checked before isPortableTextBlock narrows it.
|
|
25499
|
+
return Array.isArray(value.children) && value.children.every(function (child) {
|
|
25500
|
+
return isRecord(child) && child.type === "list-item" && _isPortableTextBlock(child);
|
|
25501
|
+
});
|
|
25465
25502
|
case "media":
|
|
25466
25503
|
return typeof value.src === "string";
|
|
25467
25504
|
case "titled-text":
|
|
@@ -25671,10 +25708,16 @@
|
|
|
25671
25708
|
var block = _ref8.block,
|
|
25672
25709
|
children = _ref8.children;
|
|
25673
25710
|
var ordered = block.style === "number";
|
|
25674
|
-
return
|
|
25675
|
-
|
|
25676
|
-
|
|
25677
|
-
|
|
25711
|
+
return (
|
|
25712
|
+
/*#__PURE__*/
|
|
25713
|
+
// `data-portable-list` scopes the depth-marker rules in Styles.ts to
|
|
25714
|
+
// design-system lists, and marks the ancestors those rules count.
|
|
25715
|
+
React__default["default"].createElement(StyledList$1, {
|
|
25716
|
+
as: ordered ? "ol" : "ul",
|
|
25717
|
+
$ordered: ordered,
|
|
25718
|
+
"data-portable-list": ""
|
|
25719
|
+
}, children)
|
|
25720
|
+
);
|
|
25678
25721
|
},
|
|
25679
25722
|
"list-item": function listItem(_ref9) {
|
|
25680
25723
|
var children = _ref9.children;
|